Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PageCache gives error "Uncaught TypeError: element.prop is not a function" when there is an iframe #6818

Closed
PascalBrouwers opened this issue Sep 30, 2016 · 28 comments
Labels
bug report Component: Framework/Cache Fixed in 2.1.x The issue has been fixed in 2.1 release line Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Progress: needs update

Comments

@PascalBrouwers
Copy link
Contributor

Preconditions

  1. Magento 2.1.0
  2. PHP 7.0.11

Steps to reproduce

  1. Install Magento 2.1.0 with module Livechat from https://github.com/livechat/magento-livechat
  2. Enable module Livechat: bin/magent module:enable LiveChat_LiveChat
  3. Clear cache: bin/magento c:f
  4. Go to homepage

Expected result

  1. No JavaScript error

Actual result

  1. JavaScript error: Uncaught TypeError: element.prop is not a function
    screen shot 2016-09-30 at 14 03 42
@PascalBrouwers
Copy link
Contributor Author

PascalBrouwers commented Sep 30, 2016

The fix is actually pretty easy.

Change line 40 of page-cache.js
.prop('href', element.prop('src'))
To:
.prop('href', $(element).prop('src'))

But I see it is already fixed 2.1.1

@devhn
Copy link

devhn commented Sep 30, 2016

@PascalBrouwers thanks, we applied this fix also within the page-cache.js

@Tristan-N
Copy link

Tristan-N commented Dec 21, 2016

@devhn @PascalBrouwers
How come the original file is not fixed yet? I fixed this, last monday I updated to Magento 2.1.3 (from 2.1.2) and now have to apply this fix again.
I use composer to update, so it can be found in the vendor folder.

@PascalBrouwers
Copy link
Contributor Author

@Tristan-N I was surprised that my 2.1.2 also still has this issue, didn't check 2.1.3 yet.

@Tristan-N
Copy link

@PascalBrouwers I did too, but didn't pay any attention and just fixed it again, until the update to 2.1.3. It's that simple, so I was a bit surprised too.

@PascalBrouwers
Copy link
Contributor Author

The weirdest thing is: they did fix it in the develop branch: https://github.com/magento/magento2/blob/develop/app/code/Magento/PageCache/view/frontend/web/js/page-cache.js

@PascalBrouwers
Copy link
Contributor Author

@veloraven Can you make sure this get's into the next release?
It was missed in this release as you can see: https://github.com/magento/magento2/blob/2.1.3/app/code/Magento/PageCache/view/frontend/web/js/page-cache.js

@erfanimani
Copy link
Contributor

It's still happening on 2.14..

@choukalos choukalos removed their assignment Feb 21, 2017
@petterkj
Copy link
Contributor

Also happening in 2.1.5.

Hint for fix? https://mage2.pro/t/topic/999/2

@Tristan-N
Copy link

@petterkj Magento 2.1.5 doesn't contains any features or patches. It's only to update alle copyright files to the correct year, so this isn't surprising.

http://devdocs.magento.com/guides/v2.1/release-notes/ReleaseNotes2.1.5CE.html

This release updates the copyright date in every file. It does not contain any functional changes or security improvements. Isolating these changes in a single release is intended to simplify future updates and developer workflow.

@brendanmckeown
Copy link

When will this fix be included in a release?

@erfanimani
Copy link
Contributor

erfanimani commented Mar 7, 2017 via email

@shuaiZend
Copy link

It's still happening on 2.1.6

@PieterCappelle
Copy link
Contributor

8months and still not yet in 2.1.7. Insane.

@veloraven
Copy link
Contributor

@PieterCappelle could you please confirm that you use clear Magento 2.1.7 install and the latest version of the Magento LiveChat Module?
Could you also specify which environment do you use? Like OS, web-server, PHP, MySQL version.
We were not able to reproduce this issue, so some additional information is required: maybe some specific environment, or some additional steps.

@PieterCappelle
Copy link
Contributor

The problem is not related to LiveChat, the problem is related to iframes in HTML. See www.sanimarkt.be, is 2.1.7. See the console.

Error is triggered because the chat integration.

@korostii
Copy link
Contributor

korostii commented Jun 8, 2017

@veloraven, the issue appears whenever you have an iframe on the page.
There is no doubt about its existence, plenty of people here have experienced it.

FYI I believe the two fixes that were implemented in scope of the following two PRs cover the issue completely:
#7914
#8005

As far as I understand those just need to be merged into 2.1-develop and put into the next release.
Could maybe consult with @vrann to verify if this assessment is correct?

@carb0nknight
Copy link

Can also confirm this issue is in 2.1.7

@jordanbrauer
Copy link

jordanbrauer commented Jun 30, 2017

@PieterCappelle Hilarious. 8 months to fix a simple "typo", yet they released an update for just copyright files in 2.1.5? Brutal!

It's like @veloraven is a bot or something. That is the only response I see her give on every issue ever, ffs 😑

Off topic: Even funnier - with the 2.1.7 update, I am pretty sure someone screwed up the template blocks in Content > Design > Configuration. The grid is above the filters and options now 😆

@ghost
Copy link

ghost commented Jul 4, 2017

Same issue with a chat that isn't installed as an extension... just added to the page via js... so obviously nothing to do with Livechat module.

I can't believe it hasn't been fixed when the the fixed code has been volunteered. Things like this are putting me off getting enterprise, what good would 24/7 support be if it's this bad?

AntonEvers pushed a commit to AntonEvers/magento2 that referenced this issue Jul 12, 2017
Please add this to the 2.1.8 release if it can be made in time.
magento-team pushed a commit that referenced this issue Jul 13, 2017
 - Merge Pull Request #10218 from ajpevers/magento2:patch-3
 - Merged commits:
   1. f609227
@1f47a
Copy link

1f47a commented Jul 21, 2017

@xAvarice
Yep agree.

  1. Find bug in production
  2. Go to Github to report it
  3. Find it was reported 12 months ago
  4. Bug acknowledged and "fixed" 12 months ago
  5. Apply fix manually

Things like the devbox not working make me feel like Magento are trying to get the Community users to either move to Enterprise or solve issues themselves.

Personally, I will no longer be recommending Magento as a solution and will be looking into alternatives such as Shopify etc.

@davidverholen
Copy link
Member

@magento-team I see there has been done something. Can we assume, that this is fixed in 2.1.8 and 2.2?

@magento-team magento-team added 2.1.x Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development bug report Component: Framework/Cache Progress: needs update labels Jul 31, 2017
@magento-team
Copy link
Contributor

Internal ticket to track issue progress: MAGETWO-70673

@magento-engcom-team magento-engcom-team added 2.1.x Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development bug report Component: Framework/Cache Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Progress: needs update labels Sep 11, 2017
@evoratec
Copy link

Still in 2.1.8

@magento-engcom-team magento-engcom-team added the Fixed in 2.1.x The issue has been fixed in 2.1 release line label Sep 18, 2017
@magento-engcom-team
Copy link
Contributor

The fix will be available with 2.1.10

@pmoreno1980
Copy link

@abhi2303237
Copy link

Hi All,

Can any one of you help me to analyse the impact of this type ERROR in magento application ?

Thanks,
Abhi

@udayakumar-ziffity
Copy link

Can also confirm this issue is in 2.1.7

This issue is still in Magento EE 2.1.9 also.

magento-engcom-team pushed a commit that referenced this issue Apr 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug report Component: Framework/Cache Fixed in 2.1.x The issue has been fixed in 2.1 release line Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Progress: needs update
Projects
None yet
Development

No branches or pull requests