Problem/Motivation

Two broken references around the accordion component. Verified against 1.0.x at commit 6e974b0.

  1. vartheme_bs5_rightup.libraries.yml declares the library accordion-scripts with js/components/accordion-init.js. That file does not exist, and neither does the js/components/ directory. It is the only declared JS in the whole theme that is missing on disk. The library is attached twelve times, from accordion-block.stories.twig and accordion-container.stories.twig only, never from a component or a live template, so all nine accordion stories request a 404.
  2. components/molecules/accordion-block/accordion-block.component.yml declares a dependency on vartheme_bs5_rightup/accordion-styles, which is not defined anywhere in vartheme_bs5_rightup.libraries.yml. It is the only undefined theme library referenced by any component.

Neither affects accordion behaviour. The components themselves declare vartheme_bs5_rightup/bs-collapse-script, which exists as js/bootstrap/collapse.js, and accordion-container has its own accordion-container.js. SDC auto-attaches those.

Steps to reproduce

  1. Open any accordion story in Storybook and watch the network panel: js/components/accordion-init.js returns 404.
  2. Search vartheme_bs5_rightup.libraries.yml for accordion-styles. There is no such library.

Proposed resolution

Remove the twelve attach_library('vartheme_bs5_rightup/accordion-scripts') calls from the two story files, remove the accordion-scripts library block, and remove the undefined accordion-styles dependency.

Verified afterwards: the libraries file parses with 34 entries, zero declared JS files are missing on disk, and zero components reference an undefined theme library.

A merge request will follow.

Remaining tasks

  • ✅ File an issue
  • ❌ Addition/Change/Update/Fix
  • ❌ Testing to ensure no regression
  • ➖ Automated unit/functional testing coverage
  • ➖ Developer Documentation support
  • ➖ User Guide Documentation support
  • ➖ UX/UI designer responsibilities
  • ➖ Accessibility and Readability
  • ❌ Reviewed by a human
  • ❌ Code review by maintainers
  • ❌ Full testing and approval
  • ❌ Credit contributors
  • ❌ Review with the product owner
  • ❌ Update Release Notes
  • ❌ Release

User interface changes

  • N/A

API changes

  • The accordion-scripts library is removed. Nothing outside the two story files attaches it.

Data model changes

  • N/A

Release notes snippet

  • Removed a library pointing at a missing accordion-init.js and an undefined accordion-styles dependency.
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

rajab natshah created an issue. See original summary.

rajab natshah’s picture

Status: Active » Needs review

  • rajab natshah committed 7ce700e9 on 1.0.x
    fix: #3627274 Remove the two dead accordion library references
    
rajab natshah’s picture

Status: Needs review » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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