Skip to content

fix: BaseRichText.getData() null safety - Added an early return#279

Open
vardumper wants to merge 1 commit intoibexa:5.0from
vardumper:feature/feature/prevent-call-to-getData-on-uninitialized-editor
Open

fix: BaseRichText.getData() null safety - Added an early return#279
vardumper wants to merge 1 commit intoibexa:5.0from
vardumper:feature/feature/prevent-call-to-getData-on-uninitialized-editor

Conversation

@vardumper
Copy link
Copy Markdown

Fixes the following console error I saw when clicking "Publish" in the editing view.
Might not be a bug but erroneous usage on my end...
Nonethelesse, I would consider catching this scenario an improvement.

ibexa-richtext-onlineeditor-js.js:145040 Uncaught TypeError: Cannot read properties of null (reading 'getData')
at BaseRichText.getData (ibexa-richtext-onlin…tor-js.js:145040:42)
at RichTextValidator.validateInput (ibexa-admin-ui-conte…parts-js.js:9312:42)
at RichTextValidator.validateField (ibexa-admin-ui-conte…parts-js.js:5116:53)
at ibexa-admin-ui-conte…parts-js.js:5190:32
at Array.forEach ()
at RichTextValidator.isValid (ibexa-admin-ui-conte…parts-js.js:5188:31)
at getValidationResults (ibexa-admin-ui-conte…parts-js.js:4668:29)
at Array.map ()
at isFormValid (ibexa-admin-ui-conte…parts-js.js:4726:40)
at HTMLButtonElement.clickHandler (ibexa-admin-ui-conte…-parts-js.js:4710:9)

Somewhat related to ibexa/admin-ui#1807

@sonarqubecloud
Copy link
Copy Markdown

@vardumper vardumper changed the title fix: early return added to prevent null reference errors on getData c… fix: BaseRichText.getData() null safety - Added an early return Dec 27, 2025
@ibexa-yuna ibexa-yuna deleted the branch ibexa:5.0 April 29, 2026 08:19
@ibexa-yuna ibexa-yuna closed this Apr 29, 2026
@mnocon mnocon reopened this Apr 29, 2026
@sonarqubecloud
Copy link
Copy Markdown

@mnocon mnocon changed the base branch from main to 5.0 April 29, 2026 09:36
@mnocon
Copy link
Copy Markdown
Contributor

mnocon commented Apr 29, 2026

Hi! During the rename of main branch to 6.0, this PR was closed accidentally - I'm sorry about that.

I've reopened it, and set it to target the 5.0 branch - corresponding to the v5 version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants