BB won't activate on custom post types after migration

Hey guys,

Weird issue. Everything worked fine on our dev server. After migrating to production server, I cant get BB to activate on custom post types. It works on pages, but not on any of the custom post types in the frontend. It is enabled for those post types, I can see it in the backend but when I try to edit post type in BB it just does nothing. No errors in console at all.

Do you think it might be related to serialized data or a server setting?

Our dev server was apache, production is nginx. Thanks.

Hey Viktor,

Try the solution found on the thread below. It’s a similar issue, where hitting the Page Builder on nginx does nothing. Let us know how it goes! :slight_smile:
http://forum.wpbeaverbuilder.com/support/q/templates-pop-up-not-showing-on-clean-install-with-bb-plugin-and-theme/#post-18428

Ben

Thanks Ben. Not sure if that’s relevant, we don’t have supecache installed.

We have memacached on nginx server, and are using wp-ffpc plugin for caching. So we don’t have “cache” folder.

More info turned up:

  1. BB works only on homepage
  2. All pages and post types don’t work

And we tracked down the issue: memcache. I don’t know why memcache isn’t playing well. In wp-ffpc plugin, we did set to exclude all dymanic requests from cache “Exclude every URL with “?” in it.” But that’s not helping.

Have you used memcache with BB before? Any ideas?

Hey Viktor,

We’re not Nginx experts here, so bear with me :slight_smile:

I believe the issue in the past has been that the ?fl_builder URL variable isn’t making it to the server. You can test that in your code with the following…

if ( ! isset( $_GET['fl_builder'] ) ) {
   echo 'It is not set!';
}

The vHost stuff that Ben linked to has fixed that many times in the past and I don’t think it’s necessarily supercache related.

Can you check to see if the fl_builder variable is in fact making it to the code before we dig in further?

Thanks,
Justin

Thanks Justin. I think I might have found related fix to Ben’s link solution for our situation. My server admin stepped away so once he’s back, we’ll test it.

And your script does confirm that it’s not making it to the server.

I will let you know once I know if our fix works or not.

Ok, we finally found solution. It’s related to Ben’s link.

location / {
  try_files $uri $uri/ /index.php?$args;
 }

You’ll note we added ?$args at the end, instead of $query_string. I’m not a server expert, but what I found says that “You can use either $query_string or $args, they are equivalent - except $query_string is readonly (or alternatively, $args can be updated by any other logic you may wish to add)”.

$args is the one mentioned in Codex.

Hey Victor,

Glad to hear that you got it figured out. Thanks for posting the solution!

Justin