?
Related to # 18221
avatar ReLater
ReLater
28 Oct 2017

Steps to reproduce the issue

  • Current Staging or apply PR #18221
  • Set error reporting in global Joomla configuration: Maximum.
  • Go into 5 published articles and add this text somewhere in the article text:

1/17

  • Save articles.
  • Go to frontend and search for

1/17

  • Any second hit has no title.

  • Several times:

Warning: preg_replace(): Unknown modifier '1' in \components\com_search\views\search\view.html.php on line 271

Reason:

See changes in https://github.com/joomla/joomla-cms/pull/18221/files

$needle = str_replace('/', '\/', $needle);

The problem is that this line is inside a foreach loop. So $needle becomes:

  1. search hit: 1\/17 (OK).
  2. search hit: 1\\/17 (PHP-Warning. Empty title.).
  3. search hit: 1\\\/17 (Not really OK but no Warning).
  4. search hit: 1\\\\/17 (PHP-Warning. Empty title.).
    and so on.

26-10-_2017_22-03-12

avatar ReLater ReLater - open - 28 Oct 2017
avatar joomla-cms-bot joomla-cms-bot - change - 28 Oct 2017
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 28 Oct 2017
avatar ReLater ReLater - change - 28 Oct 2017
The description was changed
avatar ReLater ReLater - edited - 28 Oct 2017
avatar ReLater ReLater - change - 28 Oct 2017
The description was changed
avatar ReLater ReLater - edited - 28 Oct 2017
avatar franz-wohlkoenig franz-wohlkoenig - change - 28 Oct 2017
Category com_search
avatar franz-wohlkoenig franz-wohlkoenig - change - 28 Oct 2017
Rel_Number 0 18221
Relation Type Related to
avatar astridx
astridx - comment - 28 Oct 2017

I tested this and I can confirm this issue.

avatar franz-wohlkoenig franz-wohlkoenig - change - 28 Oct 2017
Status New Confirmed
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 28 Oct 2017

thanks @astridx Status at Issue Tracker is "Confirmed".

avatar franz-wohlkoenig franz-wohlkoenig - change - 28 Oct 2017
Status Confirmed Closed
Closed_Date 0000-00-00 00:00:00 2017-10-28 09:48:45
Closed_By franz-wohlkoenig
avatar joomla-cms-bot joomla-cms-bot - change - 28 Oct 2017
Closed_By franz-wohlkoenig joomla-cms-bot
avatar joomla-cms-bot joomla-cms-bot - close - 28 Oct 2017
avatar joomla-cms-bot
joomla-cms-bot - comment - 28 Oct 2017
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 28 Oct 2017

closed as having Pull Request #18433

Add a Comment

Login with GitHub to post a comment