Open Jimmi08 opened 4 years ago
the wrong breadcrumbs are displayed by this
$CHAPTER_TEMPLATE['default']['listPages']['start'] = "{CHAPTER_BREADCRUMB}<ul class='page-pages-list'>
";
I gave up. No changes in function sc_chapter_breadcrumb()
are applied. Breadcrumbs are still displayed, only way how to rid them is to remove that shortcode from template.
But why I can't do something like this to test this?
function sc_chapter_breadcrumb()
{
return '';
It is because this, that shortcode is ignored and SimpleParser is used:
'CHAPTER_BREADCRUMB' => !empty($_GET['ch']) ? $frm->breadcrumb($bread) : ''
This is source of this problem:
$urlData = array(
'chapter_id' => $row['chapter_id'],
'chapter_name' => $tp->toHTML($row['chapter_name']),
'chapter_sef' => $bookSef,
'book_sef' => $bookSef,
'page_sef' => '',
'book_id' => $row['chapter_parent']
);
FIX:
$urlData = array(
'chapter_id' => $row['chapter_parent'],
);
Because there was book_id for this originally, something was changed. Adding book_id to allowed values didn't help.
Bug Description
breadcrumbs have wrong book url if you are on chapter page
How to Reproduce
ID 1 - book ID 2 - chapter ID 1 - page
Used URL configuration: page/1/page-name
All page list - all links are correct (/page) Single page page/1/article-1 - breadcrumbs are correct /page/book/1/general - correct /page/chapter/2/chapter-1 - correct
Single chapter page /page/chapter/2/chapter-1