Community Support for OpenDocMan (Deprecated)
Unable to view next page on Del/Undel page - Printable Version

+- Community Support for OpenDocMan (Deprecated) (https://forum.opendocman.com)
+-- Forum: OpenDocMan Community Discussion (https://forum.opendocman.com/forum-5.html)
+--- Forum: OpenDocMan Support - Community Based (https://forum.opendocman.com/forum-6.html)
+--- Thread: Unable to view next page on Del/Undel page (/thread-18.html)



Unable to view next page on Del/Undel page - Stephen - 01-12-2010

I am showing that I have 166 documents that have been deleted, viewing 0-14. At the bottom of the results I have "Result Page: Next". With next being a hyperlink. When I click on Next it sends me to a page "http://opendocserver/opendocman/0&sort_by=asc&sort_order=asc&starting_index=15&stoping_index=29&page=1" which gives me a "The page cannot be found"..."HTTP Error 404...". I know that there should be something after the / and before the 0, but I'm not sure what would go there or why the program is not automatically placing it there.

Thanks in advance for any help.

dvst8s


Re: Unable to view next page on Del/Undel page - Stephen - 01-12-2010

That link is generated from the functions.php file, in the list_nav_generator() function. Search for "Generate Next Link".

It would appear that $page_url is being set incorrectly, when the function is called. Can you confirm the URL of the page where the incorrect list is being displayed? Based on code review, it looks like delete.php, and the following call to list_nav_generator:

list_nav_generator(sizeof($sorted_array_id), $GLOBALS['CONFIG']['page_limit'], $page_url, $_REQUEST['page'], $_REQUEST['sort_by'], $_REQUEST['sort_order']);

I'm going to guess that you need to add the

$GLOBALS['CONFIG']['num_page_limit']

parameter before the $page_url. (See example in file_ops.php). The function takes seven parameters, but only six are provided as used in delete.php.

Hope that fixes it, let us know!

jonathanwminer


Re: Unable to view next page on Del/Undel page - Stephen - 01-12-2010

Jonathan,
Thank you for the quick response. That fixed the issue. In delete.php when I added $GLOBALS['CONFIG']['num_page_limit'] to the list_nav_generator function call it worked without issue.

dvst8s


Re: Unable to view next page on Del/Undel page - Stephen - 01-12-2010

I created a bug tracker for this issue:

<!-- m --><a class="postlink" href="https://sourceforge.net/tracker/?func=detail&aid=2762105&group_id=69505&atid=524751">https://sourceforge.net/tracker/?func=d ... tid=524751</a><!-- m -->

Steve