No Code Attached Yet PBF bug
avatar DSist
DSist
5 May 2023

Steps to reproduce the issue

Result Description parameter = Show. It doesn't happen often, but can be reproduced with a specific search.

Expected result

search_bug1_2

Actual result

search_bug1_1

System information (as much as possible)

Joomla 4.3.1 native search
PHP 8.0.3

Additional comments

The issue has been there from the very beginning of Joomla 4.

The articles are in Russian, but I don't think it is a language-specific issue. The site is under development with no dns record. If needed I can provide all the data in a private message.

avatar DSist DSist - open - 5 May 2023
avatar joomla-cms-bot joomla-cms-bot - change - 5 May 2023
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 5 May 2023
avatar DSist DSist - change - 5 May 2023
The description was changed
avatar DSist DSist - edited - 5 May 2023
avatar DSist DSist - change - 5 May 2023
The description was changed
avatar DSist DSist - edited - 5 May 2023
avatar DSist DSist - change - 5 May 2023
The description was changed
avatar DSist DSist - edited - 5 May 2023
avatar DSist DSist - change - 5 May 2023
The description was changed
avatar DSist DSist - edited - 5 May 2023
avatar DSist DSist - change - 5 May 2023
The description was changed
avatar DSist DSist - edited - 5 May 2023
avatar DSist DSist - edited - 5 May 2023
avatar DSist DSist - change - 5 May 2023
The description was changed
avatar DSist DSist - change - 5 May 2023
The description was changed
avatar DSist DSist - edited - 5 May 2023
avatar DSist DSist - change - 5 May 2023
The description was changed
avatar DSist DSist - edited - 5 May 2023
avatar DSist DSist - change - 5 May 2023
The description was changed
avatar DSist DSist - edited - 5 May 2023
avatar DSist DSist - change - 5 May 2023
The description was changed
avatar DSist DSist - edited - 5 May 2023
avatar DSist DSist - change - 5 May 2023
The description was changed
avatar DSist DSist - edited - 5 May 2023
avatar chmst
chmst - comment - 10 May 2023

Could you please check if the space is something like %nbsp; or %shy; in the original text?

avatar chmst chmst - change - 10 May 2023
Labels Added: Information Required
avatar chmst chmst - labeled - 10 May 2023
avatar DSist
DSist - comment - 10 May 2023

Could you please check if the space is something like %nbsp; or %shy; in the original text?

Nope, a regular space. Moreover if I delete this space in the original text Joomla removes the previous one as well, etc.

I have extracted the text fragment to reproduce the issue. Create a new article and paste this text:

Планетарное Братство Учителей Мудрости, направляющее эволюцию на нашей планете. Распределительный центр энергии Любви Бога. Духовный источник всех человеческих рас, цивилизаций, религий, культур. Великое Белое Братство. Иерархия Учителей. Иерархия Света.

Духовная Иерархия — это реальность, как и сама душа. А для нас, людей, это сверхреальность, так как Иерархия представляет собой более высокое царство природы — царство душ, которое является причинным по отношению к нашему человеческому царству. Это значит, что все эволюционные изменения, которые происходят в человечестве, являются следствиями изменений, что сначала происходят в Иерархии, то есть в умах Учителей Мудрости, и лишь затем они осаждаются на планы человеческого бытия, где и обретают те или иные формы: религиозные, политические, общественные, экономические и другие.

Планетарная Иерархия направляет эволюцию на нашей планете, имея одной из задач непрерывное расширение человеческого сознания, так как именно человеческое царство является связующим звеном между тремя дочеловеческими и тремя сверхчеловеческими царствами в теле Планетарного Логоса, нашего Бога. Иерархия воздействует на человечество двумя основными способами:

Search the term: нашего

There is no space in the search results between the words inside the red circle

search_bug1_3

avatar brianteeman
brianteeman - comment - 10 May 2023

I copied and pasted the text from your post and then searched for нашего
As you can see from the screenshot there is a space.

I am using the chrome browser on windows 11

image

avatar chmst chmst - change - 10 May 2023
Labels Removed: Information Required
avatar chmst chmst - unlabeled - 10 May 2023
avatar chmst
chmst - comment - 11 May 2023

I can confirm the issue, Firefox and Chrome. But no clue what happens here.

avatar chmst chmst - change - 11 May 2023
Labels Added: bug
avatar chmst chmst - labeled - 11 May 2023
avatar brianteeman
brianteeman - comment - 11 May 2023

Wonder why it was different for me

avatar chmst
chmst - comment - 11 May 2023

After replacing the spaces from the copied text with "my" spaces the search result is ok, There must be something in the text.

avatar DSist
DSist - comment - 11 May 2023

I have replaced all the spaces in the text with "new" spaces via JCE Editor, the result is the same.

avatar DSist
DSist - comment - 11 May 2023

I have found how to reproduce both results. I use JCE Editor as a default editor.

If you copy the source text I have cited above and paste it via Code section of the editor, the text is inserted as a paragraph with a single p tag. The search result is OK.

If you divide it into several paragraphs via Editor section with br/ inserted (using Enter key) or with p tags via Code section the result is wrong.

avatar brianteeman
brianteeman - comment - 12 May 2023

Can you replicate with tinymce

avatar DSist
DSist - comment - 12 May 2023

Yes, it is replicated with tinymce: a single p tag - OK, several p tags - no space.

avatar Hackwar
Hackwar - comment - 25 Aug 2023

The problem is the tokenize() code in the Smart Search component in the Helper class. It removes all tags and seems to not insert the right spaces here.

avatar Hackwar Hackwar - change - 25 Aug 2023
Labels Added: PBF
avatar Hackwar Hackwar - labeled - 25 Aug 2023
avatar Hackwar Hackwar - close - 28 Aug 2023
avatar Hackwar
Hackwar - comment - 28 Aug 2023

Got a PR to fix this with #41502. Closing the issue.

avatar Hackwar Hackwar - change - 28 Aug 2023
Status New Closed
Closed_Date 0000-00-00 00:00:00 2023-08-28 20:48:54
Closed_By Hackwar

Add a Comment

Login with GitHub to post a comment