wordpress-seo
wordpress-seo copied to clipboard
Space added after variables in taxonomies
- [x] I've read and understood the contribution guidelines.
- [x] 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?
- Go to SEO -> Search Appearance -> Taxonomies
- Change the title or description of one taxonomy e.g. Categories to : The "Term title"s
- Save
- 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):
- [x] Chrome
- [ ] Firefox
- [ ] Safari
- [ ] Other
Used versions
- WordPress version: 5.2.2
- Yoast SEO version: 11.5
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.
Indeed. But if I save it again, then the space is saved, so I think it is misleading...
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.
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.
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.
+1 https://wordpress.org/support/topic/empty-space-character-after-quotation-marks-in-placeholder/
@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!