Re: CakePHP 1.3.8 - Editing user info causes 404

2016-05-02 Thread Reuben
instead of /users/edit/1). And last but not least, it looks like these forums are being wound down. Head over to http://discourse.cakephp.org for CakePHP discussions. (but still reply to this topic, if you need to) Regards Reuben Helms On Tuesday, 3 May 2016 07:42:07 UTC+10, Josh R wrote: >

Re: CakePHP Forum launched!

2016-05-02 Thread Reuben
Maybe this post should get stickied / pinned, so people know all the action should now be at discourse.cakephp.org. Regards Reuben Helms On Tuesday, 26 April 2016 03:02:49 UTC+10, Megan Lalk wrote: > > CakePHP Forum launched! > > *We asked you what you wanted and the feedback was cl

Re: Problem Console on cakephp 2.7.5

2015-11-02 Thread Reuben
I don't have an 2.7.5 install to work on, but you might be better off submitting a ticket to GitHub at https://github.com/cakephp/cakephp/issues On Tuesday, 3 November 2015 09:10:22 UTC+10, Nilson Pena wrote: > > There is something wrong with cakephp 2.7.5. when using the console, for > example:

Re: Which parts of the framework can be used outside the framework?

2015-07-09 Thread Reuben
egacy application, and not to invoke the dispatcher. That gets me access to utilities, CakeSession and models, making it easier to move existing business logic into CakePHP until I'm ready to convert the legacy PHP to use MVC. Regards Reuben Helms On Thursday, 9 July 2015 07:12:29 UTC+10, David

Re: Editor for Cakephp

2015-06-23 Thread Reuben
For a long time, I used Eclipse with PDT, and associated .ctp files with PHP, but just recently, I decided to see what else was out there. I ended up going with PHPStorm, because of it's focus on PHP, and the extra support tools it could harness for web related languages. I did try NetBeans aft

Re: How to separate website code as per as restfull webservice code base within cakephp3.0

2015-04-20 Thread Reuben
-views.html and http://book.cakephp.org/3.0/en/development/rest.html. I've been a little out of touch with CakePHP 3, and havent had the opportunity to do any new development with it, however, I believe these references still roughly apply for CakePHP 2.0 as well. Regards Reuben Helms On M

Re: ignore .htaccess on git

2015-04-16 Thread Reuben
Hi You could supply .htaccess-sample and /webroot/.htaccess-sample files, and have the .gitignore entries for .htaccess. This will provide samples files that developers could copy and modify as needed, and prevent those proper versions from being checked in. Regards Reuben Helms On Thursday

Re: The (bad) perception and image of CakePHP in the public

2014-09-30 Thread Reuben Helms
; else is right and I am wrong? TBH, I’m not clever enough to be able to >> explain why Cake is the right choice compared to others; some help there >> would be cool. >> >> On 30 Sep 2014, at 00:43, Reuben wrote: >> >> My apologies, dereuromark, for the incorrect spel

Re: The (bad) perception and image of CakePHP in the public

2014-09-29 Thread Reuben
My apologies, dereuromark, for the incorrect spelling of your handle. On Tuesday, 30 September 2014 09:40:31 UTC+10, Reuben wrote: > > The few times that I've seen CakePHP compared to other PHP frameworks is > in performance tests, and it never looks pretty. Usually the test is a

Re: The (bad) perception and image of CakePHP in the public

2014-09-29 Thread Reuben
the 1 or 2 paragraph articles on TheBakery. Regards Reuben Helms On Tuesday, 30 September 2014 07:15:54 UTC+10, Florian Krämer wrote: > > In the official CakePHP Facebook group Yanuar Nurcahyo asked about > opinions on that link > http://www.quora.com/Why-isnt-Cakephp-popular-despi

Re: CakePHP 3.0.0-beta2 released

2014-09-29 Thread Reuben
Super excited for separate packages, and using components inside other applications. On Sunday, 28 September 2014 23:49:02 UTC+10, José Lorenzo wrote: > > The CakePHP core team is proud to announce the second beta release for > CakePHP > 3.0.0

Re: Use 2 tables for update

2014-06-26 Thread Reuben
Not without an original post to work from. On Thursday, 26 June 2014 21:19:23 UTC+10, CUCULEAC STEFAN wrote: > > No one? > > > > -- > View this message in context: > http://cakephp.1045679.n5.nabble.com/Use-2-tables-for-update-tp5718641p5718652.html > > Sent from the CakePHP mailing list arch

