- Issue created by @Grevil
- Merge request !50Issue #3445081 by Grevil: Add missing update hook for adjusting viewsreference field settings → (Open) created by Grevil
- 🇩🇪Germany Grevil
Alright, this does the trick! Please review!
Here is the
drush cex --diff
output after running the update hook:diff --git a/tmp/drush_tmp_1714738545_6634d571e4fb1/field.field.node.article.field_viewsreference.yml b/tmp/drush_tmp_1714738545_6634d571ec102/field.field.node.article.field_viewsreference.yml index 7191901..feadc2c 100644 --- a/tmp/drush_tmp_1714738545_6634d571e4fb1/field.field.node.article.field_viewsreference.yml +++ b/tmp/drush_tmp_1714738545_6634d571ec102/field.field.node.article.field_viewsreference.yml @@ -26,24 +26,14 @@ settings: default: default page: page block: block - feed: '0' preselect_views: block_content: block_content comment: comment comments_recent: comments_recent content: content content_recent: content_recent - files: '0' - frontpage: '0' - taxonomy_term: '0' - user_admin_people: '0' - watchdog: '0' - who_s_new: '0' - who_s_online: '0' enabled_settings: - limit: '1' - offset: '1' - title: '1' - argument: '0' - pager: '0' + limit: limit + offset: offset + title: title field_type: viewsreference
Please review!
- Status changed to Needs review
8 months ago 12:18pm 3 May 2024 - last update
8 months ago 1 fail - 🇨🇦Canada sseto
Hi Grevil,
I updated the module to beta7 and my view block disappeared. I applied patch 🐛 Configuration schema for "Enable extra settings" (title,pagination,...) incorrect Fixed and my view is back BUT only intermittently. Very strange that it disappears and reappears.
Do you think applying your update hook will fix my issue?
Thanks!
- 🇩🇪Germany Grevil
No, I don't think this patch will help you in this regard. Have you tried using the current dev version of this module?
There are currently six issues merged in dev, since 8.x-2.0-beta7: https://git.drupalcode.org/project/viewsreference/-/commits/8.x-2.x?ref_...
Maybe one of them solves your issue. - Status changed to RTBC
7 months ago 6:46am 31 May 2024 - 🇩🇪Germany harkonn
The update-hook fixed the problem for our systems and is already running in our sites.
Side-node: We copied the code into our own update-hook into our profile so we don't run into problems with update-hook-versions in our projects.
Good work! :)
- 🇳🇱Netherlands ekes
Isn't it the schema that is wrong, or rather missing? Those look like they should be integers not strings. I see there is for example
viewsreference.enabled_settings.limit
which is set for integer. It will be that it also needs one for when it's used*view:
? - First commit to issue fork.
- 🇬🇧United Kingdom scott_euser
Thanks for the work on this! Could someone update the issue summary with steps to reproduce please? I believe I should check out a particular version of the 2x branch, set up a Views Reference Field with a particular set of settings, then update to latest 2x branch and see the incorrect configuration saved.
- 🇬🇧United Kingdom scott_euser
For now I pulled all the latest changes from 2x into this merge request so tests start running as well on it.
- 🇦🇺Australia jnlar Sydney, Australia
hi @scott_euser, I've updated the IS with the reproducible steps. config_inspector module was used to produce the failed validation error.
- Status changed to Needs work
6 months ago 6:14am 27 June 2024 - 🇬🇧United Kingdom scott_euser
Thanks for the IS update, really helpful!
I tried this out but unfortunately it needs work:
- I created a field Viewsref1 with 2 views preselected, 2 views reference settings plugins selected
- Config exported
- Switched to 8.x-2.x branch
- Drush updb
- Config exported
I then created a second identical Viewsref2 field
I expected the config to be the same, on config export (except UUID and the minor diff in field name) yet they are quite different. Things like status are missing on Viewsref1 field after the update hook.
- 🇦🇺Australia jnlar Sydney, Australia
I'm unable to reproduce the mismatch (except uuid, id, field_name, label) on my end using the reproduce steps. Isn't there a difference switching to 8.x-2.x instead of checking out commit d444b603d8 in step 3? the
viewsreference_update_8104
hook doesn't exist in 8.x-2.x branch.