Hot answers tagged

13

For future reference, I had the same error and resolved it with Craft Support. In my case the project.yaml file got out of sync with what was in the database. Running craft project-config/rebuild from the project's root resolved the issue and allowed us to re-enable the plugins


12

If you re-save the section(s) that your entries are in, it should re-trigger a save of all of the entries. Hope that helps!


7

When the folks at Craft cut a release they can tag an update in one of several ways: One-click Update Manual Update They can also tag their updates with a level of importance: Normal Update Critical Update This helps Craft manage several scenarios that might occur that they need to account for during a release. When you see the "Manual Download" button ...


7

You can use Yii's migrate console command. Triggered in Craft 3 via craft migrate --type=app.


6

You'll need to remove every required packages besides the plugins you installed and craftcms/cms as well as vlucas/phpdotenv, clear your vendor folder and run composer update again. For whatever reasons sometimes all required packages by Craft end up in your custom composer.json which causes these errors I suggest you to take a look at all your plugins and ...


5

Have you tried running ./craft setup to double check if your setup is correct? If ./craft setup completes successfully ./craft should find the existing installation and complete any required setup. In my experience, this is usually related to a non-default /config/db.php or problematic .env file. Note: Always do a backup before trying anything related ...


4

Security is not off or on, it's layers of an onion. Anything you do has to factor into the bigger picture. My layers include: What user does the web server run as? What user is your content? Your web server should never be the same as the user who owns the files, typically www-data, www, apache, etc. Also, don't run apache as the user nobody. Are you ...


4

My dilemma is that for the DB updates to run for Craft, I have to hit visit the control panel and initiate them. Currently true, but only if a new database migration has been introduced during the update. Otherwise, it should be seemless. I need a programmatic solution so that I can ping a URL after the deployment is finished, and initiate the DB ...


3

Replace the /app folder, per the Manual Update instructions. It sounds like you may have already done this, but rolled it back. Once the new /app folder is in place, you must visit the admin section. This will run any necessary migrations. That's it!


3

Most likely you've got an Assets field inside of a Matrix field somewhere on your site and you're referencing project-images/{slug} in that field's upload location setting when it should be project-images/{owner.slug}. At some point, those settings were more loosely enforce, but now the error you're getting will be shown if it is incorrect. See here for ...


3

This has been fixed in Craft 2.6.2804.


3

You can do manual installs easily, all you really need it's the app folder inside the craft folder. but don't just replace it. I would rename the new app folder to something like "app-new" move it next to the other app folder inside craft folder. once it is all done copying. I would rename the "app" folder into "app-old" and rename the "app-new" into "app" ...


3

I’ve written a plugin that allows to announce scheduled maintenance in the CP and on the front-end by making use of the template variables it provides. https://github.com/carlcs/craft-maintenance Here’s some example code for how you can announce the maintenance {# Announce maintenance 1 hour in advance #} {% set announcement = craft.maintenance....


3

I think you're asking the IT equivalent of "If I go outside when it's storming, how can I not be hit by lightning?" There's always going to be that chance. When you run a public server, that's pretty similar. I'm not a high availability expert but as someone's who ran servers on behalf for clients, what you're really asking is 2 questions: How much ...


3

You're getting that error message because there is an existing craft/config/license.key file in place for your local installation and there is no record of that install on the Craft/web service end. Likely you've just copied an existing license.key file from another site into this new installation. So the web service on the Craft end thinks that since it's ...


3

Try switching MAMP out of Fast CGI mode. Go to the PHP Tab and select "Identical PHP Version for all hosts (Module mode)". Restart the servers and then. Then run the update. You can normally switch back to Fast CGI mode at this point and it will continue to work OK. But if you do run into this, or a file upload problem, it's worth changing to Module mode ...


3

error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version Your local OpenSSL setup is trying to connect with an older, insecure TLS 1.0 protocol, which Github (and a lot of other sites) no longer support. If you update it to use TLS 1.2, the error will go away. If you're on something like MAMP/WAMP, etc. then updating to the latest ...


3

I had a similar issue - update your composer.json file as per this question: Composer was unable to install the updates Alot of additional things may have got added to your composer.json file.


3

Also wanted to chime in here, that you should try running ./craft project-config/rebuild even if you're not using project.yaml. Internally, Craft uses the project config functionality even if you're not using the yaml file. Just solved a case of this issue where I'm not using the yaml file, nuked the vendor folder and the deleted the composer.lock file to ...


3

First, you'll want to check if what is being saved is a draft or revision, and if so, ignore it for your purposes. You can check via: use craft\helpers\ElementHelper; if (!ElementHelper::isDraftOrRevision($element)) { } Next if you want to avoid doing anything during "bulk saving events", on Craft 3.1.22 or later there is: if (!$element->resaving) { } ...


2

Step 01. Open your php.ini file. File path for php 5.6: /etc/php/5.6/apache2/php.ini File path for php 7.1: /etc/php/7.1/apache2/php.ini Step 02: Then increase max_exection_time from 30 to 300 or other as you like. Step 03: Restart your server sudo service apache2 restart Step 04: Go to your web's root directory then run this command composer update ...


2

In whatever Section you're getting that error in, you've got an Assets field inside of Matrix (or possibly SuperTable) and that Assets field has “Restrict uploads to a single folder” set and you've got a dynamic subfolder path setup for it. In that dynamic path, you're using {slug} when you should be using {owner.slug}. From the docs: Note that if you ...


2

How big is your database? It could be that Craft is failing to backup your database as part of the update process because it is running out of memory. Try setting the backupDbOnUpdate config setting to false and running the update again.


2

It looks like the database schema (at Craft version 2.6.2773) is ahead of the craft/app files on your file system (at Craft version 2.5.2763). Since (I assume) you're not seeing any update info being logged in production around 2016-03-09 22:07:49 (from the dateUpdated column in the craft_info table), my guess is that someone updated the site/database ...


2

Doesn't this present a security concern Not in-and-of itself, but if a malicious user finds an exploit through another means, it does make it easier for them to drop their payload on the file system. You can, of course, not make the craft/app folder writeable by Apache/PHP and just do manual updates. Or better yet, do the auto-updates on development or ...


2

No. Keep craft/app in your repo. Disclaimer: This is my own personal opinion. The topic comes up with some frequency on Craft Slack, and you will find advocates of both approaches. I fully expect to see an opposing position posted by someone else. Benefits to keeping app in your repo... You can properly vet an update, and make sure it does not create ...


2

Adding my comment as an answer because it fixed my issue: I traced the issue to a deprecation warning involving $HTTP_RAW_POST_DATA being populated. I added the line always_populate_raw_post_data = -1 to my fpm_app.conf which solved the issue.


2

It's typically bad practice to allow auto-updates -- at least in a production environment. That being said, to update Craft, you're required to download the new files (click "Download" on the update page and it gives you a zip file), and then replace them in your codebase. So right now, no you wouldn't be able to do this with a Cron Job. Craft 3 may be a ...


2

Of course you can, but it's going to be a little bit tricky since you have to be logged in or you have to find a way how to login with an automatic request. Like others said, it's a dangerous things and I would not suggest to auto update since something can eventually break and you'll not notice it before your customers. What you can do is Create a ...


2

As far as I know, there are no plans for an automatic update from Craft 2 to Craft 3. I'd suggest following the instructions from the docs to perform the update manually: https://docs.craftcms.com/v3/upgrade.html


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