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}
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();
}
}
}