Problem/Motivation

When backbone.js (located at core/assets/vendor/backbone) was updated to version 1.4.1, the backbone-min.js.map file was renamed as backbone-min.map. Although this is only an issue when JavaScript aggregation is disabled, it does cause an error in my development and local environments, so I'm opening an issue here to rename backbone-min.map to backbone-min.js.map.

Steps to reproduce

  1. Install Drupal without any additional core or contributed modules.
  2. On the Logging and errors page (/admin/config/development/logging), ensure Error messages to display is set to Errors and warnings.
  3. Go to the site's home page.
  4. The following error message should be shown: Page not found: /core/assets/vendor/backbone/backbone-min.js.map.

Proposed resolution

Rename core/assets/vendor/backbone/backbone-min.map to core/assets/vendor/backbone/backbone-min.js.map.

Remaining tasks

None.

Comments

jsutta created an issue. See original summary.

jsutta’s picture

StatusFileSize
new245 bytes

Adding patch to rename the file.

cilefen’s picture

Status: Active » Postponed (maintainer needs more info)
Related issues: +#3267339: Update Backbone to 1.4.1

It looks like this was reported on the upgrade issue

nod_ credited Gabbia998.

nod_ credited alexpott.

nod_ credited longwave.

nod_ credited ptomulik.

nod_’s picture

Version: 9.4.x-dev » 9.5.x-dev
Status: Postponed (maintainer needs more info) » Needs review
StatusFileSize
new811 bytes

Moving things here instead, porting issue credit as well.

nod_’s picture

StatusFileSize
new764 bytes
longwave’s picture

Status: Needs review » Reviewed & tested by the community

The upgrade itself was done in #3266912: Review version constraints for production yarn dependencies but this task remains from the duplicate. The file is renamed correctly to match the change in sourceMappingURL between Backbone 1.4.0 and 1.4.1, so this is RTBC.

jsutta’s picture

Thank you @nod_ and @longwave! +1 to #8.

  • lauriii committed 12a74da on 10.1.x
    Issue #3291283 by nod_, jsutta, longwave, cilefen, alexpott, Gabbia998,...

  • lauriii committed ce575e9 on 10.0.x
    Issue #3291283 by nod_, jsutta, longwave, cilefen, alexpott, Gabbia998,...

  • lauriii committed 77c7281 on 9.5.x
    Issue #3291283 by nod_, jsutta, longwave, cilefen, alexpott, Gabbia998,...

  • lauriii committed 87e7b0e on 9.4.x
    Issue #3291283 by nod_, jsutta, longwave, cilefen, alexpott, Gabbia998,...
lauriii’s picture

Version: 9.5.x-dev » 9.4.x-dev
Status: Reviewed & tested by the community » Fixed

Committed #9 12a74da and pushed to 10.1.x and cherry-picked to 10.0.x. Committed #8 77c7281 and pushed to 9.5.x and cherry-picked to 9.4.x. Thanks!

alina.basarabeanu’s picture

Patch #9 applied on Drupal Version 9.4.1 and fix the issue.

Status: Fixed » Closed (fixed)

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

leisurman’s picture

Patch #2 applies without an error but does not rename the file backbone-min.map to backbone-min.js.map for me after running composer install? I am using Drupal 9.3.22. The web-root is in web/. My environment is Virtualbox/Redhat

leisurman’s picture

I tried Patch #8 on Drupal 9.3.22. Composer said, Could not apply patch. But the file is renamed from backbone-min.map to backbone-min.js.map. Is it safe to leave this patch in as it does work and we are upgrading to Drupal 9.4 in the next few weeks?

jsutta’s picture

@leisurman, I would suggest renaming your core folder to something like core.old, then running composer install. This will reinstall Drupal Core, which should fix the issue you're seeing. After running composer install, verify that the files are correct and, if they are, delete the core.old folder.

Note: Hopefully this isn't the case as it's not best practice, but if you have any customizations applied directly to anything in the core folder, then you'll need to make sure to reapply them before deleting the core.old folder.

Hope this helps!

leisurman’s picture

@jsutta, Thank you. I will try this soon.

leisurman’s picture

We upgrade to Drupal 9.4.8. I looked inside /core/assets/vendor/backbone/
And I see the correct named file - backbone-min.js.map. There wasn't a need to use patch #8