Re: How to self join?

2014-06-16 Thread Reuben Helms
ield name. You may need to stick array() around the group and order clauses. I'm concerned that the joins entry doesn't have any conditions. I'm not sure if this is how you'd normally do a full table join via the from clause using joins. Failing that, just do a $db->getDataS

Re: How to self join?

2014-06-15 Thread Reuben
you are after. Failing that, I'd be looking at the 'joins' clause, which can do an inner or outer join as required, rather than a full table join in the from clause. [http://book.cakephp.org/2.0/en/models/associations-linking-models-together.html#joining-tables] Regards Reuben

Re: index.php not found?

2014-06-12 Thread Reuben Helms
n the Models). And the composer setup isn't as tricky as CakePHP 2.5. Regards Reuben Helms On Thu, Jun 12, 2014 at 11:02 PM, Kevin Burton < ronald.kevin.bur...@gmail.com> wrote: > I am using version 2.5. > > Here is the way I have defined the document root: >

Re: index.php not found?

2014-06-11 Thread Reuben
As John mentioned, it depends on your placement of DocumentRoot. If you're going to disable the rewrite module, then DocumentRoot should point to app/webroot. Regards Reuben Helms On Wednesday, 11 June 2014 12:54:13 UTC+10, Kevin Burton wrote: > > I have noticed that when I uncomme

Re: Security component and SQL Injection

2014-06-11 Thread Reuben
of how it is supposed to work, but I've never gone out of my way to test it. However, if you're using ::query, then that might be possible, if queries are not appropriately sanitized. Regards Reuben Helms On Thursday, 12 June 2014 09:28:03 UTC+10, phpMagpie wrote: > > Hi, > &

Re: Trying to learn Auth and Login, can someone upload there files so i can analyze?

2014-06-10 Thread Reuben
Here are a couple of examples: https://github.com/steinkel/cakephp-2.0-auth-example https://github.com/josegonzalez/tutorial-role-auth-codebase I googled "cakephp auth github". You might come across some Auth alternatives as well. Regards Reuben Helms On Wednesday, 11 June 2014 00

Re: Group controllers into folders

2014-06-10 Thread Reuben
lt the need to organize into plugins yet. In fact, it's nice to be able to see all the controllers in one directory, instead of scrambling through multiple directories. Regards Reuben Helms On Tuesday, 10 June 2014 23:13:48 UTC+10, Lucian Vasile wrote: > > Hello! > > I was wondering

Re: Delete white spaces in content

2014-06-10 Thread Reuben
but this seems like the right place to do it. However, you might get better mileage from adding a compressor to your web server (mod_deflate for Apache, gzip module for Nginx). Regards Reuben Helms On Tuesday, 10 June 2014 22:16:08 UTC+10, Сергей Калистратов wrote: > > I want to compress

Re: Use CakeResponse in Helper.

2014-06-10 Thread Reuben
already commenced, and headers have already been written. Regards Reuben Helms On Wednesday, 11 June 2014 08:49:58 UTC+10, gloop wrote: > > Hello i try to write an helper to create and download a CSV. > > Now i have the problem to set the type in the helper. > > I try: > > fu

Re: 3.0 - Getting variables into anonymous functions

2014-06-02 Thread Reuben
Oh, that's handy. As you can see, I've zero experience in anonymous functions. For those at home: $name = 'CakePHP'; $query = $articles->find(); $query->matching('Tags', function($q) use ($name){ return $q->where(['Tags.name' => $name]);}); On Tuesday, 3 June 2014 14:45:14 UTC+10, Dakot

3.0 - Getting variables into anonymous functions

