-
- 47 Posts
I have just discovered that the problem goes away when disabling friendly urls...
-
- 47 Posts
I found the problem! 2 entries in site_content were referencing each other as parent. Removing one allowed me to reenable friendly urls without problems.
How 2 pages can start referencing each other i don’t know, though.
Is this a bug?
I can’t imagine how that would have happened. What kind of work were you doing in the manager just before this started happening?
-
- 47 Posts
It was a client of mine who had just learned how to add, edit and move pages. He says, that right before this happend he was moving some pages around...
@jtech:
Your problem is your memory_limit is set to 32Mb and your Ditto call is simply using more memory than that. Increase your memory_limit or you’ll have to find a more efficient solution for your requirements than Ditto can provide. Without knowing more about your Ditto calls and Ditto itself, I don’t know why it only occurs if you make the Resource a child.
FWIW, this has nothing to do with the OP’s problem, which has to do with Resource’s referencing each other as parents; this causes an infinite loop situation in which execution stops when memory_limit is exhausted.
I just had this issue too. I think our cause was a script we used to publish documents from another site through the API.
Anyway, I made this script to search for the documents which cause the problem:
$allDocs = mysql_query("SELECT id, parent FROM modx_site_content ORDER BY id DESC");
while($doc = mysql_fetch_assoc($allDocs)) {
$parent = mysql_query("SELECT id FROM modx_site_content WHERE parent = " . $doc['id'] . " AND id = " . $doc['parent']);
if(mysql_num_rows($parent)) {
while($parentDoc = mysql_fetch_assoc($parent)) {
echo 'Infinte loop found<br /><br />';
echo 'Document #' . $doc['id'] . ' and document #' . $parentDoc['id'] . ' are eachothers parent.';
}
}
}
-
- 2 Posts
Hi,
I realise this is an old post but I had exactly the same issue.
Within the manager I am able to have two resources (a parent and a child). I can then change the parent resource of the parent to be the child thus creating a loop. The resources are both parents of each other and children of each other.
I did this from a standard Edit Resource page by clicking on on the Parent Resource dropdown and picking it’s child node from the tree on the left.
The saving dialog box then appears and never goes away whilst in the background mysql crashes. The front end then gets the fatal error and the manager too if you try and expand the resource tree. The update made it to the database.
Is there validation to stop this happening and if there is how could I be skipping it?
Environment: Revolution 2.0.7 traditional, Mac OSX 10.6.2, PHP 5.2.9, MySQL 5.1.33 running on XAMPP 1.0.1, PDO enabled, Firefox 3.6.18
Thanks for any help.
There is definitely validation in place to prevent this, but if you could offer details on how you are changing the parent to it’s own child, we’d love to get it fixed...