magento2 icon indicating copy to clipboard operation
magento2 copied to clipboard

"Uncaught TypeError: Cannot read property 'clientWidth' of undefined" error message appears on New Media Gallery page

Open chalov-anton opened this issue 4 years ago • 14 comments

Preconditions (*)

  1. Install Magento with Adobe Stock Integration
  2. Configured integration in Stores -> Configuration -> Advanced-> System -> Adobe Stock Integration fieldset

Steps to reproduce (*)

  1. Log in Admin Panel and go to Stores - Configuration - Advanced - System- Media Gallery
  2. Set Enable Old Media Gallery to No.
  3. Save Config and clear Magento cache
  4. Log out from Admin
  5. Generate small profile for your instance php bin/magento setup:performance:generate-fixtures setup/performance-toolkit/profiles/ce/small.xml
  6. Perform Media Gallery synchronization php bin/magento media-gallery-sync
  7. Clear Magento cache php bin/magento cache:clean
  8. Log in Admin Pannel
  9. Go to Content - Media Gallery

Expected result (*)

Media Gallery is opened no error messages in dev console

Actual result (*)

Uncaught TypeError: Cannot read property 'clientWidth' of undefined

Note

The bug is unstable, usually appeared on my system after Sign Out/Sign In Magento Admin

The error "comes from" 'masanory.js' client_width

chalov-anton avatar Sep 23 '20 13:09 chalov-anton

Hi @chalov-anton. Thank you for your report. To help us process this issue please make sure that you provided the following information:

  • Summary of the issue
  • Information on your environment
  • Steps to reproduce
  • Expected and actual results

Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:

@magento give me 2.4-develop instance - upcoming 2.4.x release

For more details, please, review the Magento Contributor Assistant documentation.

Please, add a comment to assign the issue: @magento I am working on this


:warning: According to the Magento Contribution requirements, all issues must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.

:clock10: You can find the schedule on the Magento Community Calendar page.

:telephone_receiver: The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, please join the Community Contributions Triage session to discuss the appropriate ticket.

:movie_camera: You can find the recording of the previous Community Contributions Triage on the Magento Youtube Channel

:pencil2: Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel

m2-assistant[bot] avatar Sep 23 '20 13:09 m2-assistant[bot]

:white_check_mark: Confirmed by @sivaschenko Thank you for verifying the issue. Based on the provided information internal tickets MC-37871 were created

Issue Available: @sivaschenko, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.

magento-engcom-team avatar Sep 23 '20 13:09 magento-engcom-team

@magento I'm working on this

konarshankar07 avatar Sep 24 '20 04:09 konarshankar07

This issue has been automatically marked as stale because it has not had recent activity. It will be closed after 14 days if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jan 03 '21 06:01 stale[bot]

I believe we still need to fix it

ihor-sviziev avatar Jan 06 '21 13:01 ihor-sviziev

This issue has been automatically marked as stale because it has not had recent activity. It will be closed after 14 days if no further activity occurs. Is this issue still relevant? If so, what is blocking it? Is there anything you can do to help move it forward? Thank you for your contributions!

stale[bot] avatar Mar 23 '21 14:03 stale[bot]

Please leave it open

ihor-sviziev avatar Mar 23 '21 15:03 ihor-sviziev

This issue has been automatically marked as stale because it has not had recent activity. It will be closed after 14 days if no further activity occurs. Is this issue still relevant? If so, what is blocking it? Is there anything you can do to help move it forward? Thank you for your contributions!

stale[bot] avatar Jun 07 '21 16:06 stale[bot]

Please keep it open.

ihor-sviziev avatar Jun 08 '21 05:06 ihor-sviziev

@sdzhepa could you re-triage this issue? JS errors usually causing some not obvious issues. It's better to fix them.

ihor-sviziev avatar Jun 08 '21 05:06 ihor-sviziev

The problem still exists in Magento 2.4.3-p1. The problem appears when you enable Page builder, and go any page builder text area , insert media row , and click on select from media Gallery button. See attached image please

image

Hanhan1989 avatar Nov 09 '21 16:11 Hanhan1989

still exists in Magento 2.4.4 for me. Any solution?

benlau87 avatar Jul 02 '23 15:07 benlau87

i faced the same issue and this one occurs mainly in Google Chrome. On Firefox this is working as expected.

arielashri avatar Aug 27 '23 13:08 arielashri

How I can fix this issue on Chrome?

blacksheep171 avatar Feb 27 '24 03:02 blacksheep171

Still exists in 2.4.6-p5

pod6wasjerks avatar Apr 18 '24 12:04 pod6wasjerks

Hi @engcom-Delta. Thank you for working on this issue. Looks like this issue is already verified and confirmed. But if you want to validate it one more time, please, go though the following instruction:

    1. Add/Edit Area: XXXXX label to the ticket, indicating the functional areas it may be related to.
    1. Verify that the issue is reproducible on 2.4-develop branch
      Details- Add the comment @magento give me 2.4-develop instance to deploy test instance on Magento infrastructure.
      - If the issue is reproducible on 2.4-develop branch, please, add the label Reproduced on 2.4.x.
      - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!
    1. If the issue is not relevant or is not reproducible any more, feel free to close it.

m2-assistant[bot] avatar Aug 07 '24 02:08 m2-assistant[bot]

Hi @chalov-anton ,

Thank you for reporting and collaboration.

Verified the issue on Magento 2.4-develop and the issue is not reproducible. Kindly refer the screenshots.

Steps to Reproduce

  1. Access Admin Panel.

  2. Go to Stores - Configuration - Advanced - System- Media Gallery

  3. Set Enable Old Media Gallery to No. image

  4. Save Config and Clear Cache

  5. Logout from Admin

  6. Generate small profile for your instance php bin/magento setup:performance:generate-fixtures setup/performance-toolkit/profiles/ce/small.xml image

  7. Perform Media Gallery synchronization php bin/magento media-gallery-sync image

  8. Clear Magento cache php bin/magento cache:clean

  9. Log in Admin Pannel

  10. Go to Content - Media Gallery

  11. Manage Gallery image image image

Kindly recheck the issue on latest Magento 2.4-develop instance and Please let us know if you are still facing any issue.

Thanks.

engcom-Delta avatar Aug 07 '24 13:08 engcom-Delta