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

[4.x]: <em> tag added to all error message {attribute} values #13640

Closed
samhibberd opened this issue Sep 4, 2023 · 4 comments
Closed

[4.x]: <em> tag added to all error message {attribute} values #13640

samhibberd opened this issue Sep 4, 2023 · 4 comments
Assignees

Comments

@samhibberd
Copy link

samhibberd commented Sep 4, 2023

What happened?

Description

The following PR (#12125) wraps the {attribute} part of all validation error messages with asterisks *{attribute}*, representing an <em> tag when parsed as markdown.

As I understand it this is an enhancement for the CP and the new error summary stuff.

It maybe just us, but this is not the correct behavior for the front end, where we would now need to include a markdown parser to handle / display any validation error messages that contain markdown.

Ideally messages for our front end would not be modified, not sure if this is configurable or might require a change or setting, but either way I have been unable to find docs or details on the change anywhere.

Craft CMS version

4.5.3

PHP version

8.2.*

Operating system and version

No response

Database type and version

No response

Image driver and version

No response

Installed plugins and versions

@wsydney76
Copy link

This also applies to CLI output, where e.g. $this->stdout(implode(' ', $tag->getErrorSummary(true)) . PHP_EOL); now outputs

*Title* "Pool" has already been taken. *Slug* "pool" has already been taken.

/Karla

@i-just
Copy link
Contributor

i-just commented Sep 8, 2023

Hi, thanks for reporting! I raised a PR to only emphasise error message attribute names in the Control Panel.

@samhibberd
Copy link
Author

Fantastic, thanks @i-just.

brandonkelly added a commit that referenced this issue Sep 12, 2023
Calling getIsCpRequest() from format() was causing an infinite recursion bug for functional tests
@brandonkelly
Copy link
Member

Craft 4.5.4 is out with that fix.

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

No branches or pull requests

4 participants