Welcome, Guest
Username: Password: Secret Key
  • Page:
  • 1

TOPIC:

Joomla 5 und Namespace 13 Nov 2023 17:09 #2383

  • Kartenladerl
  • Kartenladerl's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 3
  • Thank you received: 0
Beim cli-Backup mit Akeeba-Backup tritt folgender Fehler auf:

/usr/bin/php8.1-cli /homepages/5/d397498369/htdocs/natur/cli/joomla.php akeeba:backup:take
Symfony\Component\ErrorHandler\Error\ClassNotFoundError^ {#954
#message: """
Attempted to load class "JPlugin" from the global namespace.\n
Did you forget a "use" statement?
"""
#code: 0
#file: "/homepages/5/d397498369/htdocs/natur/plugins/system/bw_libregister/bw_libregister.php"
#line: 36
trace: {
/homepages/5/d397498369/htdocs/natur/plugins/system/bw_libregister/bw_libregister.php:36 {
require_once^
› */
› class PlgSystemBW_Libregister extends JPlugin
› {
}
/homepages/5/d397498369/htdocs/natur/libraries/src/Extension/ExtensionManagerTrait.php:217 { …}
/homepages/5/d397498369/htdocs/natur/libraries/src/Extension/ExtensionManagerTrait.php:160 { …}
/homepages/5/d397498369/htdocs/natur/libraries/src/Extension/ExtensionManagerTrait.php:99 { …}
/homepages/5/d397498369/htdocs/natur/libraries/src/Plugin/PluginHelper.php:232 { …}
/homepages/5/d397498369/htdocs/natur/libraries/src/Plugin/PluginHelper.php:192 { …}
/homepages/5/d397498369/htdocs/natur/libraries/src/Application/ConsoleApplication.php:255 { …}
/homepages/5/d397498369/htdocs/natur/cli/joomla.php:77 { …}
}
}
Wird das Namespace-Problem mit der nächsten Version gefixt?


Viele Grüße

Thomas

Please Log in or Create an account to join the conversation.

Joomla 5 und Namespace 13 Nov 2023 21:28 #2384

  • Romana
  • Romana's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 935
  • Thank you received: 78
Hallo Thomas,

danke für deine Meldung. Leider schreibst Du nichts zu den verwendeten Versionen, also frage ich mal meine Glaskugel:
  • Joomla 5.0.0
  • BwPostman 4.2.5
  • AkeebaBackup 9.8.3
  • php 8.1

Ich gebe zu, ich habe keine Ahnung, was Du mit cli-Backup meinst. cli ist klar, backup auch, aber wie das mit AkeebaBackup geht, weiß ich nicht. Vielleicht hast Du mir eine schnelle Erklärung oder einen Link? Dann könnte ich mal schauen, ob ich dein Problem nachvollziehen kann.

Grundsätzlich kann ich keinen Fehler in BwPostman sehen. Es funktioniert im Betrieb fehlerlos. Also muss AkeebaBackup etwas erwarten, was BwPostman nicht erfüllt.

Ich kann nur spekulieren:

Akeeba geht davon aus, dass Plugins unter Joomla 5 nach der neuen Methode geschrieben sind. Die Plugins von BwPostman sind aber "old school". Ich habe es bisher vermieden, die Plugins umzuschreiben, weil mit älteren Versionen von Joomla 4 nicht immer alles rund lief. Da die alte Methode aber erst mit Joomla 6 nicht mehr unterstützt wird, sehe ich da auch noch keine Eile.

Um deine Frage zu beantworten:

Ich werde in einer der nächsten Versionen von BwPostman (dauert etwas, ist ja immerhin ein Freizeitprojekt und meine Freizeit ist zur Zeit sehr, sehr knapp) die Variante Joomla 4 classic mit Namespaces (das ist eine Zwischenlösung zwischen old school und new school) einführen. Das dürfte auch in älteren Versionen von Joomla 4 problemlos funktionieren. Damit könnte das Problem mit AkeebaBackup gelöst sein.

Hth
Romana
Problem gelöst? Dann bitte auf gelöst klicken. Über ein Danke freue ich mich immer.
Problem solved? Please click to solved.I am glad to every thank you.

Please Log in or Create an account to join the conversation.

Joomla 5 und Namespace 14 Nov 2023 16:57 #2389

  • Kartenladerl
  • Kartenladerl's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 3
  • Thank you received: 0
Hallo Ramona,

Danke für Deine schnelle Antwort.

Deine Glaskugel ist sehr gut aber nicht perfekt.
Joomla 5.0.0
PHP 8.2.12
BwPostman 4.2.5
Akeeba Backup 9.8.3 Pro

Die Unterschiede sind also marginal und haben auch keine Auswirkung auf das Problem.

CLI = Command Line Interface (weist Du ja)
Den Ordner "cli" findest Du in jeder Standard-Joomla-Installation.

Ich nutze Cronjobs um automatische Backups mit Akeeba Backup oder den Dateiänderungsscanner
mit Admin Tools durchzuführen.

Das Problem tritt auch erst seit Joomla 5 auf. Mit Joomla 4 ging es noch einwandfrei.
Es sind auch noch andere Erweiterungen betroffen.
Deaktiviert man diese (wie auch BwPostman) läuft der Cronjob einwandfrei durch.

In der Commandozeile ruft man die Funktion ganz einfach mit:
/path/to/php /pfad/zum/htdocs/verzeichnis auf.
z.B.
/usr/bin/php8.1-cli /homepages/5/d397498369/htdocs/natur/cli/joomla.php akeeba:backup:take
oder
/usr/bin/php8.1-cli /homepages/5/d397498369/htdocs/natur/cli/joomla.php admintools:scan

Die Fehlermeldung kommt auch nicht von Akeeba sondern vom System:

Symfony\Component\ErrorHandler\Error\ClassNotFoundError^ {#954
#message: """
Attempted to load class "JPlugin" from the global namespace.\n
Did you forget a "use" statement?
"""
#code: 0
#file: "/homepages/5/d397498369/htdocs/natur/plugins/system/bw_libregister/bw_libregister.php"
#line: 36
trace: {
/homepages/5/d397498369/htdocs/natur/plugins/system/bw_libregister/bw_libregister.php:36 {
require_once^
› */
› class PlgSystemBW_Libregister extends JPlugin


Die Klasse müsste dann in ungefähr so beginnen:

namespace Joomla\Plugin\System\erweiterung;

use Joomla\CMS\Factory;
use Joomla\CMS\Plugin\CMSPlugin;

// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
// phpcs:enable PSR1.Files.SideEffects

final class erweiterung extends CMSPlugin


Ich weis Deine Arbeit auch sehr zu schätzen :cheer: und bin froh,
dass Du diese Komponente weiter entwickelst.


Viele Grüße

Thomas

Please Log in or Create an account to join the conversation.

Joomla 5 und Namespace 18 Nov 2023 08:08 #2395

  • Romana
  • Romana's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 935
  • Thank you received: 78
Hallo Thomas,

danke für deine Erläuterungen. Damit kann ich wohl was anfangen.

Die Umstellung der Plugins auf die Variante Joomla 4 native ist im Gange und wenn alles gut läuft in den nächsten Tagen im nächsten Release enthalten.

Liebe Grüße
Romana
Problem gelöst? Dann bitte auf gelöst klicken. Über ein Danke freue ich mich immer.
Problem solved? Please click to solved.I am glad to every thank you.
The following user(s) said Thank You: Kartenladerl

Please Log in or Create an account to join the conversation.

Joomla 5 und Namespace 30 Nov 2023 17:13 #2422

  • Kartenladerl
  • Kartenladerl's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 3
  • Thank you received: 0
Funktioniert wieder. :)

Vielen Dank:

Please Log in or Create an account to join the conversation.

[SOLVED] Joomla 5 und Namespace 30 Nov 2023 17:13 #2423

  • Kartenladerl
  • Kartenladerl's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 3
  • Thank you received: 0
Problem solved.

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Powered by Kunena Forum

Newsletter Subscription

Hint: Your entered data are only used to register to and sending of the newsletter. Your data will be processed and stored by me. For more information have a look at my privacy policy.

Your mailing list:

BwPostman
Infos about Joomla! extensions of Boldt Webservice, especially BwPostman. The newsletter will only be sent if there are any news.

Please help us prevent spam, and solve this little math question!

captcha

() Mandatory fields

Information

×

Voluntary salary

If you like Boldt Webservice then I would be glad about your backing:
  • Recommend Boldt Webservice
  • If you want to support my work with a donation, please click on the following button - the donation will be handled via paypal.

With your voluntary salary you also support the development of free software and extensions for the CMS Joomla.

Enter your amount below and click on the following button: