New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PHP 7.1.1 issues (test needed) #2870
Comments
@lonalore is more info (names) available on point 2 ? Edit : idea, but need more intell...: some plugins are build using core 'structure' of seperate language folders eg. English, Dutch, French etc... while some other plugins use the 'plain structure of having the language files in 'root'mode (no locale folders.. maybe this results in issues having such.. This is an idea i thought about lately, but would need a large testing ground and major rewrites on files to use the lang folders... (hope my thoughts are coming over..) |
I totally agree on point 2 :) |
@tgtje or core plugin |
That is/will be always a point of discussion. I can see a much cleaner system, and as translator can focus on not having to oversee other parts. Suppose you are using 6 or 7 languages and all the needed ones are in 'root', bit messy.... (although should work). Another thought would be when developing. Do i use a seperate locale folder or just my own language (as i believe english should always be present to uphold fallback) > eg.. 1 rule for 'how to'. (some side effects there too) In long term, i could ( also some tinkering on security) see something (helas no coder and just idea) a system check (ala md5 hash) as a security rule to see if compromise of system (uploaded illegal file(s) folders are part of the system (warning post) etc.... But i stop here.. little going off topic.. (always open for suggestions). Cause of wrong or missing names. .. That why i ask for more info as i (due to the coding skills i aproach at a different angle... (eg look at it in another way..) |
Thanks @lonalore . |
I got more info, so I updated the first issue in the list. |
Thanks @lonalore I can't reproduce the first issue on PHP 7.1.1. Perhaps a javascript error somewhere? Could it be related to Hungarian? |
Small post (if lang for list_new Hung. pack misses if (!defined("PAGE_NAME")) { define("PAGE_NAME", "List New Items"); } in Hung...php; made an issue/post on git/content.... ) edit : (Did a little check on more packs... a lot do miss that line... origin why it was/not in use ?? Bing packs?? Anyway, i exists in English core) |
Closing. |
@Jimmi08 where is this setting: "Load language files only for current language"? I've been looking for days but can not find it. :D |
Ahh thank you! But the current value is 'Off' on my website, but there are some plugins that do not have a hungarian language file. But english files are not included. |
Me too. Not sure now. But if I notice nontranslated strings, I just copy English file as Slovak (with lang folder English/English_ this is double work) with English strings. But this haven't happend long time so I supposed that this setting (OFF) works. |
the value on my site is also OFF, but if I do not make a folder named Norwegian or Spanish (with the corresponding files in English if I do not have the sufficient time to translate them) it shows just the LAN strings, so that is why I think we should use english files as fallback, if no language files available for the selected language |
@lonalore The code is already there. I am not sure why it is not working for some people. Perhaps some language files are including language files incorrectly?
|
Thank you @CaMer0n I don't use // [PLUGINS]/metatag/languages/[LANGUAGE]/[LANGUAGE]_admin.php
e107::lan('metatag', true, true); And |
@lonalore but that folder is not mandatory. Both version should be working. I don't use this version for my plugins either. |
So I've always used wrong parameters for |
@CaMer0n It may be because they use |
@lonalore why is your way wrong? Look at documentation: (Maybe I don't see something) |
@Jimmi08 You're right, my solution was based on documentation, but documentation seems to be outdated. I checked PHP docs now, but /**
* PREFERRED Generic Language File Loading Function for use by theme and plugin developers.
* Language-file equivalent to e107::js, e107::meta and e107::css
* FIXME disallow themes and plugins named 'core' and 'theme'
* @param string $type : 'theme' or plugin name
* @param $string $fname (optional): relative path to the theme or plugin language folder. (same as in the other functions)
* when missing, [e_LANGUAGE]_front.php will be used, when true [e_LANGUAGE]_admin.php will be used
* @param $options : Set to True for admin.
* @example e107::lan('theme'); // Loads THEME."languages/English.php (if English is the current language)
* @example e107::lan('gallery'); // Loads e_PLUGIN."gallery/languages/English_front.php (if English is the current language)
* @example e107::lan('gallery', 'admin'); // Loads e_PLUGIN."gallery/languages/English/admin.php (if English is the current language)
* @example e107::lan('gallery', 'admin', true); // Loads e_PLUGIN."gallery/languages/English_admin.php (if English is the current language)
* @example e107::lan('gallery', 'admin/example'); // Loads e_PLUGIN."gallery/languages/English/admin/example.php (if English is the current language)
* @example e107::lan('gallery', true); // Loads e_PLUGIN."gallery/languages/English_admin.php (if English is the current language)
* @example e107::lan('gallery', "something", true); // Loads e_PLUGIN."gallery/languages/English_something.php (if English is the current language)
*/
public static function lan($type, $fname = null, $options = null)
{
...
} |
I became uncertain now... I don't know which documentation is the good one. |
I am lost too, there is "break" in logic/system in these examples above. There should be strict rules and plugins develop should use them.
So many possibilities and no one what would be load simple English.php if this is because back compatibility. |
My (current, working) implementations: // [PLUGINS]/metatag/languages/[LANGUAGE]_front.php
e107::lan('metatag');
// [PLUGINS]/metatag/languages/[LANGUAGE]_admin.php
e107::lan('metatag', 'admin', true); Maybe I think it would be a great need to update outdated PHP docs and it would also be a great need to write unit/functional tests for e107 to avoid such misunderstandings. |
Maybe i'm wrong, but |
It is interesting that |
Just adding : It is the 'problem ' i mentioned before (Gitter??) here is no straight rule if files must be on 'root', or inside a locale (country) folder. Where one works with locale files, and others with 'root ' files ('root'= main language folder). The mix of both is throughout. |
I think the two options (inside and outside country folder) are there because of legacy complatibility. |
@rica-carv for legacy it would be there option load languages/English.php file. This is not there as option. Using folder and language in file name is duplicity. You have no such case in these examples or I am blind. This is correct:
|
The problem was: |
The following issues are reported by a user on e107hungary forum, I'm just forwarding them:
Cannot be change headlines on news items
(I requested more info for this, waiting for response)EDIT: Inline-editing on the admin news page is not working under PHP 7.1.1. It jumps to top of the page when clicking on the news title.
Wrong/missing plugin names because e107 cannot find language files (I think we should use english files as fallback, if no language files available for the selected language)
Cannot select sub-forum in the forum:
Provided screenshot for issue 3.
The text was updated successfully, but these errors were encountered: