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

Space added after variables in taxonomies #13187

Open
3 of 6 tasks
jg-git8 opened this issue Jun 29, 2019 · 7 comments
Open
3 of 6 tasks

Space added after variables in taxonomies #13187

jg-git8 opened this issue Jun 29, 2019 · 7 comments

Comments

@jg-git8
Copy link

jg-git8 commented Jun 29, 2019

  • I've read and understood the contribution guidelines.
  • I've searched for any related issues and avoided creating a duplicate issue.

Please give us a description of what happened.

Spaces are automatically added after the variables in the taxonomies fields even if removed.

E.g. if I have a category "Sheet", and I set the SEO title or Meta description to :
The "Term title"s
-> I expect to have The Sheets and not The Sheet s

Please describe what you expected to happen and why.

I expect that the fields are not modified while saved.
Until version 11.4, the space was added automatically when editing, but if I removed it and saved, the field would be saved as I wanted.
Starting version 11.5, if I remove the automatically added space and save, the space is added again during the save.

How can we reproduce this behavior?

  1. Go to SEO -> Search Appearance -> Taxonomies
  2. Change the title or description of one taxonomy e.g. Categories to : The "Term title"s
  3. Save
  4. Go back to the field. The content is now : The "Term title" s (with a space between the variable and the text)

Technical info

  • Which browser is affected (or browsers):
  • Chrome
  • Firefox
  • Safari
  • Other

Used versions

  • WordPress version: 5.2.2
  • Yoast SEO version: 11.5
@Djennez
Copy link
Member

Djennez commented Jul 2, 2019

It does indeed render the space on the settings page, but it is actually saved without the space.

If you save it without space (and see the space return after save), check the title in the Snippet Preview of a taxonomy. It should render without space.

@jg-git8
Copy link
Author

jg-git8 commented Jul 2, 2019

Indeed. But if I save it again, then the space is saved, so I think it is misleading...

@Djennez
Copy link
Member

Djennez commented Jul 2, 2019

Hmmm, I can understand why that would be an issue, as all options are saved when the save button is clicked, even when you don't expect that to be overridden.

So it's a valid bug, but please note that this is a minor issue that doesn't affect many people. So I don't know if / when it will get picked up. Of course, we do welcome any community PRs that would dive into this.

@osirismqz
Copy link

Hmmm, I can understand why that would be an issue, as all options are saved when the save button is clicked, even when you don't expect that to be overridden.

So it's a valid bug, but please note that this is a minor issue that doesn't affect many people. So I don't know if / when it will get picked up. Of course, we do welcome any community PRs that would dive into this.

It's an annoying issue if you are using variables to compose the title. For example we use %%curentyear%% a lot before parenthesis and square brackets like "Best guitars for beginners [Review %%currentyear%%]". It always ends as "[Review 2020 ]" with an added blank space.

@winnersmedia
Copy link

This issue still exists as described by @osirismqz, is it going to be fixed?

It's an annoying issue if you are using variables to compose the title. For example we use %%curentyear%% a lot before parenthesis and square brackets like "Best guitars for beginners [Review %%currentyear%%]". It always ends as "[Review 2020 ]" with an added blank space.

@ideenmacher
Copy link

@Djennez as maybellyne tagged the topic, i experience the same. i need the placeholder to be wrapped in these german „“ quotation marks, but its always adding a white space behind the variable after saving. if solving it for the plugin is not important enough yet, do you maybe have a little advice, where i can search for this white space being added, in the code, to maybe fix it myself temporary? thanks a lot!

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