Log message #4157890

# At Username Text
# Jul 11th 2018, 08:37 josbeir the issue is also, you are creating multiple routes that all point to the same action, paginator wants to build a url based on current controller/action, it will check the routes you defined and return the first match
# Jul 11th 2018, 08:36 prasanna.venkat $this->Paginator->pagination(array(‘ul’ => ‘pagination’)); in view how to add options to this
# Jul 11th 2018, 08:34 josbeir $this->Paginator->options(array('url' => ... ))
# Jul 11th 2018, 08:34 josbeir in the view you are using pagination make sure to set the correct url
# Jul 11th 2018, 08:33 josbeir are you passing the correct url to the pagination helper?
# Jul 11th 2018, 08:32 prasanna.venkat yes,
# Jul 11th 2018, 08:32 josbeir but pagination is not ?
# Jul 11th 2018, 08:32 josbeir so the routes are working ?
# Jul 11th 2018, 08:32 prasanna.venkat pagination links for all this are become first element of $pages array
# Jul 11th 2018, 08:30 josbeir what issue do you have?
# Jul 11th 2018, 08:30 prasanna.venkat cake 2
# Jul 11th 2018, 08:30 josbeir also, 'defaultRoute' is not needed.
# Jul 11th 2018, 08:30 josbeir cakephp 2 or 3?
# Jul 11th 2018, 08:29 josbeir i saw
# Jul 11th 2018, 08:29 slackebot4 Router::connect(‘/:controller/‘.$page.‘/*’, array(‘controller’ => ‘user_created_pages’, ‘action’ => ‘allpages’), array(‘defaultRoute’ => true)); }
# Jul 11th 2018, 08:29 prasanna.venkat Prasanna [12:39 PM] $pages = array(‘scrapbookingpages’, ‘comicpages’, ‘addtoscenepages’, ‘colouringpages’, ‘gamepages’, ‘parentpage’); foreach ($pages as $page) { Router::connect(‘/’.$page, array(‘controller’ => ‘allpages’, ‘action’ => ‘index’), array(‘defaultRoute’ => true)); Router::connect(‘/’.$page.‘/:action/*’, array(‘controller’ => ‘allpages’), array(‘d
# Jul 11th 2018, 08:29 prasanna.venkat @josbeir i have added routing as
# Jul 11th 2018, 08:29 tim Well, yesterday happened.
# Jul 11th 2018, 08:27 neon1024 Thanks @josbeir I will take a look at that after I’ve finished writing a unit test for `findCompany()` and pair programming with my colleague.
# Jul 11th 2018, 08:27 josbeir websites.{*}.id ?
# Jul 11th 2018, 08:27 josbeir https://github.com/cakephp/cakephp/blob/master/src/Collection/ExtractTrait.php#L43
# Jul 11th 2018, 08:26 josbeir maybe that works?
# Jul 11th 2018, 08:26 josbeir @neon1024 i'm finding references that you can use {*} in the path
# Jul 11th 2018, 08:24 josbeir what happened ? :,)
# Jul 11th 2018, 08:24 tim @josbeir Hi :(
# Jul 11th 2018, 08:21 josbeir cake 2, cake 3?
# Jul 11th 2018, 08:21 josbeir what is your issue
# Jul 11th 2018, 08:19 prasanna.venkat hi can anyone help with the routing issue mentioned above
# Jul 11th 2018, 08:17 lorenzo lol
# Jul 11th 2018, 08:16 neon1024 Glad it’s not just me that happens to! ;)
# Jul 11th 2018, 08:16 lorenzo and it was me who implemented it :)
# Jul 11th 2018, 08:16 lorenzo sounds like that is true
# Jul 11th 2018, 08:14 josbeir https://book.cakephp.org/3.0/en/core-libraries/collections.html#Cake\Collection\Collection::firstMatch
# Jul 11th 2018, 08:14 lorenzo ok, then I don’t remember correctly
# Jul 11th 2018, 08:14 lorenzo oh?
# Jul 11th 2018, 08:14 josbeir it is documented @lorenzo
# Jul 11th 2018, 08:13 lorenzo @neon1024 it does not support dot noation for matching
# Jul 11th 2018, 08:13 neon1024 As my `findCompany()` is returning null, which isn’t ideal
# Jul 11th 2018, 08:13 neon1024 However I’ve also found a bug earlier in my code path, so I need to fix that first
# Jul 11th 2018, 08:12 neon1024 File uploaded https://cakesf.slack.com/files/U1BT622HW/FBNFFL36E/-.sql / https://slack-files.com/T053DPNCM-FBNFFL36E-34ad6d506a
# Jul 11th 2018, 08:12 josbeir probably better write a filter function