2014-06-02 Thread Reuben
Hi In the example from the CakePHP 3 Book, how would one replace 'CakePHP' with a variable (i.e. $name), and have that passed from the calling code? Would is be via a call back, or property set on the $query, and accessible via $q? $query = $articles->find();$query->matching('Tags', function(

Re: CakePHP 3.0-dev3 Request Routing

2014-05-20 Thread Reuben Helms
gt; If you plan on using a dev version its always wise to take a look at the > migration guide ;) > See > http://book.cakephp.org/3.0/en/appendices/3-0-migration-guide.html#router > in regardings to arguments for parseExtentions() > > mark > > > Am Mittwoch, 21. Mai 2014 0

CakePHP 3.0-dev3 Xml Request Handling

2014-05-20 Thread Reuben
Routing\Dispatcher->dispatch(Object(Cake\Network\Request), Object(Cake\Network\Response)) #10 {main} I guess because of the way that Models have changed, perhaps a ResultSet can not simply be serialized to XML that way that we might have done previously. Is what I'm doing expected t

CakePHP 3.0-dev3 Request Routing

2014-05-20 Thread Reuben
Controller.php Specifying xml in parseExtensions, "works" after a fashion (the Controller is found, but there's still an error, which is the subject of another post. Regards Reuben Helms -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://

Re: Upgrading from cakePHP version 1.3 to 2.5

2014-05-20 Thread Reuben Helms
leave it as it is, and always use this branch instead of > default? > > On Friday, May 16, 2014 2:54:10 PM UTC+3, Reuben wrote: >> >> I'd branch, at the very least. >> >> On Friday, May 16, 2014, HK wrote: >> >>> I was wondering what to do wi

Re: Upgrading from cakePHP version 1.3 to 2.5

2014-05-16 Thread Reuben Helms
no matter how big) to your > current project on a separate branch? > > > Thanks > > On Friday, May 16, 2014 8:15:22 AM UTC+3, Reuben wrote: >> >> >> I would also consider installing CakePHP via composer, in preparation for >> CakePHP 3.0. Plus is just make

Re: pagination on cakephp 1.3

2014-05-15 Thread Reuben
site page ' . $this->params['paging'][$modelAlias]['page']); in the controller. (http://book.cakephp.org/1.3/en/The-Manual/Developing-with-CakePHP/Views.html#layouts) And then make sure you set the title in your layout Regards Reuben Helms On Wednesday, 14 May 2014 1

Re: CakePHP 2.4.9 authenticated Application

2014-05-15 Thread Reuben
f you only have one type of authenticating user, and want to keep it simple, then skip prefix routing. However, if you think that you might have two types of authenticating users (admins and members), then use the prefix routing. Regards Reuben Helms On Thursday, 15 May 2014 02:11:49 UTC+10, bobk

Re: Authake error

2014-05-15 Thread Reuben
Actually, looking at the code, getPreviousUrl assumes that the URL stored in the session at Authake.previousUrl is either an array or a CakeRequest, since that is what is required for Router::reverse(). You'll need to inspect the Session, and see what is being stored in Authake.previousUrl. Thi

Re: Authake error

2014-05-15 Thread Reuben
What is your Config/routes.php looking like? It might also be an issue with the plugin, if there was no previous url to resolve. You may need to log an issue with the plugin author via Github. On Thursday, 15 May 2014 03:08:26 UTC+10, Julio Rodriguez wrote: > > Hello, > > I'm using authake (htt

Re: Redirect all webpages under webroot to login page

2014-05-15 Thread Reuben
I might also suggest change the DocumentRoot of your application to app/webroot, since you probably shouldn't be accessing the controllers directory directly (unless it was just an example). On Thursday, 15 May 2014 18:38:40 UTC+10, Sam wrote: > > I am using cakephp 2.4.5. I would like to redire

Re: Redirect all webpages under webroot to login page

2014-05-15 Thread Reuben
those static pages under app/Views/Pages. You'll probably also need to update the extensions from .htm(l) to .ctp, and make use of the Router to allow the .htm(l) extension. Regards Reuben Helms On Thursday, 15 May 2014 18:38:40 UTC+10, Sam wrote: > > I am using cakephp 2.4.5. I would

Re: Upgrading from cakePHP version 1.3 to 2.5

2014-05-15 Thread Reuben
Oh, and if you're running Git on Windows, you may have to change the case of the various directories. To do this, I had to use a two stage approach: git mv config config.old git mv config.old Config and repeat for all application directories. On Friday, 16 May 2014 14:21:08 UTC+10, earth wrote

Re: Upgrading from cakePHP version 1.3 to 2.5

2014-05-15 Thread Reuben
(for the second time) a couple of months ago. The automation tools make it really easy, but you'll need to manually do stuff like authentication, since it has received a major change between releases (but for the better). Regards Reuben Helms On Friday, 16 May 2014 14:21:08 UTC+10, e

Re: Deleting an associated HABTM record

2014-05-15 Thread Reuben
to explicitly define the FlagInvoice model, as per the example in hasMany through (The Join Model) (http://book.cakephp.org/2.0/en/models/associations-linking-models-together.html#hasmany-through-the-join-model) Regards Reuben Helms On Friday, 16 May 2014 01:43:58 UTC+10, WhyNotSmile wrote

Re: When is a form post not a form post?

2014-05-14 Thread Reuben Helms
x27;)) {} > > This works for all edit and add actions. Always. > > Done in a few seconds.. :) > > > > Am Mittwoch, 14. Mai 2014 02:09:51 UTC+2 schrieb Reuben: >> >> So, having decided to always specify the action is the Form::create, so I >> can only be conce

