Skip to content
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

When using a shortcode in a popup, only the shortcode displays in Preview. #41

Closed
mrjonwilson opened this issue Mar 16, 2015 · 1 comment

Comments

@mrjonwilson
Copy link

When using a shortcode to display content such as a contact form, the form does not show in dashboard Preview mode. Only the shortcode itself is shown. However, when viewing the popup on the frontend, it displays correctly. This could be confusing to customers, making them think their shortcode or popup is not working.

Tested with Contact Form 7 and Gravity Forms.

@danieliser
Copy link
Member

Hmm, i know what the problem is but we may not be able to do much about it. Gravity forms for instance renders a message that the form doesn't exist. I have a feeling that in these cases they don't render the shortcode properly when requested from admin pages. Basically when is_admin returns true the shortcodes are not registered or disabled by default. There may be a filter I can set that will fix this in one shot. Will take some research and testing for sure.

Will put in a support ticket with CF7 to see how they are set up and find a way to bypass it. My thought tthough is in order for that to work exactly as it would in the front, I would end up hacking together a solution for each plugin that a user reported. This is because I would need to load CSS for the form as well, but that would end up being a messy solution.

May be best to just let users know that the preview won't properly display all shortcodes as some shortcodes require much more than just the rendered html, such as JS and CSS, and other shortcodes are not allowed to be rendered in admin by their respective plugins.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants