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

Importing Bard content changes active toolbar buttons #72

Closed
carstenjaksch opened this issue Jan 4, 2025 · 3 comments · Fixed by #77
Closed

Importing Bard content changes active toolbar buttons #72

carstenjaksch opened this issue Jan 4, 2025 · 3 comments · Fixed by #77
Labels
bug Something isn't working

Comments

@carstenjaksch
Copy link
Contributor

Bug description

After an import of Bard content, all my Bard fields have their active toolbar buttons changed.

The new active buttons correspond with this list: https://github.com/statamic/importer/blob/main/src/Transformers/BardTransformer.php#L68

How to reproduce

Import Bard content, the toolbar buttons of the target fields change.

Logs

No response

Environment

Environment
Application Name: Gutachterix
Laravel Version: 11.36.1
PHP Version: 8.3.15
Composer Version: 2.8.3
Environment: local
Debug Mode: ENABLED
URL: gutachterix.test
Maintenance Mode: OFF
Timezone: Europe/Berlin
Locale: en

Cache
Config: NOT CACHED
Events: NOT CACHED
Routes: NOT CACHED
Views: CACHED

Drivers
Broadcasting: reverb
Cache: file
Database: sqlite
Logs: stack / single
Mail: sendmail
Queue: sync
Session: file

Statamic
Addons: 8
Sites: 2 (Gutachterix, Clever-Immo)
Stache Watcher: Enabled (auto)
Static Caching: Disabled
Version: 5.45.0 PRO

Statamic Addons
jacksleight/statamic-bard-texstyle: 3.4.1
ryanmitchell/statamic-translation-manager: 2.0.0
statamic/collaboration: 1.0.0
statamic/importer: 1.6.0
studio1902/statamic-peak-browser-appearance: 3.6.0
studio1902/statamic-peak-commands: 8.13.0
studio1902/statamic-peak-seo: 8.18.0
studio1902/statamic-peak-tools: 6.6.0

Additional details

No response

@carstenjaksch carstenjaksch added the bug Something isn't working label Jan 4, 2025
@duncanmcclean
Copy link
Member

This is actually intentional.

It'll enable most of the Bard buttons in case it's used by your content, otherwise you'll see errors if you imported bold text somewhere, but you didn't have the "Bold" button enabled. You can disable the buttons after importing.

I'll leave this open and add a note to the documentation next week.

@carstenjaksch
Copy link
Contributor Author

Thanks for the reply on a weekend @duncanmcclean!

Would it be possible to save the enabled buttons of the Bard field to a variable before the import and revert the enabled buttons after import?

That would be more user-friendly I guess.

@duncanmcclean
Copy link
Member

Would it be possible to save the enabled buttons of the Bard field to a variable before the import and revert the enabled buttons after import?

Theoretically, we could do - but figuring out which buttons are enabled is tricky to do reliably, which is why I've left it for folks to handle post-import.

Maybe there's a better way though - I'll have a think.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants