When you

  1. create a tip and assign a class or an ID.
  2. If you try to edit and assign modal, the change doesn't gets saved to the database.
  3. If you go back to edit the tip you will see that it is still assigned to a class or ID.
CommentFileSizeAuthor
#5 tour_ui-2994408-5.patch779 bytesclemens.tolboom

Comments

jcmartinez created an issue. See original summary.

clemens.tolboom’s picture

Issue summary: View changes
Related issues: +#3003288: Cannot edit tour tip

This is also a bug in #3003288: Cannot edit tour tip

clemens.tolboom’s picture

Status: Active » Needs review

Debugging this the form is build OK

- modules/tour_ui/src/Form/TourTipForm.php:56

The code when submitting does not get the correct values for the ATTRIBUTES section

- modules/tour_ui/src/Form/TourTipForm.php:147

Is this because we 'are' a TipPluginTextExtended

Or is the logic in \Drupal\tour_ui\Plugin\tour_ui\tip\TipPluginTextExtended::buildConfigurationForm wrong?

clemens.tolboom’s picture

Status: Needs review » Needs work

The form submit should check for the Selector type value then unset the appropriate attributes to match with the logic in \Drupal\tour_ui\Plugin\tour_ui\tip\TipPluginTextExtended::buildConfigurationForm I guess now.

clemens.tolboom’s picture

Status: Needs work » Needs review
StatusFileSize
new779 bytes

Attached patch seems to solve this bug.

- The core/modules/tour/config/schema/tour.schema.yml has for tip a list of attributes; aka not particular keys.
- Test core/modules/tour/tests/tour_test/config/install/tour.tour.tour-test.yml has tips using either with no attribute, data-id or data-class.

I'm inclined to submit this fix asap but for the record and WTF is going on this patch. (I have to adjust some comment now I've written this comment)

clemens.tolboom’s picture

Version: 8.x-1.0-alpha1 » 8.x-1.x-dev
clemens.tolboom’s picture

Status: Needs review » Fixed
clemens.tolboom’s picture

Version: 8.x-1.x-dev » 8.x-1.0-beta1

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.