Skip to content

Magento creating URL with double html - html.html #466

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
saphaljha opened this issue Feb 19, 2018 · 5 comments
Closed

Magento creating URL with double html - html.html #466

saphaljha opened this issue Feb 19, 2018 · 5 comments

Comments

@saphaljha
Copy link

saphaljha commented Feb 19, 2018

Preconditions

  1. Migrated data from Magento 1.9.3.4 to 2.2.1
  2. Multiwebsite Magento

Steps to reproduce

  1. First done the migration
  2. Create a new sub-category of any category and add some products into that.
  3. Now change parent category of that subcategory using drag and from (From admin).
  4. Now check the issue in Marketing > SEO and Search > URL Re Writes
  5. Find request path "html.html"

Expected result

  1. It should show the postfix only .html

Actual result

  1. It is showing html.html in URL
    Screenshot of issue : https://www.awesomescreenshot.com/image/3180076/4a87a2023beae3148c12a3b30460e5f2

Looking forward to hearing back for solution.

NOTE : I have already migrated the website and it is live at the moment.

@victor-v-rad
Copy link
Collaborator

victor-v-rad commented Feb 19, 2018

Hi @saphaljha

Interesting... Similar issue was fixed a long ago in #59 and I did not reproduce your one the last 2.2.2 ver. Take a look at your migrated catalog_product_entity_varchar table and find records with 98 attribute_id (this attribute has attribute code = url_path in eav_attribute table) records in the field value should not have .html suffix

@saphaljha
Copy link
Author

Hello @victor-v-rad,
Thank you for showing your interest.
I am using below extension to creating the url after deleting all the URL from url_rewrite
https://github.com/saphaljha/rebuild-urlrewrite

I have also tried below quires but it is not permanent fix, when we are moving the category it is again generating the double html URLs for category products.

DELETE FROM `url_rewrite` WHERE CONCAT(`request_path`,".html")=`target_path`;
UPDATE url_rewrite SET request_path = REPLACE(request_path, '.html.html', '.html') WHERE request_path LIKE '%.html.html%';
UPDATE url_rewrite SET target_path = REPLACE(target_path, '.html.html', '.html') WHERE target_path LIKE '%.html.html%';

From #59

Thanks again @victor-v-rad

@joe-hinsole
Copy link

I also have this problem

@pietervanuhm
Copy link

Hi, @victor-v-rad

I'm still encountering this issue with double .html.

Hi @saphaljha

Interesting... Similar issue was fixed a long ago in #59 and I did not reproduce your one the last 2.2.2 ver. Take a look at your migrated catalog_product_entity_varchar table and find records with 98 attribute_id (this attribute has attribute code = url_path in eav_attribute table) records in the field value should not have .html suffix

What if this records contain .html, what do need to do ?

@victor-v-rad
Copy link
Collaborator

victor-v-rad commented Jan 17, 2019

Hi @pietervanuhm
The class which removes url suffix is \Migration\Handler\TruncateSuffix . Probably it does not work in your case. Maybe you have different configuration of url suffix for different stores.
What value or values have records with path catalog/seo/product_url_suffix in your Magento 1 core_config_data table?

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

No branches or pull requests

4 participants