RC1 | Upgrade Process

Decided to pull a version of a site I’ll be launching soon into sandbox and test the upgrade from 5.1.5 > RC1. Noting my thoughts / experience along the way.

  1. Update itself went smoothly.
  2. Cleared system cache, cleared dynamic cache, and resaved permalinks
  3. Site is still up and running (so that’s good) however elements appear to be missing.

Issue list (updating as I come across things)

#1 Bottom section on the homepage is a simple section > row > column setup. Completely missing once upgraded. Update: Turns out this was due to the global color selection not being respected during migration. The row is there, it’s simply transparent because the global color was not carried over.

5.1.5

RC1

#2 Looks like there is a fatal error on the site now.
UPDATE: in looking into this, it looks like it is due to a fairly complex / nested looper consumer setup I am using. That said, it worked flawlessly in 5.1.5 so not sure why it wouldn’t be working here.

I have a custom user meta field that stores information in an array: recently_played

Row A = Looper Provider = Dynamic Content = recently_played
Column A = Consumer
Div A = Looper Provider = Query String = post_type=courses&p={{dc:looper:item}} (gets the current item id from Row A’s Provider and creates a loop of the array)
Row B inside of Div A for formatting
Column B inside of Row B as consumer (for formatting)
Div B = Consumer = Featured Image
Div C = Consumer = Course Information

Rebuilt this in RC1 (and simplified the nesting) and it appears to have solved the issue. That said, I’d still consider this an issue since it used to work and didn’t. :stuck_out_tongue:

This worked flawlessly to get this from the recently_played usermeta array. Now it causes a critical error on RC1:

Error:

Fatal error : Uncaught Error: Object of class WP_Post could not be converted to string in /home/customer/www/XYZ.com/public_html/wp-content/themes/pro/cornerstone/includes/classes/Services/DynamicContent.php:119 Stack trace: #0 /home/customer/www/XYZ.com/public_html/wp-content/themes/pro/cornerstone/includes/classes/Services/DynamicContent.php(119): preg_replace_callback(’/{{dc:([\w.-]*)…’, Array, ‘{{dc:post:title…’) #1 /home/customer/www/XYZ.com/public_html/wp-content/themes/pro/cornerstone/includes/functions/api.php(123): Themeco\Cornerstone\Services\DynamicContent->run(’{{dc:post:title…’, true) #2 /home/customer/www/XYZ.com/public_html/wp-content/themes/pro/cornerstone/includes/classes/Elements/Renderer.php(161): cs_dynamic_content(’{{dc:post:title…’) #3 /home/customer/www/XYZ.com/public_html/wp-content/themes/pro/cornerstone/includes/classes/Elements/Renderer.php(293): Themeco\Cornerstone\Ele in /home/customer/www/XYZ.com/public_html/wp-content/themes/pro/cornerstone/includes/classes/Services/DynamicContent.php on line 119

#3 None of my layouts are being respected. These are a simple CPT with a single layout.

5.1.5

RC1

#4 In trying to fix #3, I can see that the conditions lost their assignments altogether. However, when I reassign none of the post types show up in the preview toggle. And the layout assignment simply doesn’t work.

Screen Shot 2022-12-06 at 3.26.43 PM
Screen Shot 2022-12-06 at 3.27.32 PM

#5 In trying to remedy #3 and #4 I noticed that the single layout template referenced in #3 is actually completely blank. Meaning it lost all of the formatting. What’s even crazier is that I can’t rebuild it. I can add sections but it doesn’t do anything :o

5.1.5

RC1

Noted all these. Thanks for the feedback and that stack trace.

There anyway you could get me an .xml export in a secure note?

It’s unfortunately going to be a guessing game without a reference of the pro 5 site, it really helps with debugging, but we can get most of the way there without it.

#1 What were the color values? We’ve had this come up before, but could not replicate. I’m thinking it might be a format issue.

#2 The fatal part of this will be removed. However I’m not 100% sure how you got there without a scalar value. There wasn’t anything custom here right just cornerstone elements? I’ll have to take another look

#3 #4 #5 Is the show_ui property set to true for your custom post type? get_post_types(); if you call this what does it return? Are you getting any warnings or errors with WP_DEBUG? Any console errors? when you clear your browser cache does the post types dropdown reappear?

How are we doing here? Have a merry Christmas if I don’t hear from you. Appreciate all the testing you have done.

Hi @charlie - Huge apologies on the delay. Unfortunately, ended up deleting this test instance to focus on pushing the actual site build over the finish line. Thought it’d be a decently straightforward upgrade. I’ll definitely try again soon.

To answer some of your questions:

