# |
Aug 20th 2019, 08:23 |
slackebot |
NewsProducts.news_article_id'] ] ], 'conditions' => ['NewsProducts.product_id' => $product['id']], 'order' => ['NewsArticles.date' => 'desc', 'NewsArticles.created' => 'desc'], 'contain' => ['Images'], 'limit' => 12 ]; |
# |
Aug 20th 2019, 08:23 |
scuadra |
Here is my paginate: $this->paginate = [ 'fields' => [ 'NewsArticles.id', 'NewsArticles.title', 'NewsArticles.slug', 'NewsArticles.date', 'NewsArticles.content', 'NewsArticles.image' ], 'join' => [ [ 'table' => 'news_products', 'type' => 'INNER', 'alias' => 'NewsProducts', 'conditions' => ['NewsArticles.id = |
# |
Aug 20th 2019, 08:23 |
slackebot |
can't have an association of the same name with a different target "className" option anywhere in your app. |
# |
Aug 20th 2019, 08:23 |
scuadra |
Hello. I am using Cake 3.7. I have news_articles table and news_images table (NewsArticle hasMany Images). I also have Products belongsToMany association with NewsArticles. So I am trying to paginate the NewsArticles for a given product but I get the following error: App\Model\Table\NewsArticlesTable association "Images" of type "oneToMany" to "Cake\ORM\Table" doesn't match the expected class "App\Model\Table\NewsArticleImagesTable". You |
# |
Aug 20th 2019, 08:15 |
dakota |
Also, any reason why 2.9? It is very old and support for 2.x will be dropped soon |
# |
Aug 20th 2019, 08:14 |
dakota |
@bernardine.ragas The third error there gives you what the problem is :slightly_smiling_face: You need to make the `tmp/` directory writable by your webserver user (Exactly how depends on your operating system, and how xampp works) |
# |
Aug 20th 2019, 08:13 |
bernardine.ragas |
what do i need to configure? |
# |
Aug 20th 2019, 08:12 |
bernardine.ragas |
2.9 I MEAN |
# |
Aug 20th 2019, 08:12 |
rgabasa.mynimo |
Ah I see, thank you for answering Dakota |
# |
Aug 20th 2019, 08:12 |
bernardine.ragas |
Hi guyaass, I am new to cakephp , please please help, I am using cakephp 2.0 and i downloaded it from github also i am using xampp. Problem is when i tried to run the index.php it shows some error |
# |
Aug 20th 2019, 08:10 |
dakota |
As long as your server, etc. all support UTF8 |
# |
Aug 20th 2019, 08:10 |
dakota |
@rgabasa.mynimo You should be able to |
# |
Aug 20th 2019, 08:07 |
rgabasa.mynimo |
? |
# |
Aug 20th 2019, 08:06 |
rgabasa.mynimo |
Hi Everyone I just want to ask about routes or url, can I use special characters in the url for example www.domain.com/peña |
# |
Aug 20th 2019, 07:49 |
voycey |
Discord has its own set of problems as well |
# |
Aug 20th 2019, 07:49 |
admad |
we could move this support channel to discord with provide unlimited history unlike slack, but no one has the time to setup the irc - slack - discord bridge |
# |
Aug 20th 2019, 07:47 |
admad |
we got better things to do instead of dealing with a potential db lockup because someone tried accessing that 5825925 page |
# |
Aug 20th 2019, 07:46 |
admad |
savant would know for sure |
# |
Aug 20th 2019, 07:46 |
admad |
not sure, either mysql or postgres i presume |
# |
Aug 20th 2019, 07:45 |
voycey |
What DB is this running on? |
# |
Aug 20th 2019, 07:43 |
admad |
that's why it's page number is clamped to 50 |
# |
Aug 20th 2019, 07:42 |
admad |
yeah traditional paging isn't a good option for large tables |
# |
Aug 20th 2019, 07:40 |
neon1024 |
Perhaps it needs swapping to offset pagination |
# |
Aug 20th 2019, 07:40 |
neon1024 |
We didn’t implement any limit that I remember |
# |
Aug 20th 2019, 07:40 |
neon1024 |
Perhaps it’s Crud, but in our api we allow the limit param and it tops out at 100 |
# |
Aug 20th 2019, 07:30 |
voycey |
Seems like a conscious decision to not allow it |
# |
Aug 20th 2019, 07:29 |
voycey |
:eyes: |
# |
Aug 20th 2019, 07:29 |
voycey |
https://github.com/cakephp/irc.cakephp.org/blob/6fd8df9196c1c4dc35ac8ce4fb4eca721af20ca9/src/Controller/LogsController.php#L64 |
# |
Aug 20th 2019, 07:28 |
voycey |
As surely ?page=254 would work? |
# |
Aug 20th 2019, 07:28 |
voycey |
Im not sure just adding ->last in there will solve it to be honest |
# |
Aug 20th 2019, 07:27 |
dereuromark |
PR it :slightly_smiling_face: |
# |
Aug 20th 2019, 07:27 |
voycey |
would be good to be able to go back to the beginning of it! |
# |
Aug 20th 2019, 07:27 |
voycey |
Not sure - I think like Mark said there is probably some limit somewhere |
# |
Aug 20th 2019, 07:24 |
neon1024 |
Morning everyone :wave: |
# |
Aug 20th 2019, 07:23 |
neon1024 |
@voyc] |
# |
Aug 20th 2019, 07:23 |
rightscoreanalysis |
$routes->connect('articles/view/:slug', ['controller' => 'Articles', 'action' => 'view'], ['pass' => ['slug']]); |
# |
Aug 20th 2019, 07:23 |
rightscoreanalysis |
try to make a slug route with this, what am I missing |
# |
Aug 20th 2019, 06:32 |
dereuromark |
oh someone upgraded it. https://github.com/cakephp/irc.cakephp.org/blob/6fd8df9196c1c4dc35ac8ce4fb4eca721af20ca9/src/Template/Logs/view.ctp#L103 is missing the last() method here |
# |
Aug 20th 2019, 06:29 |
dereuromark |
the code is open though, can be modified via pr |
# |
Aug 20th 2019, 06:28 |
dereuromark |
no one wants to touch it^^ |
# |
Aug 20th 2019, 06:28 |
dereuromark |
ah you mean at that page. it is still cake1 code or so. i bet the main issue is that it is so many records that fetching takes too long |