Create multipage article with content like this:
some intro text
<hr id="system-readmore" />
some 1st page text
<hr class="system-pagebreak" />
some 2nd page text
<hr class="system-pagebreak" />
some 3rd page text
and try to access page 2 or 3
The main point is presence of <hr id="system-readmore" />
before <hr class="system-pagebreak" />
404 error when trying to access a page other than the first.
Joomla 3.8
The reason in the code added by the commit
Code:
// Check if the intro text needs to be processed as well
if ($item->introtext && strpos($item->text, $item->introtext) !== 0)
{
// Save the old text of the article
$text = $item->text;
// Set the intro text as new text
$item->text = $item->introtext;
// Trigger the event with the introtext
$dispatcher->trigger('onContentPrepare', array ('com_content.article', &$item, &$item->params, $offset));
// Set the prepared intro text back
$item->introtext = $item->text;
// Restore the original text variable
$item->text = $text;
}
In the case of the article's structure I described (which is quite common), after
// Set the intro text as new text
$item->text = $item->introtext;
$item->text does not contain code <hr class="system-pagebreak" />
Next, in the onContentPrepare event handler of PageBreak plugin there is an error when trying to access the 2nd or more page:
// Simple performance check to determine whether bot should process further.
if (StringHelper::strpos($row->text, 'class="system-pagebreak') === false)
{
if ($page > 0)
{
throw new Exception(JText::_('JERROR_PAGE_NOT_FOUND'), 404);
}
return true;
}
Labels |
Added:
?
|
Category | ⇒ | com_content |
Status | New | ⇒ | Duplicate Report |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2017-09-21 11:56:13 |
Closed_By | ⇒ | franz-wohlkoenig |
Status | Duplicate Report | ⇒ | Closed |
Closed_By | franz-wohlkoenig | ⇒ | joomla-cms-bot |
Set to "closed" on behalf of @franz-wohlkoenig by The JTracker Application at issues.joomla.org/joomla-cms/18042
closed as duplicate Report ##17830
Thanks for Hint @sandewt
It seems a known problem !!!
See the issues: #17830 and #18016 .
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/18042.