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

Saving CMS page does not create URL rewrite in Magento 2.1.0 #5923

Closed
JacobDrummond opened this issue Aug 1, 2016 · 25 comments
Closed

Saving CMS page does not create URL rewrite in Magento 2.1.0 #5923

JacobDrummond opened this issue Aug 1, 2016 · 25 comments
Labels
bug report Component: CatalogUrlRewrite Fixed in 2.2.x The issue has been fixed in 2.2 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 Reproduced on 2.1.x The issue has been reproduced on latest 2.1 release

Comments

@JacobDrummond
Copy link

Preconditions

  1. PHP 5.6.16
  2. MySQL 5.6.21-log
  3. Magento 2.1.0
  4. Nginx 1.4.6

Steps to reproduce

  1. Create new CMS page in admin:
    hama-page-new-2

Expected result

  1. Page should be accessible as /foo-bar

Actual result

  1. 404 error:
    hama-3
  2. "foo-bar" doesn't appear anywhere in url_rewrite:
    SELECT * FROM url_rewrite WHERE request_path LIKE "%foo-bar%" returns nothing.

Additional info

  1. CMS pages created before the 2.1.0 upgrade load fine.
@Cacasapo
Copy link

Cacasapo commented Aug 2, 2016

Magento 2.1 here. Upgrade from 2.0.8 with a custom theme installed. PHP 7.0.9, apache 2.4.23.

Just came across this issue and thought I was losing my mind. I still might be.

Created a couple different pages and they both 404...
url_rewrite populated with pre-2.1 entries, which work.

@JacobDrummond
Copy link
Author

Hi @Cacasapo,

Are you also having URL rewrite issues with products, as described in #5929?

@Cacasapo
Copy link

Cacasapo commented Aug 4, 2016

@JacobDrummond Just tested it and yes, that is also present on my install.

@Cacasapo
Copy link

Cacasapo commented Aug 4, 2016

PS: This bug is NOT present on a 2.1 fresh install.

@andimov andimov self-assigned this Aug 5, 2016
@andimov
Copy link
Contributor

andimov commented Aug 5, 2016

@JacobDrummond
Thank you for reporting this issue.
I can't reproduce it on Magento 2.1.0 & nginx>=1.8v
Your web server doesn't pass the requirements.
Please, re-check this issue on supported software or add some additional info.

@JacobDrummond
Copy link
Author

@andimov, I also experience this bug locally on Apache/2.4.17, which is supported

@andimov
Copy link
Contributor

andimov commented Aug 5, 2016

@JacobDrummond
I can't reproduce it on Apache/2.4.18 also.

@JacobDrummond
Copy link
Author

@andimov, this issue is not present on a fresh 2.1 install. Did you start with 2.1, or upgrade from 2.0.6?

@andimov
Copy link
Contributor

andimov commented Aug 5, 2016

@JacobDrummond

You should provide the appropriate steps and preconditions for reproducing.

@andimov
Copy link
Contributor

andimov commented Aug 5, 2016

@JacobDrummond
What mode do you have for indexers updates?
Try to switch mode for all indexers twice. Then reproduce this issue again.

@JacobDrummond
Copy link
Author

@andimov,

You should provide the appropriate steps and preconditions for reproducing.

Sorry, I didn't know upgrading was a replication step until @Cacasapo mentioned it. Should I update issue descriptions as details emerge in a discussion?

Try to switch mode for all indexers twice. Then reproduce this issue again.

Switching indexer modes back and forth didn't make a difference. Aren't indexers irrelevant in this context, as Magento2 doesn't use indexers to maintain url_rewrite?

@JacobDrummond
Copy link
Author

@Cacasapo, solved this issue! The URLs aren't indexing because pages aren't assigning to stores correctly.

  1. disable single-store mode, so you can always see which stores pages are assigned to:
    page-1
  2. Run this query to assign all pages to admin store:
INSERT INTO `cms_page_store` (page_id, store_id)

SELECT      page_id     `page_id`
        , 0     `store_id`
FROM        `cms_page`

ON DUPLICATE KEY UPDATE page_id=VALUES(page_id), store_id=VALUES(store_id)
  1. Pages should be assigned to at least the admin store, and now generate URLs correctly:
    page-2

@andimov
Copy link
Contributor

andimov commented Aug 8, 2016

@JacobDrummond @Cacasapo
Thank you for a solution!
Do you think it is a Magento bug?

@JacobDrummond
Copy link
Author

JacobDrummond commented Aug 8, 2016

@andimov, it appears to be a bug with single-store mode. I'll open a separate issue for it when I have time. See this comment.

