I run into a frustrating problem using POST. I wrote a simple form which was send to another page and I wanted to take that value. $_POST did not work. $this->Input->post() did not work. \\Input::post() neither. Some debugging hours later…
While I was logged in into the frontend and tried to access the Contao’s Backend it happend that my Browser told me it couldn’t load the page. A quick check with Firebug did show that Contao does some weird redirecting / sends 303 See Other all over the way. So I asked on the german IRC channel.
Let’s imagine you created a login (frontend module) in contao and you want to output that in your own module. There’s a method called getFrontendModule which accepts the ID of a frontend module:
See, that’s for example something I do dislike at Contao. The documentation for developers sucks. Even simple things like adding the request-token to your self-written forms is not documented or I am absolutely blind. I also have the feeling that they (people who wrote the documentation) assume that a developer will read Contao’s source code if he/she has any questions. That’s like assuming a cleaning-lady checks the mechanics of a vacuum cleaner to see how it works. Anyway:
If you want to use InnoDB instead of MyISAM in Contao 3, you can just add „engine“ => „InnoDB“ to the specific DCA. Sadly this „feature“ is not documentated as of writing this.
Today I stumbled over some weird issue with jQuery and webkit browsers when sending a POST request. While in Firefox I get the response (with a status code 200) in webkit browsers (chrome, midori, safari) a 204 (no content) status code is returned. Switching to GET solves this.
Always wondered how to generate forms in modules so that I could use contao’s form generator – Instead of doing that I had to write the forms myself. Now I know how to do it.
Due to the naming of methods in Contao’s Database Layer one might get the impression that you might use prepared statements in Contao. Sadly that is not true. The goal of prepared statements is that the Database‘ query compiler does not need to run over and over again for the same query. Due to the method names „prepare“ and „execute“ I assumed (as a bug report shows, other people did as well) that Contao would offer prepared statements.
Believe it or not, I’ve had a hard time finding how to apply keys over multiple columns in Contao’s DCA’s. It does work like that: