PHP Warning: default.php on line 29

Elimelech
4 years, 8 months ago
[Tue Mar 10 07:10:43.063215 2020] [fcgid:warn] [pid 28797:tid 140197167458048] [client 66.249.64.239:0] mod_fcgid: stderr: PHP Warning:  Division by zero in /domains/masite.net/public_html/templates/mobile_basic/html/com_content/frontpage/default.php on line 29
[Tue Mar 10 07:10:43.063280 2020] [fcgid:warn] [pid 28797:tid 140197167458048] [client 66.249.64.239:0] mod_fcgid: stderr: PHP Warning: Division by zero in /domains/masite.net/public_html/templates/mobile_basic/html/com_content/frontpage/default.php on line 30
[Tue Mar 10 07:10:43.063294 2020] [fcgid:warn] [pid 28797:tid 140197167458048] [client 66.249.64.239:0] mod_fcgid: stderr: PHP Warning: Division by zero in /domains/masite.net/public_html/templates/mobile_basic/html/com_content/frontpage/default.php on line 29
[Tue Mar 10 07:10:43.063305 2020] [fcgid:warn] [pid 28797:tid 140197167458048] [client 66.249.64.239:0] mod_fcgid: stderr: PHP Warning: Division by zero in /domains/masite.net/public_html/templates/mobile_basic/html/com_content/frontpage/default.php on line 30
[Tue Mar 10 07:10:43.063315 2020] [fcgid:warn] [pid 28797:tid 140197167458048] [client 66.249.64.239:0] mod_fcgid: stderr: PHP Warning: Division by zero in /domains/masite.net/public_html/templates/mobile_basic/html/com_content/frontpage/default.php on line 29
[Tue Mar 10 07:10:43.063326 2020] [fcgid:warn] [pid 28797:tid 140197167458048] [client 66.249.64.239:0] mod_fcgid: stderr: PHP Warning: Division by zero in /domains/masite.net/public_html/templates/mobile_basic/html/com_content/frontpage/default.php on line 30
[Tue Mar 10 07:10:43.063337 2020] [fcgid:warn] [pid 28797:tid 140197167458048] [client 66.249.64.239:0] mod_fcgid: stderr: PHP Warning: Division by zero in /domains/masite.net/public_html/templates/mobile_basic/html/com_content/frontpage/default.php on line 29
[Tue Mar 10 07:10:43.063348 2020] [fcgid:warn] [pid 28797:tid 140197167458048] [client 66.249.64.239:0] mod_fcgid: stderr: PHP Warning: Division by zero in /domains/masite.net/public_html/templates/mobile_basic/html/com_content/frontpage/default.php on line 30


An error has appeared
How to fix it?
dryabov
4 years, 8 months ago
Hmm, it means you set "zero" number of columns in the frontpage menu item settings.
Elimelech
4 years, 8 months ago
and where to look for these settings?
dryabov
4 years, 8 months ago
Menus -> :menu with frontpage item -> menu item -> Parameters (Basic) -> Columns

What exact Joomla version do you use? (I see it's old 1.5, but what is the full version number?)
Elimelech
4 years, 8 months ago
Joomls 1.5.27 I have one column in the menu
dryabov
4 years, 8 months ago
Did you set another mobile homepage via "Force as homepage" setting in the Mobile Joomla! extension settings page?
Do you have other "frontpage" menu items in menus?
Elimelech
4 years, 8 months ago
Yes, no, I installed everything correctly. Maybe just some kind of glitch. The error does not appear every time, and sometimes
dryabov
4 years, 8 months ago
Do "Force as homepage" menu item has the same menu type as your actual homepage menu item?
Elimelech
4 years, 8 months ago
yes
dryabov
4 years, 8 months ago
And both of them have
Columns: 1
in its settings?

If true, It's quite strange. I'll try to reproduce it locally, but we have never met such an issue previously.

Could you insert following code into default.php (just after leading "<?php" tag, on the next line):
 
if (0 === (int) $this->params->get('num_columns')) file_put_contents(__FILE__ . '.log', $_SERVER['REQUEST_URI'] ."\nindex.php?" . http_build_query($_GET) . "\n\n\n", FILE_APPEND);
 

? (don't forget to backup original file before any changes)
It will log the URL of request (and parsed non-SEF URL) to the default.php.log file for every request that results in such an issue.
1

By continuing to use this site you consent to the use of cookies on your device as described in our cookie policy unless you have disabled them. This site will not function correctly without cookies.

I accept cookies from this site.