Umbraco.Community.BlockPreview icon indicating copy to clipboard operation
Umbraco.Community.BlockPreview copied to clipboard

Error 404 on assets.js when running Umbraco 14 + Block Preview on Ubuntu 24.04

Open psclrzn opened this issue 1 year ago • 3 comments

Which Umbraco.Community.BlockPreview version are you using?

2.0.2

Which Umbraco version are you using? For example: 10.4.0 - don't just write v10

14.2

Bug summary

My current setup: Ubuntu 24.04 VS Code 1.92.2 .NET 8.0.108 Umbraco 14.2

When trying to run my Umbraco website with Block Preview, in the back office I get a 404 error on /app_plugins/Community.BlockPreview/assets.js. This error does not appear in Windows (I quickly tests with a VM, didn't investigated much in Windows). I assume it might be caused by the case-sensivity of the Linux file system.

Steps to reproduce

Just login to the back office of an Umbraco website that uses Block Preview Go to Content and select any content page that uses Block Preview Open Code Inspector (F12 generally) in your browser. Check Console for error message.

Expected result / actual result

Block Preview should work properly in an Linux environment

psclrzn avatar Sep 03 '24 14:09 psclrzn

I tried to commit a fix and create a Pull Request but it didn't work.

Basic fix is to change the js path in umbraco-package.json.

{
  "$schema": "../umbraco-package-schema.json",
  "name": "Umbraco.Community.BlockPreview",
  "id": "Umbraco.Community.BlockPreview",
  "version": "2.0.2",
  "allowTelemetry": true,
  "extensions": [
    {
      "name": "Umbraco.Community.BlockPreview.EntryPoint",
      "alias": "Umbraco.Community.BlockPreview.EntryPoint",
      "type": "entryPoint",
      "js": "/App_Plugins/Umbraco.Community.BlockPreview/assets.js"
    }
  ]
}

psclrzn avatar Sep 07 '24 02:09 psclrzn

This should be resolved once PR #71 is merged.

kevin9092 avatar Oct 01 '24 10:10 kevin9092

Thanks. I've seen the PR has been merged.

Do we have an ETA for the release that will include this fix?

psclrzn avatar Oct 09 '24 20:10 psclrzn

I am not sure.

@rickbutterfield do you have a schedule for when the latest v1 / v2 changes are going to be released?

kevin9092 avatar Oct 16 '24 09:10 kevin9092

Hey @psclrzn - it will likely be at the end of the month!

rickbutterfield avatar Oct 16 '24 09:10 rickbutterfield

Thank you.

psclrzn avatar Oct 16 '24 20:10 psclrzn

@psclrzn The fix for this is included in 2.0.3 which is currently being released to NuGet. Please give it a try and report back!

rickbutterfield avatar Oct 30 '24 11:10 rickbutterfield