Support » Plugin: Block Lab » Migration Issue to Genesis Blocks

  • Resolved aaron13223

    (@aaron13223)


    Hey there,

    I just updated and saw the message to transition to Genesis Custom Blocks. So, I just tried migrating and it doesn’t work. All the blocks in block lab were deleted. I get a migration error:

    The following error ocurred:
    
    <p>There has been a critical error on your website.</p><p><a href="https://wordpress.org/support/article/debugging-in-wordpress/">Learn more about debugging in WordPress.</a></p>

    The Genesis Custom Blocks don’t work either. It has a menu item but the only sub menu item there is “Documentation” & “Genesis Pro”.

    My website has over 3000 posts and each post has multiple blocks so I’m really worried about this transition. I would really grateful if you could help me out.

    And yes the developer notice link for migration doesn’t work either: https://getblocklab.com/migrating-to-genesis-custom-blocks/

    • This topic was modified 1 month, 2 weeks ago by aaron13223. Reason: extra info
Viewing 9 replies - 16 through 24 (of 24 total)
  • Plugin Author Ryan Kienstra

    (@ryankienstra)

    Hi @aaron13223,

    For some reason, It worked this time by normally migrating through the wordpress dashboard……

    Great to hear! Sorry, I think the snippet I gave you had backticks.

    No, Genesis Custom Blocks isn’t going anywhere 🙂

    I think its future is more secure than Block Lab’s, as it doesn’t depend on only a few people. Though the previous Block Lab team is still working on it.

    So glad to hear you got it to work, really exciting to have you using Genesis Custom Blocks!

    Hey Ryan,

    Sorry to trouble you again. I’ve another similar website which is based on a totally similar server and is setup the same way.

    It also has 2500+ posts and is basically full made on block lab blocks. I can’t seem to migrate the blocks there as well. I tried the wp shell, increasing ram, execution time in php and nginx, but nothing seems to work.

    Can you please help me out with this? I tried multiple times just like on the other website..

    Thank you so much!

    Plugin Author Ryan Kienstra

    (@ryankienstra)

    Hi @aaron13223,
    Sure, happy to help.

    What happens on doing the wp shell commands? Does it just hang, or is there a response?

    Also, could you share the PHP error log?

    Thanks!

    Hey Ryan,

    Thank you so much for the help!

    When I try the wp shell method, it just hangs and doesn’t show anything. I’ve to press “ctrl + c” to exit the shell.

    Suprisingly, there are no errors generated in my nginx log and my php-fpm log as well. Because I increased the timeout limits in both php and nginx, the connection timed out error is also not shown. Using the migration method in the dashboard, it also just hangs there and nothing happens and the blocks are broken throughtout the website.

    • This reply was modified 1 month, 2 weeks ago by aaron13223. Reason: spelling mistake
    Plugin Author Ryan Kienstra

    (@ryankienstra)

    Hi Aaron,

    Suprisingly, there are no errors generated in my nginx log and my php-fpm log as well. Because I increased the timeout limits in both php and nginx, the connection timed out error is also not shown. Using the migration method in the dashboard, it also just hangs there and nothing happens and the blocks are broken throughtout the website.

    Hm, could you try this? If it shows a non-empty array, that means that at least some posts were migrated to GCB:

    
    wp shell
    $GLOBALS['wpdb']->get_results( $GLOBALS['wpdb']->prepare( "SELECT * FROM {$GLOBALS['wpdb']->posts} WHERE post_type != %s AND post_content LIKE %s LIMIT %d", 'revision', '%' . $GLOBALS['wpdb']->esc_like( 'wp:genesis-custom-blocks/' ) . '%', 100 ) );
    

    It queries for posts that have the GCB block namespace: wp:genesis-custom-blocks/

    That’s mainly taken from the migration code.

    Thanks!

    Plugin Author Ryan Kienstra

    (@ryankienstra)

    And if you’re up for it, assuming it’s non-production, here’s some more 🙂

    How many posts have unmigrated block-lab blocks:

    
    wp shell
    $GLOBALS['wpdb']->get_results( $GLOBALS['wpdb']->prepare( "SELECT * FROM {$GLOBALS['wpdb']->posts} WHERE post_type != %s AND post_content LIKE %s", 'revision', '%' . $GLOBALS['wpdb']->esc_like( 'wp:block-lab/' ) . '%') );
    

    How many posts have migrated genesis-custom-blocks blocks:

    
    wp shell
    $GLOBALS['wpdb']->get_results( $GLOBALS['wpdb']->prepare( "SELECT * FROM {$GLOBALS['wpdb']->posts} WHERE post_type != %s AND post_content LIKE %s", 'revision', '%' . $GLOBALS['wpdb']->esc_like( 'wp:genesis-custom-blocks/' ) . '%') );
    
    Plugin Author Ryan Kienstra

    (@ryankienstra)

    Of course, wrapping either of those in count() will get the number.

    Hey @ryankienstra,

    Really sorry for the late reply. It seems like you need a lot of patience for this. Whenever I was trying to migrate, it would break the website and gave 504 error.

    However by using this code in wp shell I could see that the migration was working as the posts were going down every time I ran it:

    count($GLOBALS['wpdb']->get_results( $GLOBALS['wpdb']->prepare( "SELECT * FROM {$GLOBALS['wpdb']->posts} WHERE post_type != %s AND post_content LIKE %s", 'revision', '%' . $GLOBALS['wpdb']->esc_like( 'wp:block-lab/' ) . '%') ));

    Just that it was slow. It took more than an hour to migrate 2400+ posts, but now it’s done!

    Thank you so much for your help! Have a great day.

    • This reply was modified 1 month, 2 weeks ago by aaron13223. Reason: added count
    Plugin Author Ryan Kienstra

    (@ryankienstra)

    Hi @aaron13223,
    All good! Great to hear that it finally worked.

    Thanks for all of your patience with migrating 2 sites, so glad to hear you’re with us in the new plugin.

Viewing 9 replies - 16 through 24 (of 24 total)
  • You must be logged in to reply to this topic.