Accordion Shortcode won't open after upgrade

I have a custom plugin that uses an accordion shortcode, and when I upgraded to Cornerstone 5.0.10, the accordion will no longer open or close. I looked into using the new Global Blocks, but there doesn’t appear to be a way with them to dynamically change the content.

Here’s a simplified example of what I’m doing in the plugin code (using a Twig template)

[accordion id=“applications”]

{% for category in entries %}
[accordion_item title="{{category.header}}" parent_id=“applications”]
Some content goes here
{% endfor %}

After doing some searching here, I also tried changing the shortcodes from [accordion] to [x_accordion] and the same with the accordion item, and it still didn’t work.


Just following up with. more information. I realized that I’d had the same problem in 2018. Here’s the forum thread; I wasn’t the OP, but my question is further down:

In 2018, the problem turned out to be the minify cache. At that time, I was given a list of files to exclude from the cache, and that fixed the problem. You can see that reply in the forum thread above. Those files are still excluded. I just tried turning off the minify cache and it fixed the problem, but I don’t want to leave it turned off. Is it possible that there are new files in the upgrade that should be excluded? (I forgot to say in my post above that I had previously purged all caches and it didn’t fix the problem.)

Thank you.

Hello @SheilaRuth,

Thanks for posting in! After doing the updates, always remember to clear all caches (if you are using WP Rocket, WP SuperCache or W3 Total Cache) when updating so that the code from the latest release is always in use. This will help you to avoid any potential errors.

This means that you will have to clear the cache and regenerate the minified HTML/CSS/JS files. If you are using Autoptimize plugin, there should be a button link in the topbar right in your WP dashboard.

You may also check out the minifying tips:

And please clear your browser cache too. You may use private browsing mode in testing your site to make sure that you are viewing the latest codes from the updates and not the cached version in your browser.

Thanks for this, but you must have missed my second message where I clarified that I had purged all caches before posting here. Please read my second message for more detail. Thank you.

Hello @SheilaRuth,

There are times that caches need to be cleared out in synchronized order. Anyways, to better assist you with your issue, kindly provide us access to your site so that we can check your settings. Please create a secure note with the following info:
– Link to your site
– WP login URL
– WP username
– WP password
– WP Administrator Role

To know how to create a secure note, please check this out: How The Forum Works

Thank you.

I looked at the “How the forum Works” doc, but I don’t see the “Secure Note” button.

I don’t know if this is related, and maybe it needs to go in a separate thread, but I thought I’d start by mentioning it here since you’re going to check the site anyway (once I figure out how to send a secure note). Another thing that’s happening since the upgrade is that when I go into Cornerstone to edit a page, it just spins. There is an error in the Chrome console “app.514eb0c.js:1 Uncaught SyntaxError: Invalid or unexpected token”.

Hi @SheilaRuth,

You can find the secure note at the bottom of your posts. Once you are able to give us the credentials of your website, then we can now start troubleshooting it.

Hope that helps.

Thank you.

Oh, thanks! I was looking below your reply, and there’s a reply button but not a secure note button. I see now I have to look below my messages. Will send secure note now.

Hello @SheilaRuth,

Please watch this video tutorial as @Christopher has explained and teaches how and which file to exclude in the minification files.

Please also be advised that Cornerstone is a page builder. You can only use Cornerstone to edit normal pages and posts. Any dynamic pages and archive pages CANNOT and will not be able to edit within the Cornerstone builder.

Hope this makes sense.

The video was helpful in identifying javascript to exclude, and that fixed the accordion problem. However, we are still not able to edit pages in Cornerstone. Please note that we are not trying to edit dynamically created pages, but pages that were created in Cornerstone in the first place. We just get a black screen with a white spinning circle. In the Chrome console it shows an error “Uncaught SyntaxError: Invalid or unexpected token” for app.514eb0c.js:1 . This started when we upgraded to 8.0.10.

UPDATE: I just now as I was typing this saw that there is now a version 8.0.11 so I updated both Cornerstone and X before posting this to see if the update fixed the problem. After updating, I cleared all caches. But the update broke my site. All the admin pages were giving an error, and I had the following error in the error log:

