Support

Home Forums Event Espresso Premium X Theme Customize Conflict with EE4 Core

X Theme Customize Conflict with EE4 Core

Posted: October 5, 2015 at 11:34 am

Viewing 21 reply threads


Jen Smith

October 5, 2015 at 11:34 am

Hi there! I have EE4 installed on my my site, hopefornhrecovery.org.

When I’m in the back end and I go to “Customize,” my preview fails to load. I inquired with X Theme thinking it was a problem on their end, but they’re saying they are seeing the error on your side.

This is the error we’re getting:
<br />
<b>Fatal error</b>: Call to a member function is_espresso_page() on a non-object in <b>/home/recovery/public_html/wp-content/plugins/event-espresso-core-reg/core/CPTs/EE_CPT_Strategy.core.php</b> on line <b>357</b><br />

Here’s the X Theme support trail: https://community.theme.co/forums/topic/customizer-preview-wont-load/#post-611132

I did completely deactivate, delete, and reinstall a fresh download of EE4 Core, but the problem persists. How can I fix this? Thanks! πŸ™‚


Jen Smith

October 5, 2015 at 2:02 pm

Hi guys! Not trying to be pushy, just wondering if you have an ETA on when we might have a resolution on this one? Much appreciated, as always! πŸ™‚


Josh

  • Support Staff

October 5, 2015 at 2:27 pm

Hi Jen,

I also have a copy of the X theme and I’m not seeing this error with the customizer, just like on the other site like you mention. It will help to confirm if running Event Espresso alone is the result of the error, because if another plugin in the mix is contributing, we’ll know where to look next. Does the error happen with only the Event Espresso plugin activated?


Jen Smith

October 5, 2015 at 2:37 pm

Yes, it’s very weird because I’m using it on another X site (which also uses the same plugins I have on this site outside of EE), and it works just fine.

But I did disable ALL the plugins to test, and when all are turned off, the preview features work.

When JUST EE4 Core is activated (the only plugin turned on), the preview won’t work.

Does that fatal error message I listed in the original post help point us in a direction? Thanks! πŸ™‚


Josh

  • Support Staff

October 5, 2015 at 4:18 pm

Since the fatal error seems to point to a symptom where a post type isn’t set, you could try going to WP > Settings > Permalinks, which will flush the rewrite rules for your site.

If that does not help, can you check to see if your other site (where the customizer isn’t broken) has same versions of EE and X installed? If they differ, what’s the version numbers?


Jen Smith

October 6, 2015 at 7:11 am

I! I went to Permalinks and just hit “save” without changing anything. Was there something else I should have done there? Unfortunately, it did not work. And the plugins between the two sites are on the same versions.

Here’s a screenshot of the plugins on my other site where things are working:
http://screencast.com/t/x12lndlTT

Here’s a screenshot of the plugins on this site where things are not working:
http://screencast.com/t/fBhUExevO

Is there somewhere I can privately send you a WP and/or FTP login to check things out? If that’s helpful? Thank you! πŸ™‚


Josh

  • Support Staff

October 6, 2015 at 8:41 am

Are the theme installations on both sites identical or are there any differences?


Jen Smith

October 6, 2015 at 8:54 am

Hi! Theme installations on both sides are identical as well.


Tony

  • Support Staff

October 6, 2015 at 9:45 am

When JUST EE4 Core is activated (the only plugin turned on), the preview won’t work.

When you say the only plugin, do you mean the only EE plugin the only plugin activated? So no other plugin is activated, including Cornerstone etc that come with X?

Go to Event Espresso -> General Settings -> Critical Pages.

Make no changes and just save the settings, this re-saves your EE config to confirm that is saved correctly.

I have X installed on a test site and have no problems with the customizer. Which stack are you using?

Can you Export your customizer settings and email the file to me (using support[at]eventespresso.com) so I can import them and re-test please. I don’t think its due to the customizer settings but that will ensure my site matches yours.

  • This reply was modified 9 years, 1 month ago by Tony.


Jen Smith

October 6, 2015 at 10:03 am

Hi! I went to Critical pages and hit Save. Did not solve the problem. πŸ™

Here are my Customizer settings: https://www.dropbox.com/s/x7kt0856zib0z8k/hope-for-nh-recovery-xcs.json?dl=0

I’m using the Renew Stack.

I’m trying to remember if anything else was activated when I turned EE back on. I know Cornerstone was active. I have to be careful when and how often I turn on and off my plugins because it’s a live site. Let me know how you want to proceed from here – thanks! πŸ™‚


Jen Smith

October 6, 2015 at 10:06 am

I just tried deactivating Cornerstone, and it doesn’t let you. But when I did that, my “Calendar” EE plugin deactivated and I got these messages:

An error has occurred:
It appears there are multiple copies of the Event Espresso Calendar installed on your server.
Please remove (delete) all copies except for this version: “3.2.5.p”

Event Espresso Calendar could not be activated. Please ensure that Event Espresso version 4.3.0.p or higher is running

I don’t see the plugin more than once, but I’ll go in through FTP to see if there’s a duplicate back there somehow. Back shortly.


Jen Smith

October 6, 2015 at 10:10 am

Nope, Calendar is only in there once and everything is on the versions the warning expressed. I was able to activate it again. And having it deactivated did not correct the Customizer problem so I don’t think that was it. πŸ™


Jen Smith

October 6, 2015 at 10:17 am

