Support #9878
closed
Popup Maker plugin problems
Added by scott voth over 6 years ago.
Updated over 6 years ago.
Category name:
WordPress Plugins
Description
There seems to be issues with the Popup Maker plugin on the Commons. I tested it on a non-Commons site and it works quite differently (and nicely).
First - after you create up a popup and then go to a page where you want to use it, there is a new tool bar icon. When you click on it, it creates a drop down of two items (Triggers and Subscription Form). Neither of these are working. On my non-Commons site, clicking on Trigger opens up a dialog where you can select which popup you want and whether you want a hyperlink or button trigger.
I got around this by creating a button and using the class, but I notice the first time the page loads, you see the popup content in the footer. See - https://ivanhoetest.commons.gc.cuny.edu/sample-page/ - (has just the one plugin and default theme)
Second - there are five themes for the popup's look and feel - none of them seem to work.
I have attached some screenshots. Thanks!
Files
- Status changed from New to Assigned
- Assignee set to Boone Gorges
Ray, could you please have a look?
The first issue is a JS error related to shortcode-ui. I don't know enough about how this plugin registers TinyMCE views, so it would likely require me to dig into the TinyMCE internals to figure it out. Ray, I seem to remember that you might've spent a bit of time with shortcode-ui in the past, so maybe you'll have a better idea where to look?
The second issue appears to be that the popup-maker plugin is generating dynamic CSS, but it's not being loaded and interpreted as CSS by the browser. Kind of a guess, but I'm wondering if this has something to do with the way the style URL is generated by the plugin - look at the format in the screenshot (the encoded ampersand). Not sure why this would come up only on the Commons.
I spent half an hour trying to debug the JS, but I'm also not well-versed with what PP is doing with TinyMCE views and Shortcake. I've created an issue on their Github repo here.
A workaround is to go to "Popup Maker > Settings > Misc" and check the "Disable the Popup Maker shortcode button" option. This will remove the TinyMCE button. (Can also be done via code with add_filter( 'pum_disable_shortcode_ui', '__return_true' );
)
Shortcodes can still work normally by manually typing in the shortcode. The documentation for this is available here:
https://docs.wppopupmaker.com/article/153-shortcode-button
Here's a screenshot that I copied from their documentation:
About the CSS serving as text/plain
, could this be an Apache configuration problem? The generated CSS is working locally for me.
- Status changed from Assigned to Resolved
- Target version set to 1.13.3
Yeah, you could also just disable Shortcake. It seems like the plugin is trying to integrate with Shortcake, but the integration is broken. I just spent my own half hour but didn't get close to understanding what's going on :)
On Ray's suggestion, I took a deeper look at the Content-Type declaration for the CSS file and realized that our custom cac-files.php was to blame. The popup-maker plugin (correctly!!) puts generated CSS files into the uploads directory, but our /files/ handler was written in such a way that it wouldn't properly identify files with MIME types that aren't on the upload whitelist. I've corrected it in https://github.com/cuny-academic-commons/cac/commit/7fd80847403d0380e48c07ce21226f507b97976e, which is live as a hotfix.
I'm going to mark this resolved, because we don't have the resources to debug the popup-maker Shortcake integration any further. Scott, please let us know if you have more issues.
- Target version deleted (
1.13.3)
- Target version set to 1.13.3
Oops, didn't mean to remove the Target version field!
Looks good and working now. I have notified Sam Ghelli - Thanks!
Ah right, Ray. You're correct. Disabling the popup seems fine for now. We could also look into disabling the Shortcake integration (which still allows the TinyMCE button - just not the live preview, if I understand it correctly.) But this is not critical.
Thanks for following up, Scott!
Also available in: Atom
PDF