Re: When is a form post not a form post?

2014-05-13 Thread Reuben
So, having decided to always specify the action is the Form::create, so I can only be concerns with detecting a POST for form submissions, I'd really like to make sure that is covered in my unit testing. But that's a tricky one. I guess I would need to write a unit test for any view that has a

Re: When is a form post not a form post?

2014-05-13 Thread Reuben
he first case scenario as well. So, looks like I'll be going with case 1, so I only need to deal with POST. PUT can still be used (and should be used) for REST APIs, but for the most part, I only want to have to deal with POST methods. On Wednesday, 14 May 2014 09:26:52 UTC+10, Reuben wr

When is a form post not a form post?

2014-05-13 Thread Reuben
little tracking down in the code to see if I can work out where/why this is happening, but anyone happens to have had experience with this, and what I should be doing instead, please let me know. Regards Reuben Helms -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter

Re: Composer, PHPUnit and CakePHP 2.x

2014-05-07 Thread Reuben
x27;s no need to include PHPUnit on the include path explicitly. On Thursday, 8 May 2014 11:56:35 UTC+10, Reuben wrote: > > When using Composer with CakePHP 2.x, does PHP Unit still have to be on > the include path, or is there a smarter way, like in CakePHP 3.x, where run >

Re: Containable and Aggregate fields

2014-05-07 Thread Reuben
You may need to use the join option directly, instead of Containable. http://book.cakephp.org/2.0/en/models/associations-linking-models-together.html#joining-tables On Thursday, 8 May 2014 00:15:29 UTC+10, Harold Putman wrote: > > I am trying to get a SUM of a column of related records through th

Composer, PHPUnit and CakePHP 2.x

2014-05-07 Thread Reuben
When using Composer with CakePHP 2.x, does PHP Unit still have to be on the include path, or is there a smarter way, like in CakePHP 3.x, where run phpunit directly? Regards Reuben Helms -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP

Re: Ordering Error Message

2014-03-22 Thread Reuben
near the bottom of this section] to control the order of field parts for a particular field. Just in case you want to hide the error field that you are displaying elsewhere. Regards Reuben Helms On Sunday, 23 March 2014 12:28:03 UTC+10, advantage+ wrote: > > Is there a way to set the order

Re: constant for base app URL?

2014-01-31 Thread Reuben
And what I forgot to mention, from a View template, you should use $this->Html->url('/', true) to generate a full URL. It will use Router::url() anyway, but will save you the hassle of doing an App::uses() in the .ctp. On Saturday, 1 February 2014 16:22:54 UTC+10, Reuben wro

Re: constant for base app URL?

2014-01-31 Thread Reuben
To get a full URL, you can use Router::url('/', true). That will give you the full URL to the application. For applications running behind a load balancer, you may wish to specify the BASE_URL, but I see you've already found that. Regards Reuben Helms On Monday, 13 March 2006

Re: What's the correct method for using Traits and Namespaces for CakePHP 2?

2014-01-30 Thread Reuben Helms
4 11:50:52 AM UTC+1, Reuben wrote: >> >> Does using namespaces change anything? >> >> Or is the App::uses just to assist with loading the appropriate file? >> >> Keeping in mind CakePHP 3, if namespaces can be used, what would be the >> namespace convention

Re: What's the correct method for using Traits and Namespaces for CakePHP 2?

