?
avatar beni71
beni71
12 Jun 2016

Steps to reproduce the issue

I have written a php script for searching for language text keys used in the whole php code. This script finds only almost all used keys, but anyway I can check on whether all keys are to be found in any language definition file (.ini file).

The following used keys are missing (list of all code lines using a missing key - a key may be listed more than once):

  • JGLOBAL_BATCH_MOVE_ROW_NOT_FOUND at: JROOT\administrator\components\com_categories\models\category.php:923
  • JGLOBAL_BATCH_MOVE_ROW_NOT_FOUND at: JROOT\administrator\components\com_categories\models\category.php:1107
  • SOME_ERROR_CODE at: JROOT\administrator\components\com_config\model\application.php:177
  • SOME_ERROR_CODE at: JROOT\administrator\components\com_config\model\application.php:209
  • SOME_ERROR_CODE at: JROOT\administrator\components\com_config\model\application.php:402
  • COM_FINDER_INDEX_PURGE_FAILED at: JROOT\administrator\components\com_finder\controllers\index.php:58
  • JGLOBAL_BATCH_MOVE_ROW_NOT_FOUND at: JROOT\administrator\components\com_menus\models\item.php:243
  • JGLOBAL_BATCH_MOVE_ROW_NOT_FOUND at: JROOT\administrator\components\com_menus\models\item.php:422
  • COM_TAGSS_REBUILD_FAILURE at: JROOT\administrator\components\com_tags\controllers\tags.php:62
  • JERROR_SAVE_NOT_PERMITTED at: JROOT\administrator\components\com_templates\controllers\template.php:221
  • BANNERS_SEARCH_IN_TITLE at: JROOT\administrator\templates\hathor\html\com_banners\banners\default.php:36
  • BANNERS_SELECT_TYPE at: JROOT\administrator\templates\hathor\html\com_banners\tracks\default.php:60
  • COM_LANGS_SEARCH_IN_TITLE at: JROOT\administrator\templates\hathor\html\com_languages\languages\default.php:39
  • FILTERS at: JROOT\administrator\templates\hathor\html\com_templates\templates\default.php:33
  • COM_USERS_FILTER_FILTER_DATE at: JROOT\administrator\templates\hathor\html\com_users\users\default.php:77
  • COM_CONTACT_SESSION_INVALID at: JROOT\components\com_contact\controllers\contact.php:64
  • COM_TAGS_DEFAULT_PAGE_TITLE at: JROOT\components\com_tags\views\tags\view.html.php:166
  • COM_USERS_REMIND_REQUEST_ERROR at: JROOT\components\com_users\controllers\user.php:392
  • COM_USER_LOGOUT_IMAGE_ALT at: JROOT\components\com_users\views\login\tmpl\default_logout.php:30
  • JLIB_DATABASE_ERROR_DATABASE_QUERY at: JROOT\installation\model\database.php:339
  • JLIB_DATABASE_ERROR_DATABASE_QUERY at: JROOT\installation\model\database.php:356
  • JLIB_LOGIN_EXPIRED at: JROOT\libraries\cms\application\cms.php:840
  • JLIB_LOGIN_DENIED at: JROOT\libraries\cms\application\cms.php:845
  • JLIB_LOGIN_AUTHORISATION at: JROOT\libraries\cms\application\cms.php:850
  • JRULE_ALLOWED_INHERITED at: JROOT\libraries\cms\html\rules.php:227
  • JRULE_DENIED_INHERITED at: JROOT\libraries\cms\html\rules.php:228
  • JLIB_INSTALLER_ERROR_PACK_REFRESH_MANIFEST_CACHE at: JROOT\libraries\cms\installer\adapter\file.php:634
  • ERRORUNKOWNEXTENSION at: JROOT\libraries\cms\installer\adapter\library.php:367
  • JLIB_INSTALLER_ERROR_LIB_REFRESH_MANIFEST_CACHE at: JROOT\libraries\cms\installer\adapter\library.php:501
  • JLIB_INSTALLER_ERROR_PACK_REFRESH_MANIFEST_CACHE at: JROOT\libraries\cms\installer\adapter\package.php:686
  • JLIB_INSTALLER_ERROR_TPL_REFRESH_MANIFEST_CACHE at: JROOT\libraries\cms\installer\adapter\template.php:606
  • UNKNOWN at: JROOT\libraries\cms\installer\installer.php:2183
  • UNKNOWN at: JROOT\libraries\cms\installer\installer.php:2184
  • JLIB_INSTALLER_INCORRECT_SEQUENCE at: JROOT\libraries\cms\installer\script.php:142
  • JLIB_APPLICATION_ERROR_MENU_LOAD at: JROOT\libraries\cms\menu\menu.php:130
  • LIB_CMS_WARNING_PROVIDE_VALID_NAME at: JROOT\libraries\cms\table\corecontent.php:97
  • EXTENSION at: JROOT\libraries\fof\utils\installscript\installscript.php:552
  • STATUS at: JROOT\libraries\fof\utils\installscript\installscript.php:553
  • JLIB_CLIENT_ERROR_JFTP_SYS_BAD_RESPONSE_NATIVE at: JROOT\libraries\joomla\client\ftp.php:447
  • JLIB_CLIENT_ERROR_JFTP_BAD_RESPONSE_SIZE at: JROOT\libraries\joomla\client\ftp.php:1351
  • RENAME FAILED at: JROOT\libraries\joomla\filesystem\folder.php:447
  • RENAME FAILED at: JROOT\libraries\joomla\filesystem\folder.php:456
  • JLIB_FILESYSTEM_PATCHER_REMOVE_LINE at: JROOT\libraries\joomla\filesystem\patcher.php:413
  • JLIB_FILESYSTEM_PATCHER_ADD_LINE at: JROOT\libraries\joomla\filesystem\patcher.php:423
  • JFRAMEWORK_FORM_FIELDS_PLUGINS_ERROR_FOLDER_EMPTY at: JROOT\libraries\joomla\form\fields\plugins.php:144
  • JLIB_STEMMER_INVALID_STEMMER at: JROOT\libraries\joomla\language\stemmer.php:58
  • JLIB_MAIL_USER_SUBMITTED at: JROOT\libraries\joomla\mail\mail.php:754
  • JLIB_MAIL_MSG_ADMIN at: JROOT\libraries\joomla\mail\mail.php:756
  • JLIB_MAIL_MSG at: JROOT\libraries\joomla\mail\mail.php:757
  • JLIB_LOGIN_EXPIRED at: JROOT\libraries\legacy\application\application.php:652
  • JLIB_LOGIN_DENIED at: JROOT\libraries\legacy\application\application.php:656
  • JLIB_LOGIN_AUTHORISATION at: JROOT\libraries\legacy\application\application.php:660
  • JGLOBAL_UNCATEGORISED at: JROOT\templates\beez3\html\com_content\featured\default_item.php:72
  • JGLOBAL_UNCATEGORISED at: JROOT\templates\beez3\html\com_content\featured\default_item.php:84

