magento2: Saving CMS page does not create URL rewrite in Magento 2.1.0

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.

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 25 (9 by maintainers)

Commits related to this issue

Most upvoted comments

@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