Page 1 of 1

Listing related pages [bludit3]

Posted: Fri Sep 21, 2018 3:19 pm
by bayerberg
Looks like theres a bug in one of the functions responsible for pages.

I'm trying to list pages related to page I'm currently on. I'm doing this by selecting the category and excluding current page.

Code: Select all

if ($page->category()) {
	$exclude = $page->title();
        $categoryKey = $page->categoryKey();
        $category = getCategory($categoryKey);
        foreach ($category->pages() as $pageKey) {
            $page = buildPage($pageKey);
						if ( $page->title() == $exclude) {} else {
used to work in Bludit 3RC but now it throws out Uncaught Error: Call to a member function title() on boolean in . What changed?

Re: Listing related pages [bludit3]

Posted: Fri Sep 21, 2018 5:51 pm
by bayerberg
had to restart local environment , presto! everything seems to be working. weird. installed both pro and standard version just to check if this is a fluke. looking to replicate this issue and will be drilling down what happened.

Re: Listing related pages [bludit3]

Posted: Fri Sep 21, 2018 9:56 pm
by bayerberg
ha - got it. the problem vanishes not when you restart your server but when you ad new content.

Re: Listing related pages [bludit3]

Posted: Sat Sep 22, 2018 11:15 am
by diego
Maybe there was some error in the database of categories, when you create/edit/remove content, the database categories are reindexed and fixing a possible problem of inconsistency.