Memcached delete issue?

2015-03-21 Thread Ronald Layanto
Hi all,

Sorry if my post is kinda stupid
I have an issue using Memcached in CakePHP 2.6.3
Currently I develop a simple website in my laptop, which already installed 
with Memcached
The Memcached already installed properly, I already checked using phpinfo 
and there's no problem at all

I also add new config in Config/core.php in my frontend app, the config 
name is 'medium', prefix 'uwl_' and using Memcached engine as well
Everything runs properly and it seems the Memcached is working
The issue occurs when I tried to change the image content using my backend 
app
I change the image content and when I refresh the frontend page, the image 
disappear, which is normal because it's still get the data from Memcached
The next step is I create a function on my backend app, the purpose is to 
clear the cache
Within this function, I did Cache::clear('uwl_', 'medium'); so I guess it 
should be good
I assume the cache will be cleared and when I refresh the frontend one more 
time, the image will be changed

Unfortunately it didn't happen, the image still broken and I assume the 
cache wasn't cleared
I tried to Google so many times regarding to clearing memcached using 
cakephp, but still no hint at all

Anyone experienced this kind of problem before?
Any suggestion to clear the cache and solve my issue?

Thanks in advance

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


Re: Memcached delete issue?

2015-03-21 Thread Ronald Layanto
Ah sorry I forgot to mention,
I also add the same config on Config/core.php on my backend app, so it 
should refer to the same cache


On Saturday, March 21, 2015 at 10:49:17 PM UTC+7, Ronald Layanto wrote:

 Hi all,

 Sorry if my post is kinda stupid
 I have an issue using Memcached in CakePHP 2.6.3
 Currently I develop a simple website in my laptop, which already installed 
 with Memcached
 The Memcached already installed properly, I already checked using phpinfo 
 and there's no problem at all

 I also add new config in Config/core.php in my frontend app, the config 
 name is 'medium', prefix 'uwl_' and using Memcached engine as well
 Everything runs properly and it seems the Memcached is working
 The issue occurs when I tried to change the image content using my backend 
 app
 I change the image content and when I refresh the frontend page, the image 
 disappear, which is normal because it's still get the data from Memcached
 The next step is I create a function on my backend app, the purpose is to 
 clear the cache
 Within this function, I did Cache::clear('uwl_', 'medium'); so I guess it 
 should be good
 I assume the cache will be cleared and when I refresh the frontend one 
 more time, the image will be changed

 Unfortunately it didn't happen, the image still broken and I assume the 
 cache wasn't cleared
 I tried to Google so many times regarding to clearing memcached using 
 cakephp, but still no hint at all

 Anyone experienced this kind of problem before?
 Any suggestion to clear the cache and solve my issue?

 Thanks in advance


-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


Re: CakePHP 2.6.X Pagination Sort Errors

2015-03-21 Thread David Cole
As luck would have it, after completing more section it started functioning 
properly. Very strange that an error like this would simply disappear... I 
have noticed that by using the sort function that it does not maintain 
pretty url's. It's uses /admin/pages?sort=Page.idorder=asc

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


Re: 3.0 - routing bug?

2015-03-21 Thread mark_story
Router::reverse() is intended to convert the results of parse() in url string. 
Reverse takes positional parameters in a different location which is how it 
differs from url().

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


CakePHP 2.6.X Pagination Sort Errors

2015-03-21 Thread David Cole
I am faced a new issues regarding CakePHP 2.6.X and pagination; I've never 
had this issue before and it only happens when attempting to use 
$this-Paginator-sort(...) in a view.

$this-Paginator-sort('Page.id', 'ID', array('model' = 'Page'));

$this-Paginator-sort('Page.id', 'ID');

$this-Paginator-sort('id');

I've done the normal setup of the pagination object in the controller

$this-Paginator-settings = array(
'contain' = false, 
'group' = 'Page.id', 
'order' = 'Page.name ASC', 
'limit' = 20
); 

$results = $this-Paginator-paginate('Page');

I am getting this in the view file

Warning (2): array_filter() expects parameter 1 to be array, null given [
CORE/Cake/View/Helper/PaginatorHelper.php, line 435] 

Warning (2): array_merge() [function.array-merge]: Argument #1 is not an 
array [CORE/Cake/View/Helper/PaginatorHelper.php, line 435]

Upon tracking the issue it stems from the params function on line 126 in 
the pagination helper, on line 131 it is returning null because 
request-params['paging'] is null.

if (!isset($this-request-params['paging']) || empty($this-request-params
['paging'][$model])) { return null; }

With the above explained, why is request-params['paging'] null? Shouldn't 
it be populated with information as it is in other sections? Is the sort 
function broken or am I missing something? Any help would be greatly 
appreciated.

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


Re: Still having trouble with saving BelongsToMany data

2015-03-21 Thread Joe T.
José, Kevin,

Breakthrough at last!
https://github.com/cakephp/cakephp/issues/6100

Fixed validation  other minor discrepancies in Table/Entity classes that 
may not have even affected things much, but didn't get any better results.

Finally i had nothing left, so tried resetting indexes on the associated 
data - it was the only difference left i could see:
$this-request-data['attributes'] = array_values($this-request-data[
'attributes']);

Before doing this, patchEntity() was losing the _joinData. After adding 
that reset, it works!

Mark is going to research it further, but for now at least i have a 
relatively low-impact workaround.

Thanks for all your help.

On Friday, 13 March 2015 13:13:30 UTC-4, heavyKevy wrote:

 I believe that is your answer you were looking for... 
 I missed it too. 

 Thanks Jose for pointing that one out.

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


File upload from form with Http Client

2015-03-21 Thread Sven Mäurer
I have read the part about the Http Client:

$http = new Client();$response = $http-post('http://example.com/api', [
  'image' = '@/path/to/a/file',
  'logo' = $fileHandle]);

and I have read the part about file input:

echo $this-Form-create($article, ['type' = 'file']);

But how can I combine them so that the file from the form is uploaded?

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.