Portfolio and sub-menus not working anymore

Hello, I’ve been busy for the last several months and haven’t done much with my website, and when trying to show someone my portfolio the other day, noticed it isn’t working anymore. I also noticed that menu items that have sub-menus don’t drop down.

I thought maybe I needed to update a plugin or something, so I went through and updated everything… WordPress, plugins, X Theme, Cornerstone, etc. Everything is now up to date, but the problem remains.

I’ve tried turning off all the plugins but Cornerstone, and the problems are still there. I know it was all working several months back, so I’m not sure what happened. And… those seem like pretty core-functionality things, especially the menus. The portfolio is just using the X Theme portfolio too.

You can see what is happening at: cgWerks.com (any page for the menus, but the portfolio page for that issue). The portfolio items are there, but not displayed. It just shows the ‘loading’ symbol, but never loads. If you scroll down and cursor along the left side, you can click on the items (that don’t display) and it goes to the individual portfolio pages, which do work. Any tips or solutions would be great! -Steve

Hi Steve,

Sorry that you’re having that issue, since you already started the basic troubleshooting please do this two things, first is to Clear and Deactivate your caching plugin for a while. The caching might still serving an old version of a file even you already updated things on your site.

If the issue still persists, after clearing and deactivating caching, please try switch to parent X theme there might be something on your child theme that causes the issue and it needs to be update (rewrote).

Let us know how it goes,
Cheers!

Hi Friech,

I tried clearing and deactivating cache (W3 Total Cache in this case). That doesn’t seem to have made any difference.

I also noticed that none of the home-page elements are working… the text typing, the ‘flip’ cards, etc.

I tried activating X Theme instead of the child, and that did get some of the elements working again, though I suppose due to some customizations in the child theme, it breaks aspects as well. So, I switched back to the child. (I’m not sure what can go wrong there or how to fix it.)

So, I decided to try and go into Cornerstone, but notice it won’t work. Also, if I do try and edit the home-page, Cornerstone isn’t an option, and my editor is filled with shortcodes… so something seems quite broken in that regard.

I’m probably going to be doing a re-design of the site anyway, but it would be nice to know what happened. The only thing I can think of that I’ve done recently aside from a few edits (and that was almost a year ago), was moving hosting environments and probably a bit before that, converting the site to https (and running a database sweep to change http to https, etc.). But, I’m sure the site was working properly since then.

So, I don’t think I’ve done anything but updates that would have caused the issues.

What is involved in the rewrite/update of the child theme? That seems like it is worth trying.

Hey @cgWerks,

I see an error in the console coming from a custom Javascript. Please temporarily remove all custom scripts on your site. First check Theme Options > JS.

-----------------------------------------------------------------------------------

Regarding updating the child theme, it would involve hiring a third-party developer to fix the issues as we do not offer support for customizations. By fix, I’m referring to parts of your site that were broken when you activated the parent X theme.

-----------------------------------------------------------------------------------

Regarding this issue:

It’s because of incorrect or incomplete migration. Please see our migration guide here: https://theme.co/apex/forum/t/cornerstone-content-builder-migration/126/1

Hope that helps.

Hi Christian,

re: error in console - Hmm, I’ll have to look into that. As far as I know, I’m not using any custom scripts, just the X Theme components. I can’t get to Theme Options. It just displays 3 graphic dots on a white screen and never moves past that.

re: child theme - Again, nothing custom there. I’m just using X Theme child. When I mentioned customizations, I just meant my settings in the Customizer/X Theme, which I can no longer get to.

re: shortcodes - Note, when I talked about migration and http to https, I did use WP Migrate DB (probably even the Pro version which I owned at the time), and certainly unchecked the GUIDs option. Also, my site was working properly after both the move to the new host and the http -> https migration. So, the problem started sometime after that… and I wouldn’t have done anything beyond plugin and WordPress updates.

What I mean, is that Cornerstone isn’t an option so I just get the standard editor filled with all the shortcodes that X generates.

So, unfortunately, I’m not really sure where to start (beyond looking at that JavaScript error), or just rebuilding the pages.

Update: OK, I found the problem and am now trying to narrow it down. I forgot that I had added some things to functions.php when I built the site. The odd thing, is that I haven’t touched that for long time, but commenting out my additions got it working again. Now I just have to figure out which one.

Some new update of plugins or WordPress must have created an issue with something I added in there. I’ll post again once I figure it out, just to update it in case it helps someone else.

I can now get to Theme Options and Cornerstone again… phew! :slight_smile:

OK, here is the troublesome code:

// Remove version from parameter tags - WP Engine suggestion (Themeco modification)

function remove_wp_version_from_scripts( $src ) {
    if ( strpos( $src, 'ver=' ) ){
        $src = remove_query_arg( 'ver', $src );
        return $src;
    }
}
add_filter( 'style_loader_src', 'remove_wp_version_from_scripts', 9999 );
add_filter( 'script_loader_src', 'remove_wp_version_from_scripts', 9999 );

It was a security optimizing recommendation to remove versions, and I got the code from the forums here. I’m not sure how necessary (or effective) it is in preventing problems, especially since I tend to keep my stuff up to date. But, if you can tell me how to fix it, I’ll do that. Otherwise, I’ll probably just leave it out. Thanks!

Hello @cgWerks,

In the latest release, we have managed to optimize the JS and CSS files. The function may have been what is causing the issue instead. We advised that it should be removed instead.

Cheers.

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