Skip to content

sitemap image URLs has wrong cache path #24484

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

Closed
bst2002git opened this issue Sep 6, 2019 · 30 comments
Closed

sitemap image URLs has wrong cache path #24484

bst2002git opened this issue Sep 6, 2019 · 30 comments
Assignees
Labels
Component: MediaStorage Component: Sitemap Event: mm19pl Fixed in 2.3.x The issue has been fixed in 2.3 release line Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed 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 Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release

Comments

@bst2002git
Copy link

bst2002git commented Sep 6, 2019

I've search into the database for the cache (ID) path and onto the filesystem,
but ID 3e7668b51c2d31ea41d3695bfbe7fa89 is not found

Preconditions (*)

Magento ver. 2.3.2 & 2.3-develop

Steps to reproduce (*)

Create sitemap.xml File

Expected result (*)

https://shop.local/pub/media/catalog/product/cache/394c582e6ac26a409e94a110e9356eac/1/1/1125.main_1.jpg

Actual result (*)

https://shop.local/de_at/product-test.html 2019-04-12T09:07:15+02:00 daily 1.0 https://shop.local/pub/media/catalog/product/cache/3e7668b51c2d31ea41d3695bfbe7fa89/1/1/1125.main_1.jpg Product Test https://shop.local/pub/media/catalog/product/cache/3e7668b51c2d31ea41d3695bfbe7fa89/1/1/1125.aw06.jpg Product Test
@m2-assistant
Copy link

m2-assistant bot commented Sep 6, 2019

Hi @bst2002git. 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.3-develop instance - upcoming 2.3.x release

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

@bst2002git do you confirm that you were able to reproduce the issue on vanilla Magento instance following steps to reproduce?

  • yes
  • no

@magento-engcom-team magento-engcom-team added the Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed label Sep 6, 2019
@engcom-Charlie engcom-Charlie self-assigned this Sep 6, 2019
@m2-assistant
Copy link

m2-assistant bot commented Sep 6, 2019

Hi @engcom-Charlie. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: 👇

  • 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).

    DetailsIf the issue has a valid description, the label Issue: Format is valid will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid appears.

  • 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description label to the issue by yourself.

  • 3. Add Component: XXXXX label(s) to the ticket, indicating the components it may be related to.

  • 4. Verify that the issue is reproducible on 2.3-develop branch

    Details- Add the comment @magento give me 2.3-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.3-develop branch, please, add the label Reproduced on 2.3.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!

  • 5. Add label Issue: Confirmed once verification is complete.

  • 6. Make sure that automatic system confirms that report has been added to the backlog.

@bst2002git
Copy link
Author

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

@magento-engcom-team
Copy link
Contributor

Hi @bst2002git. Thank you for your request. I'm working on Magento 2.3-develop instance for you

@magento-engcom-team
Copy link
Contributor

Hi @bst2002git, here is your Magento instance.
Admin access: https://i-24484-2-3-develop.instances.magento-community.engineering/admin
Login: admin Password: 123123q
Instance will be terminated in up to 3 hours.

@bst2002git
Copy link
Author

bst2002git commented Sep 6, 2019

@engcom-Charlie engcom-Charlie added Component: MediaStorage Component: Sitemap Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release labels Sep 6, 2019
@ghost ghost unassigned engcom-Charlie Sep 6, 2019
@magento-engcom-team magento-engcom-team added the Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development label Sep 6, 2019
@magento-engcom-team
Copy link
Contributor

✅ Confirmed by @engcom-Charlie
Thank you for verifying the issue. Based on the provided information internal tickets MC-19910 were created

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

@ghost
Copy link

ghost commented Sep 7, 2019

@magento i am working on it.

@m2-assistant
Copy link

m2-assistant bot commented Sep 7, 2019

Hi @prabhatrawat-webkul! 👋
Thank you for joining. Please accept team invitation 👉 here 👈 and self-assign the issue.

@ghost ghost self-assigned this Sep 7, 2019
@m2-assistant
Copy link

m2-assistant bot commented Sep 7, 2019

Hi @prabhatrawat-webkul. 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 Component: XXXXX label(s) to the ticket, indicating the components it may be related to.

  • 2. Verify that the issue is reproducible on 2.3-develop branch

    Details- Add the comment @magento give me 2.3-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.3-develop branch, please, add the label Reproduced on 2.3.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!

  • 3. If the issue is not relevant or is not reproducible any more, feel free to close it.


@ghost ghost removed their assignment Sep 10, 2019
@krisdante
Copy link
Contributor

#mm19pl

@m2-assistant
Copy link

m2-assistant bot commented Sep 15, 2019

