WooCommerce - a single product url without permalink - woocommerce

I recently discovered that a single product in my WooCommerce shows up in search results without its permalink. I cannot find this product anywhere, and therefore I cannot fix the permalink issue.
The link should read as: /nb/butikk/adheseal-2/
But it reads as: /nb/?product_variation=adheseal-2
Which of course just reroutes to the main page. I cannot find this entry in the system so I have noway of fixing the issue. It's a single post problem because every other item works as expected. Not just this particular link. Seeing as clicking the link doesn't work, I cannot find the post ID either.
I have tried to clean up the DB, resetting permalinks etc. but to no awail.
Any ideas?

It was a cache issue that prevented the permalink update.

Related

WordPress posts can't be linked to a specific category

One of our website has a problem with linking normal posts to a specific category. When we try to link a post to the category named "nieuws" (news), the archive of this category remains empty. Also WordPress shows zero on the categories (taxonomy) page. When I create a new category, for example "nieuws2" everything works as it should be. I've never seen this issue before and it seems to be a bug in the WordPress core. Any idea what this problem could be?
We figured it out! One of the database rows was crashed. Everything is working as it should be.

NextScripts SNAP : not using the permalink in wordpress?

This is in a way a followup of this question : Jetpack Publicize: Sharing only on Twitter for a category
I am currently working on a website in which one of the category only serves as a way to curate news on the net and then, share it on the front page and on Twitter.
The post itself is empty, I use a custom field to receive the URL from the user, grab a few things from the target website, update the permalink and save. Upon saving, SNAP publishes the post on Twitter.
My issue is that it is not using the permalink but the url of the post itself (which is absolutely empty). Having a look into the plugin's code, I saw that it was using post metas (most notably urlToUse, snap_MYURL) but couldn't determine if it was a priority issue or something else.
I also try to adjust my code to set these meta values to the url I want, to no avail.
Is there a way I could set my custom functions or the SNAP plugin so that the permalink is used ?
No answer after a week, neither here nor from SNAP's support. No problem.
The ugly patch I used :
Jetpack Publicize for all the Twitter updates
SNAP for the Facebook ones thanks to their ability of posting based on a specific category
It's bloated and I'd love to understand but, sometime, you have to ship

Woo commerce - variable product prices missing from WP

hoping for some help.
We use the following - Wordpress/ woo commerce /wcvendors pro. Prices for variable products are disappearing from wp engine view despite being in the product variation information. It doesn't impact every product on our site but a fair few. How it occurs is, the price is disappearing when you go in and edit the product. If we quick edit the product the price reappears. But it will dissapears again if we use the edit button. Initially the problem started because under the "Products" and "Inventory" We had checked the following setting: "Hide out of stock items from the catalog". Now this button is not ticked but it is still causing us issues.
It seems you have an error on the product page which cause the price not to be saved.
There can be some reasons, here are two I see occasioanlly:
PHP error is caused during the save, and therefore the data is lost. WordPress and WooCommerce works flawlessly together, so the first suspects are other plugins and your theme. Try first to turn off all your plugins and switch to another theme to see if this happens again. If not try to activate your theme, and recheck, and then the plugins one after the other, and check after each activation, until you find the one makes the problem.
Too many data is being saved at one time. It can be too many variations or too many custom fields. This can be fixed by changing some PHP settings. Please have a look here especially under the WPEngine note, and also check this plugin.

Why does WordPress allow multiple page-slugs in url without triggering 404?

The title is pretty self explanatory, but I'm trying to figure out why WordPress allows this or if it's a setting in .htaccess perhaps, but here's the example:
I have a page, lets say a "Contact" page with the slug of "contact-us".
I go to http://example.com/contact-us/ -- everything works normally
I go to http://example.com/contact-us/contact-us/contact-us/contact-us/contact-us/contact-us (I could do this a million times) and it does NOT trigger a 404 error!
Why is this? If I enter a random string of numbers, it instantly triggers 404.php, but just repeating the page-slug does not trigger a 404.
I would like the page-slug to not be able to be repeated over and over again and trigger a 404 if it even gets repeated once.
Has anyone else experienced this issue? Is it possibly a canonical link issue or a "nofollow". I just don't understand why WordPress is not seeing this as 404 material.
Thanks in advance for any replies, suggestions, and help.
I have found a way to solve my own problem. Today I noticed that I was running two WordPress builds on the same server but one went to 404 while the other would just go back to the page. Now I knew it was a theme specific issue.
The answer is really simple actually, it was a permalink issue. In order for me to get the behavior I was looking for, I had to select "Post Name" as my permalink settings.
I previously had a custom string of options for a different style display using "Custom Structure", which I'm assuming had the "failsafe" in it.
I'm willing to switch out the extra permalink styling options in favor of the 404.
Although, those that opt to use a custom permalink structure should see if this happens to you.

WordPress Post Date Changes On Update

I have my permalinks in WordPress set to the Month and Name setting. This generates URLs like /blog/2009/09/my-post-name. Every time a post is updated, it changes the posting date, which can potentially change the permalink address.
This is wreaking some havoc on my site, as I'll have banner/button ads throughout that point to the permalink. When a post from August is updated in September, all of the ads become broken links until I discover this and change it.
Is there any way to make the original posting date stay static, despite any updates? I'm looking for something like a plug-in or an overlooked setting, as I have multiple authors with varying degrees of computer literacy.
Thanks for any help!
Cory
Update:
Apparantly this is behaviour that others aren't experiencing, so I'm attaching a screen shot of exactly what's happening. Top image is before saving, bottom image is after saving.
(source: opl.on.ca)
Are you sure updating a post changes the permalink? I don't have this behaviour in my installations. What do changes a permalink is changing the post date.
In database, acoording to this schema, we have post__date and post__modified, two different attributes: used in create an update action. If you're having your post-date modified without modifying it directly
Updating a post date in Wordpress http://img18.imageshack.us/img18/3440/wordpresspostdate.png
then I'm afraid some plugin may be changing it's value.
Reading your description, I'm assuming you're using static links to your banners. Try to use a simple plugin that creates these links based on your post id: some simple routine would do it. You can get some information using get_post for example.
<?php
$my_id = 7;
$post_id_7 = get_post($my_id, ARRAY_A);
$slug = $post_id_7['post_name'];
?>
... or even easier with get_permalink. You need just your post id.
<?php
echo get_permalink(7);
?>
So, at least if your permalinks are changing without a reason and you dont know how to fix them, at least you can build them dinamically.
Just read the codex documentation and Function Reference to see what's avaiable to make your life easier!
I run the same permalink settings and don't have trouble with post updates changing the permalink. There are separate editor settings for the permalink and a user has to specifically change the permalink from that editor, which is right under the post title in the text editing box in the post editor. That's a WP thing to keep permalinks from getting broken all the time.
Maybe you should try using a few static pages? That way you can have both a clean permalink: mysite.com/mypermalink/ that won't change, if in fact your post permalinks are changing from a plugin that you need to use.

Resources