2014-01-29 Thread Reuben Helms
ust load the trait with App::uses() > > On Tuesday, January 28, 2014 1:52:07 AM UTC+1, Reuben wrote: > > My original question on Stack Overflow [http://stackoverflow.com/ > questions/21394852/whats-the-correct-method-for-using- > traits-and-namespaces-for-cakephp-2], and content copie

Re: What's the correct method for using Traits and Namespaces for CakePHP 2?

2014-01-27 Thread Reuben
are not in use, also keep 'app' as 'app' and not 'App'. Although replacing 'app' with APP_DIR would be better for CakePHP 2.4.5 projects that have selected a different name for their project, and don't have the HTTP root pointing to webroot (in the

What's the correct method for using Traits and Namespaces for CakePHP 2?

2014-01-27 Thread Reuben
f that's a CakePHP bug, or if there is a more appropriate way of using traits in CakePHP 2. Regards Reuben Helms -- 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 Group

Re: Router redirect pass all parameters to another domian

2014-01-20 Thread Reuben
>From the documentation, I'm not convinced that is can be used to append the content of the original URL to the new destination. http://book.cakephp.org/2.0/en/development/routing.html#redirect-routing However, you may be better off implementing a site wide redirect like that, in your web serve

Re: Will combining cakephp with web templates like Smarty or Twig make front-end coding easier?

2014-01-20 Thread Reuben
It depends on who's programming your View layer. If the developer, who is also programming the Controller and Model layers, is doing the View, then go with your preference. I already know PHP, so using the FormHelper doesn't scare me, and sometimes learning another syntax for the sake of it ge

Re: Pros and cons of Cakephp versus Laravel

2014-01-19 Thread Reuben Helms
I just had a quick gander at the doco. Whilst ORMs aren't "never seen before" features in PHP (looking at you, Doctrine), it certainly seems like Laravel is at a place where CakePHP 3 is going to take existing CakePHP users. PHP 5.4 using namespaces, location services implemented at static function

Re: Pros and cons of Cakephp versus Laravel

2014-01-19 Thread Reuben
ions so I can gradually migrate and introduce new functionality using CakePHP to the legacy application. If there are specific cases of magic that you're concerned with, let us know, and someone could probably tell you if what you're wanting to do would be a problem or not. Regards Re

Re: Is it possible for a View to access another unrelated Model's data?

2014-01-19 Thread Reuben
er, if it is used often. In the View or in Elements, you may be able to use $this->requestAction() to call a specific controller action to get data to display in a View or Element, however, this is not something I do, so someone else or the CakePHP Book may have better guidelines on actual u

Re: Console & Shells on sub-domains

2014-01-19 Thread Reuben
uld upgrade to CakePHP 3. You will also relieve yourself of the burden of having to upgrade all the sites at the same time, should you need to upgrade CakePHP versions for minor releases. Regards Reuben Helms On Sunday, 19 January 2014 09:39:48 UTC+10, April DeRossett wrote: > > I don't

Re: Help setting up 3.0

2014-01-12 Thread Reuben
Because CakePHP 3 doesn't have a stable release yet, try the --dev flag. On Saturday, 11 January 2014 10:34:15 UTC+10, advantage+ wrote: > > I am trying to set this up with Composer install as outlined in the first > step. > > > > I want to play around locally, I am on windows 7 using wamp. Upg

Re: CakePHP 3.0.0 dev preview 1 released

2014-01-05 Thread Reuben
My impression is that CakePHP 3 was all about revisions to the model layer, plus a chance to drop support for unsupported releases of PHP, and take advantage of newer language features. I've only been using CakePHP since 1.1, and I still have a few major projects in the wild using CakePHP 1.3.

Re: Generate XML using controller and force it to sent as download

2014-01-02 Thread Reuben
a bit more CakePHP friendly than the raw header() command. It's been a while since I've done development in CakePHP 1.3, however in CakePHP 2.4, you can specify $this->response->download($filename); to write that header. Regards Reuben Helms On Thursday, 2 January 2014 21:43:03

Re: CakePHP Newbie Questions

2013-12-21 Thread Reuben
$this->Auth->user('username') will give you the user name of the currently logged in user. As seen here: http://book.cakephp.org/2.0/en/core-libraries/components/authentication.html#accessing-the-logged-in-user I hope that answers your questions. Regards Reuben Helms On Wedne

Re: Looking for Help with Cakephp basics .. aka looking for a mentor

2013-12-21 Thread Reuben Helms
7;s ItemID, used to identify a page displayed on a particular menu). Anyway, you have a good Christmas, too. On Sat, Dec 21, 2013 at 2:12 AM, Silver Troy wrote: > Hello Reuben, > I want to thank you for that well thought reply, the answers and > pointers you have given me. I really do tr

