Cannot open site in Wizard: "Message: PHP Warning : Division by zero; Code: 2"

Created:

2016-11-16 12:45:16 UTC

Modified:

2017-08-16 16:32:02 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Cannot open site in Wizard: "Message: PHP Warning : Division by zero; Code: 2"

Applicable to:

  • Plesk Sitebuilder for Linux

Symptoms

The following error is shown when open site in Sitebuilder Wizard through Parallels Plesk Sitebuilder ( Sites > %site alias% > Open Site In Wizard ):

http://sitebuilder.hostname/Wizard/Edit/Html?currentPageId=mws5l4la4dh
---
Internal Sitebuilder error.
File: /usr/local/sitebuilder/include/Modules/SiteMap/Helper/View.php; Line: 58
Message: PHP Warning : Division by zero; Code: 2
---

Cause

The error is caused by a misconfiguration in Sitebuilder database. Settings of module SiteMap are missing for site <site alias> . You may check this in the following way.

Connect to Sitebuilder database:

~# mysql -u<USER> -p<PASSWD> sitebuilder3

Where <USER> and <PASSWD> are login and password for mysql administrator.

Query instance for module SiteMap on site <site alias> :

mysql> select s.alias as site, m.code as module, mi.instance_id as instance from site s, module m, module_instance mi where s.id=mi.site_id and mi.module_id=m.id and m.code='SiteMap' and s.alias='<site alias>';
+--------------+---------+-------------+
| site | module | instance |
+--------------+---------+-------------+
| <site alias> | SiteMap | schqumbfywm |
+--------------+---------+-------------+
1 row in set (0.00 sec)

mysql>

Verify that settings for instance ‘schqumbfywm’ are missing in table modules_SiteMap_settings :

mysql> select * from modules_SiteMap_settings where module_instance_id=’schqumbfywm’;
Empty set (0.00 sec)

mysql>

It is impossible to say what caused the misconfiguration in Sitebuilder database.

Resolution

To resolve the problem it is enough to insert default settings for module SiteMap. You may use the following queries.

Before reconfiguration backup Sitebuilder database:

~# mysqldump -u<USER> -p<PASSWD> sitebuilder3 > sitebuilder.dump.`date +%F.%s`.sql

Insert detail settings for instance ‘schqumbfywm’ :

mysql> insert into modules_SiteMap_settings (module_instance_id,columns_number,style_first_level,style_second_level,storage_state) values (‘schqumbfywm’,1,’circle’,’circle’,4);
Query OK, 1 row affected (0.00 sec)

mysql>

After the records were inserted the site will be opened correctly.

Have more questions? Submit a request
Please sign in to leave a comment.