silverstripe / silverstripe-admin

Silverstripe Admin Component
BSD 3-Clause "New" or "Revised" License
25 stars 92 forks source link

BUG: elemental no longer allows saving of HTML Editor fields #1650

Closed sunnysideup closed 8 months ago

sunnysideup commented 8 months ago

Module version(s) affected

2.1

Description

I upgrade this module and elemental HTML editing broke in elemental.

I found the issue here: https://github.com/silverstripe/silverstripe-admin/commit/bc92e1f14f7ef7f2093875866ec35fae74825404

Apollo error: Uncaught (in promise) Invariant Violation: An error occured!

How to reproduce

This was my install:

        "php": ">=8.2",
        "silverstripe/recipe-cms": "5.x-dev",
        "dnadesign/silverstripe-elemental": "^5",

and this was error:

vendor.js?m=1705378272:1 Uncaught (in promise) Invariant Violation: An error occured! For more details, see the full error text at https://go.apollo.dev/c/err#%7B%22version%22%3A%223.8.1%22%2C%22message%22%3A30%2C%22args%22%3A%5B%5D%7D
    at new t (http://mysite/_resources/vendor/silverstripe/admin/client/dist/js/vendor.js?m=1705378272:1:2061624)
    at f (http://mysite/_resources/vendor/silverstripe/admin/client/dist/js/vendor.js?m=1705378272:1:2026626)
    at e.clearStore (http://mysite/_resources/vendor/silverstripe/admin/client/dist/js/vendor.js?m=1705378272:1:1972850)
    at http://mysite/_resources/vendor/silverstripe/admin/client/dist/js/vendor.js?m=1705378272:1:1985233

Changing composer.json to: include:

"silverstripe/admin": "2.x-dev#f616c77340e0f2d0b26d2481882b18fc97a747fd",

Fixed the issue.

I can't write a fix, because I dont understand any of this code. I would recommend some notes around the code changed so that it explains what the code does.

Possible Solution

Revert change.

Additional Context

Firesphere seems to think it has to do with the nodejs version, but I have no further information on this.

Validations

PR

GuySartorelli commented 8 months ago

Thanks for reporting this. I can confirm I also have this when running silverstripe/admin 5.x-dev

emteknetnz commented 8 months ago

Linked PR has been merged, this will be automatically tagged shortly

sunnysideup commented 8 months ago

Ya'll AMAZING. Thank you so much.