Re: Cakephp without Save() function?

2013-12-18 Thread Reuben
When doing an insert, you need to call Model->create() first. And if you are calculating a value, assign is back to the request, so it can be saved on the Model. $data1 = (string) $this->request->data['Calculate']['var1']; $data2 = (string) $this->request->data['Calculate']['var2']; $result = $d

Re: Yet Another Validation Question

2013-12-18 Thread Reuben
ructure of the field at validation time. You may want to check for $value = $this-> data[$this->alias][$field]['year']; when determining the value of the year. Regards Reuben Helms On Wednesday, 18 December 2013 16:22:45 UTC+10, advantage+ wrote: > > I cannot validate

Re: Looking for Help with Cakephp basics .. aka looking for a mentor

2013-12-18 Thread Reuben
has made development in PHP so much easier over the years. Definitely post questions here, if you're looking for help (try to do one question per post, to keep the conversation thread clean and understandable). Chances are, someone will be able to guide you to the answer, and who knows, be

Re: GeoIp Help

2013-12-18 Thread Reuben
s than operations for equality, and IPs that are at the beginning or end of the range. 'conditions' => array( 'startIpNum <=' => $address, 'endIpNum >=' => $address), 'limit' => 1, Regards Reuben Helms On Wednesday, 18 Dec

Re: Display Errors

2013-12-18 Thread Reuben
PHP places error messages for select fields. I'm at home, and don't have access to the code base to check, but that is where I would look first. Regards Reuben Helms On Wednesday, 18 December 2013 08:23:48 UTC+10, advantage+ wrote: > > I have attached an image for the first

Re: Multiple Model Validation

2013-12-16 Thread Reuben
>From the controller, you can access $this->validationErrors to view validation errors from multiple models. Though from your example, if you were saving an Order, wouldn't you want to look at $this->Order->validationErrors to see all the errors associated with that save? Reg

Re: Validation Question

2013-12-15 Thread Reuben
t($check); $key = key($check); $addressType = explode('_', $key,2); $addressType = $addressType[0]; if (empty($this->data[$this->alias][$addressType . '_street_name'])) { return Validation::notEmpty($check[$key]); } return true; } Regards Reuben Helms On Sunday, 15 Decemb

Re: CakePhp phar and console shells

2013-12-05 Thread Reuben
And yet, while PHP remains reasonably platform agnostic, it's helpful when frameworks like CakePHP also remaining platform agnostic. I don't have anything useful to contribute with regards to phar and shells. On Friday, 6 December 2013 03:10:21 UTC+10, MaxDao wrote: > > Hello, > > We are trying

Re: CakeAdvent: Hacking the CakePHP Dispatch System

