Footer Preview in Pro not showing changes

I have created a footer in PRO.

I have followed the advice in this post

The front end looks find - and shows if I enter the footer - but does NOT show if I edit.

I have read that inline JS breaks the builder preview - is this the case here?

I have deactivated all plugins and this is still an issue - so no plugin conflict, also Chrome does not show any console errors.

If this is a known issue, when will this be fixed?

This is my URL

Hello @shamrockoz,

Thanks for asking and I am sorry to hear that Pro editor is not working properly. Let me suggest you some solutions that you can try out:

  1. On the website I see that you have activated minification feature using WP Rocket plugin. Can you please turn off minification and then try making changes in Pro Theme?
  • Ensure everything is up to date according to our version compatibility list here. Please follow the best practices when updating your theme and plugins. Click here for more information.
  1. Test for a plugin conflict. You can do this by deactivating all third-party plugins, and see if the problem remains. If it’s fixed, you’ll know a plugin caused the problem, and you can narrow down which one by reactivating them one at a time.
  2. Remove custom CSS and Javascript from the options or Child Theme and test the case.
  3. Reset your htaccess file by renaming it to .htaccess-bak. Then in WP Admin Menu, go to Settings > Permalinks and just click the Save Changes button.
  • Make sure that you’re running at least PHP v5.6.x or later to avoid any WordPress related incompatibility issues. If you’re not sure what your server configurations and settings are, install a plugin like WP-Serverinfo (https://wordpress.org/plugins/wp-serverinfo/) and check your server info by head over to Dashboard -> WP Serverinfo area.
  • Check your PHP Max Execution Time and set it for 300 for optimal usage.
  • Try increasing your PHP Memory limit. You can do this by editing your wp-config.php file which can be located under the root of your WordPress installation.

Add the following lines into that file.

define( 'WP_MEMORY_LIMIT', '512M' );
define( 'WP_MAX_MEMORY_LIMIT', '512M' );

You can add it before the line
/*That's all, stop editing! Happy Blogging. */

If you still have problems kindly get back to us with the result of the steps above and URL/User/Pass of your WordPress dashboard using the Secure Note functionality of the post to follow up the case. Also can you please give us to the permission to troubleshoot the problem? We may have to perform some tests on the website which may effect the performance, appearance, layout and functioning of website temporarily.

Thank you.

@Prasant,

Most of which you request, updates, plugins were tested prior to the ticket creation.

I have done what you asked for, PHP version, Max limit etc.

  1. This is where I have a concern. The text for this is created via the following JS ( in the footer JS ) + Footer CSS - so the actual content within the content area / text box is null - no text

jQuery(function($) {
var $Year = new Date().getFullYear()
$(’.x-colophon .copyright’).html(“© 2004 - “+$Year+” G3 WebSolutions LLC”);
});

So, perhaps, within the builder it is a case that the previewer has an issue rendering this. On the front end it’s all good.

I will supply my details in terms of how to access the dev site and you can sleuth around. So, the issue is

Front End - displays fine

Footer Editor

  1. If you just click ( not EDIT ) on the Global Footer ( G3 Footer ) - you see the JS show correctly for the content area / text elements clearly. Obviously, I only want just one element - having both is just for test purposes
  2. Ok - now click edit - and the JS result is now blank - and that is my concern.

Hello There,

I have edited your footer and I can confirm that the content area or text element return null.

If you have inserted a custom html with the JS code in it, the preview was broken because of the script. The text element is meant to display text and the content area may accept html contents. JS code should not be inserted in any of those elements to prevent any issue. JS code may be used within a raw content element only which is currently not available in the builder. Raw content element will be added in the builder soon since this is one of our enhancement request.

I would highly suggest that instead of using JS code, create a year date shortcode and you may use it along with the footer text. For more help, check this out: https://css-tricks.com/snippets/wordpress/year-shortcode/

Hope this helps.

So we are clear - none of these elements have the JS code in them.

The JS code ( as per my 1st post ) is placed with the Footer JS. The only thing present in these elements is CSS class.

So it seems that the builder preview breaks because of the Footer inline JS code? This is an issue with the builder then.

This needs to be fixed as it should NOT behave this way. If it works in the front end - it should work in the back end.

I have no need for a raw element as I am not inserting any code into the element.

Hello There,

I have checked again your footer and I can see the JS code added in the custom JS section. Your script will not work in the preview because the builder will prevent it from working to avoid any conflict or issues with the builder. In most cases, JS errors generate with the custom JS will halt the preview and the builder from working which is why any custom JS is prevented to run.

Hope this helps.

Hi,

I fashioned a solution from shortcodes as you suggested.

Thank you.

Hey There,

It’s good to know that the year shortcode works out for you.
We appreciate for letting us know.

Best Regards.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.