Problem/Motivation

When deleting a tour an access denied is logged.

http://drupal.d8/admin/config/user-interface/tour/manage/views-uii/tip/a...

Steps to reproduce on Drupal 8.4.x

- Add tour
- Add tips
- Delete tour
- Visit http://drupal.d8/admin/reports/dblog
- Error around deletion of tour.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Comments

clemens.tolboom created an issue. See original summary.

clemens.tolboom’s picture

From #2884850: Fatal error on deleting tour

When try to delete a tour created via UI before I got this error:
Fatal error: Call to undefined method Drupal\tour_ui\Plugin\tour_ui\tip\TipPluginTextExtended::export() in /var/www/docroot/modules/contrib/tour_ui/src/Form/TourTipDeleteForm.php on line 107

It appears both for 8.x-1.0-alpha1 and 8.x-1.x-dev

My core version is 8.3.2

From #2898156: Error on deleting Tour Tip

I get the following error while trying to remove a tip

PHP Fatal error: Call to undefined method Drupal\\tour_ui\\Plugin\\tour_ui\\tip\\TipPluginTextExtended::export() in /var/www/html/academics/modules/tour_ui/src/Form/TourTipDeleteForm.php on line 107, referer: http://something.com/sample1/admin/config/user-interface/tour/manage/too...

I use multisite. This error occured on sample1

From #2933209: Can not delete a TIP

Error: Call to undefined method Drupal\tour_ui\Plugin\tour_ui\tip\TipPluginTextExtended::export() in Drupal\tour_ui\Form\TourTipDeleteForm->submitForm() (line 107 of /home/www.s1biose.com/public_html/web/modules/contrib/tour_ui/src/Form/TourTip...)

clemens.tolboom’s picture

Title: Access denied on tip when deleting tour » Error when when deleting tip
Status: Active » Needs review
StatusFileSize
new2.56 KB

Digging somewhat into this issue I wonder why we still have a custom TipPluginTextExtended

/**
 * This plugin override Tour\tip\TipPluginText to add UI methods.
 *
 * It should not appear as tour\tip plugin because tour_ui shouldn't be <============
 * installed on production. So this plugin will not be availble anymore once the <=======
 * module will be installed.
 * The only goal of this plugin is to provide missing ui methods for default
 * tip text plugin.
 *
 * @Tip(
 *   id = "text_extended",
 *   title = @Translation("Text")
 * )
 */

Furthermore CR Configuration entity can declare which properties need export using annotations
https://www.drupal.org/node/2481909 suggests export has changed.

Tried the CR guide but failed. See attached patch.

clemens.tolboom’s picture

I realised too late I closed issue as duplicates of this issue but this issue was about deleting a tour and not a tip. Now it is about deleting a tip. /sorry

eldrupalista’s picture

StatusFileSize
new480 bytes

The attached patch solves the problem for deleting tips.
The patch works both in 8.x-1.x-dev and 1.0-alpha1
However in 8.x-1.x-dev, after successfully deleting the tip, it redirects to route tour_ui.get_modules, which ultimately gives an error.
I think this is some problem introducing in the dev branch because this error does not happen in 1.0-alpha1.

estoyausente’s picture

Status: Needs review » Reviewed & tested by the community

The patch in #5 works as expected!

clemens.tolboom’s picture

Status: Reviewed & tested by the community » Fixed

tnx

Status: Fixed » Closed (fixed)

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

clemens.tolboom’s picture

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