Posts: 4
Threads: 1
Joined: May 2012
I am trying to resolve this issue it is appearing in
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 1302730 bytes) in beta/admin/inc/template_functions.php on line 913
I have tried to update the memory size and its up now, but still having this error...
Thanks for your time and help.
One more issue with in this forum is search not working, I searched for "Fatal error: Allowed memory" and then "Allowed memory" both returned 0 results while there is a post.
http://get-simple.info/forum/topic/3153/...xml-files/
Posts: 6,266
Threads: 181
Joined: Sep 2011
The forum software was recently updated it seems to be having issues.
What version of GS are you on ?
Posts: 4
Threads: 1
Joined: May 2012
Posts: 6,266
Threads: 181
Joined: Sep 2011
justnajm Wrote:Thanks Shawn.
It is 3.0
hmm i recall an infinite loop condition being fixed in 3.1 I think.
Perhaps site map creation or something.
Ill have to go back to that version and look at that code line to be sure.
When does it do this error ?
Posts: 4
Threads: 1
Joined: May 2012
Thanks for the suggestions
I receive this when:
Successfully login as admin.
Client Site is working fine but back-end having this issue.
Posts: 4
Threads: 1
Joined: May 2012
Thanks alot shawn
I really appreciate your help and efforts.
I have figured out the problem myself, I had some xml files of size zero(0) in my data/pages/ directory.
And getsimple needs xml data in every file. even if it has no content.
I replaced them with the xml format getsimple required and its done.
if you want to keep "zero" size files in the directory then this will help:
replace the function with your function in template_functions.php
Code:
function get_pages_menu_dropdown($parentitem, $menu,$level) {
global $pagesSorted;
global $parent;
$items=array();
foreach ($pagesSorted as $page) {
if ($page['parent']==$parentitem){
$items[(string)$page['url']]=$page;
}
}
if (count($items)>0){
foreach ($items as $page) {
// my code is in the next line only
if($page->parent==null&&$page->sort==null&&$page->url==null) continue;
$dash="";
if ($page['parent'] != '') {
$page['parent'] = $page['parent']."/";
}
for ($i=0;$i<=$level-1;$i++){
if ($i!=$level-1){
$dash .= '<span> </span>';
} else {
$dash .= '<span> – </span>';
}
}
if ($parent == (string)$page['url']) { $sel="selected"; } else { $sel=""; }
$menu .= '<option '.$sel.' value="'.$page['url'] .'" >'.$dash.$page['url'].'</option>';
$menu = get_pages_menu_dropdown((string)$page['url'], $menu,$level+1);
}
}
return $menu;
}
Posts: 6,266
Threads: 181
Joined: Sep 2011
justnajm Wrote:Thanks alot shawn
I really appreciate your help and efforts.
I have figured out the problem myself, I had some xml files of size zero(0) in my data/pages/ directory.
And getsimple needs xml data in every file. even if it has no content.
I replaced them with the xml format getsimple required and its done.
if you want to keep "zero" size files in the directory then this will help:
replace the function with your function in template_functions.php
Code:
function get_pages_menu_dropdown($parentitem, $menu,$level) {
global $pagesSorted;
global $parent;
$items=array();
foreach ($pagesSorted as $page) {
if ($page['parent']==$parentitem){
$items[(string)$page['url']]=$page;
}
}
if (count($items)>0){
foreach ($items as $page) {
// my code is in the next line only
if($page->parent==null&&$page->sort==null&&$page->url==null) continue;
$dash="";
if ($page['parent'] != '') {
$page['parent'] = $page['parent']."/";
}
for ($i=0;$i<=$level-1;$i++){
if ($i!=$level-1){
$dash .= '<span> </span>';
} else {
$dash .= '<span> – </span>';
}
}
if ($parent == (string)$page['url']) { $sel="selected"; } else { $sel=""; }
$menu .= '<option '.$sel.' value="'.$page['url'] .'" >'.$dash.$page['url'].'</option>';
$menu = get_pages_menu_dropdown((string)$page['url'], $menu,$level+1);
}
}
return $menu;
}
I wonder if this is fixed on 3.1.