Skip to content
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

[Bug]: French language #5267

Open
ericc-dream opened this issue May 27, 2024 · 6 comments
Open

[Bug]: French language #5267

ericc-dream opened this issue May 27, 2024 · 6 comments
Labels
status: awaiting feedback This issue may be fixed and is awaiting the original poster to confirm the fix. type: bug A problem that should not be happening

Comments

@ericc-dream
Copy link

What e107 version are you using?

v2.3.3

Bug description

This is for @tgtje , maintainer of the French language, for version 2.4.4
to not overload the other topic with unrelated comment ...
I found another and potentially several
page ~/e107_admin/search.php
I have a plugin "poll" installed ...

PHP Fatal error: Uncaught Error: Undefined constant "LAN_PLUGIN_POLL_NAME" in /home/ericc/www/ericc/e107_plugins/poll/search/search_comments.php:13\nStack trace:\n#0 /home/ericc/www/ericc/e107_admin/search.php(511): require_once()\n#1 {main}\n thrown in /home/ericc/www/ericc/e107_plugins/poll/search/search_comments.php on line 13

in the language of the plug-in, this constant "LAN_PLUGIN_POLL_NAME" exists in both English and French
However ~/e107_admin/search.php seems to "include" all page "search_comments.php" from all plugin (when found)
and for plugin "poll", "search_comments.php" contain this constant which isn't defined in ~/e107_languages/French/admin/lan_search.php , nor in English ...

I'm not sure on how to manage that !
The obvious way will be to add
define("LAN_PLUGIN_POLL_NAME", "Sondage");
in ~/e107_languages/French/admin/lan_search.php , but this is a little bit ugly, I fear
this plugin is an official one as far as I can judge, but its languages files seems to not be as some more recent

And in the same page, after adding the ugly (for science) , I see at least 1 plugin which isn't installed : "Google"
And 2 rows without a name, and after looking to the html code with the dev tool of Firefox, seems to belong to 2 plugins that I removed recently, from the "uninstall" interface in the admin area, and then deleting the files. I mean , I removed them the way I'm supposed to doing it

ericc

How to reproduce

be sure that plugin "poll" is installed
go to page ~/e107_admin/search.php

Expected behavior

to display the page.
I tried with an installation of version 2.3.3, just adding the poll plugin and going to the "search" page, and the page is displayed but the "poll" isn't there

What browser(s) are you seeing the problem on?

Firefox

PHP Version

php8.2

@ericc-dream ericc-dream added the type: bug A problem that should not be happening label May 27, 2024
@tgtje
Copy link
Contributor

tgtje commented May 28, 2024

@ericc-dream just info : i updated French ( as best as possible) but am not the maintainer.
I started updating French around 2 months ago, while helping out other party who needed newer files.
Ok, for me running test for language ( LAN_PLUGIN_POLL_NAME) i get NO errors.
Checks say all is fine. Since this define is also of global nature (anywhich page front/admin) the define is called.
(my php version 8.2.13 MySQL 8.2.0)

However !! it is indeed not displayed on the search page. I installed > no issue > no display..
Maybe i need to add a poll before it works ?? (not used polls in the years).
Then it happens > when i hit create the poll php error >
Call to a member function getController() on null in C:\wamp64\www\e107n\e107_handlers\form_handler.php on line 4541
refering to this line 4541 $tabs = e107::getAdminUI()->getController()->getTabs();.
and 4737 $text .= ($key === 'options' && !vartrue($val['noselector'])) ? $this->columnSelector($fieldarray, $columnPref) : '';
So a non functional state because of ?????
Although lan's and defines do not report any problem you might have stumbled on a php bug in poll plugin..
Thats a developer issue i assume.
because of php your error report could be different from mine. (general settings)
edit: Google (guess) comes from social plugin ,gsitemap etc..

awx

edit2 : maybe the plugin need an e_search php to populate? i do not know ( because of if($obj = e107::getAddon($id,'e_search')) in search php)

@ericc-dream
Copy link
Author

Hmmm... just realized that this plugin isn't installed on my site !
However in the DB, I have a table "e107_polls" with some polls inside ... very, very old one
But, why is it present in the search page when not installed !
This confirm what I said, I see in this page some plugin that I never installed or removed, some even the files

So I installed it, and I had an error because it can't create the table in the DB !!
Then I tried to configure it , and I had an error:

PHP Fatal error: Uncaught Error: Call to a member function getController() on null in /home/ericc/www/ericc/e107_handlers/form_handler.php:4538\nStack trace:\n#0 /home/ericc/www/ericc/e107_handlers/form_handler.php(4734): e_form->columnSelector()\n#1 /home/ericc/www/ericc/e107_plugins/poll/admin_config.php(192): e_form->thead()\n#2 /home/ericc/www/ericc/e107_plugins/poll/admin_config.php(101): poll_list()\n#3 {main}\n thrown in /home/ericc/www/ericc/e107_handlers/form_handler.php on line 4538, referer: http://192.168.28.114/ericc/e107_admin/plugin.php?mode=installed&action=list&path=poll&e-token=6b0b60000f6b20059b0effd10adc79d3

probably the same as you ...
and a white page :-(

So I would say :
There are, at least, 1 bug in the plugin "Poll", which need to be completely reviewed IMHO.

And potentially another one in the admin search page, which do work in a "non expected way"

And now, how it's work ?
What is the process ?
Someone assign this to a developer ?
Should I close this one, and open 2 new, on for each ?

@tgtje
Copy link
Contributor

tgtje commented May 28, 2024

@ericc-dream Some more investigation, likely this is what you saw :

error

this happened (tricked) putting an e_search page (bit messed, but for functioning purpose in plug).
Got same error from above, but now in search php it was displayed. be it that search was blank page at first and deleting the e_search php from plug; refreshed search php eh voila Poll mentioned in list.
Knowing this i could asume that it is a remnant of your old installment (in db)..

New issue? don't know. Maybe (you as author) can change the title including Poll plugin.
It has BUG lable, so if a dev should notice it..
I think the errors are related to the plugin.

@Moc Moc added the status: testing required Someone needs to confirm this issue's existence and write a test to prevent the fix from regressing. label May 29, 2024
@Moc Moc self-assigned this May 29, 2024
@Moc
Copy link
Member

Moc commented Jun 4, 2024

Testing in progress.

Created new issue for PHP fatal error when creating new poll using PHP version 8.2 and up: #5271

Testing with French language in progress.

@tgtje
Copy link
Contributor

tgtje commented Jul 30, 2024

@ericc-dream a commit for poll was made.
Please take time to test if ok, If so you as author can close this issue.

@Moc
Copy link
Member

Moc commented Sep 27, 2024

It may very well be that this issue is already resolved in the latest update. Please try updating from Github before we look into this issue more closely.

There is an easy way to sync with Github:

  • Enable developer mode in Admin Area > Preferences > Advanced features
  • Go to Admin Area > Tools > Database > Sync with Github
  • Press the Overwrite files button and wait until the process has finished.

Alternatively you can download the ZIP file with all the latest files included by hitting the green 'Clone or download' button at the top of this page: https://github.com/e107inc/e107

@Moc Moc removed the status: testing required Someone needs to confirm this issue's existence and write a test to prevent the fix from regressing. label Sep 27, 2024
@Moc Moc removed their assignment Sep 27, 2024
@Moc Moc added the status: awaiting feedback This issue may be fixed and is awaiting the original poster to confirm the fix. label Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: awaiting feedback This issue may be fixed and is awaiting the original poster to confirm the fix. type: bug A problem that should not be happening
Projects
None yet
Development

No branches or pull requests

3 participants