AbanteCart Community

Shopping Cart Operations => Built-in Features => Topic started by: Huijun Sun on June 28, 2021, 11:38:26 PM

Title: Admin Side, Edit Email Templates, all templates are page not found
Post by: Huijun Sun on June 28, 2021, 11:38:26 PM
Hi,

My AbanteCart version is 1.3.0.
I tried to edit order confirmation email templates by Design ==> email Templates ==> "storefront_order_confirm"==> Edit.
Then it shows "THE PAGE YOU REQUESTED CANNOT BE FOUND!"

So I tried to edit all templates, all with the same result.

The error message in the error log:
2021-06-29 3:26:02 - database error: AbanteCart core v.1.3.0 SQL Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
Error No: 1064
SQL: SELECT * FROM ac_email_templates WHERE text_id='admin_order_status_notify' AND language_id=1 AND store_id=
PHP call stack:
#0 /home/lelk0ldjzkfk/public_html/core/lib/db.php:102
#1 /home/lelk0ldjzkfk/public_html/core/engine/extensions.php:1151
#2 /home/lelk0ldjzkfk/public_html/core/engine/extensions.php:372
#3 /home/lelk0ldjzkfk/public_html/core/lib/db.php:68
#4 /home/lelk0ldjzkfk/public_html/admin/model/design/email_template.php:145
#5 /home/lelk0ldjzkfk/public_html/admin/controller/pages/design/email_templates.php:214
#6 /home/lelk0ldjzkfk/public_html/admin/controller/pages/design/email_templates.php:184
#7 /home/lelk0ldjzkfk/public_html/core/engine/dispatcher.php:287
#8 /home/lelk0ldjzkfk/public_html/core/engine/dispatcher.php:322
#9 /home/lelk0ldjzkfk/public_html/core/engine/page.php:108
#10 /home/lelk0ldjzkfk/public_html/core/engine/router.php:193
#11 /home/lelk0ldjzkfk/public_html/core/engine/router.php:86
#12 /home/lelk0ldjzkfk/public_html/index.php:97
in <b>/home/lelk0ldjzkfk/public_html/core/database/amysqli.php</b> on line <b>119</b>

I reuploaded all files in this error message but still get the same result.
Please help!!
Thanks!!


Title: Re: Admin Side, Edit Email Templates, all templates are page not found
Post by: abolabo on June 29, 2021, 06:09:20 AM
To solve please replace your file with this
https://github.com/abantecart/abantecart-src/blob/dd57c53ece4ad68b38d053f65f9af8bef02b96b8/public_html/admin/model/design/email_template.php
and let us know about result.
Title: Re: Admin Side, Edit Email Templates, all templates are page not found
Post by: Huijun Sun on June 29, 2021, 03:19:01 PM
Hi Abolabo


I got another error message on the webpage, no error message in the error log.

Error message:
This page isn’t working
Redirected you too many times.
Try clearing your cookies.
ERR_TOO_MANY_REDIRECTS

I cleaned all my cookies but still not work.
Please advise.


Huijun
Title: Re: Admin Side, Edit Email Templates, all templates are page not found
Post by: abolabo on June 30, 2021, 02:47:17 AM
Hi Abolabo


I got another error message on the webpage, no error message in the error log.

Error message:
This page isn’t working
Redirected you too many times.
Try clearing your cookies.
ERR_TOO_MANY_REDIRECTS

I cleaned all my cookies but still not work.
Please advise.


Huijun

This error not related to Model-file changes.
Try to disable some of 3d-party extensions and check. Usually redirect loop becomes from their
Title: Re: Admin Side, Edit Email Templates, all templates are page not found
Post by: abolabo on June 30, 2021, 02:56:40 AM
btw, what php version do you use? try latest
Title: Re: Admin Side, Edit Email Templates, all templates are page not found
Post by: Huijun Sun on June 30, 2021, 11:20:46 AM
Hi Abolabo,

My PHP version is 8.0. And please check the picture, that all the extensions I have installed right now.

BTW, I tried to disable all extensions and still get the same error.
Please help. Thanks.

Title: Re: Admin Side, Edit Email Templates, all templates are page not found
Post by: abolabo on June 30, 2021, 11:25:58 AM
do you have .htaccess file inside public_html folder?

You can try to rename it and recheck.
If still fail - send me PM with url of your admin side and credentials.
Title: Re: Admin Side, Edit Email Templates, all templates are page not found
Post by: abolabo on June 30, 2021, 11:49:45 AM
Please note, you have a store in .ca domain zone.
But if you open email templates grid all links goes to www.yourcart.ca/.ca/index.php (why additional .ca as subfolder ?)
i guess problem is in the redirect settings of your hosting provider CPanel.
Try to ask techsupport about that redirects. Probably it's symlinks issue on host etc.

Title: Re: Admin Side, Edit Email Templates, all templates are page not found
Post by: Huijun Sun on June 30, 2021, 11:59:43 AM
Hi Abolabo,

Thanks for your support.
I will contact the hosting provider to solve this.

Thanks again.
Title: Re: Admin Side, Edit Email Templates, all templates are page not found
Post by: Huijun Sun on June 30, 2021, 12:39:46 PM
Hi Abolabo,

I contacted the tech support from the hosting company, they checked and said no redirection and symlinks issue on the host.
What I should do next?
Is it possible that I did something wrong during the installation process?
Please advise.

Truly thanks for your help.

Hui
Title: Re: Admin Side, Edit Email Templates, all templates are page not found
Post by: abolabo on July 02, 2021, 07:02:31 AM
To solve an issue needs to replace file  public_html/core/lib/config.php
with this (https://raw.githubusercontent.com/abantecart/abantecart-src/25f714966559b801259b2b539583e70e315ef51c/public_html/core/lib/config.php)
Title: Re: Admin Side, Edit Email Templates, all templates are page not found
Post by: Huijun Sun on July 02, 2021, 09:09:03 AM
Hi Abolabo,

Woo, that's amazing. It works.
The additional .ca is removed and the Email Templates are all accessible now.
Thanks for your supports.

 :-* :-* :-*