Closed (fixed)
Project:
Add To Calendar Button (AddEvent.com)
Version:
8.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
6 Nov 2019 at 15:01 UTC
Updated:
21 Aug 2023 at 19:49 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
kaythay commentedComment #3
stefaniev commentedThis patch works to make the display text translatable, but unfortunately the list of calendars to show in the button doesn't get saved anymore. No calendars are selected.
Comment #4
gg24 commentedComment #5
ramya balasubramanian commentedComment #6
ramya balasubramanian commentedPlease have a look at my below patch and screenshots.
Steps to test 'Add to calendar' Button:
Please let me know if you are facing any issues
Comment #7
ramya balasubramanian commentedComment #8
Revathi Manohar commentedHi,
I have tested the patch it is working for me.
Comment #9
nagarajan kumar commented@ramya thanks for the steps. same am following its work for me.
Comment #10
sorlov commentedAlso need to provide schema for provided Third party settings for date formatters
cause currently I got missing schema error
Comment #11
danflanagan8I just added some basic functional test coverage in #3379744: Addtocalendar could use some automated tests! that should be helpful in resolving this issue.
I added
protected $strictConfigSchema = FALSE;to the test because indeed there are schema problems in the module. If I remove that declaration and run the test it fails with:Drupal\Core\Config\Schema\SchemaIncompleteException: Schema errors for addtocalendar.settings with the following errors: addtocalendar.settings:addtocalendar_show variable type is integer but applied schema class is Drupal\Core\TypedData\Plugin\DataType\StringDataThere are other schema problems as well, as the IS notes.
Anyway, now that we have automated tests, the goal of this issue is to get those tests to run after removing the $strictConfigSchema declaration.
Comment #12
danflanagan8I just applied the patch in #6 and ran the test locally with the strict schema enforced. I got a little farther I think before the test failed for a schema violation:
So that's one thing that needs fixing. That needs to be string though, so we'll need to update the config in the test module. I think technically that indicates we should include an update hook to force that config update on existing sites.
When I update my zeros to '0' in the test config, the tests pass! Yay!
But I also think that
field.field_settings.add_to_calendar_fieldshould extend the core boolean schema since our field extends that field.I'll make both of these updates.
Regarding #10 I think we should handle that in a new issue since the current test coverage does not cover that case.
Comment #13
danflanagan8Here's an updated patch with everything mentioned in #12.
Comment #14
danflanagan8Comment #16
danflanagan8Fixed!
Thank you for the nice work, @kaythay! I noticed that the patch in #6 is simply a re-posted version of your original patch in #2.
I created a followup for the third party settings: #3379787: AddToCalendar third party settings missing schema