too much recursion
ogharib - May 19, 2008 - 10:06
| Project: | AJAXify |
| Version: | 5.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Description
I got a "too much recursion" error when a link that uses AJAXify is clicked.
Such link is as follows:
<a class="comment_add" onclick="return ajaxify('.view-footer-story','ajaxify/div.box/comment/reply/271')" title="do comment" href="/mysite/comment/reply/271#comment-form">comment</a>The "ajaxify/div.box/comment/reply/271" page works properly; that is, it displays the section of the comment reply.
The cause of such error was a "slash" ("/") in the URL before the ? (since I use an exposed filter for the view).
To illustrate, if I have the page as: http://localhost/mysite/story_view
After selecting a filter, I will have the URL as: http://localhost/mysite/story_view/?filter0=23
If the slash is removed from the URL and you click the above "comment" link, no problem will occur.

#1
As a workaround, the following two steps were done:
1. Created a new URL alias: "story_view" for "story_view/"
2. Used drupal_goto() function to redirect the user to the URL without the slash that causes the error:
The wrong URL:
http://localhost/mysite/story_view/?filter0=23
The solution:
drupal_goto('story_view', 'filter0=23'); // which redirects to http://localhost/mysite/story_view?filter0=23
I hope that would help.
#2
I had another "too much recursion" problem with these details:
- The following URL works fine with me: http://localhost/mysite/mybooks
- On the other hand, this URL generates the "too much recursion" error: http://localhost/mysite/mybooks/list
Note that, both "mybooks" and "mybooks/list" are paths to views.
I found a solution to such "too much recursion" problem when I applied the patch submitted by zeta ζ with the coding conventions being applied.