Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[White label] [Trix editor] Console error when deleting logo while custom tab is active #12296

Open
drummer83 opened this issue Mar 20, 2024 · 2 comments
Assignees
Labels
bug-s4 The bug is annoying, but doesn't prevent from using the platform. Not so many users are impacted.

Comments

@drummer83
Copy link
Contributor

Description

This was found when testing #12271.

If the custom tab for white labelling is active and the white label logo is the removed, there is a console error and the page content is displayed twice.

Expected Behavior

Deleting the white label logo while the white label custom tab is active should work without errors.

Actual Behaviour

Deleting the white label logo while the white label custom tab is active shows a console error and the page content is displayed twice.

Steps to Reproduce

  1. Activate your browser console (hit F12) in your browser and click on 'console'.
  2. In enterprise settings go to White Label.
  3. Activate 'Hide OFN navigation'.
  4. Upload a logo.
  5. Activate 'Create custom tab in shopfront'.
  6. Enter a tab title.
  7. Enter a tab content.
  8. Click 'Update'.
  9. In enterprise settings go to White Label again.
  10. Remove the logo and confirm the confirmation dialog.
  11. Observe the Trix error in the console.
  12. Observe that the page content is dispayed twice.

Animated Gif/Screenshot

Browser console error:
grafik

Duplicated content:
grafik

Workaround

Refresh the page to remove the duplicate content.

Severity

bug-s4: it's annoying, but you can use it

Your Environment

Possible Fix

@drummer83 drummer83 added the bug-s4 The bug is annoying, but doesn't prevent from using the platform. Not so many users are impacted. label Mar 20, 2024
@MrBowmanXD
Copy link

Began to investigate this issue. In app/webpacker/controllers/trixeditor_controller.js:line 25 if we check for this.element.toolbarElement first (with a if clause) we can make the error disappear but i still see repeated content, will investigate a bit more.

@MrBowmanXD
Copy link

Will probably need to check the logic behind the removal of the logo, because the content is repeated when the logo is removed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-s4 The bug is annoying, but doesn't prevent from using the platform. Not so many users are impacted.
Projects
Status: In Progress ⚙
Development

No branches or pull requests

2 participants