Suddenly "Pages" tab stopped loading - only headers and menu in Admin Panel (I had GS 3.2 running). The other tabs loaded fine. I made a full website backup and uploaded latest GS (v. 3.3.13) and plugin updates (i18n - set). But the problem remains. I can edit pages, access backups, Special Pages, Theme and so on.. Only "Pages" tab cannot get loaded for some reason.. What should I check/fix?
Thank you!
UPD: If the I18N Base plugin is disabled, then Pages work fine. So, probably it has to do with weird page with a wrong URL or something..
Probably a js error check browser console
(2017-01-13, 22:43:04)shawn_a Wrote: [ -> ]Probably a js error check browser console
The console shows no mistake, however it takes over a minute trying to get "admin/load.php?id=i18n_base", and the i get an empty window..
I guess it has to do with a weird page or page naming. This is a client's website and they don't remember what exactly they did which could be a reason for this mistake...
I attached a screenshot.. Is there a way to fix it?
First step, always: enable error reporting
Thank you!
That's what i see in ..data/other/logs/errorlog.txt
Code:
[17-Jan-2017 16:10:10] PHP Fatal error: Maximum execution time of 60 seconds exceeded in /var/www/vhosts/qrstat.uz/httpdocs/plugins/i18n_base/pages.php on line 89
...
[17-Jan-2017 16:12:28] PHP Fatal error: Maximum execution time of 60 seconds exceeded in /var/www/vhosts/qrstat.uz/httpdocs/plugins/i18n_base/pages.php on line 91
And this is piece of code from that file "..plugins/i18n_base/pages.php"
PHP Code:
foreach ($pages as &$page) {
if ($view == 'hierarchical') {
$level = -1;
$sort = '';
for ($p = $page; $p; $p = $p['parent'] ? $pages[$p['parent']] : null) {
$sort = sprintf('%03d',$p['menuOrder']).$p['title'].' '.$sort;
if ($sortfield) {
$sort = @$p[$sortfield].' '.$sort;
}
if ($p['parent']) $pages[$p['parent']]['hasChildren'] = true;
if ($level >= 0 && !@$p['open']) { $page['invisible'] = true; unset($page['open']); }
$level++;
}
$page['level'] = $level;
$page['sort'] = $sort;
} else {
$page['sort'] = $page['title'];
if ($sortfield) {
$page['sort'] = @$page[$sortfield].' '.$page['sort'];
}
}
The attached file shows code row numbers
It seems as the foreach running infinite. Something's going wrong with your pages. It is hard to say exactly what, that issue can have various causes. You can try to extend the foreach statement to see what is wrong or where the output ends:
Code:
foreach ($pages as &$page) {
echo '<pre>'; print_r($page); echo '</pre>';
...
PS. And enable error reporting to show *ALL* error and *warnings* messages
I have seen this happen before when a page was its own parent, or a pages parent was missing.
Or a child page was it parents parent, basicly a cyclical reference.
(2017-01-17, 22:28:35)Bigin Wrote: [ -> ]It seems as the foreach running infinite. Something's going wrong with your pages. It is hard to say exactly what, that issue can have various causes. You can try to extend the foreach statement to see what is wrong or where the output ends:
Code:
foreach ($pages as &$page) {
echo '<pre>'; print_r($page); echo '</pre>';
...
PS. And enable error reporting to show *ALL* error and *warnings* messages
Yep, I got a long list of created pages.. The code is too long, so, I'm attaching it.. Thank you!
(2017-01-18, 00:17:50)shawn_a Wrote: [ -> ]I have seen this happen before when a page was its own parent, or a pages parent was missing.
Or a child page was it parents parent, basicly a cyclical reference.
I guess something like this has happened. Is there a way to find mistake in a quick way? Can Sitemap help?
not really, I would check page backups for the last modification that was done
yes, I think it's something wrong with your last page, that page is its own parent
Code:
Array
(
[url] => ishonch-telefonlari
[variants] => Array
(
)
[exists] => 1
[parent] => ishonch-telefonlari
[title] => Ishonch telefonlari
[metak] =>
[metad] =>
[menuStatus] => Y
[menuOrder] => 0
[private] =>
[date] => SimpleXMLExtended Object
(
[0] => Fri, 06 Jan 2017 14:20:32 +0500
)
)
(2017-01-18, 02:23:36)Bigin Wrote: [ -> ]yes, I think it's something wrong with your last page, that page is its own parent
Code:
Array
(
[url] => ishonch-telefonlari
[variants] => Array
(
)
[exists] => 1
[parent] => ishonch-telefonlari
[title] => Ishonch telefonlari
[metak] =>
[metad] =>
[menuStatus] => Y
[menuOrder] => 0
[private] =>
[date] => SimpleXMLExtended Object
(
[0] => Fri, 06 Jan 2017 14:20:32 +0500
)
)
omg! Thank you so much
Bigin,
shawn_a! I had to correct that file as well as pages.xml and got my Pages tab back!
Thank you once again!