Install
Works with Drupal: ^11.4 || ^12Using Composer to manage Drupal site dependencies
Alternative installation files
Download tar.gz
59.25 KB
MD5: e5c80e52418ab1c021ed5e8ec95164bf
SHA-1: dfa79407ccbafe31dd8d42f620cd5cec860ccff5
SHA-256: 1b6a4c762558f8cea3b02437500b7f16d9666ee6e782701b1f374fa47008b869
Download zip
98.52 KB
MD5: 6cd5c262daa498a24ab872cfb2a73c61
SHA-1: 78718c48dd1b416239de3debf1cdf7bcf681880b
SHA-256: cc2aa4aef4e5049d6653f950fa864411b9e7ca7f783f4153e45c6a0d8cd6f9d9
Release notes
Breaking changes
- #6 The GraphQL schema mirrors the Contentfry API instead of serving a front end.
contentfryPostsreturns aContentfryPostListwithitemsandtotalinstead of a list of posts.totalis the number of posts without the limit and the offset.- The
languages,undetectedLanguageandnetworksarguments are removed. The query returns the posts in the current content language, or in the first fallback language that has posts. mediaTypestakes theContentfryMediaTypeenum (IMAGE,VIDEO,TEXT).networkandmediaTypeon a post are now enums too.- Fields are regrouped and renamed.
image(url,width,height) replacesimageUrlandimageSize.author(name,handle,url,imageUrl) replaces theuser*fields.urlreplaceslinkandpermalink, andpublishedAtreplacespostTime. On the video,providerandproviderVideoIdreplacesourceandvideoId. On the call to action,buttonTextandurlreplacebuttonandlink. postRef,sentiment,ingestTimeandconnectionare removed.hashtagsis now non-nullable.- A site that needs other language settings, or the posts on a field of its own types, can build its own schema extension. It uses the new
contentfry_postsandcontentfry_languagesdata producers. See the README for an example. PostRepository::getPosts()returns aPostListobject instead of an array. The posts are in itsitemsproperty.
New features
- #4 The posts block falls back to the same languages for every current content language. With the language setting "The current content language", the new setting "Show the posts in a fallback language" shows the posts in the first fallback language that has posts. The block uses the site's language fallback with the operation
contentfry_posts, so the Language Hierarchy module andhook_language_fallback_candidates_contentfry_posts_alter()also apply.
Bug fixes
- #3 The
contentfry_postsdata producer does not add the cache tag of thecontentfry.settingsconfig.
Upgrade notes
- Update your GraphQL queries and any PHP code that calls
PostRepository::getPosts(), as described under "Breaking changes". - No update hook changes existing blocks. Because the new setting is on by default, existing posts blocks set to "The current content language" will start showing posts in a fallback language when the current content language has none. To keep the old behavior, edit the block and turn off "Show the posts in a fallback language".