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

[Bug] Error key is present twice in the base.php lang file #5314

Closed
tabacitu opened this issue Sep 12, 2023 · 2 comments
Closed

[Bug] Error key is present twice in the base.php lang file #5314

tabacitu opened this issue Sep 12, 2023 · 2 comments

Comments

@tabacitu
Copy link
Member

Bug report

What I did

Generated an operatino with a button using DevTools. Inside it, it was using trans('backpack::base.error') which we have been providing for a long time.

What I expected to happen

Werk.

What happened

No werk, because:
CleanShot 2023-09-12 at 10 48 40

Basically, before 1f734e4 we already had an error key which translated to Error. Now, that's being overridden by the error key that @promatik added, which provides an array 🤦‍♂️

So when you do trans('backpack::base.error') and expect a string... no bueno... you get an array now. So we've pretty much introduced a bug with that PR. We didn't notice that the string already existed.

What I've already tried to fix it

Nothing it. Because the problem is... we have to choose one to keep. Tbh since this one is newer, I would keep the old one as error and rename the new array as error_page or something. But we have to do that inside all themes 🤦‍♂️

@promatik
Copy link
Contributor

Ouch! I didn't know about that error key ...
I'll rename error to error_page 👌

@promatik
Copy link
Contributor

Fixed here; #5316

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

No branches or pull requests

2 participants