-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Brower Compatibility (osTicket v1.17 PHP8.0 with attachment_preview plugin ) #59
Comments
The important feature for me on this plug-in is the audio player . I'm not sure why the audio player is not working. |
I hope this plug-in gets an update. I will wait for the update. I did find the issue in thread-entry.tmpl.php, starts at line 98 class="attachments" |
@ Bugoy : What workaround did you use? I got attachment_preview to install on PHP 8.0 and OSTicket 1.17.2 (in WAMP), but I can not get a player to come up for MP3 attachments. Unfortunately the MP3 attachments (voicemail attachments from our phone system sent as email attachments) are the only ones I really care about from this plug-in. Without it, OSTicket is nowhere near as useful as it is with it. Hoping it is a simple fix. |
I did some further testing. PDFs and Images open with the plug-in just fine. Neither the audio or video player will appear. Is this some restriction within OSTicket that prevents an external player? Something within OSTicket that needs to be enabled? |
I compared the page source for the ticket view page for a ticket w/ attached MP3 file on our old (OST 1.15.2, PHP 7.4.2, old version of attachment-preview) and new, migrated (OST 1.17.2, PHP 8.0.25, new version of attachment-preview). The If I created a test.php file that was the page source from the new server (no player) and manually inserted the code for the player (changing the ID items to match the database key in the new install), then opened that test.php from the new WAMP stack (copied test.php to ./ost/scp/, then navigate to https:///scp/test.php), the mp3 player was there, and would play the file. So, it appears that the issue is not with the new stack, but with the code not being inserted by the plug-in. I'm hoping the plug-in can get fixed (or the offending change in OSTicket can be identified). It is a key to productivity in OSTicket (this really should be part of core functionality, so I greatly appreciate your work in making this available). |
The plug-in does not seem to be paying attention to the settings. I unchecked the 'Inline PDF files as s:', then restarted the services, and the ticket will still display a pdf attachment inline, even though it has been told not to. |
File AttachmentPreviewPlugin.php If I comment out lines 391, 392 and 393 (after the listing of allowed file extensions, these lines appear to check if extension is allowed in config before putting them into $allowed_extensions) then the mp3 attachment player appears. It doesn't allow the player for mp4, but we rarely if ever get video sent to us. This doesn't get to why the config is not getting consulted, but it at least gets us the mp3 player we need. (starting at line 390) |
Addendum: The .mp4 problem was because the video was larger than the 1024 kb max limit (and since the plugin does not seem to be checking for values, I couldn't raise the limit). I did find/make a video that was small enough to test with, and the video player will work with the revised AttachmentPreviewPlugin.php from the previous post. |
FWIW commenting out lines 276 through 291 gets rid of the size check if you need greater than 1024 kb. // if ($size_limit) { |
Hi,
I like this plug-in since it was released and my current osTicket is V1.14.3. Everything is working fine. I can play the audio from the ticket and view files from the ticket.
I am forced to update to v1.17 due to MS OAuth2 but before updrading. I setup a new server to test all the plugin and mods I made for osTicket.
My main browser and all users main browser is Chrome with the latest update and I too have an issue with PDF viewing and Audio with no player. Long store short see below.
Chrome: Can view PDF View and No audio player
Edge: Can view PDF and No audio player
Safari: Can view PDF and No audio player
The text was updated successfully, but these errors were encountered: