Zen Cart Logo
Forums / General Questions / Investigating new_product_preview blank page from admin when insert new product

Investigating new_product_preview blank page from admin when insert new product

Views: 1,610

Results 1 to 20 of 27
13 Apr 2020, 2:59 PM
#1
solo_400 avatar

solo_400

Zen Follower

Join Date:
Aug 2009
Posts:
369
Plugin Contributions:
0

Investigating new_product_preview blank page from admin when insert new product

Hi,

On my test environment, when I try to add a new product to a category and try preview button, I can see only admin menus and blank content after. When I try doing this for products already existing, works fine.

Example page:

https://www.mysite/shopname/admin/product.php?cPath=123&product_type=1&action=new_product_preview

No log files on log directory or cache directory. I have tried activating STRICT_ERROR_REPORTING but I believe is not working on admin side.

Can you please give some hints how to debug this ?

thank you

13 Apr 2020, 3:14 PM
#2
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,690
Plugin Contributions:
56

Re: Investigating new_product_preview blank page from admin when insert new product

My guess would be that there's a SQL error occurring. See if your hoster can give you access to these logs.

13 Apr 2020, 3:23 PM
#3
solo_400 avatar

solo_400

Zen Follower

Join Date:
Aug 2009
Posts:
369
Plugin Contributions:
0

Re: Investigating new_product_preview blank page from admin when insert new product

Thank you. Is hosted by myself on a personal linux environment.

No errors on /var/log/mariadb/mariadb.log

13 Apr 2020, 3:54 PM
#4
solo_400 avatar

solo_400

Zen Follower

Join Date:
Aug 2009
Posts:
369
Plugin Contributions:
0

Re: Investigating new_product_preview blank page from admin when insert new product

I discovered that problem shows up when URI checkbox "Tick this box to have the URI auto-generated for this product." is selected. How can I debug this ?

13 Apr 2020, 4:19 PM
#5
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,690
Plugin Contributions:
56

Re: Investigating new_product_preview blank page from admin when insert new product

I'd recommend you get rid of your URL modification process until your cart is working.
(And after that too, but that's your call.)

14 Apr 2020, 5:19 PM
#6
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,080
Plugin Contributions:
56

Re: Investigating new_product_preview blank page from admin when insert new product

Note, too, that the Ceon URI Mappings have an update that's compatible with zc156 and later (although you don't mention your Zen Cart version). See this link for more information: https://www.zen-cart.com/showthread.php?225478-Ceon-URI-Mapping-V5-0

26 Apr 2020, 3:13 PM
#7
solo_400 avatar

solo_400

Zen Follower

Join Date:
Aug 2009
Posts:
369
Plugin Contributions:
0

Re: Investigating new_product_preview blank page from admin when insert new product

At Modules -> Payment Modules cannot see right area which allows to remove or edit payment options.

No errors in log directory. Is there a way to force a full debug of every php call ?

ZC Version is 1.5.5.

26 Apr 2020, 3:30 PM
#8
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,690
Plugin Contributions:
56

Re: Investigating new_product_preview blank page from admin when insert new product

Can you scroll to the right and see the edit option? Sometimes entries can get super wide and it appears that there's no right sidebar, but there is, it's just off-screen.

26 Apr 2020, 3:32 PM
#9
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,956
Plugin Contributions:
8

Re: Investigating new_product_preview blank page from admin when insert new product

solo_400:

Thank you. Is hosted by myself on a personal linux environment.

No errors on /var/log/mariadb/mariadb.log

solo_400:

At Modules -> Payment Modules cannot see right area which allows to remove or edit payment options.

No errors in log directory. Is there a way to force a full debug of every php call ?

ZC Version is 1.5.5.

if you are hosting in your linux environment, i would look here:

/var/log/apache2/error.log

i'm assuming you are running a LAMP stack. your access log would also be in that directory:

/var/log/apache2/access.log

if you do not see the logs there, your would then need to look into your apache configuration to see where you have configured the log files to go, as well as the logging level.

best.

26 Apr 2020, 3:57 PM
#10
solo_400 avatar

solo_400

Zen Follower

Join Date:
Aug 2009
Posts:
369
Plugin Contributions:
0

Re: Investigating new_product_preview blank page from admin when insert new product

Thank you.

Found the php log file path: /var/log/php-fpm/www-error.log

And surprise, surprise the same error everytime I click on any payment option:

[26-Apr-2020 15:52:39 UTC] PHP Parse error: syntax error, unexpected '[', expecting ',' or ';' in /var/www/html/mystore/includes/modules/payment/linkpoint_api.php on line 320

I've never had a problem like this on live store. This is a clone store on my private server. Could be related to php version ?
[root@localhost php-fpm]# php -v
PHP 7.3.16 (cli) (built: Mar 17 2020 10:18:38) ( NTS )

