45

413 errors occur when the request body is larger than the server is configured to allow. Here’s how you can fix it, depending on your web server: Apache: Set the LimitRequestBody directive in either your httpd.conf file or a local .htaccess file. (https://stackoverflow.com/a/3719358/1688568) Nginx: Set the client_max_body_size directive in nginx.conf (http:/...


25

That error isn't a Craft or PHP error, it's coming from older versions of xDebug. It can happen on more complicated pages (lots of fields, tabs, etc.), but you can get around it by adjusting the xdebug.max_nesting_level to something higher than the default 100 or to upgrade xDebug to 2.3+, which has changed to the default value to 256. Note that you don't ...


22

Following the answer in this issue https://stackoverflow.com/questions/15563217/apache2-fastcgi-comm-with-dynamic-server-aborted-first-read-idle-timeout/15565267#15565267 I was able to successfully run my script without this dreaded timeout and 500 error, like so: Go to File > Edit Template > Apache > httpd.conf Do a Find & Replace for ...


17

1. "Expected name or number" error The parser is expecting a method/property after the dot of productSale, but you are passing arguments. Removing the dot to make it valid: {% set products = craft.entries.section('product').productSale(':notempty:') %} . 2. Documentation There is no documentation on this yet, but it is listed in the release notes: ...


16

You can use the setFlash function in the userSession Service like this: In your Controller: craft()->userSession->setFlash('yourVariable', "Something happened yo!"); In your template (that the user gets redirected to): {% set message = craft.session.getFlash('yourVariable') %} After that just run an if-statement to see if the message is set or not....


14

I might be shooting in the sky, but make sure that in your in your .htaccess you have RewriteBase / after RewriteEngine On


12

You'll get this if (for any reason) your local install can't connect to our web service that holds all of our update and release information. If this happens, your local install will cache that there was a connection error and cache to not try again for 5 minutes, no matter how many times you refresh. So you can either wait the 5 minutes and try again, or ...


9

I'm not familiar with EE's show_error, but a plugin's error template logic is identical to the logic that Craft uses to determine what to display. From your plugin, if you: throw new HttpException($statusCode, $optionalMessage) Where $statusCode is 404 or 400, or any proper http status code, Craft will load the corresponding 404.html, 400.html, etc. from ...


7

Typically the Craft logs are stored here: /craft/storage/runtime/logs I don't know how much logging the installer does, but if it does any at all, that's where you'll find the log data. In the meantime, you can also try this script by Ben Croker which will check your server configuration to make sure it has everything it needs to proceed.


7

Craft will run out-of-the-box with 32M of memory, no problem. However, memory consumption will start to increase depending on several factors including: The complexity of your site, including the number of fields, sections (and types of sections), categories, tags, users, entries, plugins in use (and how efficient they are working), etc. More importantly, ...


6

The actual web root name doesn’t matter. Usually it’s “public_html” or something similar, and Craft’s “public” folder is only meant to represent that folder. There are no references to the public/public_html folder within Craft itself; it’s the other way around: The index.php file within public/public_html is the one referencing Craft, via its $craftPath ...


6

You are close, instead of checking entry|length, you can do {% if entry is defined %} {% if entry is defined and entry.sectionId == 1 %} So if I am understanding correctly, the full code will be: {% if entry is defined and entry.sectionId == 1 %} // Redirect to homepage {% else %} // Do some checking into whether there's a corresponding entry, ...


6

Well, the first method only tries to get an asset model. But if there's no asset added to the field it simply returns null. So calling a method like getUrl, or accessing a property like url or title can't work, as they do not exist for null. {% set image = entry.geschaeftsbereichHeadImage.first() %} {% if image %} <img src="{{ image.url(headBanner) }...


5

It turned out that the problem was from customizing the domain's document root in the userdata files and then the PHP-FPM configuration had not been rebuilt and the service not restarted. The following resolved the issue: /scripts/php_fpm_config --rebuild /scripts/restartsrv_apache_php_fpm It's interesting since there are a broad variety of issue that ...


4

The log file got me on my way after a tip from Brad Bell: 'CDbException' with message 'CDbCommand failed during the SQL statement: SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'craft_assetfiles' already exists' in ...craft/app/framework/db/CDbCommand.php:358 Removing the database and doing a fresh install solved the issue.


4

All of Craft's log files get stored in craft/storage/runtime/logs. If you're running in devMode, then any log message with a trace, info, warning or error severity error will get logged there in addition to lots of database profiling information. If devMode is off, only warning and error get logged. Installation is a special exception to this config ...


4

I can confirm this is a bug on Craft 2.2.2579 when CSRF protection is enabled. Will get a fix out for it shortly and update this answer when it's done. Update: Fixed in Craft 2.2.2582.


4

I cleared the cache to no avail. After combing through error logs, I found I had an error with my curl and ssl setup via homebrew. After re-installing those items and reinstalling php55 like so... brew install php55 --with-homebrew-curl --with-homebrew-libxslt --with-homebrew-openssl --without-snmp ...everything seemed to be fixed and was able to run my ...


4

We were experiencing this issue, as well as the randomly logging out issue. As I answered on that question, we fixed both these issues by switching session.auto_start to Off session.auto_start = 0


4

Sounds like an FTP upload or an unzipping operation didn't finish properly. Try downloading a fresh copy of Craft from http://buildwithcraft.com and replacing the old craft/app folder with the new one.


4

Had the same problem. I my case, it was the following code in my nginx config file: location ~* (?:\.(?:bak|config|sql|fla|ini|log|sh|inc|swp|dist)|~)$ { deny all; } After removing log| from the list, the problem was solved.


4

In case it helps someone, my issue was the permissions for the root index.php file...It was 666 (writeable by group) and when I switched that file permissions to 644, the installation was able to move forward.


4

After checking out the craft/app/etc folder, I noticed the cache folder was missing. It turns out that the problem was with my FTP client ignoring folders named "cache". So really a dumb mistake on my part. Thanks for your help @BradBell!


4

That seo code will need to be in a block of its own. Create a seo block in your _layout template and then wrap your seo code in your include template with block tags of the same name.


4

What I do is to handle the metadata in a macro that I call from _layout, which is passed the _context twig global variable In _layout.html: {% import '_macros/_metaData' as m_metaData %} <head> {{m_metaData.output(_context)}} ... Here is the content of _macros/_metaData.html. The output macro constructs a metaData object, based on what is in the ...


4

I just return the form model object back to the template. Yii has built in validation and error handling within the models themselves. In the example email is the instance of your form's model. The template: {% if email is not defined %} {% set email = craft.postmaster.email() %} {% endif %} {% for error in email.getAllErrors() %} <p>{{ ...


4

You're likely missing the PHP JSON extension, which is a requirement to run Craft.


4

Your guess is correct... as the docs say, you should never have devMode enabled in production environments specifically for reasons like this (as well as many others). If you find errors that are leaking sensitive server info with devMode disabled, then that is a bug and should be reported to support@buildwithcraft.com.


4

I too just had this problem - upon any action in the control panel flashed "An unknown error occurred". What I found in my craft web.log was: "ErrorException: ignore_user_abort() has been disabled for security reasons in" Apparently in my server setup via Runcloud there are various advanced boilerplate Disable_Functions. I removed "ignore_user_abort". ...


4

It looks like the Redactor I plugin was incompatible with Craft 2.6... Fortunately, Brandon fixed this last night! Update your version of Redactor I, and the problem should be fixed.


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