What's the deal with Deno? We talk with a major contributor to find out. Listen now.
5

It looks like getenv returns a string (or false if the variable is not set, but it is in this case). So you need to cast the string to a boolean value to make it work. However, (bool)'false' gives true, not false. There are two possible solutions: Set the variable to 0 instead of false in your .env file: DEV_MODE=0 AUTO_UPDATE=0 And then in your config: '...


5

Yes, possible. You just need to override the URL routing within the subdirectory, so requests to /sub/* get routed to /sub/index.php rather than /index.php. For example, if you’re using Apache, just place Laravel’s .htaccess file within your subdirectory.


3

Your /craft/config/social.php file should probably look like this: <?php return [ 'lockDomains' => [ 'awebaddress.net', ], ]; If you wanted to add more config settings, that would look like this: <?php return [ 'lockDomains' => [ 'awebaddress.net', ], 'allowEmailMatch' => false, ];


3

The problem is the ... in your contactform.php file. The docs use it because they assume you might have some other valid config settings you want to include in that config file, but it's not real code, which is why PHP is choking on it. Remove the ... and you should be set.


3

If you're used to Local you can also use that for Craft. Here's 2 articles to get you started: https://medium.com/@madebyraygun/a-quick-and-easy-local-environment-for-craft-3-4fd7c7ff5815 and https://www.tyssendesign.com.au/articles/craft/using-local-by-flywheel-with-other-cms/ I'm also hearing good things about https://ddev.readthedocs.io/en/stable/ ...


3

This can be done with a plugin. The plugin would create an 'activity' table that saves the current user's ID and a timestamp of their last known activity. You can insert the first row by listening to the onLogin event and remove their row by listening to the onLogout. All subsequent requests, you'd compare the last known activity timestamp to the ...


3

Found the problem. I had to remove putenv from the disabled functions in php.ini


3

Both the craft/ folder name in Craft 2, and the craft executable in Craft 3, can be renamed. Since the craft executable is user-facing (when SSH’d in), I’d recommend leaving that alone and rename your craft/ folder to something else, maybe craft2/. Then in public_html/index.php, update your $craftPath variable to point to the new location: $craftPath = '../...


3

Marion's answer is a workaround for Craft 2, but this has been officially addressed in the upcoming Craft 3: https://github.com/craftcms/cms/issues/840


3

The testToEmailAddress config setting which Configures Craft to send all system emails to a single email address (or multiple email addresses), for testing purposes. sounds like the one you are looking for.


3

As it turns out, I had made a configuration change that broke Craft's default behavior: 'defaultTemplateExtensions' => array('twig', 'xml') All of Craft's internal templates use .html, and HTML templates are included in the default value of that config item. By overriding it, I had rendered Craft unable to find its stock error template. Moral of the ...


2

In this situation you don't want to use a config file and instead you want to use plugin settings. The settings have a UI and save to the db, which does exactly what you want. The config files are meant to only be updated manually updating them. http://buildwithcraft.com/docs/plugins/plugin-settings


2

You probably just need to set upload_tmp_dir in your php.ini file to be a path under your openbase_dir paths. Or just remove the openbase_dir restrictions.


2

The isSystemLive config setting isn't multi-site aware. It sets the entire Craft installation on or off, rather than per site, so you'll need to find a different method to disable domain2.com on the production server. Untested, but you could try to set the baseUrl for domain2.com to an empty string on production and see if that works.


2

I wrote one of the articles about using Local and Craft that @erwinheiser mentioned above. I had enough trouble with Local over the years that I've since switched to Lando, which is an easy to use, cross-platform local development tool built on top of Docker. (No Docker experience necessary.) I use the built-in LAMP profile with Craft on a daily basis with ...


2

The advantage of Docker/Vangrant, etc. is they help create a server similar to production so you run into less issues when deploying. However, those setups are often overkill and complex especially if you don't collaborate on a team. The good news is Craft is simply a LAMP application, like WP, so any stack that includes a web server like Apache or Nginx ...


2

For windows, have you checked out Laragon? For Mac and Linux there is valet that is probably simpler than vagrant. Valet for mac Valet for linux Hope this helps.


1

I think you're getting a few conventions mixed up. Using an @ is typically reserved for aliases https://docs.craftcms.com/v3/config/environments.html#using-aliases-in-control-panel-settings What you're probably looking for is environment variables in your .env file. You could set: EMAIL_HOST=myhost EMAIL_PORT=myport EMAIL_USERNAME=myusername ...


1

Apparently, the answers are the following: Redactor doesn't know how to output slugs/URIs instead of full URLs Possibly a solution comes up with craft in the future My API setup is suboptimal: In fact, I did set the baseUrl including the language: https://frontend.com/de. The recommendation is to not do that at the moment but keep one "Site" for all ...


1

Shameless plug: We've written a plugin that automatically updates your email settings depending on your environment. It's not free, but it is cheap :-) Please check out the page on our website for more information.


1

If you are running Apache, you could set your ENVIRONMENT variable in your <VirtualHost> directive using SetEnv ENVIRONMENT "domain2" then have a section: 'domain2' => [ 'isSystemLive' => false ], In your config/general.php.


1

In my case I was missing the .env file in my Atomic SFTP deploy. 🤦🏼‍♂️ So the DB_DRIVER setting was not there...


1

This error indicates that you don't have a matrix block, called header, setup in the CMS, but your template is expecting one. The solution is to create a new matrix field; settings > fields > new field. The field type should be “matrix” and it's handle needs to be “header”.


1

No need for a plugin, just don't check this option


1

Not currently, but feel free to make a feature request! https://github.com/craftcms/cms/issues


1

A further requirement came up to change the Italian output (symbol moved to after the price rather than before) so I opted for a simple Twig extension: /** * Wrapper for Craft's NumberFormatter->formatCurrency * Changes formats for French and Italian display * * @param $value * @param string $currency * * @return string */ public function ...


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