#1 Color value was RGBA. To be more specific it was rgba(40, 76, 235, 0.93)
#2. There were a couple of loopers. One of them accessing a data saved in a custom function but all had been working fine on 5.1.5. I rebuilt it the same way (to my knowledge) in RC1 and rebuilding it fixed the fatal error. So something must have gone awry.
#3 #4 #5 Yes, CPT is set to true and they’re working just fine. Didn’t have a chance to fully dive into WP debug log before shifting gears.

Anyway, super excited for where V6 is headed nonetheless and will be giving this upgrade process a go again I’m sure (as will thousands of your customers). :slight_smile: Merry Christmas to you and the rest of the TC fam. Be sure to get some R&R.

1 Like

Thank you very much. I share that same excitement on V6. There’s some updates around #2 in the latest release, however we might have to take another look when that time comes. Contact me if you need anything.
Will do on the R&R lol.

1 Like

So, finally got this site launched on 5.1.5. Now testing the update again to 6.0.1 on a fresh staging install (done about 30 min ago) on a completely different server than the previous test.

Good news, my templates appear to have transferred over nicely. :slight_smile:

That said still seeing the first issue and a few new ones. Hopefully this doesn’t get too confusing but going to reiterate the list here as I see them.

1. Outstanding: Global color issue mentioned above is still happening. Easy fix - now that I know what is going on – but definitely an issue.

2. Fixed: Fatal error mentioned above no longer happening! Woot woot!

3. Fixed: Templates not being respected looks like it has been remedied :tada:

4. Fixed: Since #3 appears to be fixed. #4 is looking good. All conditions have been carried over (from what I can tell).

5. Fixed: #5 looks good as well.

6. NEW: I have video element set to autoplay in a modal. This works fine on 5.1.5. In 6.0.1 the audio autoplays but the video does not show up unless I physically hit the play button. Link in private note.

Update on #6 Noticed it has to do with a custom attribute I’ve been using to stop the video on modal-close. I have many (MANY) sites using data-rvt-offscreen-reset on the video element because that feature was removed several years ago from the modal itself. This has worked flawlessly for stopping the video on modal-close. But no longer works :-/

Totally understand this may have been a workaround, but if the attribute was removed from the core codebase… is there an alternative workaround? Seems there should be something that allows you to stop a video on close-action.

Great to hear on the fixes and I hope you have been well.

#1 We’ll be running more migration tests these coming days. Does the V5 site in the note have this color issue?
#6 I’ll make sure that functionality gets added back in. It looks like it was removed or renamed, but regardless I’ll get you an answer. Sounds like it should work this way by default, IE any media content in a toggleable that is closed should stop so I’ll see if I can do that too.

Thanks have a great day.

New development here. The offscreen reset feature is still available. So can you confirm that you see the custom attribute here? It was placed here in Pro5 correct? If not that seems like a migration issue we can fix. I do not see the custom attribute on your Pro6 page so I would start there.

image

V5 site has never had the issue but the issue shows up when upgrading 5.1.5 to 6.0.1

Here’s what it looks like in the v5.1.5 environment:

And here’s what it looks like in the 6.0.1 environment:

Oddly enough, to solve the issue I had to set the upper color background layer to “none” then toggle back to color and it all works in 6.0.1.

Yeah, I removed the attribute because if I have data-rvt-offscreen-reset as an attribute on the video then autoplay doesn’t work in 6.0.1. See the demo page now. I’ve added the attribute back in.

I think I’ll have a fix for the video offscreen issue in this next release. Just going to test some more. data-rvt-offscreen-reset should work with autoplay after that.

Okay that’s good to know that toggling it fixes it. That narrows it down for me. Thanks a bunch!

Try out the offscreen-reset attribute again in 6.0.3. It’s working on my end now, but I have a feeling we’ll be fixing more JS rendering issues like this so send them my way.

Thanks @charlie! Just tested out and looks like we’re back in business! Thank you sir!

On a somewhat related note: awhile back there was talk about including a checkbox in relevant elements to enable/disable the data-rvt-offscreen-reset so that it wasn’t such a workaround / pro feature. Any plan to incorporate? At the very least, it would be nice to have this available as an option on the video element itself.

In fact, there are quite a few people who (before we discovered the data-rvt-offscreen-reset by reading through a bunch of TC core files) still enable the deprecated Content Area Modal Element for videos because it has this feature.

Screen Shot 2023-01-10 at 7.19.05 AM

3 Likes

Awesome. Yeah that would be great as it feels like it should work similar to this already. Thanks for bringing up the old area too that’ll be great for me to reference. I’ll add it to our feature list.

Also the WC Archive inner looper issue with be fixed in 6.0.4. And Hex colors that use the alpha slider with work in 6.0.4. Have a great day friend!

2 Likes