?
avatar bluezeyes
bluezeyes
22 Jan 2015

Steps to reproduce the issue

  1. Create a overwrite for en-GB (Site) with key "TESTIT" and content "TestValue" and save it.
  2. Proove that a overwrite file for en-GB are created and contain the above created language constant

  3. Create a new overwrite, Create a key as in one of the reserved words mentioned in Specification for language files like NO, YES, etc. (I tested with "YES" and "NO")

  4. Fill the Value with something unique: "Testcontent Blaahh".
  5. Save the new overwrite constant.

Expected result

The expected behaviour should be that the key is not saved and the User should get a message, that the key could not be saved, because he used one of the reserved words [List of reserved words]

Actual result

  1. The user get the message, that the key is saved successfully. BUT (in case of tested "NO" and "YES" keys) all keys, which were previous created, are deleted! Second the tested KEYs, which are contained in the overwrite file are not be visible in list of overwrites, which is, well.., less important.

System information (as much as possible)

Joomla: Joomla! 3.3.6 Stable [ Ember ] 01-October-2014 02:00 GMT
Joomla Platform: Joomla Platform 13.1.0 Stable [ Curiosity ] 24-Apr-2013 00:00 GMT
PHP: 5.5.9-1ubuntu4.5
DB: MySQL 5.5.40-0ubuntu0.14.04.1
Apache: Apache/2.4.7 (Ubuntu)

Used Template: Isis

Additional comments

Neither and good practice should be not using of reserved words.. but as keeping the system robust and error-resistant there should be a check added.

avatar bluezeyes bluezeyes - open - 22 Jan 2015
avatar infograf768
infograf768 - comment - 22 Jan 2015

It is a known issue that overrides are not checked for parsing problems and therefore will not show when debug language is on. Changing status as this is not an Urgent bug.


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/5864.
avatar infograf768 infograf768 - change - 22 Jan 2015
Priority Urgent Medium
avatar infograf768 infograf768 - change - 22 Jan 2015
Category Administration Language & Strings Multilanguage Templates (admin) Templates (site) UI/UX Administration Language & Strings Templates (admin) Templates (site) UI/UX
avatar bluezeyes
bluezeyes - comment - 22 Jan 2015

Well let's say I've created 20, 50 or more overrides, which could be deleted by one! accidential error in naming of the Key, YES instead of ZES for example.

(English KB layout. with German KB layout)

The system message indicates everything is alright, successfully saved.

I jump to the next language do the same (have the key / content c&p )
In this way I could with ease losing all existing overwrites in minutes!

Because the system still say everything alright.

I would say this is an urgent bug.

Because of this points:

  • There is no hint to not use reserved words for keys in the language manager.
  • There is no check to prevent using them.
  • The system indicates everything is OK.
  • The saving procedure destroys Data on the file system!
  • Not every Admin / Web developer / advanced user has the knowledge of the reserved words.

And the only way to restore the values is, to type them manually or, god hope, have a backup of the overwrite file.

avatar bluezeyes
bluezeyes - comment - 22 Jan 2015

Additionally the only hint on the reserved words list I found in the Specification mentioned above.

avatar infograf768
infograf768 - comment - 23 Jan 2015

Although there is no destruction of any files, saving a reserved word as constant when creating an override kills the site with a Fatal Error.
I made a PR preventing from saving such reserved words when using the Language Manager: Edit/new override. Please test.
#5877

NOTE: To be able to fully debug the xx-XX.override.ini files, we need another more complex PR

avatar bluezeyes
bluezeyes - comment - 23 Jan 2015

Well I tested with j3.3.6, the behavior is there, that it will be saved without results in fatal error.

The destruction was meaned as it deletes all previous constants in that xx-xx.ovewrite.ini
When saving a reserved word as key.

Thanks for the PR. I will test it, when I found out how.. ;-)

avatar zero-24 zero-24 - close - 23 Jan 2015
avatar infograf768
infograf768 - comment - 23 Jan 2015

Closing as we have a patch

avatar infograf768 infograf768 - change - 23 Jan 2015
Status New Closed
Closed_Date 0000-00-00 00:00:00 2015-01-23 10:10:00
avatar infograf768 infograf768 - close - 23 Jan 2015
avatar bluezeyes
bluezeyes - comment - 23 Jan 2015

Thanks zero-24

avatar zero-24 zero-24 - change - 7 Jul 2015
Labels Added: ?

Add a Comment

Login with GitHub to post a comment