• Resolved Eusebiu Oprinoiu

    (@eusebiuoprinoiu)


    Hello!

    I don’t know if you’re aware, but HappyFiles and Imagify don’t work well together.
    When you access the Media Library, everything works as it should, but as soon as you click on one of the categories created by HappyFiles, things start to break:
    – the View details toggle from Imagify is always expanded and clicking it doesn’t work properly (you must click multiple times on it to work)
    – the Compare Original vs Optimized button from Imagify doesn’t work

    (the javascript console log is full of errors)

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Codeer

    (@codeer)

    @eusebiuoprinoiu I wasn’t aware of this Imagify issue. Thank you for reporting it. I am going to have a look and let you know about my findings.

    Plugin Author Codeer

    (@codeer)

    All right, here are my findings so far:

    When using the latest version of HappyFiles (1.0.1) there should be no more error in the console when using it alongside Imagify.

    The “Compare Original vs. Optimized” button works fine in the grid view.

    The “View details” button works fine for me in list view.

    I can confirm that the “Compare Original vs. Optimized” text link doesn’t show the Imagify modal after browsing to a different HappyFiles category. The reason for that is that the list view in WordPress doesn’t work with AJAX as the grid view does.

    HappyFiles imitates an AJAX-like reload by fetching the results from the applied filters and replacing the list view HTML of the current page. In that case Imagify would need to be re-initialised with a manual page reload.

    Unfortunately Imagify doesn’t provide a globally available function that I could add to HappyFiles.

    Would it be okay for you to manually reload the page or should we add a setting to disable the AJAX-like reload in the list view, so a proper page reload happens, which should initialise Imagify properly.

    Please also make sure to update HappyFiles and let me know if you still receive any errors in your console. If so, could you email me a screenshot, so I can see exactly what those errors say?

    Thread Starter Eusebiu Oprinoiu

    (@eusebiuoprinoiu)

    Hello, Codeer!

    No errors or warnings are displayed with the latest version.
    However, the “View details” button doesn’t work as expected. It only works as expected if you don’t navigate between categories. If you do, the details are expanded (not hidden as they should be) and in order to toggle them, you must click multiple times.

    As far as I can tell, the ul#imagify-view-details-[ID] should have an inline style=”display: none;” added by default that gets removed via JavaScript when you click on the “View details” button, but that doesn’t happen when you navigate between categories. The issue is probably caused by the use of AJAX in HappyFiles as you said.

    It would be nice to have the option to disable the AJAX reload on the List view, but keep it on the Grid view. (I haven’t tested, but I’m guessing other plugins are affected by this as well if they use JavaScript to dynamically change the markup via JavaScript on the Media Library page)

    Plugin Author Codeer

    (@codeer)

    Hi @eusebiuoprinoiu,

    I just reached out to the Imagify support to see if there is a way to reload Imagify without having to reload the entire page. I will get back to you as soon as I hear from them.

    Best,
    Thomas

    Plugin Author Codeer

    (@codeer)

    Hi @eusebiuoprinoiu,

    I did not hear back from the Imagify team. So I went ahead and added a new settings under “Settings > HappyFiles” named “Disable AJAX (List View)”.

    This is a new setting that ships with the latest version (1.1.1), which I just released.

    It reloads the media library page when using the pagination or switching categories, thus reinitialising all scripts of plugins like Imagify, etc. (that alter the media library list view).

    Enjoy!

    Thread Starter Eusebiu Oprinoiu

    (@eusebiuoprinoiu)

    Hello, Thomas!
    I’ve seen the update and it works great! ??
    Thank you very much for the fix…

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Conflict between HappyFiles and Imagify’ is closed to new replies.