Hot answers tagged

4

This sounds like a mod_security issue. You'll need to reach out to whoever manages your server and ask them to relax the security around saving data to all URLs under your /admin URL area. What is happening behind the scenes is that the security on your server thinks that you may be trying to query the database and do something malicious. i.e. SELECT * ...


4

My guess is you're running into one of two issues. You're bumping into your php.ini file's max_intput_vars and/or post_max_size limitations. Your server has something like Suhosin or mod_security installed and the content you're trying to save in the Rich Text field is triggering one of their security rules.


3

Craft checks if a form has changed using javascript in the cp.js file, see line 196. You could replicate this quite easily yourself though, here is a stripped down example: var initialFormValues = $('form[data-confirm-unload]').serialize(); function checkFormChanged() { if ($('form[data-confirm-unload]').serialize() != initialFormValues) { ...


3

Yes! Assuming you're using some sort of business logic plugin (if you don't have one, get one), then simply put this code in your main *Plugin.php file... public function init() { // Trigger template hook craft()->templates->hook('cp.entries.edit', function(&$context) { // Check to ensure that you're in the right section ...


3

You can, and it's easy! The "Save" button contains a dropdown arrow, with alternative options for saving: You'll notice that "Save and continue editing" is the top option. You may also notice that there's a keyboard shortcut for it... cmd + s on Mac, ctrl + s on PC.


3

Try using setContentFromPost, as mentioned in this answer from Brandon. $content = array( 'fieldHandle' => 'value', ); $globalSet->setContentFromPost($content); craft()->globals->saveContent($globalSet);


2

It doesn't look like MySQL is the issue from the database profiling info you posted. If you enable devMode, reproduce the issue, then look at your craft/storage/runtime/logs/craft.log folder and find the last request, you can see the code profiling/tracing information. See if you can find out where the 200 second delay is coming from that information.


2

Sounds like something may be corrupt in your /app folder... I'd recommend performing a manual update to try to fix the problem. If you are still experiencing this issue after performing the manual update, I'd recommend contacting Pixel & Tonic directly, to report this as a bug. You can email them at support@buildwithcraft.com, or use the "Send a ...


1

Looks like this was a ModSecurity tripping up the contents of the particular Redactor field in the POST request. The nuclear option for a fix is to disable ModSecurity. The more nuanced fix is to find the particular rule that is tripping up the request and either disable it or to modify it so it allows that content through.


1

Here are two approaches you could take: Seed Plugins Sprout Import - Sprout Import has features for both Seeding and Weeding seeded data. Sprout Import uses Faker to generate fake data and makes Faker available to you in your templates too. If you need to customize your fake data, the docs give an example of how you can generate fake data as a template, ...


1

Or you could just use an existing seeding plugin like A&M Seed. :) Even if it does do exactly what you're looking for, you can use it as a starting point for your plugin.


1

I cleared all caches and updated file index, and now everything runs smooth. No idea why, but it fixed the problem.


1

Under your single's section settings, you had an invalid URI format for the cy_gb (Welsh) locale: ein heiddo. URI's can't have spaces in them. It'd be nice if Craft could warn you that the URI format is invalid (no spaces, all URL safe characters, etc), but it's difficult because Twig code is allowed in those fields and all sorts of characters that aren't ...


1

To debug where the delay is, you can enable devMode, which will write out a bunch of code and database profiling information to your log files in craft/storage/runtime/logs. After you do that, save an entry then find that request in the log files. You can look at the timestamps on that request to see what part of the code the 30 second delay is occurring ...


Only top voted, non community-wiki answers of a minimum length are eligible