Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
I get an error whenever saving either of the provided google_analytics_reports view without any customization.
The error is as follows:
InvalidArgumentException: The configuration property display.default.display_options.filters.start_date.value.type doesn't exist. in Drupal\Core\Config\Schema\ArrayElement->get() (line 74 of core/lib/Drupal/Core/Config/Schema/ArrayElement.php).
I thought this patch might resolve but to no avail:
#2369119: Fatal error when trying to save a View with grouped filters using other than string values
Comment | File | Size | Author |
---|---|---|---|
#32 | google-analytics-reports-views-start-date-value-type-doesnt-exist-2850463-32-D8.patch | 1.48 KB | hkoosha |
#24 | interdiff.txt | 989 bytes | b_sharpe |
#24 | 2850463-missing-config-24.patch | 5.87 KB | b_sharpe |
#23 | 2850463-missing-config-23.patch | 5.05 KB | b_sharpe |
#8 | 2850463-8.patch | 2.09 KB | casey |
Comments
Comment #2
sylus CreditAttribution: sylus commentedThis seems to get it working again for me ^_^
Comment #3
othermachines CreditAttribution: othermachines commentedI would be very surprised if this isn't somehow related to #2369119: Fatal error when trying to save a View with grouped filters using other than string values. There's a fix committed for core 8.3.x and 8.4.x branches just days ago. I've got 8.2.x installed and I can't duplicate the problem on my machine.
The extra config info really shouldn't be necessary. It would be good to know if the problem still persists for you on an updated installation and, if so, the steps to duplicate it. Core version and any modules installed would be helpful, too.
Thanks for your report. Sorry I can't be more help than that.
Comment #4
RaisinBranCrunch CreditAttribution: RaisinBranCrunch commentedYes, it is definitely that issue that causes this. I think the specific cause of it is:
views.filter_value.*:
type: string
label: 'Filter value'
Which was added to views.filter.schema.yml. It causes the DataDefinition to be loaded as string, even though in the past it would have been a mapping or something like that. I haven't had a chance to look into it enough yet, but this change broke a filter on one of our custom fields.
Comment #5
RaisinBranCrunch CreditAttribution: RaisinBranCrunch commentedThanks so much, sylus, for the schema. That allows it to be imported.
Reproduction steps: use 8.3.0. Don't ask me why, but the fix you mentioned is actually the thing that causes this for this module (and for certain custom filters, like ours). If you remove the changes that were made to views between RC2 and 8.3.0, it still works.
Comment #6
RaisinBranCrunch CreditAttribution: RaisinBranCrunch commentedComment #7
DuneBL#2 solved my problem
Thank you!!
Comment #8
casey CreditAttribution: casey at SWIS commentedComment #9
abu-zakham CreditAttribution: abu-zakham at Vardot commentedI can confirm Patch #2 solved the problem. Thanks.
Comment #10
kingfisher64 CreditAttribution: kingfisher64 commentedAnother confirmation that #2 patch fixes the issue.
Can this please be committed Mr Maintainer?
Comment #11
kingfisher64 CreditAttribution: kingfisher64 commentedComment #12
DuneBLI confirm #2 solved the issue, and #8 doesn't solve it...
Comment #13
othermachines CreditAttribution: othermachines commentedOK, I'm now running into this on 8.3.7.
I think a more complete solution would combine patches in both #2 and #8. #2 only resolves the problem when saving the default views; however I still get errors if I save a GA view that I have created:
#8 resolves this error.
Comment #14
serg2 CreditAttribution: serg2 commented@othermachines, does your suggestion still work against 8.4?
Comment #15
othermachines CreditAttribution: othermachines commented@serg2 - Sorry, I don't know. I'm not yet using this module on an active 8.x installation as it hasn't been supported in over a year. :(
Comment #16
serg2 CreditAttribution: serg2 commentedAs Othermachines said in #13 there are two issues:
1: Saving an existing view
2: Creating(and then saving) a new view: e.g. duplicating one of the existing two views.
Against Drupal 8.4.0 the patch in #2 solves the first issue but not the second. The #8 needs a re-roll once #2 has been applied but even then does not solve the second issue.
Comment #17
LendudeSomething like #8 is the right way to fix this. Every custom filter needs to have a corresponding schema. The default is a single string value. If the filter wants values other then that, it needs a schema.
See core/modules/views/config/schema/views.filter.schema.yml for some examples. It's also strange that the default Views contain no plugin_id for the filters, so rebuilding the Views after adding the proper schema sounds like a pretty good idea too.
Comment #18
RAWDESK CreditAttribution: RAWDESK commentedBoth #2 and #8 fixed it for me. Without #2 the error on save persisted for a newly added "Chart" display.
Comment #19
akprasad303 CreditAttribution: akprasad303 commented#2 fixes issue when we edit available view from Google analytics but when try to add new view then same error persist.
Comment #20
stevieb CreditAttribution: stevieb commentedI had a similar issue ... this solved it
https://www.drupal.org/project/drupal/issues/2917006
Comment #21
Vivek Panicker CreditAttribution: Vivek Panicker commented#2 solved my problem too for Drupal 8.4.4.
Comment #22
akprasad303 CreditAttribution: akprasad303 at Publicis Sapient for Publicis Sapient commentedComment #23
b_sharpe CreditAttribution: b_sharpe commentedA combination of both and removing core info, working for me on 8.4.4
Comment #24
b_sharpe CreditAttribution: b_sharpe commentedFixes missing 'plugin_id' for attachments as well.
Comment #25
igonzalez CreditAttribution: igonzalez commentedEdit
Comment #26
handkerchiefCore 8.5.0
--> I added the patch from #24
--> If I want to edit an existing google analytics report view, this is shown in the field section:
broken/missing handler
--> If I want to create a view with google analytics data:
InvalidArgumentException: The configuration property display.default.display_options.filters.start_date.value.type doesnt exist. in Drupal\Core\Config\Schema\ArrayElement-get() (line 76 of core/lib/Drupal/Core/Config/Schema/ArrayElement.php). Drupal\Core\Config\StorableConfigBase-castValue(display.default.display_options.filters.start_date.value.type, offset) (Line: 211) Drupal\Core\Config\StorableConfigBase-castValue(display.default.display_options.filters.start_date.value, Array) (Line: 211) Drupal\Core\Config\StorableConfigBase-castValue(display.default.display_options.filters.start_date, Array) (Line: 211) Drupal\Core\Config\StorableConfigBase-castValue(display.default.display_options.filters, Array) (Line: 211) Drupal\Core\Config\StorableConfigBase-castValue(display.default.display_options, Array) (Line: 211) Drupal\Core\Config\StorableConfigBase-castValue(display.default, Array) (Line: 211) Drupal\Core\Config\StorableConfigBase-castValue(display, Array) (Line: 212) Drupal\Core\Config\Config-save() (Line: 280) Drupal\Core\Config\Entity\ConfigEntityStorage-doSave(google_analytics, Object) (Line: 392) Drupal\Core\Entity\EntityStorageBase-save(Object) (Line: 259) Drupal\Core\Config\Entity\ConfigEntityStorage-save(Object) (Line: 387) Drupal\Core\Entity\Entity-save() (Line: 637) Drupal\Core\Config\Entity\ConfigEntityBase-save() (Line: 989) Drupal\views_ui\ViewUI-save() (Line: 191) Drupal\views_ui\ViewAddForm-submitForm(Array, Object) call_user_func_array(Array, Array) (Line: 111) Drupal\Core\Form\FormSubmitter-executeSubmitHandlers(Array, Object) (Line: 51) Drupal\Core\Form\FormSubmitter-doSubmitForm(Array, Object) (Line: 585) Drupal\Core\Form\FormBuilder-processForm(view_add_form, Array, Object) (Line: 314) Drupal\Core\Form\FormBuilder-buildForm(view_add_form, Object) (Line: 74) Drupal\Core\Controller\FormController-getContentResult(Object, Object) call_user_func_array(Array, Array) (Line: 123) Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber-Drupal\Core\EventSubscriber\{closure}() (Line: 582) Drupal\Core\Render\Renderer-executeInRenderContext(Object, Object) (Line: 124) Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber-wrapControllerExecutionInRenderContext(Array, Array) (Line: 97) Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber-Drupal\Core\EventSubscriber\{closure}() (Line: 151) Symfony\Component\HttpKernel\HttpKernel-handleRaw(Object, 1) (Line: 68) Symfony\Component\HttpKernel\HttpKernel-handle(Object, 1, 1) (Line: 57) Drupal\Core\StackMiddleware\Session-handle(Object, 1, 1) (Line: 47) Drupal\Core\StackMiddleware\KernelPreHandle-handle(Object, 1, 1) (Line: 99) Drupal\page_cache\StackMiddleware\PageCache-pass(Object, 1, 1) (Line: 78) Drupal\page_cache\StackMiddleware\PageCache-handle(Object, 1, 1) (Line: 50) Drupal\ban\BanMiddleware-handle(Object, 1, 1) (Line: 57) Drupal\shield\ShieldMiddleware-handle(Object, 1, 1) (Line: 47) Drupal\Core\StackMiddleware\ReverseProxyMiddleware-handle(Object, 1, 1) (Line: 50) Drupal\Core\StackMiddleware\NegotiationMiddleware-handle(Object, 1, 1) (Line: 23) Stack\StackedHttpKernel-handle(Object, 1, 1) (Line: 657) Drupal\Core\DrupalKernel-handle(Object) (Line: 19)
Comment #27
rudam CreditAttribution: rudam commentedsame problem as #26 on 8.5.1
broken/missing handler
Comment #28
handkerchiefComment #29
mikolos CreditAttribution: mikolos commentedI had the same issue with the broken/missing handler after installing the patch. Re-importing the Google Analytics Fields at /admin/config/services/google-analytics-reports-api and clearing all caches resolved the issue for me.
Comment #30
mikolos CreditAttribution: mikolos commentedConfirmed, I'm having the same issue as #26.
The only workarounds that I can see for now are:
-> Broken handler issue for existing GA Views: re-import the Google Analytics fields.
-> InvalidArgumentException for new GA views: duplicate one of the existing views and modify it to your needs.
Comment #31
mbaev CreditAttribution: mbaev commentedDrupal 8.5.4. Patch #2 still works.
Comment #32
hkoosha CreditAttribution: hkoosha as a volunteer and at Milan Education Group commentedMind you, google_analytics_reports (not the API module though) must be re-installed so Drupal picks up the file views.schema file.
Comment #33
DuneBL@hkoosha thank you for the patch, but what is the difference with #24? Should we apply both?
Comment #34
hkoosha CreditAttribution: hkoosha as a volunteer and at Milan Education Group commented@DuneBL It's okay either way.
#24 fixes built-in default views, so you can clone them. #32 fixes the add new view wizard form, so you can add a new view without cloning.
I tested, everything works without #24 too. It shouldn't!!! but it does. Anyways you go ahead and apply #24 too.
Comment #35
Rajab Natshah CreditAttribution: Rajab Natshah at Vardot for Vardot commentedWe have been using #2 for over 2 years, and it's working well
committing #2. so any other addon or changes could be in a new issue
Comment #36
Rajab Natshah CreditAttribution: Rajab Natshah at Vardot for Vardot commentedComment #37
Rajab Natshah CreditAttribution: Rajab Natshah at Vardot for Vardot commentedComment #38
Rajab Natshah CreditAttribution: Rajab Natshah at Vardot for Vardot commentedComment #39
Rajab Natshah CreditAttribution: Rajab Natshah at Vardot for Vardot commentedComment #41
Rajab Natshah CreditAttribution: Rajab Natshah at Vardot for Vardot commentedComment #42
Rajab Natshah CreditAttribution: Rajab Natshah at Vardot for Vardot commentedComment #43
Rajab Natshah CreditAttribution: Rajab Natshah at Vardot for Vardot commentedComment #45
hkoosha CreditAttribution: hkoosha as a volunteer and commentedI still insisnt upon having my patch (#34) applied. The views is really determined to find the value.min and value.max, if the filter type of start_date / end_date is set to number.
I spent a whole day going down through the yaml parser, I can see the min and max are there, insinde an array keyed by value, however yaml can not realize this value is also an array. It thinks it's a plain single value without any subvalues.
You could easily try this on a recent version of Drupal core. also synchronizing and importing configuration via drush completely fails unless this patch is applied.
But anyway, it's your call :shrug.
Comment #46
jidrone CreditAttribution: jidrone at Mobomo commentedI agree with @hkoosha, a new issue should be created, I needed the patch #32 using version 8.x-3.0-beta3 and Drupal core 8.7.10.
Comment #47
Rajab Natshah CreditAttribution: Rajab Natshah at Vardot for Vardot commentedThanks koosha and Ivan for following up !
I will re-test your patch again.
You could create a new issue as a follow up issue, you have got a good point
Comment #48
Rajab Natshah CreditAttribution: Rajab Natshah at Vardot for Vardot commented#3097496: Add config schema for google analytics date views filter plugin id