Listing related pages [bludit3]

Post Reply
User avatar
bayerberg
Master Bludit
Posts: 71
Joined: Wed Jun 07, 2017 1:05 pm

Fri Sep 21, 2018 3:19 pm

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?
i do things, check them out on behance | check out startups undiluted - london's startup ecosystem
User avatar
bayerberg
Master Bludit
Posts: 71
Joined: Wed Jun 07, 2017 1:05 pm

Fri Sep 21, 2018 5:51 pm

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.
i do things, check them out on behance | check out startups undiluted - london's startup ecosystem
User avatar
bayerberg
Master Bludit
Posts: 71
Joined: Wed Jun 07, 2017 1:05 pm

Fri Sep 21, 2018 9:56 pm

ha - got it. the problem vanishes not when you restart your server but when you ad new content.
i do things, check them out on behance | check out startups undiluted - london's startup ecosystem
User avatar
diego
Site Admin
Posts: 635
Joined: Sat May 16, 2015 2:53 pm
Contact:

Sat Sep 22, 2018 11:15 am

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