2013-12-03 Thread Reuben
Thanks for the heads up, Jose. I'm always keen to read blogs of CakePHP core developers and contributors. Regards Reuben Helms On Wednesday, 4 December 2013 02:54:08 UTC+10, Jose Diaz-Gonzalez wrote: > > Hi all! > > I'm Jose Diaz-Gonzalez (@savant on twitter <https

Re: Production and Development Environment

2013-12-03 Thread Reuben Helms
actions. It's been a while since I've actually played with the CakePHP 2.X Auth stuff, but that's the general idea I was going for. Best of luck finding a solution. Regards Reuben Helms On Tue, Dec 3, 2013 at 8:39 AM, Advantage+ wrote: > I appolagize. > > > > But

Re: Production and Development Environment

2013-11-29 Thread Reuben Helms
You don't have to go through every controller. Just on the one controller, the AppController, for the default deny, and the code that will skip that deny if you have a config that suggests you're in a development environment. The only other Controller to touch will be the controller that looks af

Re: Production and Development Environment

2013-11-28 Thread Reuben Helms
gt; > > > > > > *Dave Maharaj* > > *Freelance Designer | Developer* > [image: Description: header_logo] > www.movepixels.com | d...@movepixels.com | 709.800.0852 > > > > *From:* cake-php@googlegroups.com [mailto:cake-php@googlegroups.com] *On > Behalf

Re: Production and Development Environment

2013-11-27 Thread Reuben
I'm assuming that's some sort of Ajax API that you're doing? You could make your Javascript aware that it's in a development environment, and pass the Authorization token, as per http://coderseye.com/2007/how-to-do-http-basic-auth-in-ajax.html. If you're using jQuery.ajax, you can pass the user

Re: Best Practise - beforeValidate()

2013-11-26 Thread Reuben
But that's a lot of messing around, and far removed your example. For me, the best practice is to keep it simple, and not to alter the data, unless specifically requested by the key user or project requirements. Regards Reuben Helms On Saturday, 23 November 2013 11:15:54 UTC+10, advant

Re: Upgrade problem (1.3 to 2.4) - missing Controller.php

2013-11-26 Thread Reuben
.php and APP/Config/bootstrap.php files, and compare with a fresh install of CakePHP 2.4, to make sure everything in the fresh install is at least present in the the upgraded files. Regards Reuben Helms On Tuesday, 29 October 2013 20:30:45 UTC+10, Azad Gh wrote: > > Hi all, > > I ha

Re: Problem with CakePHP, htaccess and subdomain

2013-11-26 Thread Reuben
Neither of the sites are reporting issues at the moment. What URL are you using to create the error? On Tuesday, 26 November 2013 23:53:33 UTC+10, Arthur Emanuel de O. Carosia wrote: > > I have the beta version of my website hosted at www.gamesantigos.net, > that was build in CakePHP. > > Then

Re: Strange error within a controller action

2013-11-26 Thread Reuben
nager So, perhaps the target URL can not be found, and the .htaccess mod_rewrite rules are forwarding the request to be handled by CakePHP. Regards Reuben Helms On Wednesday, 27 November 2013 05:14:37 UTC+10, Pierre wrote: > > Good evening > > I am using responsiveF

Re: Ordering of block content across view types

2013-11-25 Thread Reuben
Gah, just realised that I don't add my layout scripts to the scripts block, so I imagine if I did, the order would be whacky. On Tuesday, 26 November 2013 16:21:50 UTC+10, Reuben wrote: > > Hi all > > How does CakePHP know to put block content in the right order, for block &g

Ordering of block content across view types

2013-11-25 Thread Reuben
s an issue, because the view scripts are dependent on the layout scripts getting loaded first (a jQuery dependency). Somehow HtmlHelper->script() and css() manages to get it right, and I just can't see how it's doing it. Regards Reuben Helms -- Like Us on FaceBook https://www.facebook

Re: Best Practice Question - Components

2013-11-06 Thread Reuben Helms
the model will be split between an Entity and a Table. The Table will take care of the schema, and typical database/CRUD operations, while the Entity will concentrate more on the business logic side of things. Regards Reuben Helms On Thu, Nov 7, 2013 at 10:08 AM, Kristen M wrote: > Yeah, the

Re: Best Practice Question - Components

2013-11-05 Thread Reuben
If you have existing class that work, then you could include them as Vendor code, and have your controllers call their find and save functions. However, doing things the CakePHP way, you'll probably want to convert those classes to Models, rather than Components. Models are where your business

Re: Cake broken after upgrading server to php 5.3.27

2013-11-05 Thread Reuben
What version of CakePHP are you using? On Tuesday, 5 November 2013 07:54:24 UTC+10, T.T. Nichole wrote: > > After upgrading the server and the php version to 5.3.27 I can no longer > log into the admin account and the dropdown menus no longer work. I have > tried resetting the admin password and

Re: Cake 2: Very confusing docs/tutorials... Is there another foolproof source?

2013-10-30 Thread Reuben Helms
With regards to admin routing, it looks like you're interested in doing prefix routing. As listed here [ http://book.cakephp.org/2.0/en/development/routing.html#prefix-routing], you'll need to do the following: Set up admin as a routing prefix in app/Config/core.php Add the admin_ prefix to any

Re: Defining Plugin

2013-10-28 Thread Reuben Helms
What options did you end up using? On Tuesday, October 29, 2013, Ed Propsner wrote: > I was able to work everything out using $this->paginator options(). I > appreciate the help :) > > > On Mon, Oct 28, 2013 at 2:17 AM, Ed Propsner wrote: > > You're absolutely right, I was definitely confusing t

Saving CakeEmail output to .eml

2013-10-27 Thread Reuben
, where the user could be expected to open the file later and see the email, and attachments, etc. Regards Reuben Helms -- 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

Re: Defining Plugin