26 Apr 2020, 4:10 PM
#12
solo_400 avatar

solo_400

Zen Follower

Join Date:
Aug 2009
Posts:
369
Plugin Contributions:
0

Re: Investigating new_product_preview blank page from admin when insert new product

And this is the error when I try to add a new product and preview page.

[26-Apr-2020 16:02:21 UTC] PHP Fatal error: Cannot use 'String' as class name as it is reserved in /var/www/html/mystore/includes/classes/class.String.php on line 57

And, it probably doesn't work with 7.3 PHP

Any similar experience here on forum? Need to be sure the problem is php version.

26 Apr 2020, 4:13 PM
#13
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,080
Plugin Contributions:
56

Re: Investigating new_product_preview blank page from admin when insert new product

solo_400:

And this is the error when I try to add a new product and preview page.

[26-Apr-2020 16:02:21 UTC] PHP Fatal error: Cannot use 'String' as class name as it is reserved in /var/www/html/mystore/includes/classes/class.String.php on line 57

Any similar experience here on forum? Need to be sure the problem is php version.
The problem, while exposed on more recent PHP versions, is that the class.String.php is using a now-obsolete naming convention and requires update.

26 Apr 2020, 4:17 PM
#14
barco57 avatar

barco57

Totally Zenned

Join Date:
Apr 2006
Location:
West Salem, IL
Posts:
2,841
Plugin Contributions:
0

Re: Investigating new_product_preview blank page from admin when insert new product

Zen Cart v1.5.5 is designed for PHP 5.5 up to PHP 7.1

26 Apr 2020, 4:29 PM
#15
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,771
Plugin Contributions:
9

Re: Investigating new_product_preview blank page from admin when insert new product

and easily solved by just removing linkpoint. Why fix a deprecated payment module?

26 Apr 2020, 6:32 PM
#16
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,869
Plugin Contributions:
7

Re: Investigating new_product_preview blank page from admin when insert new product

Cannot use 'String' as class name
This is part of CEON URI mapping v4.0, as mentioned on this page various times:
https://www.zen-cart.com/showthread.php?184548-Ceon-URI-Mapping-v4-x/page21

I corrected this and other issues long ago:
https://github.com/torvista/zen-cart_CEON-URI-Mapping

But you should upgrade, not patch bits and pieces.

26 Apr 2020, 7:30 PM
#17
solo_400 avatar

solo_400

Zen Follower

Join Date:
Aug 2009
Posts:
369
Plugin Contributions:
0

Re: Investigating new_product_preview blank page from admin when insert new product

dbltoe:

and easily solved by just removing linkpoint. Why fix a deprecated payment module?

I have move the file in linkpoint_api.php_orig and payment modules now shows up and settings also.

If I understand the file linkpoint_api.php impact only one payment module ( not used ) and do not impact all other payment modules, right ? Hope is not crucial for other modules.

Thank you. If i'm lucky I don't need to figure out how to change php server configuration. This is a test environment.

26 Apr 2020, 7:33 PM
#18
solo_400 avatar

solo_400

Zen Follower

Join Date:
Aug 2009
Posts:
369
Plugin Contributions:
0

Re: Investigating new_product_preview blank page from admin when insert new product

torvista:

This is part of CEON URI mapping v4.0, as mentioned on this page various times:
https://www.zen-cart.com/showthread.php?184548-Ceon-URI-Mapping-v4-x/page21

I corrected this and other issues long ago:
https://github.com/torvista/zen-cart_CEON-URI-Mapping

But you should upgrade, not patch bits and pieces.

Infinite thanks!

26 Apr 2020, 9:14 PM
#19
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Investigating new_product_preview blank page from admin when insert new product

solo_400:

Infinite thanks!
Version 5 of the Ceon URI Mapping module will work with your version of ZC (1.5.5) also and would be an easier installation than past or older versions.

26 Apr 2020, 10:08 PM
#20
solo_400 avatar

solo_400

Zen Follower

Join Date:
Aug 2009
Posts:
369
Plugin Contributions:
0

Re: Investigating new_product_preview blank page from admin when insert new product

mc12345678:

Version 5 of the Ceon URI Mapping module will work with your version of ZC (1.5.5) also and would be an easier installation than past or older versions.

I've finished the upgrade "Database and configuration were successfully updated to version 4.5.5"

  1. I can't see version 5 nowhere.

  2. From module page https://www.zen-cart.com/downloads.php?do=file&id=889 I downloaded 4.5.6 version but package zip is 4.5.5 ( so confusing )

Do I still need this file ? "In the 4.5.5 zip there is still one file with leftover wrong code. (see https://www.zen-cart.com/showthread.php?184548-Ceon-URI-Mapping-v4-x&p=1352311#post1352311)."

If yes, I can't find it on githup.