Ecommerce software home
Shopping Cart Software Forum for Ecommerce Templates
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?



Find us on Facebook

Follow us on Twitter

View our YouTube channel


 All Forums
 Technical
 WordPress for Ecommerce Templates
 ****** IMPORTANT WORDPRESS INFORMATION *******
 New Topic  Reply to Topic
 Printer Friendly
Author  Topic   

Andy
ECT Moderator

95440 Posts

Posted - 04/10/2015 :  06:50:16  
We were recently made aware of a problem where store pages on a WordPress site could return a 404 error response. We immediately provided a temporary fix which we made available as a plugin

This was just a temporary fix until we could find a better way of handling things and possible problems. Daniel from our developers page has come up with a resolution that no longer requires the editing of core code but does require changes to the individual store pages.

Previously a products page for example would have used the following

<?php
$GLOBALS['ectcartpage']='products';
require('./wp-blog-header.php');
get_header();

?>
<?php
get_sidebar();
?>
<div>
<?php
include "vsadmin/inc/incproducts.php";
?>
</div>
<?php
get_footer();
?>

We now suggest using

<?php
$GLOBALS['ectcartpage']='products';
require('./wp-config.php');
$wp->init();
$wp->parse_request();
$wp->query_posts();
$wp->register_globals();
get_header();

?>
<?php
get_sidebar();
?>
<div>
<?php
include "vsadmin/inc/incproducts.php";
?>
</div>
<?php
get_footer();
?>

This should be changed on all the ECT store pages and you should also delete the CustomCore Update plugin as it is no longer required

You can check the response headers on sites like

http://tools.seobook.com/server-header-checker/
http://www.webrankinfo.com/english/tools/server-header.php

enter the URL of your store pages, such as category, product or detail page and you should get a "200 OK" response.

If you have any questions, let us know.

Please note that licenses purchased after February 2017 have this fix already included.

Andy

Please feel free to review / rate our software

dewers
Ecommerce Template Guru

USA
1282 Posts

Posted - 02/02/2017 :  09:44:51  
You can avoid the 404 response code issues with WordPress on ECT pages without using the Custom Core Update plugin which can cause compatibility issues when WordPress updates are released. To do so, you need to change the following code at the top of the ECT front-end pages from:

require('./wp-blog-header.php');
get_header();


To:

require('./wp-config.php');
$wp->init();
$wp->parse_request();
$wp->query_posts();
$wp->register_globals();
get_header();


Daniel Ewers
Ecom-Mods.com

PHP extensions from Ecom-Mods.com
Rate Our Products & Services

Andy
ECT Moderator

95440 Posts

Posted - 02/02/2017 :  09:49:38  
Thanks Daniel. I'll do some testing on that.

Andy

Please feel free to review / rate our software

Andy
ECT Moderator

95440 Posts

Posted - 02/03/2017 :  06:37:59  
This has now been thoroughly tested and the original post edited. If anybody has any questions about the changes or requires any help, please let me know.

A big thank you to Daniel who has kindly provided the code.

Andy

Please feel free to review / rate our software

garykit
Starting Member

Hong Kong
45 Posts

Pre-sales questions only
(More Details...)

Posted - 03/27/2017 :  05:04:13  
Hi Andy & Dewers,
I have also got the problem about "return a 404 error response" such as this link http://kagiweddings.com/sizeTable/

What's ECT front-end pages? How can I resolve this problem?

Best Regards,
Gary

Andy
ECT Moderator

95440 Posts

Posted - 03/27/2017 :  05:06:20  
Hi Gary

Send me an email with your FTP details and I'll sort it out for you.

Andy

Please feel free to review / rate our software

garykit
Starting Member

Hong Kong
45 Posts

Pre-sales questions only
(More Details...)

Posted - 03/27/2017 :  05:28:47  
HI Andy,
I have just sent my ftp information to you via email.
Have you got it?
Best Regards,
Gary

Andy
ECT Moderator

95440 Posts

Posted - 03/27/2017 :  06:20:49  
Hi Gary

I added the code so that the store pages wouldn't return a 404 error but the page you mention /sizeTable/ doesn't physically exist so that's why it shows as Page Not Found.

Andy

Please feel free to review / rate our software

garykit
Starting Member

Hong Kong
45 Posts

Pre-sales questions only
(More Details...)

Posted - 03/27/2017 :  06:29:39  
It is page name of wp page. All my wp pages caught the same 404 errors

Edited by - garykit on 03/27/2017 06:30:51

Andy
ECT Moderator

95440 Posts

Posted - 03/27/2017 :  06:51:18  
Could it be you have changed the URL structure in the wordpress admin page. In the Wordpress Pages admin page can you view page and see what URL is shown?

Andy

Please feel free to review / rate our software

garykit
Starting Member

Hong Kong
45 Posts

Pre-sales questions only
(More Details...)

Posted - 03/28/2017 :  02:45:45  
Hi Andy,
I have just found out why this error happen.
I found that the "edit" button for editing the Permalink disappeared in the WP Edit page when I activated the ECT Custom URLs plugin as the attached page.
Hope that you can resolve this problem as soon as possible.
Best Regards,
Gary

[img]http://kagiweddings.com/ECT/ECT-URL_error.jpg[/img]

Andy
ECT Moderator

95440 Posts

Posted - 03/28/2017 :  03:15:35  
You can type in what you like in the field and then hit the submit button - that should work ok.

Andy

Please feel free to review / rate our software

garykit
Starting Member

Hong Kong
45 Posts

Pre-sales questions only
(More Details...)

Posted - 03/28/2017 :  22:46:53  
Hi Andy,
It doesn't work. I can do so after I disactivate this plug-in.
Best Regards,
Gary

Andy
ECT Moderator

95440 Posts

Posted - 03/29/2017 :  02:33:23  
Can you de-activate the plugin and check the links to your stores pages are still working as they should. Instead of reactivating this plugin if you need it, try the one here instead https://wordpress.org/plugins/custom-permalinks/

Andy

Please feel free to review / rate our software

garykit
Starting Member

Hong Kong
45 Posts

Pre-sales questions only
(More Details...)

Posted - 03/29/2017 :  03:26:27  
resolved it, thx

mrouse2323
Advanced Member

143 Posts

Pre-sales questions only
(More Details...)

Posted - 11/03/2017 :  05:03:13  
any update on this? on my store pages on this tool
http://tools.seobook.com/server-header-checker/

I get a 401 error

on this tool
http://www.webrankinfo.com/english/tools/server-header.php

I get a 301 error

here are my pages
https://www.steenent.com/categories.php
https://www.steenent.com/products.php


etc


how do I fix it

Andy
ECT Moderator

95440 Posts

Posted - 11/03/2017 :  05:16:20  
I have just sent you an email and will look into that for you.

Andy

Please feel free to review / rate our software
   Topic   
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Shopping Cart Software Forum for Ecommerce Templates © 2002-2019 ecommercetemplates.com
This page was generated in 0.03 seconds. Snitz Forums 2000