Listing related pages [bludit3]

Post Reply
User avatar
bayerberg
Master Bludit
Posts: 141
Joined: Wed Jun 07, 2017 1:05 pm
Location: London, UK
Has thanked: 7 times
Been thanked: 10 times
Contact:

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?
bludit plugins and themes - makeitblu | I do things, check them out on behance and dribbble.
User avatar
bayerberg
Master Bludit
Posts: 141
Joined: Wed Jun 07, 2017 1:05 pm
Location: London, UK
Has thanked: 7 times
Been thanked: 10 times
Contact:

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.
bludit plugins and themes - makeitblu | I do things, check them out on behance and dribbble.
User avatar
bayerberg
Master Bludit
Posts: 141
Joined: Wed Jun 07, 2017 1:05 pm
Location: London, UK
Has thanked: 7 times
Been thanked: 10 times
Contact:

ha - got it. the problem vanishes not when you restart your server but when you ad new content.
bludit plugins and themes - makeitblu | I do things, check them out on behance and dribbble.
User avatar
diego
Site Admin
Posts: 773
Joined: Sat May 16, 2015 2:53 pm
Been thanked: 1 time
Contact:

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.
Post Reply