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

Breadcrumb logic loads and executes all parent pages #3115

Closed
getu-lar opened this Issue Dec 9, 2013 · 2 comments

Comments

Projects
None yet
3 participants
@getu-lar

getu-lar commented Dec 9, 2013

This is directly related to issue #3105 ; basically just another (arguably much worse) expression of the same fundamental issue.

Whenever a page is loaded with the Pages->_page method, all its direct parents are loaded to build the page's breadcrumbs. The unfortunate thing happens in https://github.com/pyrocms/pyrocms/blob/2.2/master/system/cms/modules/pages/controllers/pages.php on line 162

$parents[] = $this->pyrocache->model('page_m', 'get_by_uri', array($breadcrumb_segments, true));

This fetches the complete page (once for each parent in the page hierarchy) and thereby executes all the WYSIWYG fields causing massive side-effects.

Again, I'll provide a fix shortly, but this is just another symptom of an underlying issue as described in #3105

P.S:
I'm also relatively certain that the second parameter ($is_request) for the get_by_uri method should in this case be false instead of true, since the code is already iterating over all path segments and having the recursive search in get_by_uri can only cause trouble (at least in the way that I understand breadcrumbs).

@huglester

This comment has been minimized.

Show comment
Hide comment
@huglester

huglester Dec 11, 2013

Contributor

I was having issues with page redirects in 2.2.
When I try to redirect a page to some different page from a plugin (using pages module for example)

I will check if that solves my problem

Contributor

huglester commented Dec 11, 2013

I was having issues with page redirects in 2.2.
When I try to redirect a page to some different page from a plugin (using pages module for example)

I will check if that solves my problem

@philsturgeon

This comment has been minimized.

Show comment
Hide comment
@philsturgeon

philsturgeon Dec 28, 2013

Member

Thanks for the fix. These models grew over time to be rather messy, so it's nice to kill them off in 2.3. Hopefully some of these issues will be avoided.

Please can you combine your issues and pull requests to avoid doubling up the number of emails our watchers are getting? No need to point out a problem then fix, just explain the problem in the fix.

Member

philsturgeon commented Dec 28, 2013

Thanks for the fix. These models grew over time to be rather messy, so it's nice to kill them off in 2.3. Hopefully some of these issues will be avoided.

Please can you combine your issues and pull requests to avoid doubling up the number of emails our watchers are getting? No need to point out a problem then fix, just explain the problem in the fix.

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