# |
Feb 9th 2018, 18:03 |
dereuromark |
convention based routing |
# |
Feb 9th 2018, 18:03 |
alysson-azevedo |
i'll read what it does |
# |
Feb 9th 2018, 18:03 |
alysson-azevedo |
it was missing a `$routes->fallbacks();` inside the prefix declaration |
# |
Feb 9th 2018, 17:59 |
jkarlmen |
@neon1024 got it |
# |
Feb 9th 2018, 17:58 |
dereuromark |
ok |
# |
Feb 9th 2018, 17:57 |
alysson-azevedo |
i'll debug and post results later |
# |
Feb 9th 2018, 17:57 |
dereuromark |
what do you mean? I always declare it outside: https://github.com/dereuromark/cakephp-sandbox/blob/3.0/config/routes.php#L39 |
# |
Feb 9th 2018, 17:56 |
alysson-azevedo |
I worked before when prefix was outside |
# |
Feb 9th 2018, 17:55 |
alysson-azevedo |
Yeah. I declared the prefix route inside a `/` scope |
# |
Feb 9th 2018, 17:54 |
dereuromark |
most likely your prefix routing has an issue then |
# |
Feb 9th 2018, 17:54 |
dereuromark |
you should paste a pastebin url with your code, including the routes.php setup |
# |
Feb 9th 2018, 17:52 |
alysson-azevedo |
Hi guys. I have a route with xlsx configured. When i make a request `GET /records.xls` it works fine. But on my html view, i have `ech$this->Html->link('Excel file', ['_ext' => 'xlsx'])` that raises an error: ``` Error: A route matching "array ( '_ext' => 'xlsx', 'action' => 'index', 'prefix' => 'reports', 'plugin' => NULL, 'controller' => 'Records', )" could not be found. ``` |
# |
Feb 9th 2018, 17:44 |
dereuromark |
find('tagged') is the custom finder |
# |
Feb 9th 2018, 17:44 |
dereuromark |
but yeah, should be |
# |
Feb 9th 2018, 17:44 |
aro |
ok |
# |
Feb 9th 2018, 17:44 |
dereuromark |
dunno, I basically made the existing ones a bit better working and maintained. find out and feel free to PR documentation improvements for these things |
# |
Feb 9th 2018, 17:43 |
aro |
like say i have an entry with tag a,b,c and another entry with tag b,c and another with tag b, can it suggest the latter two by order of occurence? |
# |
Feb 9th 2018, 17:43 |
aro |
does your plugin find related records by tag? |
# |
Feb 9th 2018, 17:42 |
slackebot |
!tell aro about awesome |
# |
Feb 9th 2018, 17:42 |
slackebot |
Command sent from Slack by dereuromark: |
# |
Feb 9th 2018, 17:41 |
aro |
i havent heard of that |
# |
Feb 9th 2018, 17:41 |
dereuromark |
aro: awesome list |
# |
Feb 9th 2018, 17:41 |
aro |
which is the best tagging plugin? |
# |
Feb 9th 2018, 17:03 |
neon1024 |
I just make my own, but we don’t have any public facing user stack |
# |
Feb 9th 2018, 16:58 |
jkarlmen |
did you roll your own user management or did you use another users plugin |
# |
Feb 9th 2018, 16:57 |
jkarlmen |
that cost me 3 days of fighting |
# |
Feb 9th 2018, 16:57 |
jkarlmen |
yeah i learned that last night haha |
# |
Feb 9th 2018, 16:53 |
neon1024 |
..and remember to call parent:: where appropriate |
# |
Feb 9th 2018, 16:53 |
neon1024 |
Just make sure to refer to your extending class, rather than the base class, so your code is executed |
# |
Feb 9th 2018, 16:53 |
neon1024 |
As it will share the same associations, being a subclass |
# |
Feb 9th 2018, 16:53 |
neon1024 |
But yeah, you can associate to an extended model |
# |
Feb 9th 2018, 16:52 |
neon1024 |
I stopped using that plugin because I spent too much time customising it |
# |
Feb 9th 2018, 16:50 |
jkarlmen |
because right now i'll have to rename all instances of that model in my code |
# |
Feb 9th 2018, 16:49 |
jkarlmen |
and still refer to "Users" |
# |
Feb 9th 2018, 16:49 |
jkarlmen |
so instead of trying to fight them I was hoping there was a way i could say "add these table relations to this plugin's model" |
# |
Feb 9th 2018, 16:49 |
jkarlmen |
which makes sense ... I'm using cakeDC's users plugin and their users model is conflicting with mine |
# |
Feb 9th 2018, 16:48 |
neon1024 |
Otherwise I have to inspect the instance to see what I’m working with, or hope I used a descriptive variable name :P |
# |
Feb 9th 2018, 16:48 |
neon1024 |
I tend to name them differently so it’s nice and obvious in my code |
# |
Feb 9th 2018, 16:48 |
jkarlmen |
huh ... now there is an idea |
# |
Feb 9th 2018, 16:48 |
neon1024 |
If you want to load both models at the same time that is |
# |
Feb 9th 2018, 16:47 |
neon1024 |
You can use the same filename and such, but you’ll have to use `$this->setAlias()` in the table class initialize method I think |