Overrite language file gets deleted Topic is solved

General questions regarding the use of languages in Joomla! 3.x.

Moderators: infograf768, General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Post Reply
User avatar
Dangerous Boy
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 232
Joined: Mon Dec 26, 2005 6:25 pm
Location: Home

Overrite language file gets deleted

Post by Dangerous Boy » Sat Sep 21, 2019 6:22 pm

Fresh installation, Joomla 3.9,
In the administrator I create the overrite, and it works just fine... but since I have about 400+ strings to translate I can't go one by one in the administrators area, I mean, I can but...who does it one by one?...
Instead I already have a list of everything I need the way I need it...
Si, once the file is created xx_XX.overrite.ini I just paste the rest of information, but!, after that it gets deleted by it self! how is that even possible! i mean is possible but WHY!?
PRS_SOME_SOME ="Some some some..."
PRS_OTHER_SOME = "Other some..." ...etc

why does it get deleted!? it doesn't delete what I paste it deletes the whole file...
Nothing for the moment....

User avatar
toivo
Joomla! Master
Joomla! Master
Posts: 11342
Joined: Thu Feb 15, 2007 5:48 am
Location: Suzhou, China

Re: Overrite language file gets deleted

Post by toivo » Sun Sep 22, 2019 1:08 am

Just to clarify, are you saying that you installed the latest version of Joomla, 3.9.11, then added a file called xx-XX.override.ini, where xx-XX indicates your language selection, to the folder language/overrides, and then suddenly that file disappeared, without any action by you?

Check the correct spelling of the filename, it has to be xx-XX.override.ini.

Please post the results from the Forum Post Assistant (FPA) by following the instructions at https://forumpostassistant.github.io/docs/.
Toivo Talikka, Global Moderator

User avatar
Dangerous Boy
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 232
Joined: Mon Dec 26, 2005 6:25 pm
Location: Home

Re: Overrite language file gets deleted

Post by Dangerous Boy » Sun Sep 22, 2019 2:23 am

@toivo, yes, pretty much that's what happen... the "initial" file is generated by Joomla!.
administrator/languages/overrite/new overrite/select language
Lets say Spanish, the file name is: es-ES.override.ini
at this point I have only added one string
I do a little test to see if it work and it does! woo hoo!, then, I open the file with Notepad++ and paste the rest of strings. which is one per line...
(I use CSL as custom string language)
CSL_CS01223546 = "Some"
CSL_CS01223547 = "Somes"... etc
I use the numbers as "unique", since all of the string are generated from another software a CRM I developed...a few years ago...
After I paste the rest of the strings and after I saved it and close it BOOM! it gets deleted right after is called from Joomla...
I have checked the CHMOD and the encode type (always UTF-8) and there is nothing special, soon as I hit the refresh button for a second test, boom the file is gone!...

