New Blog Templates: Help with an error log.

I am having is when creating a new site from the front-end. I am using Blog Templates. I get these mysql errors only when selecting a certain template. Those errors are in my log. Here is a gist of my exact log: https://gist.github.com/buddyq/fbf79b1460aa51cd2de4ccde7ac16ce8

How can I decipher exactly where this bad mysql statement might be?

I just did a grep on the server for WHERE ID IN and I found 3 instances in blogtemplates/copier.php one looks like it might be it.

Looks like theres a syntax error

$objects = $wpdb->get_results( "SELECT * FROM $templated_posts_table
WHERE ID IN ( $objects_ids )", ARRAY_N );

and LINE 1012: $objects_meta = $wpdb->get_results( "SELECT * FROM $templated_postmeta_table
WHERE post_id IN ( $objects_ids )", ARRAY_N );

those look VERY similar to what is in the error nothing else in my Grep came close.

The template made with enfold theme but I call it Tarrytown. It is a child theme of enfold. No custom queries in the theme.

  • Predrag Dubajic

    Hi Buddy,

    Hope you're doing well.

    I was testing your child theme and it doesn't seem to be the cause of this issue, when I create new site on my test network based on the Tarrytown template it doesn't return any errors.

    Could you give it a try on your site with parent Enfold theme and default WP just so we can double check if it has anything to do with the child theme or Enfold?

    Also, could you give it a try with the default wp-signup page instead of the custom one you are using?

    This should helps us to pinpoint the issue and debug it further.

    Best regards,
    Predrag

  • Buddy

    I might need a help with this test.

    I do not remember HOW I redirected away from wp-signup.php.

    I can see that BuddyPress registration goes to my "Register" wp page which uses the custom template called 'create_a_site.php' inside my themes/agent-assets folder. However, I disabled that and selected none under BuddyPress but still got the same create site page. I think I hardcoded the link to the create a site button, but I get a blank page when manually going to wp-signup.php

    I tried to grep everything I could think of. I have no idea how I redirected away from wp-signup.php. Can someone help?

  • Predrag Dubajic

    Hi Buddy,

    Just curious but I am wondering if you can try it using the WPMUDEV Blog Templates plugin?

    Yes, I actually checked your Tarrytown template settings in New Blog Templates and configured my template the same way.

    I'm afraid that I can't figure out what exactly is causing this signup process on your site.
    First thing is that your site registration redirects to BuddyPress first even though you have "Both users and sites can be registered" option is selected, but when this is selected you should be able to access site registration page without the need of creating a user account first.

    Other strange thing is that your Create New Site page actually has single.php template selected, while on front end it shows like it uses create_a_site.php

    Regardless of that I tried replicating the same setup on my end, so I used AgentAssets child theme on my main site, created Create New Site page and selected create_a_site.php, activated BuddyPress and configured it.
    And I still can't replicate the behavior from your site, I can still use both wp-signup.php and BP registration pages separately, but the create_a_site.php template is not loaded, it shows a blank page for me so I couldn't test registration process on my site from that page.

    It looks like there's something else that's used to power up your custom template but I couldn't figure out what.
    Can you try disabling all of your plugins and see if the custom signup page will work for you after that?

    Best regards,
    Predrag

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.