WordPress Zero Width Spaces in URL - wordpress

We have a user that has zero width spaces that are ending up at the end of URL's that he is copying and pasting from an outlook email client into his WordPress 4.9.4 site. This doesn't happen on all of the sites, just some of them. The issue is happening just on a standard page using the TinyMCE tools to create the link.
Is anyone aware of a way to easily have WordPress strip these out? I don't know what the "correct" behavior is on these - but it certainly causes for some unique troubleshooting cases for the uneducated.
Another way to state this: Is anyone aware what the "default" behavior is on WordPress TinyMCE with handling "zero width spaces"? I have a user running into issues with them (not sure how they are getting there) and I've never seen this before.

Related

Wordpress site doesn’t render as expected

I decided to give wp ago, thought it would save time from writing custom html, css and js.
For the most part it has, however, how the page renders in my admin page compared to live is very different.
Because it’s rendering in admin as expected I’m finding it difficult to correct the display issues.
Has anyone else experienced this? If so, how did you resolve it?
Compare the domain name in the URL when your are logged as admin to the domain name when you are live.
If you create your WP at first time in a development URL then moves to a different server it will not be able to find CSS files what causes wrong rendering.

How do I stop Yoast from using first image it finds on a page as its og:image?

I think I understand that the behaviour's expected to prioritise from a given individual page's overriding image, to the first image it can scrape from a page, to the site's default fallback image (this being the lowest priority).
I somehow disabled the "first image it can scrape" bit though on a test build of a site, and I'm wondering how I can replicate that? As far as I can tell, all the settings as far as Yoast between my environment and production are the same, and I'm really confused what's causing the difference.
But to keep clear, I want all pages across the site to use the fallback image set in Yoast's social settings by default, only ever replacing it if a specific page is given an override image; and so I'm trying to stop Yoast from ever using images it finds from a page.
I feel like I must be blind to've not been able to find another thread/question that addresses this – that, or what I'm doing doesn't make sense for whatever reason?

Wordpress Migration issue css

I have migrated website to new domain, the problem is css not loading
if I inspect element it gives link to old domain, is there a way to update css links in wordpress?
please help
When moving a WordPress site to a new domain, you need to change the Site URL and Home URL, usually in the database or in wp-config.php, depending on how the site was originally set up. There may be other changes you need to make in the database, or by manually editing posts, like the locations of images in posts.
This page on wordpress.org is a good reference, for all the things you may need to change, and it shows a few different methods to make most of the changes, so you can choose the one you prefer:
https://codex.wordpress.org/Changing_The_Site_URL
Make sure to keep a backup of the site in case of any mistakes. If you make some changes, and most of the site is working, but a few things aren't, I would recommend making another backup, so you could restore it again without losing much work, if needed.
yes when you are adding links to your site you show use the function site_url().example/my_post in order to construct the links

'Bug' in WordPress? All URL's are appended with a '-2'

This is odd...
When I create a page (either draft or published) WordPress does its' job by creating/ suggestion a URL File Name.
For some reason it always appends a '-2' (without apostrophes)
So, for example - /exampleABC/ become automatically /exampleABC-2/
At first I thought it was because there was a draft version of the file or one in existence, but that isn't the case.
I've no idea how best to error-check here - any ideas what I should be looking for? Thanks
The current version of WordPress (version 4.5.1) does not have this "bug". Therefore, one of a few possibilities is happening for you:
Possibility 1: You have slug conflicts.
This is the way that WordPress resolves "slug" conflicts. So - the thing that you have to remember is that ANY record in the posts table - whether for a page, post, custom post type, etc - and even media - will have a slug. As #McNab points out - this includes the posts (and media) in the trash. If the slug for the page you are creating conflicts with any existing slug, then WP will automatically append a number (and "increment" it as appropriate):
Saving example - if a post with the slug example exists, will result in a new slug of example-2. If example-2 already exists, then example-3, etc.
Possibility 2: You have a plugin that is causing this issue.
Always keep in mind that plugins can do a LOT, given the power and flexibility of WP, and it's conceivable that a plugin (or your theme) could be causing this.
Possibility 3: Your site is hacked.
Similar to #2, there may be a nefarious / malicious plugin, theme, or "hack" on your site, which is causing this.
However - my strong guess is that it's just possibility 1 - you have other records in the posts table with the slug already existing.
How to know / prove it?
If I were testing / debugging this, I would take the following steps:
Create a page with a crazy, unique page title: "xyzpdqaaa" or similar. Save it. What is the slug? If it's "xyzpdqaaa-2" (aka "wrong"), then possibility one is (probably) ruled out. If it's "xyzpdqaa" (aka "right"), then everything is fine, and you just have slug conflicts.
If the slug turns out to be "xyzpdqaaa-2", then I would disable ALL plugins. (This is a pain, and I hate doing it, but it truly is the way to prove it). Repeat step 1 (with a new "crazy unique" title) - if it's correct, then you've got a plugin causing the problem.
If it is a plugin, start enabling plugins. Typically I work in "halves" - enable HALF the plugins (do your best guess at which one(s) are safe - and enable those first). Test again. If OK, enable more (half of the remaining plugins), test again. If not ok, disable half the enabled ones. (Keep track of which you did / did not enable, so you can narrow down which plugin is causing the issue). Repeat until you narrow down the specific plugin causing problems.
If it's not a plugin (it's still "wrong" even with all plugins disabled), then leave your plugins disabled, and switch themes. Test again. If it's still "wrong", then your site is hacked - clean up the hack. If it's "right", then your theme is the culprit.

Wordpress main website and mobile website duplicate content.

Basically a client has asked for his WordPress website to be turned into a mobile website as well. I have never attempted this and know nothing about SEO.
However the issue has arisen that this may cause duplicate content issues with Google, and therefore both sites may be dropped in the rankings.
I was looking at turning the website into a mobile site via one of the available WordPress mobile website plugins.
My question is if duplicate content will be an issue? Has anyone ever tried this?
After doing some reading I kind of think it may be possible to tell Google not to index the mobile website, although as I understand it It would be the same set of files. So I am unsure that if I tell it not to index one of them, that it will drop the other one as well.
Can anyone with WordPress and SEO knowledge clear this up for me?
In my opinion, if you have two indexed URLs with same text, there is duplicate content. And for Google, duplicate content is always an issue.
If you decide to no to index the mobile version of site, there will be not duplicate content because only one version of site will be indexed by Google.
Duplicate content is independent of your CMS (Wordpress), it's just a story about two indexed pages with same text.

Resources