[Skip to main content](#vessel-content)

#   unpublishing a former default variant results in 404

##

- **[NicoW](/forum/user/58228-nicow "View NicoW's Profile")**
- [![NicoW's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/58228-nicow "View NicoW's Profile") Topic Author
- [ Offline](/forum/user/58228-nicow)

Less More

- Posts: 147
- Thank you received: 8
-
-

2 years 1 week ago -  2 years 1 week ago [\#364469](#364469) by [NicoW](/forum/user/58228-nicow "View NicoW's Profile")  *[unpublishing a former default variant results in 404](/forum/26-product-category-display/908870-unpublishing-a-former-default-variant-results-in-404#364469 "Hi, me again....what can i say :(  I have a product and it has some variants, and the default variant is out of stock not coming back. So when i et another variant as deafault that works. If i unpublish the former default variant, it results in a 404 of the whole product page.  I tried doing mass actions canonical urls but that does nothing.  How do i solve this? i dare not delete the variant as then i could not solve the 404 issue. Thanks")* was created by *[NicoW](/forum/user/58228-nicow "View NicoW's Profile")*

Hi, me again....what can i say ![:(](/media/kunena/emoticons/22.png ":(")

I have a product and it has some variants, and the default variant is out of stock not coming back.
So when i et another variant as deafault that works.
If i unpublish the former default variant, it results in a 404 of the whole product page.

I tried doing mass actions canonical urls but that does nothing.

How do i solve this? i dare not delete the variant as then i could not solve the 404 issue.
Thanks

- [ ![Schermafbeelding2024-11-15205612.png](/forum/attachment/59996) ](/forum/attachment/59996 "...1-15205612.png") [ ](/forum/attachment/59996?download=1 "...1-15205612.png")
- [ ![Schermafbeelding2024-11-15205658.png](/forum/attachment/59997) ](/forum/attachment/59997 "...1-15205658.png") [ ](/forum/attachment/59997?download=1 "...1-15205658.png")

Last edit: 2 years 1 week ago by [NicoW](/forum/user/58228-nicow "View NicoW's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MDg4NzAtdW5wdWJsaXNoaW5nLWEtZm9ybWVyLWRlZmF1bHQtdmFyaWFudC1yZXN1bHRzLWluLTQwND90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86584
- Thank you received: 14325
-
-

2 years 1 week ago [\#364470](#364470) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[unpublishing a former default variant results in 404](/forum/26-product-category-display/908870-unpublishing-a-former-default-variant-results-in-404#364470 "Hi, me again....what can i say :(  I have a product and it has some variants, and the default variant is out of stock not coming back. So when i et another variant as deafault that works. If i unpublish the former default variant, it results in a 404 of the whole product page.  I tried doing mass actions canonical urls but that does nothing.  How do i solve this? i dare not delete the variant as then i could not solve the 404 issue. Thanks")*

Hi,

I don't see why that would be the case. We would need to check the settings of the product and temporarily reproduce the issue. Could you provide a backend access via our contact form ?
[ www.hikashop.com/support/contact-us.html](https://www.hikashop.com/support/contact-us.html)

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MDg4NzAtdW5wdWJsaXNoaW5nLWEtZm9ybWVyLWRlZmF1bHQtdmFyaWFudC1yZXN1bHRzLWluLTQwND90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Philip](/forum/user/34318-philip "View Philip's Profile")**
- [![Philip's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/34318-philip "View Philip's Profile")
- [ Offline](/forum/user/34318-philip)

Less More

- Posts: 4820
- Thank you received: 652
-
-

2 years 1 week ago -  2 years 1 week ago [\#364491](#364491) by [Philip](/forum/user/34318-philip "View Philip's Profile")  Replied by *[Philip](/forum/user/34318-philip "View Philip's Profile")* on topic *[unpublishing a former default variant results in 404](/forum/26-product-category-display/908870-unpublishing-a-former-default-variant-results-in-404#364491 "Hi, me again....what can i say :(  I have a product and it has some variants, and the default variant is out of stock not coming back. So when i et another variant as deafault that works. If i unpublish the former default variant, it results in a 404 of the whole product page.  I tried doing mass actions canonical urls but that does nothing.  How do i solve this? i dare not delete the variant as then i could not solve the 404 issue. Thanks")*

Hello,

We have received your elements, but are unable to complete them, can you please complete them with this:
- The **product** affected by your problem previously described.
- Specify **which variant** will therefore remain at 0 stock (and will not return) in this product.

In order to precise our idea, we have explore your site, and wasn't able to see a 404 error by reaching product with variants, **OR** by select a variant with a 0 stock.
Guide us more in order to better understand the situation.

Regards

Last edit: 2 years 1 week ago by [Philip](/forum/user/34318-philip "View Philip's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MDg4NzAtdW5wdWJsaXNoaW5nLWEtZm9ybWVyLWRlZmF1bHQtdmFyaWFudC1yZXN1bHRzLWluLTQwND90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[NicoW](/forum/user/58228-nicow "View NicoW's Profile")**
- [![NicoW's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/58228-nicow "View NicoW's Profile") Topic Author
- [ Offline](/forum/user/58228-nicow)

Less More

- Posts: 147
- Thank you received: 8
-
-

2 years 5 days ago [\#364558](#364558) by [NicoW](/forum/user/58228-nicow "View NicoW's Profile")  Replied by *[NicoW](/forum/user/58228-nicow "View NicoW's Profile")* on topic *[unpublishing a former default variant results in 404](/forum/26-product-category-display/908870-unpublishing-a-former-default-variant-results-in-404#364558 "Hi, me again....what can i say :(  I have a product and it has some variants, and the default variant is out of stock not coming back. So when i et another variant as deafault that works. If i unpublish the former default variant, it results in a 404 of the whole product page.  I tried doing mass actions canonical urls but that does nothing.  How do i solve this? i dare not delete the variant as then i could not solve the 404 issue. Thanks")*

Hi,

You could not find the issue because i will not leave my site running with errors. this is after all the most important sales season of the year.

The product is called horizon, the variant is the 'White' 'WITH' variant which was the default variant until it run out of stock.
I have now replaced the image with an image explaining it will not come back.

If i disable the variant, the website gives an error.

BTW, the same happens if i add text in the description of the variant. (since you rebuild them to have separate boxes for description, specs, video, compare)

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MDg4NzAtdW5wdWJsaXNoaW5nLWEtZm9ybWVyLWRlZmF1bHQtdmFyaWFudC1yZXN1bHRzLWluLTQwND90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86584
- Thank you received: 14325
-
-

2 years 4 days ago [\#364598](#364598) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[unpublishing a former default variant results in 404](/forum/26-product-category-display/908870-unpublishing-a-former-default-variant-results-in-404#364598 "Hi, me again....what can i say :(  I have a product and it has some variants, and the default variant is out of stock not coming back. So when i et another variant as deafault that works. If i unpublish the former default variant, it results in a 404 of the whole product page.  I tried doing mass actions canonical urls but that does nothing.  How do i solve this? i dare not delete the variant as then i could not solve the 404 issue. Thanks")*

Hi,

Thanks for the details.
I was able to reproduce the issue by temporarily unpublishing the variant with a stock at 0.
That should indeed not happen. I'm not sure why it would.
Now, unpublishing the variant is the same as deleting it, so you could delete the variant and you should hopefully not have the same problem.
But to understand why this is happening, we'll need a FTP access in order to dig into the issue.
Could you provide it via our contact form ?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MDg4NzAtdW5wdWJsaXNoaW5nLWEtZm9ybWVyLWRlZmF1bHQtdmFyaWFudC1yZXN1bHRzLWluLTQwND90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86584
- Thank you received: 14325
-
-

2 years 13 hours ago [\#364651](#364651) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[unpublishing a former default variant results in 404](/forum/26-product-category-display/908870-unpublishing-a-former-default-variant-results-in-404#364651 "Hi, me again....what can i say :(  I have a product and it has some variants, and the default variant is out of stock not coming back. So when i et another variant as deafault that works. If i unpublish the former default variant, it results in a 404 of the whole product page.  I tried doing mass actions canonical urls but that does nothing.  How do i solve this? i dare not delete the variant as then i could not solve the 404 issue. Thanks")*

Hi,

I've spent a few hours trying to understand the problem.
I've narrowed it down to the line: Code:

echo HTMLHelper::_('content.prepare', $html);

in the view file override product / show.
This is custom code which is not in HikaShop by default.
I've changed it to : Code:

echo JHTML::_('content.prepare',$html);

as it corresponds more closely to what is there by default in HikaShop: Code:

&lt;div id="hikashop_product_description_&lt;?php echo $variant_name; ?&gt;" style="display:none;"&gt;&lt;?php echo JHTML::_('content.prepare',preg_replace('#&lt;hr *id="system-readmore" */&gt;#i','',$variant-&gt;product_description)); ?&gt;&lt;/div&gt;

and the error doesn't happen.

It doesn't help that you have a mechanism on your website which makes the page redirects to a custom 404 page whenever there is a PHP fatal error happening and I don't know how to deactivate that.
Ideally, you can look in the PHP error log of your server which should contain the fatal error message.

But my change seems to help so I guess the problem can be marked as solved.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MDg4NzAtdW5wdWJsaXNoaW5nLWEtZm9ybWVyLWRlZmF1bHQtdmFyaWFudC1yZXN1bHRzLWluLTQwND90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[NicoW](/forum/user/58228-nicow "View NicoW's Profile")**
- [![NicoW's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/58228-nicow "View NicoW's Profile") Topic Author
- [ Offline](/forum/user/58228-nicow)

Less More

- Posts: 147
- Thank you received: 8
-
-

2 years 13 hours ago [\#364653](#364653) by [NicoW](/forum/user/58228-nicow "View NicoW's Profile")  Replied by *[NicoW](/forum/user/58228-nicow "View NicoW's Profile")* on topic *[unpublishing a former default variant results in 404](/forum/26-product-category-display/908870-unpublishing-a-former-default-variant-results-in-404#364653 "Hi, me again....what can i say :(  I have a product and it has some variants, and the default variant is out of stock not coming back. So when i et another variant as deafault that works. If i unpublish the former default variant, it results in a 404 of the whole product page.  I tried doing mass actions canonical urls but that does nothing.  How do i solve this? i dare not delete the variant as then i could not solve the 404 issue. Thanks")*

Thanks, i'll thry whatever happens after black friday sales.
I'll pass this discussion on to rcatheme as he makes a lot of templates for hikashop he can probably learn from this.
It's still strange though about adding text into a variant description resulting in the same error as disabling a variant. But whatever is fixed im happy about.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MDg4NzAtdW5wdWJsaXNoaW5nLWEtZm9ybWVyLWRlZmF1bHQtdmFyaWFudC1yZXN1bHRzLWluLTQwND90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[NicoW](/forum/user/58228-nicow "View NicoW's Profile")**
- [![NicoW's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/58228-nicow "View NicoW's Profile") Topic Author
- [ Offline](/forum/user/58228-nicow)

Less More

- Posts: 147
- Thank you received: 8
-
-

1 year 11 months ago [\#364676](#364676) by [NicoW](/forum/user/58228-nicow "View NicoW's Profile")  Replied by *[NicoW](/forum/user/58228-nicow "View NicoW's Profile")* on topic *[unpublishing a former default variant results in 404](/forum/26-product-category-display/908870-unpublishing-a-former-default-variant-results-in-404#364676 "Hi, me again....what can i say :(  I have a product and it has some variants, and the default variant is out of stock not coming back. So when i et another variant as deafault that works. If i unpublish the former default variant, it results in a 404 of the whole product page.  I tried doing mass actions canonical urls but that does nothing.  How do i solve this? i dare not delete the variant as then i could not solve the 404 issue. Thanks")*

This is his reply, maybe this is for amongst you 2 as i have no idea:

echo HTMLHelper::_('content.prepare', $html); and echo JHTML::_('content.prepare', $html); are the same. Starting with Joomla! 4, JHTML has been replaced with HTMLHelper.

After applying the changes, was your issue resolved? Please confirm so I can check further if needed.

(i replied to him that i tested and the issue is indeed resolved)

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MDg4NzAtdW5wdWJsaXNoaW5nLWEtZm9ybWVyLWRlZmF1bHQtdmFyaWFudC1yZXN1bHRzLWluLTQwND90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86584
- Thank you received: 14325
-
-

1 year 11 months ago [\#364681](#364681) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[unpublishing a former default variant results in 404](/forum/26-product-category-display/908870-unpublishing-a-former-default-variant-results-in-404#364681 "Hi, me again....what can i say :(  I have a product and it has some variants, and the default variant is out of stock not coming back. So when i et another variant as deafault that works. If i unpublish the former default variant, it results in a 404 of the whole product page.  I tried doing mass actions canonical urls but that does nothing.  How do i solve this? i dare not delete the variant as then i could not solve the 404 issue. Thanks")*

Hi,

I also agree with him that both should produce the same result. But on your website, that's not the case. Not sure why.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MDg4NzAtdW5wdWJsaXNoaW5nLWEtZm9ybWVyLWRlZmF1bHQtdmFyaWFudC1yZXN1bHRzLWluLTQwND90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.086 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
