Service "iframe" error: Cannot read property 'name' of undefined
See original GitHub issueInstalling the service “iframe”
<div class="tac_iframe" width="930" height="500" data-url="https://maps.google.ch/maps?f=[...]output=embed"> </div>
var tarteaucitron_interval = setInterval(function() {
if (typeof tarteaucitron.services.iframe.name == 'undefined') {
return;
}
clearInterval(tarteaucitron_interval);
tarteaucitron.services.iframe.name = 'Google Maps';
tarteaucitron.services.iframe.uri = 'https://myuri.com/disclaimer';
tarteaucitron.services.iframe.cookies = ['APISID','CONSENT','HSID','NID','SAPISID','SID','SIDCC','SSID'];
}, 10);
(tarteaucitron.job = tarteaucitron.job || []).push('iframe');
Gives me the error in the console:
TypeError: Cannot read property 'name' of undefined
What am I missing?
BTW: nice script! Thanks for the work.
Issue Analytics
- State:
- Created 5 years ago
- Comments:9 (3 by maintainers)
Top Results From Across the Web
Uncaught TypeError: Cannot read property 'name' of undefined
On this line: if(response.location !== 'undefined') ...you're checking if response.location is not the string "undefined" .
Read more >Uncaught TypeError : Cannot read properties of undefined
Looking for ways to handle Uncaught TypeError: Cannot read property of undefined in JavaScript? This guide will help you to catch errors.
Read more >How to Fix TypeError: Cannot read Property 'push' of ...
You call the method on a variable previously set to undefined . · You call the method on a variable before it has...
Read more >How To Fix Cannot Read Property 'style' of Null in JavaScript
This error boils down to one problem. The element you are trying to access does not exist in the DOM (document object model)...
Read more >ERROR TypeError: Cannot read property title of undefined
HEY, SET YOUR LIKE THERE ! ... Your browser can't play this video. ... Solved: ERROR TypeError : Cannot read property title of...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
😃 But even when we wait for it (setting the interval to 5000 in
var tarteaucitron_interval
), the same problem occurs. I’m over my limit with this… Thanks for your help, anyway.But the principal question remains: Why is it necessary to define
if they are not used in tarteaucitron.services? They are nevers passed into it.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.