[10-Jan-2021 19:51:09 UTC] PHP Fatal error: Uncaught Error: Class ‘TGM_Plugin_Activation’ not found in /home/momschoi/public_html/wp-content/themes/x/framework/functions/x/validation/class-validation-cornerstone.php:55
Stack trace:
#0 /home/momschoi/public_html/wp-includes/class-wp-hook.php(287): X_Validation_Cornerstone->maybe_show_notices(’’)
#1 /home/momschoi/public_html/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters(NULL, Array)
#2 /home/momschoi/public_html/wp-includes/plugin.php(484): WP_Hook->do_action(Array)
#3 /home/momschoi/public_html/wp-admin/admin-header.php(292): do_action(‘admin_notices’)
#4 /home/momschoi/public_html/wp-admin/edit-form-advanced.php(425): require_once(’/home/momschoi/…’)
#5 /home/momschoi/public_html/wp-admin/post.php(206): require(’/home/momschoi/…’)
#6 {main}
thrown in /home/momschoi/public_html/wp-content/themes/x/framework/functions/x/validation/class-validation-cornerstone.php on line 55

I restored X back to 8.0.10, and that fixed that error. Cornerstone is still at 8.0.11, and that seems to have fixed my problem with the spinning circle and not being able to edit pages in Cornerstone. But now I need to figure out why updating X broke the site so that I can bring it back up to 8.0.11 to match Cornerstone.

Actually, I was wrong. Cornerstone is not working at all. I thought it was, but it’s not working on any page. Further, the blog posts are not showing up on the blog page at I have tried purging the caches. Please help!

Hi @SheilaRuth,

It seems that the pages are loading in the Cornerstone, please find the page(s) and the screenshot in the secure note which I have tested. Please let me know if you still have the issue.


I tried both of these links, and in both cases I got the same thing: spinning circle and error. I’ve been using Google Chrome, but I just tried it in Safari and the same thing happened.

I also tried again editing the home page and got the same result. It’s not just me; the content team are also having the same problem.

Also, the blog posts are not displaying on the blog index page. This is what it looks like.

Please help as this is quite an urgent problem. If the blog posts don’t even display, we’re losing site traffic. Thanks.

Hi Sheila,

We certainly want to help get all this working for you. The errors you’re seeing on the blog are because X and Cornerstone both need to be updated to the latest version. Once you have both updated, purge all caches and you should see the blog restored. I’ve also checked Cornerstone, and the editor is working ok for me. It could be something cached on your computers.

Would you happen do have done any of the updates over FTP? I was looking over the thread and see you reverted to the previous version of X because of an error. That class should definitely have existed, so it could be an issue were some of the files weren’t fully uploaded. I would recommend using the WordPress theme and plugin uploaders. Nowadays they allow you to install the same theme or plugin even if it is already installed and it will prompt if you want to replace the existing one. This will make sure all of the files are included properly.

Yes, I updated by ftp. The updater never works on my site, I assume something to do with the way I have it installed on a multisite installation. I’ll try re-uploading the update and see if that works.

I re-uploaded X version 8.0.11, and was able to successfully update this time. The X and Cornerstone versions now match. It did fix the errors on the blog index page, and that page is now displaying correctly. However, editing a page in Cornerstone still gives the spinning circle and the "Invalid or Unexpected Token error in the developer console.

It’s now been almost 24 hours since I sent my last message. Any suggestions for where to go next? We have urgent Cornerstone page edits that we need to do.

Hello @SheilaRuth,

Just for future topics, self responding or bumping your post pushes it back in our Queue system so it takes longer to respond to.

I have logged in and I temporarily deactivated your W3 Total Cache plugin. When I edit your About page, it has loaded in the builder with no issue.

See the secure note.

Please use the private browsing mode or use incognito mode and test your site again.

Thank you for the heads-up about bumping causing my post to go to the back of the queue. I’ll avoid that in the future.

I tried editing the about page in Cornerstone in both a regular and incognito window in Chrome, and both a regular and private browsing window in Safari, and the same thing happened in all cases: a white spinning circle and the “Invalid or Unexpected Token” error. Why does it work for you but not for me?