Fix Error in Varbase Components - declared in both as a prop and as a slot

Created on 1 June 2023, over 1 year ago
Updated 10 June 2023, over 1 year ago

Problem/Motivation

Once installed and configured, every request for a site page other than admin pages, generates the following error:
The component "varbase_components:badge" declared [content] both as a prop and as a slot...in Drupal\sdc\Component\ComponentValidator->validateDefinition() (line 67 of C:\...\docroot\core\modules\sdc\src\Component\ComponentValidator.php)

If I change the name of the slot in badge.component.yml on line 48, the error then happens with another component, varbase_components:button. I'm sorry, but I don't know the implications of just changing all the slot items that match properties or if they should be able to have the same name.

Steps to reproduce

Given a new clean install of varbase 10 alpha1 (on Apache httpd-2.4.47-win64-VS16, Win11, php 8.1.7)
When browser requests a site page
Then the above error message is added to watchdog log and user gets the standard try again later error message.

Proposed resolution

  • Make sure to use different names for props and slots.

Remaining tasks

  • βœ… File an issue about this project
  • βœ… Addition/Change/Update/Fix to this project
  • βœ… Testing to ensure no regression
  • βœ… Automated unit/functional testing coverage
  • βž– Developer Documentation support on feature change/addition
  • βž– User Guide Documentation support on feature change/addition
  • βœ… Accessibility and Readability
  • βœ… Code review from 1 Varbase core team member
  • βœ… Full testing and approval
  • βœ… Credit contributors
  • βœ… Review with the product owner
  • βœ… Update Release Notes and Update Helper on new feature change/addition
  • βœ… Release Varbase 10.0.0-alpha2 β†’ , varbase_components-2.0.0-alpha5 β†’

Varbase update type

  • βœ… No Update
  • βž– Optional Update
  • βž– Forced Update
  • βž– Forced Update if Unchanged

User interface changes

  • N/A

API changes

  • N/A

Data model changes

  • N/A

Release notes snippet

πŸ› Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States cmbp

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024