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

Site Editor Plugin sidebar: Clone: Theme Name is duplicated #387

Closed
carolinan opened this issue Jun 2, 2023 · 4 comments · Fixed by #389
Closed

Site Editor Plugin sidebar: Clone: Theme Name is duplicated #387

carolinan opened this issue Jun 2, 2023 · 4 comments · Fixed by #389

Comments

@carolinan
Copy link

If my theme name is for example "testar" and I go into the Site Editor plugin sidebar and select "Create theme" and then
clone, it will tell me that the theme already exists. This is fine. But when I enter a new name in the name field,
for example, "testar2", the theme ends up as "testar222"; if I set the theme name to "testarx" it ends up as "testarxxx" "testar-again" ends up as "testar-againagainagain".

The theme name presented in the UI in the Site Editor plugin sidebar (theme info panel) matches the name that ends up in the style.css file.
But it does not match the theme folder name: If the theme name is "testarenxxx" then the folder name is "testarenx".

MacOS
Local by flywheel
PHP 8.0.022
WP 6.2.2
Create block theme Version 1.12.0
Gutenberg Version 1.12.0

The theme that is being cloned is a "blank" theme generated through the create block theme plugin.

@carolinan
Copy link
Author

This another related edge case, if the theme is testar and I enter Swedish characters åäö, the theme name ends up as testaråäöaaoaao

@pbking
Copy link
Contributor

pbking commented Jun 2, 2023

Hrm. I wasn't able to reproduce this.

I created a new blank theme called "Blank".

Then I cloned that theme and called it "Clone" and both folders were created without error and named as expected. I tried with other variations (CloneCopy, CloneCopy2, etc) and all were created as I expected.

I'm not sure what I'm missing to reproduce this.

@carolinan
Copy link
Author

carolinan commented Jun 3, 2023

Are you using the Site Editor option?

What about the text domain, is that correct too?

I am testing on two different installs, but both are on mac..

@pbking
Copy link
Contributor

pbking commented Jun 5, 2023

Are you using the Site Editor option?

Yes indeed. Text domain is cloned correctly for me as well. Both the text domain and folder leverage the $slug variable so it makes sense that if one was off for you they both would be.

I'm also using on a Mac. I'll give it another whirl today to see if I can duplicate.

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

Successfully merging a pull request may close this issue.

2 participants