? Pending

User tests: Successful: Unsuccessful:

avatar infograf768
infograf768
19 Jan 2019

Pull Request for Issue https://forum.joomla.org/viewtopic.php?f=711&t=969007

Summary of Changes

In some cases, the language string may contain an odd number of double quotes.
If this is due to an escaped double quote, it should not show as an error.

Testing Instructions

Enable debug language
Load admin.

Modify the string en-GB.lib_joomla.ini in the en-GB administrator language
from
JLIB_DATABASE_ERROR_VALID_AZ09="Please enter a valid username. No space at beginning or end, at least %d characters and must <strong>not</strong> have the following characters: < > \ &quot; ' &#37; ; ( ) &."
to
JLIB_DATABASE_ERROR_VALID_AZ09="Please enter a valid username. No space at beginning or end, at least %d characters and must <strong>not</strong> have the following characters: < > \ \" ' &#37; ; ( ) &."

i.e. replacing &quot; by \"

Before patch

Debug lang is showing Error for the line 226

After patch

No more error.

avatar infograf768 infograf768 - open - 19 Jan 2019
avatar infograf768 infograf768 - change - 19 Jan 2019
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 19 Jan 2019
Category Libraries
avatar astridx
astridx - comment - 19 Jan 2019

Is it correct, that I should change the language string in JOOMLA/administrator/language/en-GB/en-GB.lib_joomla.ini ?

Because here it is in line 230

In JOOMLA/language/en-GB/en-GB.lib_joomla.ini it is on line 226

For testing I changed both strings to

JLIB_DATABASE_ERROR_VALID_AZ09="P\"lease enter a valid username. No space at beginning or end, at least %d characters and must <strong>not</strong> have the following characters: < > \ \" ' &#37; ; ( ) &."

But I did not find a place testing it in frond end.

In back end I see now error. I changed the string and I opened user manager and inserted a username with a space on the begin. After that I see a correct language string.

users edit rsfd administration

avatar brianteeman
brianteeman - comment - 19 Jan 2019

@astridx from your screen shot i see joomla 4. This pull request is for Joomla 3 aka staging

avatar astridx
astridx - comment - 19 Jan 2019

@brianteeman Thank you. You are right. I am in the wrong version

avatar infograf768
infograf768 - comment - 19 Jan 2019

@astridx
the issue is not in the display of the string.
the issue is that Debug Language would state that the string is in error while it is not.
see bottom of page.
test is to be done on 3.x
to test it is very important to only add one \” in the string (odd number) and not an even number.

avatar imanickam
imanickam - comment - 20 Jan 2019

I have tested this item successfully on c557551

I have tested this successfully on Joomla! 3.9.2


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/23590.

avatar imanickam imanickam - test_item - 20 Jan 2019 - Tested successfully
avatar infograf768
infograf768 - comment - 20 Jan 2019

One more tester please.

avatar astridx
astridx - comment - 20 Jan 2019

I have tested this item successfully on c557551


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/23590.

avatar astridx astridx - test_item - 20 Jan 2019 - Tested successfully
avatar infograf768 infograf768 - change - 20 Jan 2019
Status Pending Ready to Commit
avatar infograf768
infograf768 - comment - 20 Jan 2019

RTC

Thanks for testing!


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/23590.

avatar HLeithner
HLeithner - comment - 24 Jan 2019

@infograf768 I think the solution is wrong, if you don't want to get an error for a missing closing quote (which is possible in Spanish) you simple should remove

// Check for odd number of double quotes.
if (substr_count($line, '"') % 2 != 0)
{
$errors[] = $realNumber;
continue;
}

avatar infograf768
infograf768 - comment - 24 Jan 2019

I disagree. That code is to display an error if the string value is missing an opening OR closing quote.
Also to deal with a missing double quote in the QQ
It is perfectly fine and these should always be a pair, AFTER we got rid of "_QQ_" and \". It was this last one that is at the origin of this PR, when it is used for example to replace a &quot;
What is special in Spanish that would be an issue?

avatar HLeithner HLeithner - change - 24 Jan 2019
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2019-01-24 12:48:53
Closed_By HLeithner
Labels Added: ?
avatar HLeithner HLeithner - close - 24 Jan 2019
avatar HLeithner HLeithner - merge - 24 Jan 2019

Add a Comment

Login with GitHub to post a comment