-
-
Notifications
You must be signed in to change notification settings - Fork 412
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
Language handlers may not always be loaded properly #5147
Comments
Is this a new install or upgrade? |
Also, what OS and was it installed via package or source? |
new install |
Installing package using apt |
Can you please open a debian bug before we go any further. It's a packaging issue and @paulgevers needs to know about it. |
cacti (1.2.23+ds1-1) |
Let me know the ticket #. |
I won't write off a cacti issue too though. I just don't have this issue on RHEL, but it could be I'm using php's built in language processor vs. the one you are using. |
See if the php-gettext module is available. I'm thinking not for Debian/Ubuntu. If it is, you should install and then restart Apache + php-fpm. |
Looking at the error, it seems to be a dependency issue between PHP MyAdmin and cacti. So, definitely needs to be logged with Debian. If you uninstall php-myadmin, it might reconcile the issue though. I'm not sure. |
|
php-phpmyadmin-motranslator is already the newest version (5.3.0-1). if i try to remove, cacti is removed too |
Okay, so interesting. |
Okay, pull the lib/function.php that I just committed and replace yours and let's see how far you get... It'll be in the 1.2.x branch. |
I tested it in an English language virtual machine browser and it works. the error appears on a Brazilian Portuguese computer. computer with other languages should give error too |
Understood. Make sure you update the Debian ticket. |
Updated. Thanks a lot for the help |
Okay, I think I found the solution. Some bad code in our language processor. Let me give you one more patch. You should be able to change languages freely then. |
Error 500 on apache when changing languages
If you pull the include/global_languages.php from the 1.2.x branch, this will be resolved for all languages. Thanks for reporting this! |
Error 500 on apache when changing languages
Thanks for the notification. Seems worth fixing :) . @netniV, @TheWitness : for info, we're nearly starting the first freeze for Debian. I wouldn't be surprised if 1.2.23 would be the version we ship in Our release schedule: https://release.debian.org/testing/freeze_policy.html |
Cool. If you incorporate these changes, that would be good. I've asked Mark to wait a few more weeks and then push a 1.2.24. So, a quick release, but after we have another week or so for things to settle. |
@bmeirellesRJ, two options. Grab the two file, or grab the whole thing. We've done a few additional tweaks today, but our QA team gave it the final approval a few hours ago. |
If we had any later dependencies these would have to be in and released in the next day or two. Otherwise, 1.2.x has another month before it needs a release. We can certainly try to get another one done to tidy up a few bits at the beginning of feb which means internal code freeze on that branch a week before. |
Just for you info, I'm already building a fixed Debian version, so that's not the problem. I can easily pull in a new version of cacti until 2023-02-12. I also expect I can still pull in a new cacti version until 2023-03-12, depending on the size of the changes. After that, I think the window is starting to close. |
@paulgevers we are hip deep in 1.3 now. So, you are safe to pull. Just check back about a week before the freeze to get any updates. Any 1.2.23 bugs will show with the Amongst the Core team, we have an agreement that it's time to move on to 1.3 which should be evident by all the recent activity. |
@TheWitness just to check if I understand you correctly. You mean it's safe to pull from the 1.2 branch, or do you mean I can already pull from the 1.3 branch. I assume you meant the former and that you don't recommend me to put 1.3 in the upcoming stable. |
@paulgevers 1.2 is safe to pull. We are still working on several features for 1.3. |
Good morning, apparently resolved. Other problems appeared but I believe it was my installation because it replaces the entire folder and as I installed it using the .deb package, the folder structure is different from what was created in the database. Confirm as soon as the update is available on debian. Thank you for helping me. I also found a bug in a template and I have suggestions to improve others, where can I deal with this matter? Opening pull request? |
You can should open an issue tracker, and then create a pull request for it. The main reason being, any updates should have a corresponding CHANGELOG entry so it gets you the number without needing a subsequent commit or review asking for that. |
@paulgevers I would suggest, 2 weeks before any freeze preventing you from having 1.2.24, we prepare our release which will include a code freeze (except for critical bugs) for one week before we release. That should give you a week, would that be enough? |
Hmm, with all the changes applied to
I'm going to check the delta of |
Hmm, can't find that, but my history links to commit 92aa644. Maybe that's relevant for context. And some more humming, I wonder if this has been broken for a longer time. Maybe I should try an older version too. |
Seems like 1.2.21 was also broken, so at least |
I wonder if this could be a problem in |
it appeared with me too, I had to replace all files |
I would say that's a PhpMyAdmin problem. Clearly, their constructor is trying to use a cache but fails to find the Class for it via their autoloader (or maybe by whatever autoloader is being introduced with the packaged version attached to cacti ?) |
@paulgevers I assume in your package you are updating the global_languages.php with a patch to correct the localization of |
Are you including the autoload.php file at that point? Is the include_path set to be |
This fix is from the result of an illegal format character in the auth_login.php page that was identified by virtue of the fix #5147
Regression from #5147 therefore no ChangeLog
@netniV all I do is create a symlink from the packaged motranslator (I honestly don't understand why PhpMyAdmin is in that name, it seems a separate project, but maybe it shares history) to the cacti folder:
I don't do anything else as far as I recall. |
Ah, well that is likely the issue. The autoload.php isn't being included I reckon, and I also feel like if the include_path isn't set to /usr/share/php then it would also fail to load the symphony components too |
With regards to the directory naming, PhpMyAdmin is the project owner. PhpMyAdmin project would presumably be PhpMyAdmin/PhpMyAdmin. I do have the MoTranslator package installed as I was looking at your problem. Let me see if I can get it working for you, but I do feel we should have a specific issue for this separate from what this issue tracker is about. You have a very specific Debian problem which may not be present on other systems. |
@paulgevers Give the langauge branch a test, it's not complete as I want to improve the fallback through other processors if the selected one doesn't exist. It worked for me. |
@netniV thanks a bunch for working on it. Given that motranslator is not the embedded cacti translator I totally agree that in essence this is a problem I'm responsible for. I appreciate you help with it. I though that this issue started because the reporter was running a Debian system, but maybe I misunderstood and languages were also broken in non-Debian context. I'll try your branch later tonight (CET) or tomorrow. |
OK, thanks. Once you have the issue created and the branch tested, we can merge that. |
I'm trying to install on debian bookworm
I'm installing using APT
the browser shows error 500
my apache is 2.4.54 and my php is 8.1.12
this appears in the apache log:
[Sat Jan 07 14:07:12.322217 2023] [php:error] [pid 55502] [client 192.168.254.100:57408] PHP Fatal error: Uncaught Error: Class "PhpMyAdmin\MoTranslator\Cache\InMemoryCache" not found in /usr/share/php/PhpMyAdmin/MoTranslator/Translator.php:115\nStack trace:\n#0 /usr/share/cacti/site/include/global_languages.php(312): PhpMyAdmin\MoTranslator\Translator->__construct()\n#1 /usr/share/cacti/site/include/global_languages.php(254): load_gettext_motranslator()\n#2 /usr/share/cacti/site/include/global.php(527): include_once('...')\n#3 /usr/share/cacti/site/include/auth.php(27): require_once('...')\n#4 /usr/share/cacti/site/index.php(25): include('...')\n#5 {main}\n thrown in /usr/share/php/PhpMyAdmin/MoTranslator/Translator.php on line 115
[Sat Jan 07 14:07:12.322446 2023] [php:warn] [pid 55502] [client 192.168.254.100:57408] PHP Warning: Trying to access array offset on value of type null in /usr/share/cacti/site/lib/functions.php on line 5866
[Sat Jan 07 14:07:12.326601 2023] [php:warn] [pid 55502] [client 192.168.254.100:57408] PHP Warning: Trying to access array offset on value of type null in /usr/share/cacti/site/lib/functions.php on line 5931
The text was updated successfully, but these errors were encountered: