For a project of a client of ours, we had to create a custom web-application. After some online investigation Googling, CakePHP came out as the best-value-for-money PHP framework, and it comes with a super-duper handbook.
After implementing the outlines of the application, we had a first evaluation round which attended us at a small bug (?) in the system…
The “created” and “modified” (or “updated” as alternative) columns in the database scheme should, according to the CakePHP book, be updated automagically when using the built-in model->save() method.
After a few test-rounds we noticed that these values were initialised when first adding the data to the database, but were not updated afterwards when editing the model data.
The traceback lead me to the /cakeframework/cake/libs/model/model.php line 1204:
1204
| if ($this->hasField($updateCol) && !in_array($updateCol, $fields)) { |
This if checks if a model has access to a database column “created”, “modified” or “updated” with the hasField() model-method and also does a simple in_array() check and here’s the caveat: The second check requires the datetime-field NOT to be in a preset array with the following values “created”, “modified” or “updated”.
Rather tricky to result in both requirements returning “true” and update the datetimefields if available ^^.
So to fix it and have your modified / updated datetime-fields kept up-to-date change the line to the following:
1204
| if ($this->hasField($updateCol) && in_array($updateCol, $fields)) { |
Hoping to be of any assistance!
I am currently deeply involved in translating our current D6 website. It exists in English, we already foresaw that we would translate it, so i18n was activated.
First of all, I made sure that all my content and menu items were correctly set to English. Next step was to add the new languages, so I added Dutch and French. I configured the language negotiation so that we only use path prefix.
Activated the language switcher block and lo and behold…. SOME of my menu items staid visible in NL while others disappeared as they should. So, I went over all my settings again, checked all my content, but everything was set and configured as it should have been.
Slowly becoming desperate, I finally simply deactivated the menu items giving me this problem and reactivated them.
This, ladies and gentlemen, did the trick…
If anyone out there has a good explanation for this, please enlighten us.
ps: caching was off since I was working on my local dev site.
Drupal version: 6.15
i18n version: 6.x.1.2
Good news everyone !!
In our eternal quest to constantly find ways to improve the Exquisite by HaLe package, we have teamed up with 4scriptum.
Together with the nice people of 4scriptum, we will be able in the very near future to offer special reductions on copy writing and translations for Exquisite customers.
You will find much more info and details on this extra service on the Exquisite by HaLe site very soon…
And that’s not all…
We will be adding 2 more options in the category A option list.
- Performance and availability monitoring
- Online offsite backup
When becoming the owner of a wonderful Exquisite by HaLe website, you expect your site to be up and running 24/7 and off course to be performant. You don’t have to take our word for it, no… just choose the monitoring option and see for yourself.
Your data is precious… we know… so don’t risk losing it! The online offsite backup option offers you the possibility to have your data backed up securely and encrypted on a remote system.It simply is amazing.
We are able to offer you these two new options thanks to Super-Visions.
Check our site regularly…
Make sure to check out the Exquisite by HaLe site regularly for updates and new services. We will be adding more all the time!