@Cacasapo
Copy link

Cacasapo commented Aug 8, 2016

@JacobDrummond Nice job on the workaround.

Thing is, a fix for the two issues you've found really needs to be in 2.1.1, which, hopefully, drops soon.

@andimov andimov added Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development and removed Progress: needs update labels Aug 15, 2016
@andimov
Copy link
Contributor

andimov commented Aug 16, 2016

@JacobDrummond @Cacasapo
Thanks! I've created an internal ticket for this issue - MAGETWO-56863 and linked it to this one.

@liquidia
Copy link

issue still exist in latest 2.1.1

@andimov andimov removed their assignment Sep 2, 2016
@yumicom
Copy link

yumicom commented Nov 4, 2016

issue exist in v. 2.1.2

mmansoor-magento pushed a commit that referenced this issue Nov 11, 2016
mmansoor-magento pushed a commit that referenced this issue Nov 11, 2016
mmansoor-magento pushed a commit that referenced this issue Nov 11, 2016
mmansoor-magento pushed a commit that referenced this issue Nov 11, 2016
mmansoor-magento pushed a commit that referenced this issue Nov 11, 2016
mmansoor-magento pushed a commit that referenced this issue Nov 11, 2016
mmansoor-magento pushed a commit that referenced this issue Nov 11, 2016
…n Magento 2.1.0 with single-store mode #5923

tHub] Saving CMS page does not create URL rewrite in Magento 2.1.0 with
single-store mode #5923# the commit.
mmansoor-magento pushed a commit that referenced this issue Nov 11, 2016
Fixed issues:
- MAGETWO-55605: Security Issue with referrer
- MAGETWO-58222: Cron separate process
- MAGETWO-56863: [GitHub] Saving CMS page does not create URL rewrite in Magento 2.1.0 with single-store mode #5923
- MAGETWO-60037: User is able to create empty URL key for category which leads to numerous errors
@erfanimani
Copy link
Contributor

Issue exists in 2.1.3..

@veloraven
Copy link
Contributor

MAGETWO-56863 fixes this issue in develop branch
Internal ticket for branch 2.1 - MAGETWO-58383

@Ctucker9233
Copy link

@veloraven What version of Magento will contain MAGETWO-58383? Are there commit references for this internal ticket?

@magento-engcom-team magento-engcom-team added Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development bug report Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Component: CatalogUrlRewrite labels Sep 11, 2017
@magento-engcom-team magento-engcom-team added 2.1.x Fixed in 2.2.x The issue has been fixed in 2.2 release line Reproduced on 2.1.x The issue has been reproduced on latest 2.1 release labels Sep 20, 2017
@magento-engcom-team
Copy link
Contributor

@JacobDrummond, thank you for your report.
The issue is already fixed in 2.2.0

@Cacasapo
Copy link

So, is the 2.1.x branch going to be abandoned for 2.2?

@Ctucker9233
Copy link

@Cacasapo I'm pretty sure 2.1 is not at EOL. But they want everyone to go to 2.2.

magento-engcom-team pushed a commit that referenced this issue Feb 12, 2018
…URL rewrite in Magento 2.1.0 with single-store mode #5923 - for 2.1
magento-engcom-team pushed a commit that referenced this issue Feb 12, 2018
…URL rewrite in Magento 2.1.0 with single-store mode #5923 - for 2.1
magento-engcom-team pushed a commit that referenced this issue Feb 12, 2018
…URL rewrite in Magento 2.1.0 with single-store mode #5923 - for 2.1
magento-engcom-team pushed a commit that referenced this issue Feb 12, 2018
…URL rewrite in Magento 2.1.0 with single-store mode #5923 - for 2.1
magento-engcom-team pushed a commit that referenced this issue Feb 12, 2018
…URL rewrite in Magento 2.1.0 with single-store mode #5923 - for 2.1
magento-engcom-team pushed a commit that referenced this issue Feb 12, 2018
…URL rewrite in Magento 2.1.0 with single-store mode #5923 - for 2.1
magento-engcom-team pushed a commit that referenced this issue Feb 12, 2018
…URL rewrite in Magento 2.1.0 with single-store mode #5923 - for 2.1
@Ctucker9233
Copy link

@magento-engcom-team Will the backport for 2.1 make it into the next release?

mmansoor-magento pushed a commit that referenced this issue Oct 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug report Component: CatalogUrlRewrite Fixed in 2.2.x The issue has been fixed in 2.2 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 Reproduced on 2.1.x The issue has been reproduced on latest 2.1 release
Projects
None yet
Development

No branches or pull requests

9 participants