Rank math causing block error

Description:

Just installed rank math as almost ready to go live. Then i went to edit the home page, desktop view is fine, but changing to tablet/mobile - This block has encountered an error and cannot be previewed.

Checking console:
TypeError: Cannot read properties of undefined (reading ‘classList’)
at index.js?ver=1.3.4.6:3:2894643
at gm.forEach ()
at gm.addClass (index.js?ver=1.3.4.6:3:2894628)
at iC.updateSlidesClasses (index.js?ver=1.3.4.6:3:2913859)
at iC.slideTo (index.js?ver=1.3.4.6:3:2921827)
at iC.init (index.js?ver=1.3.4.6:3:2952468)
at index.js?ver=1.3.4.6:3:2979784
at index.js?ver=1.3.4.6:3:2979792
at Ur (react-dom.min.js?ver=18.2.0:10:73411)
at Jr (react-dom.min.js?ver=18.2.0:10:80643)

Step-by-step reproduction instructions:

it seems to be affecting only the home page, when changing responsive view on other pages/templates all seems fine.

When i deactivate rank math, it’s all good.

Hello @donlee100,

Thanks for the report.

Does it happen when no block is selected and you switch breakpoints?
Does it happen when only certain blocks selected?

Thanks in advance.

Cheers,

I encountered the same issue but without RankMath. It happens after updating to 1.3.4.6. I made a video (1.5 minutes) showing the page without block error in 1.3.4.5, updating to 1.3.4.6, regeneration blocks and showing the error.

I have no blocks selected only change breakpoint and get the error. The page only consists of section container slider and about 12 slides with images. When i copy the whole section to a new page also get the same error when changing breakpoint

After some troubleshooting i believe the fault is with slider block settings. Toggling loop off no longer causes block error when changing breakpoints in combination with rank math plugin, hope that helps.

image

Hi @donlee100,

Thank you for investigating this further!

With 1.3.4.7, we have removed the loop preview in the editor to avoid this issue:

Kindly let me know if this is the case on your end.

Thank you in advance.


Sorry to hear you’re experiencing trouble with this, @Xonbu.com.

Could you possibly check your browser console log, and see if any errors appear?
iIf you do notice anything, kindly share a screenshot.

If you don’t notice anything unusual, to investigate further, kindly provide us with a temporary access to your installation.

If this is possible, for security and privacy reasons, kindly send the details using our paste website, by sharing the link generated through email to support@cwicly.com.

Please follow these steps:

  • Visit our designated paste website: https://paste.cwicly.com/
  • Input your installation details into the provided text field.
  • After entering the information, the website will generate a unique link for your submission.
  • Share this generated link with us through email.

Thank you in advance.