Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

osTicket v1.10 (stable) and Maintenance Release v1.9.15 are now available! Go get it now

Annoying problems

Hello everyone,

I've got two annoying problems:

a) When I click on a ticket the loading bar (orange one) freezes in about half way. If I reload the page (F5 in browser) the page os loaded without any problem.

b) I can not attach any files to a ticket reply. When I click to select files the page is scrolled to the page beginning and no dialog is shown.

I'm using version v1.10 (901e5ea) [Apache/2.4.6 (CentOS) OpenSSL/1.0.1e-fips PHP/5.6.31 and MySQL 5.7.19] and latest Chrome version.

Using Chrome console I found this on tickets.php:10

Uncaught SyntaxError: Unexpected token ,
    at eval (<anonymous>)
    at jquery-1.11.2.min.js:2
    at Function.globalEval (jquery-1.11.2.min.js:2)
    at m.fn.init.domManip (jquery-1.11.2.min.js:3)
    at m.fn.init.append (jquery-1.11.2.min.js:3)
    at m.fn.init.<anonymous> (jquery-1.11.2.min.js:3)
    at m.access (jquery-1.11.2.min.js:3)
    at m.fn.init.html (jquery-1.11.2.min.js:3)
    at m.fn.init.options.success (jquery.pjax.js:271)
    at j (jquery-1.11.2.min.js:2)

Anyone solved this?
Tagged:

Comments

  • Digging deeper the piece of code with problem is:

     <script type="text/javascript">
            $(function(){$('#aa742f457fb822aa7e54d9 .dropzone').filedropbox({
              url: 'ajax.php/form/upload/attach',
              link: $('#aa742f457fb822aa7e54d9').find('a.manual'),
              paramname: 'upload[]',
              fallback_id: 'file-aa742f457fb822aa7e54d9',
              allowedfileextensions: [],
              allowedfiletypes: [],
              maxfiles: 20,
              maxfilesize: 0,25,
              name: 'attach:response[]',
              files: []        });});
            </script>

    Notice the line:

              maxfilesize: 0,25,

    The syntax is wrong.
  • That looks like it's for a custom form element. Do you have any of those? 
  • Grizly,

    Thanks for your comment.

    I'm afraid not. It is some related to maxfilesize.
  • Hi Everyone,

    The problem is on this line:

              maxfilesize: <?php echo $maxfilesize; ?>,

    The thing is that $maxfilesize is computed from a division up in the code. I'm using a localized PHP that uses comma (,) as decimal point. Replaced that line with:

              maxfilesize: <?php echo str_replace(',','.',$maxfilesize); ?>,

    and voilà! All works now.

    Pedro
  • Great find mate! 
    Never would have thought of that. I suggest submitting a pull request, as others might be affected, at least you will be when the next upgrade comes out.
  • He opened an issue instead of a pull request.
Sign In or Register to comment.