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

Remove breadcrumbs for multistore homepage #6503

Merged
merged 1 commit into from
May 25, 2017

Conversation

PingusPepan
Copy link
Contributor

@PingusPepan PingusPepan commented Sep 6, 2016

When there are multiple different cms home pages with same identifier but for different store views, breadcrumbs are shown in all of them except the first.
The same applies for 404 pages.
Fixes #6504

When there are multiple different cms home pages with same identifier but for different store views, breadcrumbs are shown in all of them except the first.
The same applies for 404 pages.
@skovalenk
Copy link
Contributor

@PingusPepan Hi, Ill appritiate if you explain to me how spliting string by | delimiter, helps to find home page identifier. I Suppose you have some sequence such as "home_page_id|something_else". However by default Magento dont have this functionality

@PingusPepan
Copy link
Contributor Author

PingusPepan commented Sep 9, 2016

@sereban I copied this exact code from Magento 2 core code and just altered it for homepage and 404 recognition.
You can find the original code I copied this from in the file: (app/code/Magento/Cms/Helper/Page.php:125)

I think the | delimiter is applied when there are multiple pages for different store views with same identifiers and this helps to identify them by id.

@PingusPepan
Copy link
Contributor Author

PingusPepan commented Sep 9, 2016

You can see where and why this happens in file app/code/Magento/Cms/Model/ResourceModel/Page/Collection.php:57

If there are two same identifiers, it adds the delimiter. That's fine, it just wasn't accounted for in the breadcrumbs homepage and 404 check code. I only added the check for it and now it works just fine. #6504 is fixed by this PR. The delimiter lives only in config so it can't be seen while editing the page or in cms database table.

@skovalenk
Copy link
Contributor

@PingusPepan Ok So if there is identifier and page title for home page than they save with delimiter. Cool. Thanks. We will see PR.

@PingusPepan
Copy link
Contributor Author

Has anyone looked into this? It's a simple bug fix and it would help to have it fixed in Magento. This way I have to manually replace the file after every test install/update

@vrann vrann self-assigned this Apr 14, 2017
@vrann vrann added this to the April 2017 milestone Apr 14, 2017
@okorshenko okorshenko modified the milestones: April 2017, May 2017 May 9, 2017
@magento-team magento-team merged commit e163e31 into magento:develop May 25, 2017
@magento-team
Copy link
Contributor

@PingusPepan Thank you for the contribution

@PingusPepan PingusPepan deleted the patch-2 branch May 25, 2017 07:31
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.

6 participants