Autonav problems with 5.4.0.3
Permalink 1 user found helpful
I have an autonav in my theme hardcoded:
It worked fine until my update from 5.4.0 to 5.4.0.3. No it shows only the first level pages but no subpages as it did before. I can't find any reason for this.
<?php $btn = BlockType::getByHandle('autonav'); $btn->controller->mainCollection = $c; $btn->controller->displayPages = 'second_level'; $btn->controller->orderBy = 'display_asc'; $btn->controller->displaySubPages = 'relevant'; $btn->controller->displaySubPageLevels = 'custom'; $btn->controller->displaySubPageLevelsNum = '1'; $btn->render('view'); ?>
It worked fine until my update from 5.4.0 to 5.4.0.3. No it shows only the first level pages but no subpages as it did before. I can't find any reason for this.
Sorry, I didn't find the thread you linked. It really mentions my problem.
In the meantime I found this line in autonav's controller.php:
this condition is always false because $sortCID has no value... seems to be a relict from the previous version.
In the meantime I found this line in autonav's controller.php:
} else if (($this->displaySubPages == "relevant" || $this->displaySubPages == "relevant_breadcrumb") && (in_array($sortCID, $this->cParentIDArray) || $sortCID == $this->cID)) {
this condition is always false because $sortCID has no value... seems to be a relict from the previous version.
PS: I changed it to
This works for me. I don't know if it's correct for every use. I just guessed...
} else if (($this->displaySubPages == "relevant" || $this->displaySubPages == "relevant_breadcrumb") && (in_array($tc->getCollectionID(), $this->cParentIDArray) || $tc->getCollectionID() == $this->cID)) {
This works for me. I don't know if it's correct for every use. I just guessed...
Seems it is a known issue. He suggests "To fix this in the meantime, you can download the original concrete 5.4.0 from our downloads page, and replace 5.4.0.3's concrete/blocks/autonav/controller.php with the original 5.4.0 autonav controller."