- Issue created by @gmarcel
- πΊπΈUnited States wells Seattle, WA
Thanks for flagging.
Looks like this is a result of changes in π Entity operations for menu links are hardcoded in edit menu form Fixed (change record: Operations link for MenuLinkContent entity are moved along with entity list builder β ).
The two methods that need to implemented are
getResetRoute
andgetOperations
.I'm not quite sure why
\Drupal\colossal_menu\Entity\Link
is inheriting\Drupal\Core\Entity\ContentEntityBase
instead of\Drupal\Core\Menu\MenuLinkBase
. Worth looking in to whether that change should be made as the base class already providesgetResetRoute
andgetOperations
. - πͺπΈSpain alvarodemendoza
Added generic inherited methods to prevent the error.
- Status changed to Needs review
over 1 year ago 8:53am 27 July 2023 - last update
over 1 year ago 9 pass - Status changed to Needs work
over 1 year ago 3:04pm 27 July 2023 - πΊπΈUnited States wells Seattle, WA
@AlvaroDeMendoza thanks for the patch --
+ // Links can either be reset or deleted, not both. + if ($this->isResettable()) { + $operations['reset'] = [ + 'title' => $this->t('Reset'), + 'url' => $this->getResetRoute(), + ]; + } elseif ($this->isDeletable()) { + $operations['delete'] = [ + 'title' => $this->t('Delete'), + 'url' => $this->getDeleteRoute(), + ]; + }
Since these links are not ressetable lets just have the delete operation here (i.e., get rid of the unnecessary if-else structure).
-
wells β
committed ca6b2562 on 3.0.x authored by
AlvaroDeMendoza β
Issue #3371088 by AlvaroDeMendoza: Missing Methods in Entity\Link on...
-
wells β
committed ca6b2562 on 3.0.x authored by
AlvaroDeMendoza β
- Status changed to Fixed
about 1 year ago 10:01pm 4 October 2023 Automatically closed - issue fixed for 2 weeks with no activity.