From 77e1b9d2ab4b62bb38e4e2c0f44984a8365efce2 Mon Sep 17 00:00:00 2001 From: Prokyonn Date: Tue, 30 Jul 2024 15:59:51 +0200 Subject: [PATCH] Fix LinkProvider alias and enhance articles list view (#5) --- UPGRADE.md | 10 ++ config/lists/articles.xml | 93 +++++++++++++++++++ .../Symfony/HttpKernel/SuluArticleBundle.php | 2 +- 3 files changed, 104 insertions(+), 1 deletion(-) diff --git a/UPGRADE.md b/UPGRADE.md index 0465c7e5..088b5292 100644 --- a/UPGRADE.md +++ b/UPGRADE.md @@ -2,6 +2,16 @@ ## 3.x +### Article user settings updated + +Due to the refactoring of the new content bundle storage, the user settings for articles must be erased to avoid conflicts. + +Execute the following SQL query to delete the user settings: +```mysql +DELETE FROM `se_user_settings` + WHERE `se_user_settings`.`settingsKey` LIKE '%article%' +``` + ### Elasticsearch Bundle need to be required The SuluArticleBundle defines not longer its dependency to `handcraftedinthealps/elasticsearch-bundle` because diff --git a/config/lists/articles.xml b/config/lists/articles.xml index a2c26773..1595233f 100644 --- a/config/lists/articles.xml +++ b/config/lists/articles.xml @@ -2,6 +2,27 @@ articles + + + %sulu.model.user.class% + Sulu\Article\Domain\Model\ArticleInterface.creator + + + %sulu.model.contact.class% + %sulu.model.user.class%.contact + + + + + %sulu.model.user.class% + Sulu\Article\Domain\Model\ArticleInterface.changer + + + %sulu.model.contact.class% + %sulu.model.user.class%.contact + + + dimensionContent @@ -29,6 +50,13 @@ + + + authorEntity + dimensionContent.author + + + @@ -54,6 +82,71 @@ + + + firstName + authorEntity + + + + + lastName + authorEntity + + + + + + + + + + + + created + Sulu\Article\Domain\Model\ArticleInterface + + + + + changed + Sulu\Article\Domain\Model\ArticleInterface + + + + + + firstName + %sulu.model.contact.class% + + + + + lastName + %sulu.model.contact.class% + + + + + + + + firstName + %sulu.model.contact.class% + + + + + lastName + %sulu.model.contact.class% + + + + + locale dimensionContent diff --git a/src/Infrastructure/Symfony/HttpKernel/SuluArticleBundle.php b/src/Infrastructure/Symfony/HttpKernel/SuluArticleBundle.php index a4534d71..0716eab4 100644 --- a/src/Infrastructure/Symfony/HttpKernel/SuluArticleBundle.php +++ b/src/Infrastructure/Symfony/HttpKernel/SuluArticleBundle.php @@ -231,7 +231,7 @@ public function loadExtension(array $config, ContainerConfigurator $container, C new Reference('sulu_page.structure.factory'), new Reference('doctrine.orm.entity_manager'), ]) - ->tag('sulu.link.provider', ['alias' => ArticleInterface::RESOURCE_KEY]); + ->tag('sulu.link.provider', ['alias' => 'article']); // Smart Content services $services->set('sulu_article.article_data_provider_repository')