2013-10-27 Thread Reuben
doing that, there would have to be an assumption that the model and the controller are in the same plugin. There's also a url option in which you can specify the actual url to use, if using the model does not work. Regards Reuben Helms On Monday, 28 October 2013 05:49:51 UTC+10, CrotchFr

Re: Where to place this logic?

2013-10-25 Thread Reuben Helms
and components and helpers, that rely, in part, in external objects, but have those mocked so you can control input, and accurately place asserts on the output from your Libs. Regards Reuben Helms On Fri, Oct 25, 2013 at 8:50 PM, Anja Liebermann wrote: > -BEGIN PGP SIGNED MESSAGE- >

Re: File clean up after using CakeResponse::file()

2013-10-24 Thread Reuben
Just had a thought. A really short cache could also do the trick, as long as that cache content could be referenced by CakeResponse::file(). On Friday, 25 October 2013 16:34:39 UTC+10, Reuben wrote: > > Looking at the way CakeResponse::file() works, it does not appear it is > possible

Re: File clean up after using CakeResponse::file()

2013-10-24 Thread Reuben
ue of unlinking files that are in the middle of downloading. And if it does take more than 5 minutes to download, bad luck. Regards Reuben Helms On Friday, 25 October 2013 14:14:15 UTC+10, Reuben wrote: > > I have a function that extracts a file from an archive, and streams it to >

File clean up after using CakeResponse::file()

2013-10-24 Thread Reuben
t starts getting streamed to the user. The next spot might be in a Dispatch filter, but I've got no idea where to start, and if a dispatch filter has access to the controller. Any pointers, please? Regards Reuben Helms -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us

Re: Find and HABTM

2013-10-15 Thread Reuben
My first guess is because the necessary fields required by the contains statement to do the join are not included when specifying the contains clause for Disciplina and DisciplinasEvento. i.e. the query cant get DisciplinasEvento if Disciplina.id is not retrieved. The query can't get Modalidad

Re: mysql join query gives too much results, twice.

2013-10-15 Thread Reuben
at_con.categorie_id', 'cat_con.product_id' => $pid) ) ) ))); You can use the sql_dump, or the DebugKit plugin to view the actual SQL generated by CakePHP. Regards Reuben Helms On Tuesday, 15 October 2013 19:48:40 UTC+10, UltraMarkus wrote: > >

Re: Where to place this logic?

2013-10-15 Thread Reuben
p. I think that might be possible with CakePHP 2.x and the App::uses() clause, and would probably do rather well in CakePHP 3.0, when we can start using namespaces properly. This might not be the best way, but it's a way, and I'd also love to hear if anyone else has a recommendation or

Re: Issues have moved to Github

2013-10-15 Thread Reuben
Where might one submit an issue about installing via Composer for CakePHP 2.4.1? I couldn't see a repository responsible for the Vendor/bin/cake.bat file imported or generated when performing a CakePHP install via Composer. Regards Reuben Helms On Saturday, 12 October 2013 12:41:57 U

Re: Installation via composer

2013-10-14 Thread Reuben
I had better luck replacing the bash command with cmd /C, so that it would run the cake bake in a cmd shell, and then terminate when complete. On Monday, 14 October 2013 17:30:56 UTC+10, Reuben wrote: > > I thought I'd try out installing CakePHP via composer. > > After ha

Installation via composer

2013-10-14 Thread Reuben
ction of Vendor\bin\cake.bat, it's trying to invoke bash. bash might be valid if you're running Cygwin or in a Git shell, but shouldn't a .bat file stick to basic Windows command line commands, like cmd, rather than bash? Regards Reuben Helms -- Like Us on FaceBook https://www.f

Re: Can the same web app mix cakephp with non-cakephp code?

2013-10-12 Thread Reuben
I've integrated CakePHP with legacy code, with the end goal that all legacy code would eventually be converted to CakePHP. The trickiest part was ensuring that the legacy code could use the CakePHP sessions. To do this, I had to alter webroot/index.php with a define that would prevent the Dis

Re: Cake 2: Very confusing docs/tutorials... Is there another foolproof source?

2013-10-12 Thread Reuben
In the context of __d(), 'cake_dev' is the domain for the translation. Rather than looking in default.po for the translation, the function will look in cake_dev.po. Likewise, when the i18n shell script generates the .pot file, it will create cake_dev.pot, instead of default.pot. The thought oc

  1   2   >