# |
Jan 13th 2018, 13:56 |
dinosaur |
Untampered .htaccess webroot = drwxr-xr-x webroot/css = drwxrwxrwx no error messages |
# |
Jan 13th 2018, 13:53 |
admad |
assuming you have the default rule in .htaccess could be file/folder permissions issue |
# |
Jan 13th 2018, 13:50 |
dinosaur |
Trying to figuring out why it is not |
# |
Jan 13th 2018, 13:46 |
admad |
webroot/css/foo.css should be callable as domain.com/css/foo.css |
# |
Jan 13th 2018, 13:42 |
dinosaur |
@admad The old application call resources like "/css/name.css". Its only working if I change then to "/webroot/old/css". Even if I move the css dir to /webroot/css I cannot call directly "/css/name.css". There are a way to avoid change every each file? |
# |
Jan 13th 2018, 13:14 |
dinosaur |
trying! :slightly_smiling_face: |
# |
Jan 13th 2018, 13:12 |
dinosaur |
hmm The shared session would be needed anyway |
# |
Jan 13th 2018, 13:12 |
dinosaur |
This or maybe cakephp auth+menu and point the menu calling to each one of the old files... |
# |
Jan 13th 2018, 13:11 |
admad |
so share session between the 2 apps and redirect to cake login page is not authticated |
# |
Jan 13th 2018, 13:10 |
dinosaur |
@admad I did. But it is a protected content, so I wish to auth into cake and only then allow access to that old files/structure... |
# |
Jan 13th 2018, 13:03 |
admad |
@dinosaur if you put the old site inside webroot it will be directly accessible like domain.com/oldfoo.php |
# |
Jan 13th 2018, 12:57 |
technofection |
Hi, I am trying to create a resource map like this 'map' => [ '/search/:page/:records/*' => [ 'action' => 'index', 'method' => 'GET' ], .... .... I want to set regular expression for the URL parameters... What is the syntax? |
# |
Jan 13th 2018, 12:52 |
dinosaur |
I have an old site using raw PHP with no MVC. For several reasons, I wish to put it "inside" a CakePHP. I've found this https://www.endpoint.com/blog/2009/12/03/iterative-migration-of-legacy (exactly what I want) but it is too old and I could not replicate the generic idea to CakePHP3. Does anyone maded similar thing? Can you point me to idea to try? Rebuild it from scratch is not an option. |
# |
Jan 13th 2018, 12:48 |
ghoritrilochan |
i have use https://github.com/paypal/PayPal-PHP-SDK this plugin but not understand which place in insert "first .php" file |
# |
Jan 13th 2018, 12:13 |
info356 |
ah great! thanks |
# |
Jan 13th 2018, 12:13 |
admad |
https://api.cakephp.org/3.5/class-Cake.Collection.CollectionInterface.html#_combine |
# |
Jan 13th 2018, 12:13 |
admad |
@info356 ->all()->combine() |
# |
Jan 13th 2018, 12:12 |
ghoritrilochan |
any have paypal payment getway demo. i not understand how to implement so... |
# |
Jan 13th 2018, 12:09 |
info356 |
toArray(['keyValue' => '{n}.reference']) would be a nice feature or not? |
# |
Jan 13th 2018, 12:07 |
admad |
instead of the foreach you can use Hash::combine() |
# |
Jan 13th 2018, 11:48 |
info356 |
File uploaded https://cakesf.slack.com/files/U8MUBMSFQ/F8RSXA341/-.php / https://slack-files.com/T053DPNCM-F8RSXA341-3929512773 |
# |
Jan 13th 2018, 11:19 |
kitcat711 |
I am trying with a contain, but got an empty array as a result |
# |
Jan 13th 2018, 11:19 |
kitcat711 |
how can I get an article with all its tags? |
# |
Jan 13th 2018, 11:18 |
kitcat711 |
using the BelongsToMany association like here https://book.cakephp.org/3.0/en/orm/associations.html#belongstomany-associations |
# |
Jan 13th 2018, 11:18 |
kitcat711 |
hey there |
# |
Jan 13th 2018, 11:05 |
technofection |
Hi, I am trying to create a resource map like this 'map' => [ '/search/:page/:records/*' => [ 'action' => 'index', 'method' => 'GET' ], .... .... I want to set regular expression for the URL parameters... What is the syntax? |
# |
Jan 13th 2018, 01:44 |
mdotobie |
Actually scratch that question. I just realized there is another approach I can take |
# |
Jan 13th 2018, 01:34 |
mdotobie |
is there a way to access the ServerRequest object from a Form object in CakePHP 3.5 |
# |
Jan 12th 2018, 23:15 |
obinoob |
*supposed |
# |
Jan 12th 2018, 23:14 |
obinoob |
admad thank you meanwhile I've used a for loop in my ajax call but tomorrow I'll read the api carefully I'm so blind by now! I'm not sure how it's suppose to change date format on a batch of records... suppose I need to use a for loop right? |
# |
Jan 12th 2018, 21:04 |
admad |
Err obinoob |
# |
Jan 12th 2018, 21:04 |
admad |
opinion: use this in bootstrap https://api.cakephp.org/3.5/class-Cake.I18n.DateFormatTrait.html#_setJsonEncodeFormat |
# |
Jan 12th 2018, 20:23 |
obinoob |
my javascript application is expecting a json value to be a date startDate: Sat Aug 25 2018 00:00:00 GMT+0100 (WEST) but cakephp is returning string startDate: "2018-01-12T19:55:58+00:00" is there a way I can do this from server side or I will have to loop data with javascript and make my things? |
# |
Jan 12th 2018, 18:54 |
maymeow |
anyone have good travis config file for cakephp (with mysql service) ? |
# |
Jan 12th 2018, 18:22 |
DJTrey |
i have a cakephp site that has wordpress in the webroot. it keeps redirecting to /webroot/blog. can someone please take a look if you have a chance? here's my htaccess https://stackoverflow.com/questions/48229945/wordpress-blog-inside-of-cakephp-keeps-redirecting-to-webroot-blog |
# |
Jan 12th 2018, 16:36 |
beakman |
Or some sorta join which would might end up a bit more efficient. |
# |
Jan 12th 2018, 16:35 |
beakman |
@bigdaddygee Might be able to shove a subquery somewhere in there too. |
# |
Jan 12th 2018, 16:35 |
bigdaddygee |
Maybe yes, but I just don't understand why this not working. but thanks :slightly_smiling_face: |
# |
Jan 12th 2018, 16:35 |
beakman |
https://book.cakephp.org/3.0/en/orm/behaviors/counter-cache.html |
# |
Jan 12th 2018, 16:34 |
beakman |
@bigdaddygee Might just want to use a counter cache for that. |
# |
Jan 12th 2018, 16:31 |
bigdaddygee |
``` $Stores = $this->Stores ->find() ->select(['UserStores.Count' => function(\Cake\ORM\Query $q) { return $q->func()->count('*'); }]) ->contain([ 'CreatedByUsers', 'ModifiedByUsers', 'Users', 'UserStores', 'Images' ]); ``` |