twitter publish Cannot read properties of undefined (reading 'height')

Viewed 18

I'm using embedded twitter publish feature on my wordpress site in my sidebar. Its working sometimes without problems but sometimes its not working and giving an error in my console which is:

modules.c7def0268c66f6a548ed.js:1 TypeError: Cannot read properties of undefined (reading 'height')
    at 1.d77d8092171c9a9ccc4c.js:1:1055103
    at ve (1.d77d8092171c9a9ccc4c.js:1:1055145)
    at oa (modules.c7def0268c66f6a548ed.js:1:230702)
    at ql (modules.c7def0268c66f6a548ed.js:1:283160)
    at Cu (modules.c7def0268c66f6a548ed.js:1:270334)
    at xu (modules.c7def0268c66f6a548ed.js:1:270262)
    at ku (modules.c7def0268c66f6a548ed.js:1:270125)
    at gu (modules.c7def0268c66f6a548ed.js:1:267091)
    at modules.c7def0268c66f6a548ed.js:1:216470
    at GGKn.t.unstable_runWithPriority (modules.c7def0268c66f6a548ed.js:1:107996)

And also its showing "There is a problem. Please try again later." text inside the embedded area. Its totally random, sometimes its working, sometimes not.

The code i'm using:

<a class="twitter-timeline" href="https://twitter.com/twitter" data-widget-id="644528552445128704" data-chrome="nofooter noborders transparent" width="100%" height="500">Twitter'da takip et!</a> 

Here is some pictures:

  1. Error message: https://i.stack.imgur.com/ejXrt.png
  2. Console error: https://i.stack.imgur.com/kOJe5.png
  3. When it works: https://i.stack.imgur.com/VjUlv.png
1 Answers

I would assume that the height property requires some kind of unit. Like 500px or 100% or 2rem etc. Your width is correct since it has a percentage included, but the height is missing one.

width="100%" 
height="500" // height change to 500px or whatever unit
Related