System information (as much as possible)

Source code from stage cloned. Currently, this 3.6.0-beta1-dev.
PHP 7.0.6

avatar beni71 beni71 - open - 12 Jun 2016
avatar brianteeman
brianteeman - comment - 12 Jun 2016

As with any script its results are only as good as the script. There are
many compound keys in Joomla that it looks like you are missing.

avatar mbabker
mbabker - comment - 12 Jun 2016

The ones I've searched against are all legit and all non-compound keys.

The SOME_ERROR_CODE stuff should all NOT be JText keys anyway. That's just bad error handling across the system not defining a proper integer error code on error objects (which with scalar typehinting would cause a PHP Error).

COM_TAGSS_REBUILD_FAILURE is a typo. And the two for the Hathor com_banners overrides are just missing the COM_ prefixes. That's as far as I've gone.

avatar infograf768
infograf768 - comment - 12 Jun 2016

Yep, some strings missing and typos to correct.

avatar infograf768
infograf768 - comment - 13 Jun 2016

@brianteeman
I can solve easily the ones with typos and existing strings:
COM_TAGSS_REBUILD_FAILURE => COM_TAGS_REBUILD_FAILURE
COM_LANGS_SEARCH_IN_TITLE => COM_LANGUAGES_SEARCH_IN_TITLE
ERRORUNKOWNEXTENSION => JLIB_INSTALLER_ERROR_PLG_UNINSTALL_ERRORUNKOWNEXTENSION
BANNERS_SEARCH_IN_TITLE => COM_BANNERS_SEARCH_IN_TITLE
BANNERS_SELECT_TYPE => COM_BANNERS_SELECT_TYPE

Change
JFRAMEWORK_FORM_FIELDS_PLUGINS_ERROR_FOLDER_EMPTY
to
JLIB_PLUGIN_ERROR_FOLDER_EMPTY
and change the code from
JLog::add(JText::_('JFRAMEWORK_FORM_FIELDS_PLUGINS_ERROR_FOLDER_EMPTY'), JLog::WARNING, 'jerror');
to
JLog::add(JText::sprintf('JLIB_PLUGIN_ERROR_FOLDER_EMPTY', $folder), JLog::WARNING, 'jerror');
and create the string.
`JLIB_PLUGIN_ERROR_FOLDER_EMPTY="Error: the %s plugin folder is empty."

"Rename failed" for folder is a bit more complex as we do have a string ( JLIB_FILESYSTEM_ERROR_FOLDER_RENAME="Rename failed: %s") which is used correctly in one context but not sure it could as a sprintf in the 2 others.

If you want, I can start a PR. Concerning the missing strings, as they need a good English writer, you could propose a patch against mine.

What do you think?

avatar brianteeman
brianteeman - comment - 13 Jun 2016

That was my to-do list for this morning as soon as I finished this coffee.
If you want to start it then I will just have to assist with the strings
that is fine by me.

avatar brianteeman
brianteeman - comment - 13 Jun 2016

My thought was to do TWO pr. One with the simple typos and keys that are
named wrong and another pr for missing strings.
That should make it easier for the tt

avatar infograf768
infograf768 - comment - 13 Jun 2016

not really easier on TTs. I let you do things then.
My main findings are above.

avatar brianteeman
brianteeman - comment - 13 Jun 2016

OK I will start soon

avatar brianteeman
brianteeman - comment - 13 Jun 2016

Started at #10804


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

avatar brianteeman
brianteeman - comment - 13 Jun 2016

Closed


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

avatar brianteeman brianteeman - change - 13 Jun 2016
Status New Closed
Closed_Date 0000-00-00 00:00:00 2016-06-13 11:18:14
Closed_By brianteeman
avatar brianteeman brianteeman - close - 13 Jun 2016
avatar brianteeman brianteeman - close - 13 Jun 2016
avatar brianteeman brianteeman - close - 13 Jun 2016
avatar brianteeman
brianteeman - comment - 13 Jun 2016

@beni71 apologies for suggesting that these were false positives


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

avatar brianteeman brianteeman - change - 13 Jun 2016
Labels Added: ?
avatar beni71
beni71 - comment - 13 Jun 2016

No problem - it's a bit special issue .. But I am very pleased to see that you and your team have the thing tackled as quickly. Thanks a lot.


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

Add a Comment

Login with GitHub to post a comment