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

Sitemap Generation - Product URL check null fix #21749

Merged

Conversation

asim-vax
Copy link
Contributor

Description (*)

Using category URL in products for sitemap - checks if metadata is null or not, when data is either blank/empty or has contents. The null check never passes.

This fix sets empty field to null, so IS NULL check passes.

Manual testing scenarios (*)

  1. log into admin
  2. stores -> config -> catalog -> catalog -> Search Engine Optimisation -> Use category URL in product -> No
  3. Generate sitemap
  4. view sitemap -> it uses catalog/product/view/id/2149 type URL
  5. Apply fix in pull request
  6. Regenerate sitemap
  7. sitemap now uses request path (i.e product-name) rather than category/product-name

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages

@magento-engcom-team
Copy link
Contributor

Hi @asim-vax. Thank you for your contribution
Here is some useful tips how you can test your changes using Magento test environment.
Add the comment under your pull request to deploy test or vanilla Magento instance:

  • @magento-engcom-team give me test instance - deploy test instance based on PR changes
  • @magento-engcom-team give me 2.3-develop instance - deploy vanilla Magento instance

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

@magento-cicd2
Copy link
Contributor

magento-cicd2 commented Mar 14, 2019

CLA assistant check
All committers have signed the CLA.

@magento-engcom-team
Copy link
Contributor

Hi @aleron75, thank you for the review.
ENGCOM-4519 has been created to process this Pull Request

@magento-engcom-team
Copy link
Contributor

@asim-vax thank you for contributing. Please accept Community Contributors team invitation here to gain extended permissions for this repository.

@aleron75
Copy link
Contributor

Hello @asim-vax,
once merged, don't forget you can easily port this PR (if needed) to other branches with the Porting Tool, read more here.

@VasylShvorak
Copy link
Contributor

Hi @asim-vax I cannot reproduce issue on 2.3-develop branch.
Manual testing scenario:

  • Set Stores -> Configuraation -> Catalog -> Catalog -> Search Engine Optimization
    #21749Conf
  • Go to Marketing ->Site Map
  • Click Add Sitemap
  • Set Filename and Path
  • Click Save & Generate
  • View sitemap
  • ✔️ Url's for category and product are correct
    #21749Sitemap

@asim-vax
Copy link
Contributor Author

@VasylShvorak having looked at a blank 2.3 installation the metadata for a product is indeed null, however - we came from an m1 installation, converted to m2
Screenshot from 2019-03-22 14-36-52
As you can see, the metadata field is not null,but an empty string - and our entire sitemap became BASE_URL/catalog/product/view/id/868

@VasylShvorak
Copy link
Contributor

✔️ QA passed

@magento-engcom-team magento-engcom-team merged commit def3be9 into magento:2.3-develop Mar 30, 2019
@m2-assistant
Copy link

m2-assistant bot commented Mar 30, 2019

Hi @asim-vax, thank you for your contribution!
Please, complete Contribution Survey, it will take less than a minute.
Your feedback will help us to improve contribution process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants