The author and authored are now localized and has to be updated.
bin/adminconsole phpcr:migrations:migrate
bin/websiteconsole sulu:article:reindex --no-interaction
The sulu:article:index-rebuild
command was refactored and renamed to sulu:article:reindex
.
See Commands in documentation.
Recreate the index to update mapping (new content_data
field) and reindex your articles:
bin/adminconsole sulu:article:reindex --drop --no-interaction
bin/websiteconsole sulu:article:reindex --drop --no-interaction
Update configuration for Elasticsearch ^2.2 or
^5.0 and add the new analyzer pathAnalyzer
.
After that recreate the index and reindex your articles:
bin/adminconsole ongr:es:index:drop -m default --force
bin/websiteconsole ongr:es:index:drop -m live --force
bin/adminconsole ongr:es:index:create -m default
bin/websiteconsole ongr:es:index:create -m live
bin/adminconsole sulu:article:index-rebuild ###LOCALE###
bin/websiteconsole sulu:article:index-rebuild ###LOCALE### --live
Excerpt data is now resolved in the article template instead of an array of categories and images you get directly the data.
before:
{{ extension.excerpt.categories[0] }}
{{ extension.excerpt.images.ids[0] }}
{{ extension.excerpt.icon.ids[0] }}
after:
{{ extension.excerpt.categories[0].id }}
{{ extension.excerpt.images[0].id }}
{{ extension.excerpt.icon[0].id }}
Recreate the index and reindex your articles:
bin/adminconsole ongr:es:index:drop -m default --force
bin/websiteconsole ongr:es:index:drop -m live --force
bin/adminconsole ongr:es:index:create -m default
bin/websiteconsole ongr:es:index:create -m live
bin/adminconsole sulu:article:index-rebuild ###LOCALE###
bin/websiteconsole sulu:article:index-rebuild ###LOCALE### --live
Removed persist option route_path
use the method setRoutePath
instead.
Now also support for ElasticSearch 5. To still be compatible with ^2.2, make sure you run:
- composer require ongr/elasticsearch-bundle:1.2.9
The multi-page feature needs a refactoring of the WebsiteArticleController
.
If you have overwritten it you have to adapt it.
Before:
class CustomArticleController extends Controller
{
public function indexAction(Request $request, ArticleDocument $object, $view)
{
$content = $this->get('jms_serializer')->serialize(
$object,
'array',
SerializationContext::create()
->setSerializeNull(true)
->setGroups(['website', 'content'])
->setAttribute('website', true)
);
return $this->render(
$view . '.html.twig',
$this->get('sulu_website.resolver.template_attribute')->resolve($content),
$this->createResponse($request)
);
}
}
After:
class CustomArticleController extends WebsiteArticleController
{
public function indexAction(Request $request, ArticleInterface $object, $view, $pageNumber = 1)
{
return $this->renderArticle($request, $object, $view, $pageNumber, []);
}
}
The _cacheLifetime
attribute available in the request parameter of a article
controller will return the seconds and don't need longer be resolved manually
with the cachelifetime resolver.
Reindex elastic search indexes:
bin/adminconsole sulu:article:index-rebuild ###LOCALE### --live
bin/adminconsole sulu:article:index-rebuild ###LOCALE###