Martijn Geerts Posted December 15, 2013 Share Posted December 15, 2013 version: 2.3.8 This works $page->children(); // works $pages->find("parent=$page"); // works $page->children("start=0, limit=4"); // works $page->children("limit=4"); // throws a fatal error $pages->find("parent=$page, limit=4") // throws a fatal error // Fatal error: Call to a member function children() on a non-object in /Users/martijn/Sites/www_domains/pvw/htdocs/wire/core/PageTraversal.php on line 205 Fatal error isn't thrown when adding start=0 to the selector. Link to comment Share on other sites More sharing options...
nik Posted December 16, 2013 Share Posted December 16, 2013 I tried those out and they all seem to work as expected for me (using the latest dev, 2.3.8). What's the page tree like? In what context are you running that code, in a template file or a module? Are you able to reproduce this behavior on a clean install? Or with some certain steps taken from a clean install? 1 Link to comment Share on other sites More sharing options...
Martijn Geerts Posted December 16, 2013 Author Share Posted December 16, 2013 (edited) It's quite an complex structure. Maybe the fault is on my side. There are serveral finds on the same $pagearray, hasn't figured it out completely. This is what I want: I have a carousel, (listing pages when it has images), next I have a throughput of pages, which includes the dropped pages of the carousel (pages with no images) // Home Page (i stands for pages with image) carousel: +-+ +-+ +-+ +-+ +-+ +-+ +-+ |i| |D| |D| |i| |i| |D| |i| +-+ +-+ +-+ +-+ +-+ +-+ +-+ ^ ^ ^ | | | +-----+-----------------+---- dropped, contains no images throughput: (limit 5) +-+ +-+ +-+ +-+ +-+ |D| |D| |D| | | | | 3 dropped pages + 2 extra pages to fill up till the limit is reached, sort=-date +-+ +-+ +-+ +-+ +-+ Now on an other page, say /news/ I want to paginate all other news items not containing the pages loaded on the home page. --- I re-arranged a lot, calling start=0 on all searches ( except the one I use pagination for ) it's solved. Big thanks for stepping in Nik. Edited December 16, 2013 by Martijn Geerts Link to comment Share on other sites More sharing options...
arjen Posted December 16, 2013 Share Posted December 16, 2013 Absolutely love your technical drawing skills. 2 Link to comment Share on other sites More sharing options...
Martijn Geerts Posted December 16, 2013 Author Share Posted December 16, 2013 Those are better then my writing skills Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now