Fehler bei Update von 4.0.12 auf 5.0.0

Hast du einen Fehler in der aktuellen Version gefunden ? Diesen kannst du uns hier mitteilen und uns bei der Fehlersuche helfen.
Antworten
ttenrok
Beiträge: 2
Registriert: 16. Nov 2025, 12:46

Fehler bei Update von 4.0.12 auf 5.0.0

Beitrag von ttenrok »

Liebes Forum,

ich habe mich heute an das Update von 4.0.12 auf 5.0.0 gewagt.
Ich habe die Schritte aus dem Wiki befolgt (https://www.admidio.org/dokuwiki/doku.p ... 2.0:update).
Beim Datenbank Update bekomme ich jetzt aber leider eine Fehlermeldung:

Code: Alles auswählen

S C R I P T - E R R O R

An error occured within the update script. Please visit our support forum https://www.admidio.org/forum and provide the following information.

VERSION: 4.3.0
STEP: 1080

MESSAGE: Der eingegebene Icon-Name stimmt nicht mit der erwarteten Syntax überein. Ein Icon-Name von Bootstrap Icons sollte nur die Zeichen a-z, Zahlen und einen Bindestrich enthalten.

B A C K T R A C E


0 /home/www/doc/16395/<domain>/web/admidio/src/InstallationUpdate/Service/UpdateStepsCode.php(332): Admidio\ProfileFields\Entity\ProfileField->setValue()
1 /home/www/doc/16395/<domain>/web/admidio/src/Components/Entity/ComponentUpdate.php(135): Admidio\InstallationUpdate\Service\UpdateStepsCode::updateStep43AddSocialNetworkProfileFields()
2 /home/www/doc/16395/<domain>/web/admidio/src/Components/Entity/ComponentUpdate.php(183): Admidio\Components\Entity\ComponentUpdate::executeUpdateMethod()
3 /home/www/doc/16395/<domain>/web/admidio/src/Components/Entity/ComponentUpdate.php(276): Admidio\Components\Entity\ComponentUpdate->executeStep()
4 /home/www/doc/16395/<domain>/web/admidio/src/InstallationUpdate/Service/Update.php(100): Admidio\Components\Entity\ComponentUpdate->update()
5 /home/www/doc/16395/<domain>/web/admidio/install/update.php(300): Admidio\InstallationUpdate\Service\Update->doAdmidioUpdate()
6 {main}
Die Fehlermeldung an sich ist zwar selbsterklärend, allerdings weiß ich nicht, welcher Icon-Name fehlerhaft ist. In welcher Datei wird er referenziert?

Viele Grüße

ttenrok


Edit:
Betreffender Abschnitt in UpdateStepsCode.php

Code: Alles auswählen

            
    public static function updateStep43AddSocialNetworkProfileFields()
    {
        global $gProfileFields;

        $sql = 'SELECT cat_id FROM ' . TBL_CATEGORIES . ' WHERE cat_name_intern = \'SOCIAL_NETWORKS\' ';
        $categoriesStatement = self::$db->queryPrepared($sql);

        if ($row = $categoriesStatement->fetch()) {
            $profileFields = $gProfileFields->getProfileFields();

            if (!array_key_exists('LINKEDIN', $profileFields)) {
                $profileFieldLinkedIn = new ProfileField(self::$db);
                $profileFieldLinkedIn->saveChangesWithoutRights();
                $profileFieldLinkedIn->setValue('usf_cat_id', (int)$row['cat_id']);
                $profileFieldLinkedIn->setValue('usf_type', 'TEXT');
                $profileFieldLinkedIn->setValue('usf_name_intern', 'LINKEDIN');
                $profileFieldLinkedIn->setValue('usf_name', 'SYS_LINKEDIN');
                $profileFieldLinkedIn->setValue('usf_description', 'SYS_SOCIAL_NETWORK_FIELD_DESC');
332          $profileFieldLinkedIn->setValue('usf_icon', 'fab fa-linkedin');
                $profileFieldLinkedIn->setValue('usf_url', 'https://www.linkedin.com/in/#user_content#');
                $profileFieldLinkedIn->save();
            }

            if (!array_key_exists('INSTAGRAM', $profileFields)) {
                $profileFieldInstagram = new ProfileField(self::$db);
                $profileFieldInstagram->saveChangesWithoutRights();
                $profileFieldInstagram->setValue('usf_cat_id', (int)$row['cat_id']);
                $profileFieldInstagram->setValue('usf_type', 'TEXT');
                $profileFieldInstagram->setValue('usf_name_intern', 'INSTAGRAM');
                $profileFieldInstagram->setValue('usf_name', 'SYS_INSTAGRAM');
                $profileFieldInstagram->setValue('usf_description', 'SYS_SOCIAL_NETWORK_FIELD_DESC');
                $profileFieldInstagram->setValue('usf_icon', 'fab fa-instagram');
                $profileFieldInstagram->setValue('usf_url', 'https://www.instagram.com/#user_content#');
                $profileFieldInstagram->save();
            }

            if (!array_key_exists('MASTODON', $profileFields)) {
                $profileFieldInstagram = new ProfileField(self::$db);
                $profileFieldInstagram->saveChangesWithoutRights();
                $profileFieldInstagram->setValue('usf_cat_id', (int)$row['cat_id']);
                $profileFieldInstagram->setValue('usf_type', 'TEXT');
                $profileFieldInstagram->setValue('usf_name_intern', 'MASTODON');
                $profileFieldInstagram->setValue('usf_name', 'SYS_MASTODON');
                $profileFieldInstagram->setValue('usf_description', 'SYS_SOCIAL_NETWORK_FIELD_DESC');
                $profileFieldInstagram->setValue('usf_icon', 'fab fa-mastodon');
                $profileFieldInstagram->setValue('usf_url', 'https://mastodon.social/#user_content#');
                $profileFieldInstagram->save();
            }
        }
    }
Benutzeravatar
fasse
Administrator
Beiträge: 6277
Registriert: 12. Nov 2005, 16:06

Re: Fehler bei Update von 4.0.12 auf 5.0.0

Beitrag von fasse »

Hallo ttenrok,

das schaue ich mir an. Problem ist ein Update-Code innerhalb der 4.3, welcher jetzt bei der 5.0 Probleme macht.

Viele Grüße
Fasse
ttenrok
Beiträge: 2
Registriert: 16. Nov 2025, 12:46

Re: Fehler bei Update von 4.0.12 auf 5.0.0

Beitrag von ttenrok »

Ich habe mir jetzt damit beholfen, in der Datenbank manuell die Einträge für Mastodon, LinkedIn etc. anzulegen. Nachdem die Einträge angelegt waren, ist das Datenbank-Update sauber durchgelaufen.
Benutzeravatar
fasse
Administrator
Beiträge: 6277
Registriert: 12. Nov 2005, 16:06

Re: Fehler bei Update von 4.0.12 auf 5.0.0

Beitrag von fasse »

Super. Den Fehler habe ich für die nächste Version auch schon behoben, so dass andere nicht mehr darüber stolpern werden.
Antworten