Support #9878
closedPopup Maker plugin problems
0%
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
Updated by Matt Gold over 6 years ago
- Status changed from New to Assigned
- Assignee set to Boone Gorges
Updated by scott voth over 6 years ago
I did notice this - https://github.com/PopupMaker/Popup-Maker/issues/270
Updated by Boone Gorges over 6 years ago
- File Screenshot_2018-06-04_13-21-49.png Screenshot_2018-06-04_13-21-49.png added
- File Screenshot_2018-06-04_13-19-22.png Screenshot_2018-06-04_13-19-22.png added
- File Screenshot_2018-06-04_13-25-17.png Screenshot_2018-06-04_13-25-17.png added
- Assignee changed from Boone Gorges to Raymond Hoh
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.
Updated by Raymond Hoh over 6 years ago
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.
Updated by Boone Gorges over 6 years ago
- 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.
Updated by Raymond Hoh over 6 years ago
- Target version deleted (
1.13.3)
Yeah, you could also just disable Shortcake.
The problem with that is Shortcake is manually included with BP Event Organiser's Group Events shortcode plugin:
https://github.com/cuny-academic-commons/bp-event-organiser/blob/1.1.x/bp-event-organiser-group-widget.php#L119
And that the Group Events shortcode plugin is network-activated, so it's not possible for a regular site admin to disable this plugin.
Updated by Raymond Hoh over 6 years ago
- Target version set to 1.13.3
Oops, didn't mean to remove the Target version field!
Updated by scott voth over 6 years ago
Looks good and working now. I have notified Sam Ghelli - Thanks!
Updated by Boone Gorges over 6 years ago
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!