Hi @krisdante. 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 Component: XXXXX label(s) to the ticket, indicating the components it may be related to.

  • 2. Verify that the issue is reproducible on 2.3-develop branch

    Details- Add the comment @magento give me 2.3-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.3-develop branch, please, add the label Reproduced on 2.3.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!

  • 3. If the issue is not relevant or is not reproducible any more, feel free to close it.


@magento-engcom-team
Copy link
Contributor

Hi @bst2002git. Thank you for your report.
The issue has been fixed in #24605 by @krisdante in 2.3-develop branch
Related commit(s):

The fix will be available with the upcoming 2.3.4 release.

@magento-engcom-team magento-engcom-team added the Fixed in 2.3.x The issue has been fixed in 2.3 release line label Sep 20, 2019
@simon-saurabh
Copy link

@krisdante Do we need to do anything else other than implementing the above 3 commits as I have applied all 3 commits and the image issue with sitemap is still there for me. It is still taking the Magento placeholder image. Also, my Magento version is 2.3.2 and the above patch is not working for me.

@krisdante
Copy link
Contributor

How do you create a sitemap ? With cron on manually in admin pannel?

@krisdante
Copy link
Contributor

It is strange that it takes placeholder image. It was generating wrong checksum - so the file was de-facto not existing (404) not placeholder.

@simon-saurabh
Copy link

@krisdante we are generating the sitemap.xml from the Magento Admin and yes you are right that it is generating the wrong checksum, as I had removed the cache path from the image URL to see the product image exist on the path then it is showing me the correct product image.

For eg- this is the image URL in the sitemap.xml (http://abc.com/media/catalog/product/cache/8b5174bff07af2e5e6c6a9fb70572a9b/3/-/3-30-521-2_c.jpg) which is giving me placeholder image and if I am trying this (http://abc.com/media/catalog/product/3/-/3-30-521-2_c.jpg) then it is showing me the correct image.

So do you have any idea how to fix this issue?
Thanks in advance.

@simon-saurabh
Copy link

@krisdante We have debugged it further and found out that only for Sitemap, we have image_type param inside MiscParams array that are set there as blank on file vendor/magento/module-catalog/Model/View/Asset/Image.php on the constructor.
But if we are unsetting the blank image_type param from the miscParams then the image path is coming correctly. I mean it is generating the correct checksum. Do you know why it is happening?

@krisdante
Copy link
Contributor

If they are blank it means that you do not have patch (emulation is not worked). It is the situation that was before the patch

@simon-saurabh
Copy link

@krisdante But my magento version is 2.3.2 which is the latest version so why the patch is required?

@krisdante
Copy link
Contributor

Because it is merged to 2.3.4

@simon-saurabh
Copy link

@krisdante ok so can you please provide me the commit id on which the fix is implemented?

@krisdante
Copy link
Contributor

It's like 4 messages up.
861e9f9

@simon-saurabh
Copy link

@krisdante But I have already tried the above but still having issues with checksum on the cached URL of the image on the sitemap xml

@krisdante
Copy link
Contributor

If the checksum did not change - seems that you have not applied the patch correctly.
If it changed than it needs to be checked in settings of your current theme if you have the big image defined properly.

@krisdante
Copy link
Contributor

product_page_image_large this image type needs to be defined.

@simon-saurabh
Copy link

@krisdante Thanks for the help, the above hint fix the issue for me as I have only created view.xml for frontend theme and I was specifying product_page_image_large param there but there was no view.xml for backend and thats why setting was coming as blank for sitemap.xml as I was generating it from backend.

@krisdante
Copy link
Contributor

You miss-understood me, and that also confirms that you did not apply patch properly.
The pach reads this setting from frontend. It is good that this setting is not set for backend. THet's teh whole fix - settings age read from frontend view.xml.

@johncarlson21
Copy link

could you please tell me what the proper product_page_image_large params should be set to. I have it in my view.xml file but like this:

and I'm running 2.3.4 and the patch changes are there.

@magento-quality-patches

The patch solving a similar issue is available in Magento Quality Patches package (MQP)

Patch
MDVA-30357: Fixes the issue with wrong image URLs are created when generating a sitemap by cron.

Compatible versions
Magento OpenSource/Commerce/Commerce Cloud 2.3.2 - 2.4.0

⚠️ We strongly recommend testing all patches in a staging or development environment before deploying to production.

Applying a patch - Magento OpenSource/Commerce

  1. $ composer require magento/quality-patches
  2. $ ./vendor/bin/magento-patches apply MDVA-30357

See MQP Magento Commerce documentation

Applying a patch - Magento Commerce Cloud
See MQP Magento Commerce Cloud documentation

Patch Details
https://support.magento.com/hc/en-us/articles/360050277772

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: MediaStorage Component: Sitemap Event: mm19pl Fixed in 2.3.x The issue has been fixed in 2.3 release line Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed 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 Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release
Projects
None yet
Development

No branches or pull requests

7 participants