Dotclear

Vous n'êtes pas identifié(e).

Annonce

#1 2021-02-08 10:22:39

mangetout
Membre
Inscription : 2021-02-08

Problems with sidebar widgets

I recently upgraded a both my dotclear version (to 2.18) and my server's PHP version to 8.0

At some point along this upgrade path, the sidebar widgets on my site disappeared (no errors when the page is loaded on the site - just missing)

When I click the presentation widgets menu item in the admin interface, I get this:

Fatal error: Uncaught Error: Call to a member function addTitle() on null in /homepages/5/d196903873/htdocs/PROD/plugins/pages/_widgets.php:23 Stack trace: #0 /homepages/5/d196903873/htdocs/inc/core/class.dc.core.php(384): pagesWidgets::initWidgets(Object(dcWidgets)) #1 /homepages/5/d196903873/htdocs/PROD/plugins/translatedwidgets/_default_widgets.php(90): dcCore->callBehavior('initWidgets', Object(dcWidgets)) #2 /homepages/5/d196903873/htdocs/PROD/plugins/translatedwidgets/index.php(15): include('/homepages/5/d1...') #3 /homepages/5/d196903873/htdocs/PROD/admin/plugin.php(42): include('/homepages/5/d1...') #4 {main} thrown in /homepages/5/d196903873/htdocs/PROD/plugins/pages/_widgets.php on line 23

The Widgets plugin is 'translatedwidgets' v 1.7  - any ideas what might be causing this?  I tried looking a the code mentioned in the above error, but I'm not fluent with PHP, and not even sure I'm looking at root cause

Dernière modification par mangetout (2021-02-08 10:24:26)

Hors ligne

#2 2021-02-08 10:48:47

Philippe
Stagiaire
Lieu : Toulon
Inscription : 2004-06-13
Site Web

Re : Problems with sidebar widgets

Dotclear 2.18 is not compatible with PHP 8 yet. The 2.19 version will be.

I would recommend either using PHP 7 or, if you feel adventurous, using the 2.19-dev version. I use it with PHP 8.0.2 for local tests. So far, everything works fine with it

Hors ligne

#3 2021-02-08 11:26:17

mangetout
Membre
Inscription : 2021-02-08

Re : Problems with sidebar widgets

Thanks - I did not realise that.

I've rolled back to PHP version 7.2, but I'm still seeing the error.
I tried uninstalling the widgets plugin and reinstalling it (after rolling back PHP) in case that helped, but still not working

Hors ligne

#4 2021-02-08 11:37:24

Philippe
Stagiaire
Lieu : Toulon
Inscription : 2004-06-13
Site Web

Re : Problems with sidebar widgets

Sorry I have no experience with this plugin (translatedWidgets) which does not come with the official packages. May I ask why you would need it precisely?

If your bug comes from the widgets plugin (which is not clear in your message), try emptying templates cache directory from the maintenance plugin.

Hors ligne

#5 2021-02-08 15:14:05

mangetout
Membre
Inscription : 2021-02-08

Re : Problems with sidebar widgets

The translatedwidgets plugin is the only sidebar widgets plugin I could find - it appears to have replaced the one that was just called 'widgets'.  I just need it so I can have a search function and some links to a contact page, etc, in the sidebar.

I just tried emptying the templates cache (from the maintenance page) and now the whole site is broken - the home page just yields this:
Fatal error: Uncaught Error: Call to a member function addTitle() on null in /homepages/5/d196903873/htdocs/PROD/plugins/pages/_widgets.php:23 Stack trace: #0 /homepages/5/d196903873/htdocs/PROD/inc/core/class.dc.core.php(384): pagesWidgets::initWidgets(Object(dcWidgets)) #1 /homepages/5/d196903873/htdocs/PROD/plugins/translatedwidgets/_default_widgets.php(90): dcCore->callBehavior('initWidgets', Object(dcWidgets)) #2 /homepages/5/d196903873/htdocs/PROD/plugins/translatedwidgets/_public.php(15): include('/homepages/5/d1...') #3 /homepages/5/d196903873/htdocs/PROD/inc/core/class.dc.modules.php(731): require('/homepages/5/d1...') #4 /homepages/5/d196903873/htdocs/PROD/inc/core/class.dc.modules.php(701): dcModules->loadModuleFile('/homepages/5/d1...') #5 /homepages/5/d196903873/htdocs/PROD/inc/core/class.dc.modules.php(244): dcModules->loadNsFile('translatedwidge...', 'public') #6 /homepages/5/d196903873/htdocs/PROD/inc/public/prepend.php(90): dcModules->loadModules('/homepages/5/d1...', 'public', 'en') #7 /h in /homepages/5/d196903873/htdocs/PROD/plugins/pages/_widgets.php on line 23

Hors ligne

#6 2021-02-08 15:16:12

mangetout
Membre
Inscription : 2021-02-08

Re : Problems with sidebar widgets

I removed the translatedWidgets plugin and cleared the cache again, and the site is back up (obviously with no sidebar, but that's the same as before).  So it does look like this plugin is either the issue itself, or is exposing some other issue when it tries to run

Hors ligne

#7 2021-02-08 15:58:54

Philippe
Stagiaire
Lieu : Toulon
Inscription : 2004-06-13
Site Web

Re : Problems with sidebar widgets

mangetout a écrit :

I just need it so I can have a search function and some links to a contact page, etc, in the sidebar.

Have you tried, now that the faulty plugin is removed, to add the search widget?

Hors ligne

#8 2021-02-08 17:03:19

mangetout
Membre
Inscription : 2021-02-08

Re : Problems with sidebar widgets

I don't know how to do that.  When I remove the widgets plugin, the admin menu item for managing any widgets disappears.

Hors ligne

#9 2021-02-08 17:25:08

Philippe
Stagiaire
Lieu : Toulon
Inscription : 2004-06-13
Site Web

Re : Problems with sidebar widgets

Try extracting the official widgets plugin from a fresh archive of dotclear 2.18, and send it to your server in the /dotclear/plugins directory

Hors ligne

#10 2021-02-08 22:08:14

mangetout
Membre
Inscription : 2021-02-08

Re : Problems with sidebar widgets

That worked - thank you so much!

I guess something must have become corrupted in the plugins folder

Hors ligne

Vous n'êtes pas identifié(e).

Pied de page des forums

Sites map