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

Spaces are removed for inline formatting (italics and bold) #11125

Closed
christophstockinger opened this issue Nov 15, 2024 · 5 comments · Fixed by #11127
Closed

Spaces are removed for inline formatting (italics and bold) #11125

christophstockinger opened this issue Nov 15, 2024 · 5 comments · Fixed by #11127
Labels

Comments

@christophstockinger
Copy link
Contributor

Bug description

We have an existing customer project that we updated to Statamic v5 some time ago and is currently running on v5.38.0.

We have been shown a strange behavior by our customer that we cannot understand, that it only occurs isolated in the project. The problem does not occur in one of our sandbox projects with the same Statamic version and the same bard field settings.

The problem is as follows:
If one or more words in a paragraph are marked in italics or bold, the space before and after the marking is deleted after saving and also displayed as such. Interestingly, however, the space character is also sent in the payload of the request.

During debugging, however, we noticed that these are then removed all at once when the fields are added.

Screen.Recording.2024-11-15.at.11.52.45.mov

I have attached a video that shows the issue again so that you can reproduce it.

We are also happy to provide the test environment of the customer project, but unfortunately we have to refrain from linking it publicly here in Github. Unfortunately, this can only be done privately (via e-mail or Discord).

How to reproduce

The attached video shows the steps to reproduce the problem.

As described, it is possible that this does not occur in another project. We therefore offer to provide access to the test environment. The problem is present on all environments that we operate (local, test and production)

Logs

No response

Environment

Environment
Application Name: [DEV] Konkav & K16
Laravel Version: 11.31.0
PHP Version: 8.2.9
Composer Version: 2.8.2
Environment: development
Debug Mode: OFF
URL: cms-konkav.morethings.dev
Maintenance Mode: OFF
Timezone: UTC
Locale: de

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

Drivers
Broadcasting: log
Cache: file
Database: mysql
Logs: stack / single
Mail: smtp
Queue: sync
Session: file

Statamic
Addons: 7
Sites: 5 (Konkav - DE, Konkav - EN, K16 - DE, K16 - EN, K16 - PL)
Stache Watcher: Enabled
Static Caching: Disabled
Version: 5.38.0 PRO

Statamic Addons
aryehraber/statamic-uuid: 2.3.0
jonassiewertsen/statamic-documentation: 2.0.0
morethingsdigital/personio: dev-main
morethingsdigital/statamic-nextjs: 1.0.2
studio1902/statamic-peak-browser-appearance: 3.5.0
studio1902/statamic-peak-seo: 8.17.0
studio1902/statamic-peak-tools: 6.4.0

Installation

Existing Laravel app

Additional details

No response

@jacksleight
Copy link
Contributor

jacksleight commented Nov 15, 2024

I suspect this is since the changes in #8958.

Either this check or this check must be failing (probably the first). No idea why that would be happening though.

@mnlmaier
Copy link
Contributor

@jacksleight do you think there is a quick way around this? this prevents our client from editing content, which is not optimal 😐

@christophstockinger
Copy link
Contributor Author

@jacksleight Fun Fact: Our CP-Route ist an empty string like CP_ROUTE="" because we use no frontend layer and have a headless mode

@christophstockinger
Copy link
Contributor Author

I have just done a test and set the CP route back to CP. And lo and behold, it works, which is what this skip instruction from your first link is supposed to do.

But this is once again a case where the value for the CP route is an empty string. Like this: CP_ROUTE=""

And this case should also be considered in my eyes, as it is essential for headless operation. If this is not desired, then I would also mention this in the docs or describe exactly how to configure a headless mode. @jackmcdade @duncanmcclean

@jacksleight
Copy link
Contributor

Ah ha, I think in that case it should just assume all routes are CP routes and always skip the default trim strings middleware.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants