[Resolved] Display Error in Ticket Overview

    • June 10, 2019 at 11:28 pm #4625
      R
      fachmarkt
      Participant

      osTicket v1.12 // osTicket-1.12-Awesome-104<br />
      PHP 5.6.40 // MySQL 5.7.26 // Apache web server

      I get following error code in new version:

      “” ); $( “table.list.queue.tickets a.preview” ).wrap( “<br />
      ” ); function myFunction(x) { if (x.matches) { // If media query matches $( “tbody tr” ).wrapInner( “”); $(‘td.osta_priority.osta_priority_low’).closest(‘tr’).addClass(“priority-low”); $(‘td.osta_priority.osta_priority_normal’).closest(‘tr’).addClass(“priority-normal”); $(‘td.osta_priority.osta_priority_high’).closest(‘tr’).addClass(“priority-high”); $(‘td.osta_priority.osta_priority_emergency’).closest(‘tr’).addClass(“priority-emerency”); $(‘.overdueTicket’).closest(‘tr’).addClass(“overdue”); $( “.overdue td.osta_ticket” ).append( “<br />
      <br />
      ” ); $(‘.paperclip’).closest(‘tr’).addClass(“paperclip-icon”); $( “.paperclip-icon td.osta_ticket” ).append( “<br />
      <br />
      ” ); $(‘tr’).each(function() { var $this = $(this), $href = $this.find(‘.pull-right’), $target = $this.find(‘td.osta_ticket’); $href.appendTo($target); }); } else { ; } } var x = window.matchMedia(“(max-width: 760px)”) myFunction(x) // Call listener function at run time x.addListener(myFunction) // Attach listener function on state changes jQuery(“.truncate”).each(function(i, value) { var $link = jQuery(value); var text = $link.text(); if(text.length > 55) { $link.text(text.substring(0, 55) + “…”); } });”

    • June 11, 2019 at 12:34 am #4626
      S
      techcare
      Participant

      Hey mate. Just purchased and started running osTicket Awesome myself. But curiously did you try the following:

      1. Clear cache (or better yet use Incognito (most browsers support this now))
      2. Run your osTicket with PHP v7.2

      Best regards,

      Hope you get it sorted.

      Steve

    • June 11, 2019 at 2:56 am #4628
      E
      Aliplast
      Participant

      Hi, I’ve got the same problem.

      Installation is running on php 7.2

    • June 11, 2019 at 3:07 am #4629
      S
      techcare
      Participant

      If you have Google Chrome do the following:

      1. On the page with the issues
      2. Click the 3 dots top right
      3. Hover over “More Tools”
      4. Click “Developer Options”
      5. On the tabs available click “Console”
      6. What error messages show up there if any?

      Also do you have any PHP error logs?

      Have you tried Chrome’s Incognito option?

    • June 11, 2019 at 9:29 am #4634
      stevland
      Keymaster

      Thank you for the reports, @fachmarkt and @Aliplast.

      I am trying to figure out what could be causing this on your end. Unfortunately I can’t reproduce the issue on my end.

      Thanks to @techcare we have ruled out PHP version as the cause.

      I notice that you are both using language packs. But I don’t have the same error while using Dutch in Chrome, Opera, Firefox, Edge or Safari.

      Can either of you tell me if you see the error in this demo?

      Any additional information is appreciated.

    • June 11, 2019 at 10:46 am #4635
      stevland
      Keymaster

      Hi guys,

      Please right-click and download this file. Upload it to /include/staff/templates.

      Let me know if it fixes the issue on your end. 

      Thank you!

    • June 11, 2019 at 12:12 pm #4637
      R
      fachmarkt
      Participant

      Hi Stevland,

      at your demo site theres no error. Works perfect there.

      At my installation i am using the german language pack.

      And… unfortunetely i cannot donwload the php file.  https://osticketawesome.com/wp-content/uploads/queue-tickets.tmpl.php

      I get just a server error message ;-/

    • June 11, 2019 at 12:51 pm #4638
      stevland
      Keymaster

      Yes, there are no errors in the demo installation even when using the German language pack. 😐

      Please right click on the link to download.

      • June 11, 2019 at 11:50 pm #4642
        E
        Aliplast
        Participant

        FYI
        The demo site looks fine …

    • June 11, 2019 at 12:58 pm #4639
      stevland
      Keymaster

      I emailed a copy of the file to both of you to be certain.

    • June 11, 2019 at 11:48 pm #4641
      E
      Aliplast
      Participant

      Hi Stevland, thanks for the quick feedback.

      I also cannot download the .php file and there was no attachment on your mail.
      Perhaps it is blocked by our firewalls.  Can you attach it as a zipped file?

    • June 11, 2019 at 11:55 pm #4643
      R
      fachmarkt
      Participant

      Hi stevland, thank you for sending the file by email. 

      I copied to the folder, the old file was overwritted by this new one… but, i have the same error… it doesn’t help ;-/

    • June 11, 2019 at 11:57 pm #4644
      R
      fachmarkt
      Participant

      And i also installed PHP 7.2 on my server… without any effect also.

    • June 12, 2019 at 12:20 am #4645
      R
      fachmarkt
      Participant

      And if this can help you: The Google Developer Console says: Uncaught SyntaxError: Invalid or unexpected token tickets.php:766 Uncaught SyntaxError: Invalid or unexpected token

    • June 12, 2019 at 3:54 am #4647
      E
      Aliplast
      Participant

      Maybe this can help?

    • June 12, 2019 at 12:17 pm #4650
      stevland
      Keymaster

      Thank you for the screenshot, @Aliplast. But unfortunately it has only made me more confused! (⊙_⊙)

      I can’t see anything terribly wrong with the code. I don’t know why it is marked red by Chrome’s Dev Tools while the rest of the jQuery code is not.

      Also, there is no file named “tickets.php”. Indeed, a file by that name is nowhere to be found in my own Dev Tools.

      I notice your IP address is 10.10.0.81. That means that you are connected to a VPN. Is it possible to disconnect from the VPN and connect to your osTicket Awesome installation directly? 


      @fachmarkt
      are you using a VPN?

      I’d like to figure out what is going on. I would really appreciate it if one or both of you could create a temporary agent account (Admin Panel > Agents > Add New Agent) for me using info@osticketawesome.com. Be sure to give the account full administrative privileges.

    • June 12, 2019 at 7:31 pm #4660
      S
      techcare
      Participant

      Are you sure @stevland ??

      I have 2x tickets.php files:

      One is stored in /support/scp/tickets.php

      The other is stored in /support/tickets.php

      * /support/ is the location of osTicket install

    • June 13, 2019 at 12:06 am #4662
      E
      Aliplast
      Participant

      Hi, our installation is on an internal network so no exposure to the outworld …
      + same remark as @techcare concerning the tickets.php files

    • June 13, 2019 at 6:42 am #4664
      R
      fachmarkt
      Participant

      @fachmarkt are you using a VPN?, no we are not. I also checked our ticket system at several offices in several areas. The problem is still the same…

      You have received a login email… 

      Thank you very much in advance!

    • June 13, 2019 at 2:07 pm #4675
      stevland
      Keymaster

      @techcare,

      Fair enough. I shouldn’t have said that there is no file named tickets.php. What I should have said is that the code in @Aliplast’s screenshot is from a file named queue-tickets.tmpl.php. Perhaps tickets.php parses that file. 

      In any event, the main point I was trying to make is that I cannot get locate the same file/code within the Sources tab of Dev Tools. Can you?

      It may be a moot point. It is just another odd aspect of this situation and I was thinking out loud.

    • June 13, 2019 at 2:11 pm #4676
      stevland
      Keymaster

      @fachmarkt,

      Unfortunately I cannot log into your installation. I received this really weird email from your osTicket today:

    • June 18, 2019 at 10:58 am #4698
      stevland
      Keymaster

      I’m at a bit of a standstill with this one, guys, but I’m still keen to figure it out.


      @fachmarkt
      have you had a chance to figure out why your system is sending emails in the wrong format?

    • June 19, 2019 at 12:23 am #4704
      R
      fachmarkt
      Participant

      Hi Stevland,

      no, until now not. But i will send you an email with User Login + PW later.

      So you can login at our system.

      Thank you in advance

    • June 19, 2019 at 1:59 am #4706
      E
      Aliplast
      Participant

      OK, tx
      keep me posted and let know if you need more input from me

    • June 19, 2019 at 6:50 pm #4707
      stevland
      Keymaster

      @fachmarkt. I was able to successfully access your osTicket Awesome installation and track down the source of the issue. Thank you.

      You are using the attachment_preview plugin. When the plugin is disabled, the issue is not present.

      I have opened a GitHub issue with the plugin developer in the hope that he’ll have an idea as to what the conflict may be.


      @Aliplast
      , I am assuming that you are using the same plugin, yes?


      @fachmarkt
      I left the plugin disabled in your installation. If you wish to re-enable it you can do so by going to Admin Panel > Manage > Plugins.

    • June 20, 2019 at 3:15 am #4712
      R
      fachmarkt
      Participant

      Thank you so much, stevland. 😉

      That was easy … 

      But now i think we have new issue in our system…

      I cannot click the Topics we can see in black color… whats going wrong here?

       

    • June 20, 2019 at 8:52 am #4714
      stevland
      Keymaster

      @fachmarkt

      That was easy … 

      Easy for you. : P

      I cannot click the Topics we can see in black color… whats going wrong here?

      I don’t know. Are those tickets from a different source than the others (such as email)?

      Do you still have a backup of your original osTicket directory to compare? If yes, what is the URL please?

      For example, if your osTicket was originally https://mydomain.com/support, then the first step in the osTicket Awesome installation instructions is to rename it to https://mydomain.com/support-old.


      BTW (in case you haven’t realized this yet), you can still click on the Ticket # for now to view the ticket.

    • June 21, 2019 at 6:11 am #4716
      S
      ITmgmt
      Participant

      I can confirm the attachment plugin as the cause of this error. I was seeing the same code after viewing a ticket & then browsing back to the agent panel / ticket overview. After disabling the plugin the error messages are gone.

    • June 21, 2019 at 8:22 am #4717
      stevland
      Keymaster

      @ITmgmt Thank you for confirming this.

    • June 21, 2019 at 8:27 am #4718
      stevland
      Keymaster

      @fachmarkt,

      I figured out what is going on with your second issue.

      All of the ticket subjects that have lost their link are really long and have been truncated using jQuery.

      Unfortunately, for whatever reason, the jQuery is behaving differently within your installation and is stripping away the anchor tags.

      It is a really easy fix.

      Open /include/staff/templates/queue-tickets.tmpl.php and change line 355 from

      jQuery(".truncate").each(function(i, value) {

      to

      jQuery(".truncate a").each(function(i, value) {

    • June 22, 2019 at 4:48 am #4719
      R
      fachmarkt
      Participant

      @stevland

      Yes, i have a backup of my osticket installation, but it was just local.

      Now i have tried you jquery fix and it workus just perfect.

      Many thanks again for your fast help and solution.

      👌

       

    • June 24, 2019 at 6:08 pm #4724
      stevland
      Keymaster

      Thank you for giving me access to your installation, @fachmarkt!

You must be logged in to reply to this topic.