User tests: Successful: Unsuccessful:
Status | New | ⇒ | Pending |
Category | ⇒ | Administration com_finder |
Labels |
Added:
?
|
I have tested this item
Status | Pending | ⇒ | Ready to Commit |
RTC
Did you actually check and see if the option works?
AFAICT the only thing you can have tested is that there is no error when this option is enabled, you are not actually testing if the option works. From what I can tell this option can not work as it hasnt been implemented. So it is not possible to say that the problem is fixed.
This is correct @brianteeman - it is a quick solution which fixes the fatal error and storing false duplicates in content. It surely needs more investigation.
@brianteeman I don't see that this functionality is not implemented at all. At least it is implemented in the same way as the common search terms, as far as I can see in code.
It is e.g. read here https://github.com/joomla/joomla-cms/blob/4.0-dev/administrator/components/com_finder/src/Indexer/Indexer.php#L914 and then checked here https://github.com/joomla/joomla-cms/blob/4.0-dev/administrator/components/com_finder/src/Indexer/Indexer.php#L942-L945 .
The "numeric" property of the token is set as well as the common "property" by the tokenizer. If the site is multilingual, the tokenizer of the translation is used if available:
For testing that it would need a translation which provides that, same as with testing the common search terms (if not English).
At least that's what I can find in code. Of course I might be wrong. Maybe @Hackwar can shed a light on it.
Hmm, @brianteeman could be right and it's not fully implemented because in database tables for terms and tokens have a column "common" but don't have a column "numeric".
I have not tested this item.
Reverting my test now as I'm unsure either now if this is the right fix. If the new article doesn't contain any numeric words, I would not expect anything to be filtered out and so there should be tokens found, like it is with the common search words if those aren't given for some language.
Status | Ready to Commit | ⇒ | Pending |
Back to pending.
I have tested this item
Thinking it over and reviewing the code, I think this PR is right, and it fixes the issue.
The two "continue" statements here may result in the "values" property of the query not being set, and so it needs to check for that before executing the query.
Another question is why the "values" property of the query is not set when the option to filter numerics is on. This is a separate issue which doesn't change anything on the need for the check added by this PR.
Status | Pending | ⇒ | Ready to Commit |
RTC
This bug could also be fixed by removing the option. As the option doesn't do anything (it can't) then that would be a more sensible fix than having an option that doesnt do anything. Merging this PR will just mask the problem that the option doesn't do anything
@brianteeman When the option will be removed then it still will need the fix from this PR because due to the other filtering for common search terms the values property of the query still might be not set.
@brianteeman You can test what I said as follows: Have a multilingual site with English language and others. Switch off the "filter numeric terms" option, if on, and switch on the "filer common words" option. Then create an article, assign it to English language and make sure that the article content consists only of words from this list here: https://github.com/joomla/joomla-cms/blob/4.0-dev/language/en-GB/com_finder.commonwords.txt . Then try to save. Result: Same error as mentioned in the issue. Apply the patch again and try again. Result: Works. Note that this only works when an article is assigned to the English language and not to language all, and that requires a multilingual site.
@brianteeman When the option will be removed then it still will need the fix from this PR because due to the other filtering for common search terms the values property of the query still might be not set.
I meant completely remove everything associated with this broken option. Not just the xml
@brianteeman You can test what I said as follows: Have a multilingual site with English language and others. Switch off the "filter numeric terms" option, if on, and switch on the "filer common words" option. Then create an article, assign it to English language and make sure that the article content consists only of words from this list here: https://github.com/joomla/joomla-cms/blob/4.0-dev/language/en-GB/com_finder.commonwords.txt .
Of course. But it would also be resolved by removing the broken code.
Of course. But it would also be resolved by removing the broken code.
@brianteeman The code for the "Filter common words" is not broken, and as I clearly pointed out this one also requires the fix from this PR here, even if you completely remove the other option "Filter numeric terms" with all its code.
@brianteeman The code for the "Filter common words" is not broken,
Never said it was
@brianteeman The code for the "Filter common words" is not broken,
Never said it was
@brianteeman The do the test which I have described in my comment and you will see that the fix provided by this PR here is not only needed for the broken "Filter numeric terms" but also for the not broken "Filter common words" option.
As I am failing to explain please test #35542
And as I am failing to explain please test what I have described in my comment, regardless of that option. You will get the fatal error without this PR and you will also get it with your PR and you will not get it with this PR.
No fatal error with my pr
No fatal error with my pr
@brianteeman Also not when you do exactly as I described here;
Have a multilingual site with English language and others.
Switch off the "filter numeric terms" option, if on, and switch on the "filer common words" option.
Then create an article, assign it to English language and make sure that the article content consists only of words from this list here: https://github.com/joomla/joomla-cms/blob/4.0-dev/language/en-GB/com_finder.commonwords.txt .
Then try to save. Result: Same error as mentioned in the issue.
Apply the patch again and try again.
Result: Works.
Note that this only works when an article is assigned to the English language and not to language all, and that requires a multilingual site.
Note that this only works when an article is assigned to the English language and not to language all, and that requires a multilingual site.
I missed that part
@brianteeman Don't get me wrong please. If the option is broken and it makes sense to remove it, then let's do it and I will support your draft PR. I only think that the fix of this PR here still will be necessary when the option has been removed, that's what I try to explain (and what I've tested).
I updated my pr to include this fix.
@richard67 under a previous maintainer it was common for this type of quick fix to be applied without addressing the full problem. This always resulted in issues further down the line with band-aids on top of band-aids. Now that they are no longer a maintainer I hope we can stop applying band-aids and look at the whole problem
I have this problem but the new code actually doesnt fix it.
Hi there,
Okay so this is Joomla! version is "4.0.3. I am running this on a development area/url on my webserver, if need can give you access. I added two screenshots. FYI I have over 2000 articles, 100 categories and 50 tags. When I turn ON Filter Numeric Terms proceed to indexing, an error appears, as shown in screenshot. When I turn it OFF the indexing proceeds as normal.
For now I have disabled it. Does this help?
Liz
Error.pdf
Enabled_numeric.pdf
@EJBJane It is strange that you still get SQL error with the new code. You can send an email to tuanpn@joomdonation.com with the access, I will be happy to take a look at the error to see why it still happens with that new code.
OK. So I got access to the site:
So I can only guess that @EJBJane has not added code from this PR to her site yet.
It works now, with the kind help of Tuan. It was difficult for me to know which was the right file to replace and which code. I am very new to Github (I never really needed it).
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2021-09-27 11:02:53 |
Closed_By | ⇒ | bembelimen | |
Labels |
Added:
?
|
Thx
sad face - this is just masking the real problem
I have tested this item✅ successfully on 4290b90
I have tested this PR and it resolves the problem.
The articles stored while the error occurred are not displayed in articles overview. It is not related to this PR.
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/35540.