I have done this more than once, I also added more than one string from Joomla's administrator and it works, but after I paste my strings... I don't know what happen there...
does anyone else has seen this behavior ?
for me is the first time and it makes me feel like a noob using Joomla and I have years! working with it... sad, so sad!
----------------------
Forum Post Assistant (v1.4.9 (lambrusca) : 21st September 2019 wrote:
Problem Description :: wrote:Overwrite language file gets deleted byt it self
Log/Error Message :: wrote:na
Last PHP Error(s) Reported :: wrote:[21-Sep-2019 21:29:37 America/Mexico_City] PHP Notice: Undefined variable: header_class in /home/joomla/sales/public_html/templates/magus/html/mod_menu/default-footer.php on line 20
Actions Taken To Resolve wrote:Testing local hoist ans life host, checked CHMOD, encoded type file always utf-8
Basic Environment :: wrote:Joomla! Instance :: Joomla! 3.9.8-Stable (Amani) 11-June-2019
Joomla! Platform :: Joomla Platform 13.1.0-Stable (Curiosity) 24-Apr-2013
Joomla! Configured :: Yes | Writable (666) | Owner: --protected-- . (uid: /gid: ) | Group: --protected-- (gid: ) | Valid For: 3.9
Configuration Options :: Offline: false | SEF: true | SEF Suffix: true | SEF ReWrite: true | .htaccess/web.config: Yes | GZip: false | Cache: false | CacheTime: 15 | CacheHandler: file | CachePlatformPrefix: false | FTP Layer: false | Proxy: false | LiveSite: | Session lifetime: 15 | Session handler: database | Shared sessions: false | SSL: 0 | Error Reporting: development | Site Debug: false | Language Debug: false | Default Access: 1 | Unicode Slugs: false | dbConnection Type: mysqli | PHP Supports J! 3.9.8: Yes | Database Supports J! 3.9.8: Yes | Database Credentials Present: Yes |

Host Configuration :: OS: Windows NT | OS Version: 6.1 | Technology: AMD64 | Web Server: Apache/2.4.23 (Win64) OpenSSL/1.0.2n PHP/7.2.0 | Encoding: gzip, deflate | Doc Root: --protected-- | System TMP Writable: Yes | Free Disk Space : 414.71 GiB |

PHP Configuration :: Version: 7.2.0 | PHP API: apache2handler | Session Path Writable: Yes | Display Errors: | Error Reporting: 32767 | Log Errors To: /w/logs/php_error.log | Last Known Error: 21st September 2019 21:29:37. | Register Globals: | Magic Quotes: | Safe Mode: | Allow url fopen: 1 | Open Base: | Uploads: 1 | Max. Upload Size: 128M | Max. POST Size: 256M | Max. Input Time: 800 | Max. Execution Time: 900 | Memory Limit: 3000M

Database Configuration :: Version: 5.7.14 (Client:mysqlnd 5.0.12-dev - 20150407 - $Id: b396954eeb2d1d9ed7902b8bae237b287f21ad9e $) | Host: --protected-- (--protected--) | default Collation: utf8_general_ci (default Character Set: utf8) | Database Size: 7.50 MiB | #of Tables: 150
Detailed Environment :: wrote:PHP Extensions :: Core (7.2.0) | bcmath (7.2.0) | calendar (7.2.0) | ctype (7.2.0) | date (7.2.0) | filter (7.2.0) | hash (1.0) | iconv (7.2.0) | json (1.6.0) | SPL (7.2.0) | pcre (7.2.0) | readline (7.2.0) | Reflection (7.2.0) | session (7.2.0) | standard (7.2.0) | mysqlnd (mysqlnd 5.0.12-dev - 20150407 - $Id: b396954eeb2d1d9ed7902b8bae237b287f21ad9e $) | tokenizer (7.2.0) | zip (1.15.1) | zlib (7.2.0) | libxml (7.2.0) | dom (20031129) | PDO (7.2.0) | bz2 (7.2.0) | SimpleXML (7.2.0) | xml (7.2.0) | wddx (7.2.0) | xmlreader (7.2.0) | xmlwriter (7.2.0) | apache2handler () | openssl (7.2.0) | curl (7.2.0) | com_dotnet (7.2.0) | fileinfo (1.0.5) | gd (7.2.0) | gettext (7.2.0) | gmp (7.2.0) | intl (1.1.0) | imap (7.2.0) | ldap (7.2.0) | mbstring (7.2.0) | exif (7.2.0) | mysqli (7.2.0) | Phar (2.0.2) | pdo_mysql (7.2.0) | pdo_sqlite (7.2.0) | phalcon (3.4.3) | soap (7.2.0) | sockets (7.2.0) | sqlite3 (7.2.0) | xmlrpc (7.2.0) | xsl (7.2.0) | Zend Engine (3.2.0) |
Potential Missing Extensions ::

Switch User Environment (Experimental) :: PHP CGI: No | Server SU: No | PHP SU: No | Custom SU (LiteSpeed/Cloud/Grid): Yes
Potential Ownership Issues: No

Apache Modules :: core | mod_win32 | mpm_winnt | http_core | mod_so | mod_access_compat | mod_actions | mod_alias | mod_allowmethods | mod_asis | mod_auth_basic | mod_auth_digest | mod_authn_core | mod_authn_file | mod_authz_core | mod_authz_groupfile | mod_authz_host | mod_authz_user | mod_autoindex | mod_cache | mod_cache_disk | mod_cgi | mod_dir | mod_env | mod_include | mod_isapi | mod_log_config | mod_mime | mod_negotiation | mod_rewrite | mod_setenvif | mod_socache_shmcb | mod_ssl | mod_userdir | mod_vhost_alias | mod_php7 | Apache/2.4.23 (Win64) OpenSSL/1.0.2n PHP/7.2.0 |
Potential Missing Modules :: mod_expires | mod_deflate | mod_security | mod_evasive | mod_dosevasive | mod_qos | mod_userdir |
Folder Permissions :: wrote:Core Folders :: images/ (777) | components/ (777) | modules/ (777) | plugins/ (777) | language/ (777) | templates/ (777) | cache/ (777) | logs/ (---) | tmp/ (777) | administrator/components/ (777) | administrator/modules/ (777) | administrator/language/ (777) | administrator/templates/ (777) | administrator/logs/ (777) |

Elevated Permissions (First 10) :: .idea/ (777) | .idea/codeStyles/ (777) | .idea/dataSources/ (777) | .idea/dataSources/e2c7f714-8823-4726-8e5d-5c682b4ad4de/ (777) | .idea/dataSources/e2c7f714-8823-4726-8e5d-5c682b4ad4de/storage_v2/ (777) | .idea/dataSources/e2c7f714-8823-4726-8e5d-5c682b4ad4de/storage_v2/_src_/ (777) | .idea/dataSources/e2c7f714-8823-4726-8e5d-5c682b4ad4de/storage_v2/_src_/schema/ (777) | .idea/fileTemplates/ (777) | .idea/fileTemplates/includes/ (777) | .idea/inspectionProfiles/ (777) |
Database Information :: wrote:Database statistics :: Uptime: 387261 | Threads: 1 | Questions: 50036 | Slow queries: 0 | Opens: 12553 | Flush tables: 1 | Open tables: 1556 | Queries per second avg: 0.129 |
Extensions Discovered :: wrote:Components :: SITE ::
Core :: com_mailto (3.0.0) 1 | com_wrapper (3.0.0) 1 |
3rd Party::

Components :: ADMIN ::
Core :: com_actionlogs (3.9.0) 1 | com_admin (3.0.0) 1 | com_ajax (3.2.0) 1 | com_associations (3.7.0) 1 | com_banners (3.0.0) 1 | com_cache (3.0.0) 1 | com_categories (3.0.0) 1 | com_checkin (3.0.0) 1 | com_config (3.0.0) 1 | com_content (3.0.0) 1 | com_contenthistory (3.2.0) 1 | com_cpanel (3.0.0) 1 | com_fields (3.7.0) 1 | com_finder (3.0.0) 1 | com_installer (3.0.0) 1 | com_joomlaupdate (3.6.2) 1 | com_languages (3.0.0) 1 | com_login (3.0.0) 1 | com_media (3.0.0) 1 | com_menus (3.0.0) 1 | com_messages (3.0.0) 1 | com_modules (3.0.0) 1 | com_newsfeeds (3.0.0) 1 | com_plugins (3.0.0) 1 | com_postinstall (3.2.0) 1 | com_privacy (3.9.0) 1 | com_redirect (3.0.0) 1 | com_search (3.0.0) 1 | com_tags (3.1.0) 1 | com_templates (3.0.0) 1 | com_users (3.0.0) 1 |
3rd Party:: tcpdf (1.0.5) 1 | ECB Currency Converter (1.0) ? | VIRTUEMART (-) 1 | VirtueMart_allinone (-) 1 |

Modules :: SITE ::
Core :: mod_articles_archive (3.0.0) 1 | mod_articles_categories (3.0.0) 1 | mod_articles_category (3.0.0) 1 | mod_articles_latest (3.0.0) 1 | mod_articles_news (3.0.0) 1 | mod_articles_popular (3.0.0) 1 | mod_banners (3.0.0) 1 | mod_breadcrumbs (3.0.0) 1 | mod_custom (3.0.0) 1 | mod_feed (3.0.0) 1 | mod_finder (3.0.0) 1 | mod_footer (3.0.0) 1 | mod_languages (3.5.0) 1 | mod_login (3.0.0) 1 | mod_menu (3.0.0) 1 | mod_random_image (3.0.0) 1 | mod_related_items (3.0.0) 1 | mod_search (3.0.0) 1 | mod_stats (3.0.0) 1 | mod_syndicate (3.0.0) 1 | mod_tags_popular (3.1.0) 1 | mod_tags_similar (3.1.0) 1 | mod_users_latest (3.0.0) 1 | mod_whosonline (3.0.0) 1 | mod_wrapper (3.0.0) 1 |
3rd Party:: mod_virtuemart_cart (3.2.14) 1 | mod_virtuemart_category (3.2.14) 1 | mod_virtuemart_currencies (3.2.14) 1 | mod_virtuemart_manufacturer (3.2.14) 1 | mod_virtuemart_product (3.2.14) 1 | mod_virtuemart_search (3.2.14) 1 | MOD_VMAJAXDROPDOWNCART (1.0.1) 1 |

Modules :: ADMIN ::
Core :: mod_custom (3.0.0) 1 | mod_feed (3.0.0) 1 | mod_latest (3.0.0) 1 | mod_latestactions (3.9.0) 1 | mod_logged (3.0.0) 1 | mod_login (3.0.0) 1 | mod_menu (3.0.0) 1 | mod_multilangstatus (3.0.0) 1 | mod_popular (3.0.0) 1 | mod_privacy_dashboard (3.9.0) 1 | mod_quickicon (3.0.0) 1 | mod_sampledata (3.8.0) 1 | mod_stats_admin (3.0.0) 1 | mod_status (3.0.0) 1 | mod_submenu (3.0.0) 1 | mod_title (3.0.0) 1 | mod_toolbar (3.0.0) 1 | mod_version (3.0.0) 1 |
3rd Party:: VirtueMart Administrator Menu (3.2.14) ? |

Libraries ::
Core ::
3rd Party:: Free Mono (-) ? | Helvetica (-) ? |

Plugins ::
Core :: PLG_ACTIONLOG_JOOMLA (3.9.0) 1 | plg_authentication_cookie (3.0.0) 1 | plg_authentication_gmail (3.0.0) 0 | plg_authentication_joomla (3.0.0) 1 | plg_authentication_ldap (3.0.0) 0 | plg_captcha_recaptcha (3.4.0) 0 | plg_captcha_recaptcha_invisible (3.8) 0 | plg_content_confirmconsent (3.9.0) 0 | plg_content_emailcloak (3.0.0) 1 | plg_content_fields (3.7.0) 1 | plg_content_finder (3.0.0) 0 | plg_content_joomla (3.0.0) 1 | plg_content_loadmodule (3.0.0) 1 | plg_content_pagebreak (3.0.0) 1 | plg_content_pagenavigation (3.0.0) 1 | plg_content_vote (3.0.0) 0 | plg_editors-xtd_article (3.0.0) 1 | plg_editors-xtd_fields (3.7.0) 1 | plg_editors-xtd_image (3.0.0) 1 | plg_editors-xtd_menu (3.7.0) 1 | plg_editors-xtd_module (3.5.0) 1 | plg_editors-xtd_pagebreak (3.0.0) 1 | plg_editors-xtd_readmore (3.0.0) 1 | plg_extension_joomla (3.0.0) 1 | plg_fields_calendar (3.7.0) 1 | plg_fields_checkboxes (3.7.0) 1 | plg_fields_color (3.7.0) 1 | plg_fields_editor (3.7.0) 1 | plg_fields_imagelist (3.7.0) 1 | plg_fields_integer (3.7.0) 1 | plg_fields_list (3.7.0) 1 | plg_fields_media (3.7.0) 1 | plg_fields_radio (3.7.0) 1 | plg_fields_repeatable (3.9.0) 1 | plg_fields_sql (3.7.0) 1 | plg_fields_text (3.7.0) 1 | plg_fields_textarea (3.7.0) 1 | plg_fields_url (3.7.0) 1 | plg_fields_user (3.7.0) 1 | plg_fields_usergrouplist (3.7.0) 1 | plg_finder_categories (3.0.0) 1 | plg_finder_contacts (3.0.0) 1 | plg_finder_content (3.0.0) 1 | plg_finder_newsfeeds (3.0.0) 1 | plg_finder_tags (3.0.0) 1 | PLG_INSTALLER_FOLDERINSTALLER (3.6.0) 1 | plg_installer_packageinstaller (3.6.0) 1 | PLG_INSTALLER_URLINSTALLER (3.6.0) 1 | plg_privacy_actionlogs (3.9.0) 1 | plg_privacy_consents (3.9.0) 1 | plg_privacy_content (3.9.0) 1 | plg_privacy_message (3.9.0) 1 | plg_privacy_user (3.9.0) 1 | plg_quickicon_extensionupdate (3.0.0) 1 | plg_quickicon_joomlaupdate (3.0.0) 1 | plg_quickicon_phpversioncheck (3.7.0) 1 | plg_quickicon_privacycheck (3.9.0) 1 | plg_search_categories (3.0.0) 1 | plg_search_contacts (3.0.0) 1 | plg_search_content (3.0.0) 1 | plg_search_newsfeeds (3.0.0) 1 | plg_search_tags (3.0.0) 1 | PLG_SYSTEM_ACTIONLOGS (3.9.0) 0 | plg_system_cache (3.0.0) 0 | plg_system_debug (3.0.0) 1 | plg_system_fields (3.7.0) 1 | plg_system_highlight (3.0.0) 1 | plg_system_languagecode (3.0.0) 1 | plg_system_languagefilter (3.0.0) 1 | plg_system_log (3.0.0) 1 | plg_system_logout (3.0.0) 1 | plg_system_logrotation (3.9.0) 1 | plg_system_p3p (3.0.0) 0 | plg_system_privacyconsent (3.9.0) 0 | plg_system_redirect (3.0.0) 0 | plg_system_remember (3.0.0) 1 | plg_system_sef (3.0.0) 1 | plg_system_sessiongc (3.8.6) 1 | plg_system_stats (3.5.0) 1 | plg_system_updatenotification (3.5.0) 1 | plg_twofactorauth_totp (3.2.0) 0 | plg_twofactorauth_yubikey (3.2.0) 0 | plg_user_contactcreator (3.0.0) 0 | plg_user_joomla (3.0.0) 1 | plg_user_profile (3.0.0) 0 | plg_user_terms (3.9.0) 0 |
3rd Party:: plg_editors_codemirror (5.40.0) 1 | plg_editors_tinymce (4.5.11) 1 | Search - VirtueMart (3.2.14) ? | AMAZON (3.2.14) ? | VM Framework Loader during Plugin U (1.0) ? | VM - Calculation Avalara Tax (3.2.14) ? | plgvm_specification (3.2.14) ? | VMCustom - textinput (3.2.14) ? | AMAZON (3.2.14) ? | Authorize.net AIM (3.2.14) ? | Heidelpay (16.11.07) ? | Klarna (3.2.14) ? | Klarna Checkout (3.2.14) ? | VM Payment - klikandpay (3.2.14) ? | VM Payment - Paybox (3.2.14) 0 | PayPal (3.2.14) ? | realex_hpp_api (3.2.14) ? | Skrill (3.2.14) ? | Sofort (3.2.14) ? | Sofort Ideal (3.2.14) ? | Standard (3.4.2) ? | 2Checkout (3.2.14) ? | By weight, ZIP and countries (3.2.14) ? | Realex_hpp_api (3.2.14) ? |
Templates Discovered :: wrote:Templates :: SITE :: beez3 (3.1.0) 1 | magusl (1.5.1) 1 | magus (1.2.0) 1 | protostar (1.0) 1 |
Templates :: ADMIN :: hathor (3.0.0) 1 | isis (1.0) 1 |
Last edited by toivo on Sun Sep 22, 2019 3:37 am, edited 3 times in total.
Reason: mod note: disabled smilies in post Options for readability
Nothing for the moment....

User avatar
toivo
Joomla! Master
Joomla! Master
Posts: 11342
Joined: Thu Feb 15, 2007 5:48 am
Location: Suzhou, China

Re: Overrite language file gets deleted

Post by toivo » Sun Sep 22, 2019 3:07 am

Dangerous Boy wrote:the "initial" file is generated by Joomla!
Ok, you added one entry so that Joomla created the initial override file in the correct location.

It would still be useful to see the results from the FPA. If this behaviour were are a common problem, there would have been numerous bug reports by now.
Toivo Talikka, Global Moderator

User avatar
Dangerous Boy
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 232
Joined: Mon Dec 26, 2005 6:25 pm
Location: Home

Re: Overrite language file gets deleted

Post by Dangerous Boy » Sun Sep 22, 2019 3:25 am

If this behaviour were are a common problem, there would have been numerous bug reports by now.
Yes and no... to be honest I'm not sure, most people would stick to add this string one by one and it will work so they may never see this kind of problem...
I'll do an screen-cast so that you can see the actual problem in action..
Nothing for the moment....

User avatar
toivo
Joomla! Master
Joomla! Master
Posts: 11342
Joined: Thu Feb 15, 2007 5:48 am
Location: Suzhou, China

Re: Overrite language file gets deleted

Post by toivo » Sun Sep 22, 2019 3:51 am

Is that FPA listing from your localhost site? It is not using the latest version of Joomla, which is 3.9.11.

What are the .idea folders listed in the FPA results? If the web folder has Joomla and some other application using the same files, the results can be unpredictable.

Does the same issue occur on the localhost site and the remote host?

Dangerous Boy wrote:all of the string are generated from another software a CRM I developed...a few years ago...
Is it possible that the strings contain some combination of characters or binary code that is picked up by an anti virus application or some security software running on the server so that the file is subsequently deleted?
Toivo Talikka, Global Moderator

User avatar
Dangerous Boy
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 232
Joined: Mon Dec 26, 2005 6:25 pm
Location: Home

Re: Overrite language file gets deleted

Post by Dangerous Boy » Sun Sep 22, 2019 4:05 am

The .idea folder is from my IDE (phpstorm), it is use to keep track of the whole project is only on local host.
I thought at first, that that was problem some binary code or something weird but no, nothing out of the ordinary...
And no, I don't think is the antivirus, since this issue happen on local it also happens on the live server...
there is the link to the screen-cast I just did...
http://sepremex.com/assets/videos/joomla_language.mp4
(please excuse my poor English).
Nothing for the moment....

User avatar
toivo
Joomla! Master
Joomla! Master
Posts: 11342
Joined: Thu Feb 15, 2007 5:48 am
Location: Suzhou, China

Re: Overrite language file gets deleted

Post by toivo » Sun Sep 22, 2019 4:43 am

Thanks for posting the video, which helped identify the root cause. Remove all brackets from the language constants, for example change PRS_TEBULE_(ONLY_IN_STORE) to just PRS_TEBULE_ONLY_IN_STORE.

As soon as the middle line was added to the attached test file, accessing Extensions - Language(s) - Overrides made the file disappear from the folder.

Code: Select all

COM_TEST="Just a test"
COM_TEST(SECOND)="Testing brackets"
COM_TEST_MORE="nothing"
According to the php manual, The characters {}|&~![()^" cannot be used in keys.
Ref. https://docs.joomla.org/Specification_of_language_files
Toivo Talikka, Global Moderator

User avatar
Dangerous Boy
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 232
Joined: Mon Dec 26, 2005 6:25 pm
Location: Home

Re: Overrite language file gets deleted

Post by Dangerous Boy » Sun Sep 22, 2019 5:07 am

I see, I find this: PRS_YEBRA_(STUFFED_GRAPE_LEAVES) and a few others...
what about double _ underscore symbol?
PSR__SOME
and what about this - as in
PSR_SOME-OTHER
Thats the only symbols that I find...
Nothing for the moment....

User avatar
toivo
Joomla! Master
Joomla! Master
Posts: 11342
Joined: Thu Feb 15, 2007 5:48 am
Location: Suzhou, China

Re: Overrite language file gets deleted

Post by toivo » Sun Sep 22, 2019 5:54 am

The double underscore seems to be acceptable and also the dash character - seems to work, even if the dash is included together with brackets in the list of characters not to be used in PHP keys.
Toivo Talikka, Global Moderator

User avatar
Dangerous Boy
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 232
Joined: Mon Dec 26, 2005 6:25 pm
Location: Home

Re: Overrite language file gets deleted

Post by Dangerous Boy » Sun Sep 22, 2019 6:48 am

Yes, I just did a little test with those parameters, with double __ and double --, seems to work fine, I also tested the "error" by adding the ( ) in the constant and it does delete the file, so, we can safely assume that using the wrong symbols in the constant will delete the file...
Now that we know this, it would be better to thrown an error than delete the file, although not many people will make this mistake, may be that is why I couldn't find what the problem was...
Thank you for your help!
For me is 2am, I'll go sleep and then I'm going to re-do my function to re-build the constants...
Again thank you., have a great weekend!
Last edited by Dangerous Boy on Sun Sep 22, 2019 6:51 am, edited 2 times in total.
Nothing for the moment....

User avatar
infograf768
Joomla! Master
Joomla! Master
Posts: 18872
Joined: Fri Aug 12, 2005 3:47 pm
Location: **Translation Matters**

Re: Overrite language file gets deleted

Post by infograf768 » Sun Sep 22, 2019 6:49 am

I confirm here that if you add a string which constant contains ANY of the forbidden characters

Code: Select all

{}|&~![()^"
, then the override file is deleted when refreshing the overrides manager.
I am afraid you will have to modify the constants containing such characters.

I would indeed have expected the file to stay but not be loaded by Joomla (and therefore the strings would not have been translated) but it is simply deleted.

Note:
I you create the override containing such characters via the override manager, the forbidden characters are deleted in the constant.
Jean-Marie Simonet / infograf · http://www.info-graf.fr
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group

User avatar
Dangerous Boy
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 232
Joined: Mon Dec 26, 2005 6:25 pm
Location: Home

Re: Overrite language file gets deleted

Post by Dangerous Boy » Sun Sep 22, 2019 7:00 am

@infograf768, yes, I tried adding the forbidding symbols in the language manager and when is saved they got deleted, so I ad them manually just to confirm that the file gets deleted.
Thank you.
Nothing for the moment....

User avatar
infograf768
Joomla! Master
Joomla! Master
Posts: 18872
Joined: Fri Aug 12, 2005 3:47 pm
Location: **Translation Matters**

Re: Overrite language file gets deleted

Post by infograf768 » Sun Sep 22, 2019 7:30 am

The reason is that any error of this type in an ini file is discovered by `parse_ini_file` and the file is emptied by

Code: Select all

	public static function filterKey($value)
	{
		$filter = JFilterInput::getInstance(null, null, 1, 1);

		return strtoupper($filter->clean($value, 'cmd'));
	}
Therefore, once the file is emptied, it is just deleted.
You can test this by creating an empty en-GB.override.ini and load the overrides Manager.
Jean-Marie Simonet / infograf · http://www.info-graf.fr
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group

User avatar
toivo
Joomla! Master
Joomla! Master
Posts: 11342
Joined: Thu Feb 15, 2007 5:48 am
Location: Suzhou, China

Re: Overrite language file gets deleted

Post by toivo » Sun Sep 22, 2019 7:44 am

Should have used glasses :)

The character in the list of invalid characters I somewhat inaccurately called dash instead of hyphen earlier, is actually the tilde ~, therefore it is perfectly all right to use the hyphen character - in language constants.
Toivo Talikka, Global Moderator


Post Reply

Return to “Language - Joomla! 3.x”