Ok, one more update. I just did a side-by-side comparison of plugins between the site that’s working and the site that’s not.

I found some plugins on the broken site that are not on the working site. I deactivated them one at a time and tested. Deactivating them did not fixed the problem. Thanks for continuing to investigate.


Tony

  • Support Staff

October 6, 2015 at 12:17 pm

Importing your customizer settings made no difference on my test site.

Does your home page call EE events anywhere? Using [ESPRESSO_EVENTS] for example?

Can I take a look at the customizer on your site, I’d like to confirm if any other errors are being thrown. If so please send temporary login details using this form:

https://eventespresso.com/send-login-details/


Jen Smith

October 6, 2015 at 12:39 pm

Homepage is not currently using an EE shortcode, no.

Just submitted the login info you need. Thanks! πŸ™‚


Tony

  • Support Staff

October 6, 2015 at 1:03 pm

I can’t see anything obvious to cause this.

I would highly recommend creating a development copy of the site that can be used to disable plugins and troubleshoot this without causing disruption to your sites visitors. This can be either a local site or preferably an install within a subdirectory on the same server.

One of the easiest way to setup a clone of the site is using the Duplicator plugin.


Jen Smith

October 6, 2015 at 3:00 pm

Hi Tony! Thanks for the tip on Duplicator – that worked great. Staging is at staging.hopefornhrecovery.org

Same login credentials I sent earlier today should still work. PLEASE NOTE: I did not bring over all the images. Did not seem necessary for our testing purposes.

The problem persists despite a new database. Can you login and pound on the staging site to see if we can find a solution?

And just to ask again, the error message does not guide us on where we should be looking for the problem?
<b>Fatal error</b>: Call to a member function is_espresso_page() on a non-object in <b>/home/recovery/public_html/wp-content/plugins/event-espresso-core-reg/core/CPTs/EE_CPT_Strategy.core.php</b> on line <b>357</b><br />

Thanks again! πŸ™‚


Tony

  • Support Staff

October 7, 2015 at 9:06 am

Hi Jan,

This error

Fatal error: Call to a member function is_espresso_page() on a non-object in /wp-content/plugins/event-espresso-core-reg/core/CPTs/EE_CPT_Strategy.core.php on line 357

Basically means ‘something’ unexpected is being loaded within the query, its somehow making it through the checks made by EE and the is_espresso_page() function is being called on it, but its not an object and can not have that method run on it. Unfortunately it doesn’t point to anything specific but just that something is wrong in the query.

Usually this is due to either plugins or the sites theme adding something in a strange way that EE doesn’t expect, that wasn’t the case here.

On staging I stripped back all plugins and installed twentyfourteen, the customizer still would not work. So it wasn’t due to a plugin or theme being activated at that time.

However after digging through errors and getting the full stack trace I found that it was something to do with the wp_nav_menu call. Knowing this I checked into your WP Menus (Appearance -> Menus) that shows an ‘Event Category’ menu that appears to have been added by another events plugin, that menu contains 2 events that are invalid.

So normally that menu isn’t being loaded on the front end of the site, but the customizer is loading the menu, incase you activate it through the options. So the customizer loads the menu, which triggers EE checks, which loads the event (but not an EE event) which runs the is_espresso_event() check which causes the fatal error… phew.

So as you can see there’s a fair few moving parts to this which is why is was so difficult to track down. Anyway, the fix is to go to Appearance -> Menus.

Make sure you are within the ‘Event Categories’ menu – http://take.ms/6vLir
(I’ve blurred a lot of details out but just check your in the same section)

Those 2 events listed in that menu, if you remove both of those (they look like they have been created within another event plugin) the customizer will work as expected. Its not an issue with the customizer, or even X, but a compatability issue with EE and other events plugins.

I have created a ticket for our developers to investigate and see if we can prevent this from happening in the future.


Jen Smith

October 7, 2015 at 9:16 am

Holy Smokes! That’s a needle in a haystack, but you found it. Well done!

Yes, we used to use Modern Tribe. Those plugins are deactivated, but clearly there was some menu pollution left over. I will make the adjustments on the live site.

Thank you SO MUCH! πŸ™‚


Tony

  • Support Staff

October 7, 2015 at 11:19 am

You’re most welcome, Jen.

Just to note, whilst troubleshooting this we basically turned staging upside down and inside out trying to narrow it down. We wouldn’t normally do this to a staging site but as it was specifically setup to troubleshoot this issue I figured you’d be ok with that.

So, if you want to continue using that staging site, I would recommend removing it, and recreating it from the Duplicator package your previously used (or even a new one with your recent fixes in) just so its up to date and starts from the same point as live.

Make sense?


Jen Smith

October 7, 2015 at 11:29 am

Ha ha! Yes, I read between the lines on the last note and kind of figured it got turned upside down. No worries on that – totally ok! That is why I set it up. ????

Thanks for the heads-up though. I will take it down and install an updated version the next time we need to work on staging.

Thanks again for all your help! ????


Tony

  • Support Staff

October 7, 2015 at 11:42 am

Just checking in-case you decided to keep it as is and re-activate the plugins.

It would likely work, but the config would have been wiped (ee settings) and would likely have caused issues as time went on. So thought it was best just to let you know either way.

Happy to help and glad its all working πŸ™‚

Viewing 21 reply threads

The support post ‘X Theme Customize Conflict with EE4 Core’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso