Questions tagged [config]

Craft configuration and settings.

Filter by
Sorted by
Tagged with
0 votes
1 answer
9 views

How to prevent Twig Syntax Error when a plugin is disabled?

I am using the Sprig plugin, and for some reason I'm disabling it in some environments. In config/general.php I have added: 'disabledPlugins' => ['sprig'] And in my twig template, I have a ...
Romain Poirier's user avatar
1 vote
1 answer
25 views

Multi-domain configuration

We have a multi-(sub)domain setup within a single Craft CMS and single .env file: insights.xximo.com and www.xximo.com. Sometimes when visiting insights.xximo.com we get errors like: Access to script ...
svondervoort's user avatar
1 vote
1 answer
47 views

changedFieldIndicator change on every commit

When we're making changes to the Craft config, changedFieldIndicator is often the culprit of many changes, and makes pull requests "larger" or more complicated than they need to be. Is this ...
Lee's user avatar
  • 173
0 votes
1 answer
41 views

Prevent concurrent user logins/sessions

Is there a way to prevent the same user having multiple concurrent active sessions? Specifically if a user has logged into Craft's CP in one browser, but logs in on other browser/device, can we ...
Ian Nebbiolo's user avatar
0 votes
1 answer
94 views

.env / config data not loading on repeated / simultaneous requests

I'm having this strange issue on php7.4 and php8.1 on windows11 (apache2.4) where my craft sites loose or fail to load the .env data on some requests and only when under load / handling requests in ...
Rick Kukiela's user avatar
1 vote
1 answer
80 views

Hosting and permission problems

It's my first time deploying CraftCMS and I ran into some issues which I don't seem to fix. I'm using Combell to host my website. I can only access my site when I go to "sitename".be/web/ . ...
Knz-dw's user avatar
  • 11
0 votes
1 answer
163 views

Postgres SSL PDO config for config/db.php

Struggling to configure this correctly and cleanly. When I upgrade to latest 3.x Craft on staging, Craft can no longer connect to the Postgres DB, which uses SSL. Have had success up until CraftCMS ...
John's user avatar
  • 63
2 votes
1 answer
170 views

Ensure @web alias is explicitly overridden warning on system check

Ensure @web alias is explicitly overridden ^^^I am not sure why this warning shows up in Craft's system report. I already have defined @web alias in config/general.php per instructions on craft's ...
hvs's user avatar
  • 283
1 vote
1 answer
112 views

email settings per environment not working

I'm trying to set this up changing config/app.php with 'dev' => [ 'components' => [ 'mailer' => function () { // Get the stored email settings ...
Steven Grant's user avatar
  • 1,855
2 votes
1 answer
147 views

Project config priority between project config files and database

I want to completely understand how Craft loads the current settings on a site. And there are two things I didn't find in the documentation: Question part A. Does the database take precedence or do ...
Álvaro Franz's user avatar
3 votes
1 answer
510 views

Multiple developers working on the same site - Project config issues

I am working on a site with other three developers. We are all working on different features for the same site. We are having conflicts with project config files, since we are merging our changes into ...
Álvaro Franz's user avatar
1 vote
2 answers
1k views

@webroot - how to find out path?

Getting "Error clearing cache Control panel resources: Unable to clear control panel resources because the location isn't known for console commands" and the recommendation to set @webroot ...
Emma Swann's user avatar
1 vote
1 answer
267 views

How do I renew Craft CMS license?

When I go to Updates in my home Dashboard, I see there are "5 updates available!" I click "Go to Updates" and a big orange ribbon pops up that reads: Your license has expired! ...
Rachel Bonnette's user avatar
1 vote
2 answers
44 views

Product Search - redactor description field not indexing

I am struggling to get my head around plurals and fuzzy search etc. I have seen this article, which seems to help answer this but am hoping someone can clarify based on my scenario Search forms ...
Malcolm Maclean's user avatar
1 vote
1 answer
234 views

Template URL/path alias

Is there any way to use an environment variable in the URL and template path settings for sections? We are prototyping a site with a temporary skin running alongside our front-end build but would ...
Cole Henley's user avatar
  • 1,741
0 votes
1 answer
91 views

Non-www connection refused issue

I have a strange issue on my installation. It works fine as www.domain.com but if I redirect to non-www in the .htaccess, it redirects but gives me 'Connection Refused'. the same happens if I go to ...
John Sourcer's user avatar
1 vote
0 answers
140 views

Redirect to frontend login form after receiving email verification mail from CMS?

I'm working on a site with public registration and a manual approval flow for new users. The following settings for user accounts are active: Verify email addresses, Allow public registration, Suspend ...
MoritzLost's user avatar
  • 8,892
3 votes
1 answer
534 views

Invalid Configuration Error in Craft CMS 3 using Nitro 2

I'm getting into Nitro 2 and so far loving it. I decided to create a scaffolding project to jump start other projects. Along the way, I ran into this error: Invalid Configuration – yii\base\...
cbad's user avatar
  • 115
0 votes
0 answers
17 views

Can control panel date display always be numeric?

I understand the display of entries' postDate, etc., in the control panel can be localized, but I'm wondering if it's possible to get rid of the "yesterday" and "today" designators,...
4midori's user avatar
  • 584
0 votes
0 answers
33 views

Updating user email does not update username when useEmailAsUsername is set

When the config setting useEmailAsUsername is set, I would expect updating a users' email address to also update the username field when saving the element. However, this does not occur unless you ...
William Isted's user avatar
3 votes
1 answer
906 views

Custom Aliases not working

I'm trying to setup aliases following the instructions in the docs, but I can't get them to work (for example they don't appear when setting paths for Assets). I copied and pasted the code exactly as ...
doctorgloom's user avatar
1 vote
2 answers
101 views

Exporting site configurations for import to new websites - separate databases

Is it possible to export the site configurations of one website in terms of the site structures, not the content, for importing into another site with a separate database, essentially creating a site ...
johnquest's user avatar
2 votes
1 answer
628 views

Use of App::env() compared to getenv() since Craft 3.4.18

I've noticed since Craft 3.4.18 there is a App::env() function from craft\helpers\App::env(). This was created from the discussion here it seems: https://github.com/craftcms/cms/pull/5893 It seems ...
James White's user avatar
  • 1,141
1 vote
1 answer
250 views

What are the yaml files in config/project? Should I commit them?

See the title. I'm currently committing the YAML files to our git repo so they deploy to our production server. Is that appropriate? Should I ignore the config/project folder?
Incraigulous's user avatar
1 vote
1 answer
229 views

Incorrect canonical URLs and redirect chains

I have installed SEOMatic. However, I am getting incorrect canonical URLs. Here is an example: https://jenoffvanhulle.com/en/ The URL has a trailing slash, the canonical URL not A second problem is ...
Jenoff's user avatar
  • 11
1 vote
1 answer
68 views

Updating plugin/module config via template/controller

I have a plugin/module that synchronises local records with a Google Sheet managed by the client. The URL for this doc is stored in a module config. I want the client to be able to update this via the ...
Cole Henley's user avatar
  • 1,741
1 vote
1 answer
171 views

German special characters like umlauts (ä, ö, ü) are not converted correctly with convertFilenamesToAscii

Filenames with German special characters are not converted correctly with convertFilenamesToAscii, e.g. ä, ö, ü are converted in a, o, u in contrast to ae, oe, ue in slugs with limitAutoSlugsToAscii.
Sanbo's user avatar
  • 129
1 vote
1 answer
49 views

Loading assets cross-domain with SSL or non-SSL option

Here's a unique situation. I have three websites. All assets are stored at the domain of the first site: domain.com/files/* The first two sites run completely over SSL. No problem. The third site ...
4midori's user avatar
  • 584
1 vote
1 answer
231 views

How can I set an alias dynamically based on request?

I have a multi-domain setup where I run multiple one-pager sites from different domains. For development purposes, I have configured it to work like this: dev has: http://localhost/www.domain1.com ...
jishi's user avatar
  • 263
2 votes
2 answers
742 views

How to use SSL for local development with Nitro?

I've created a new Craft CMS project and installed Nitro to run everything in a VM. Now I'm wondering if it's possible to use SSL for the local domain? I didn't found anything in the documentation.
Slevin's user avatar
  • 123
2 votes
2 answers
483 views

Cleanup Craft Logs

Whenever I have PHP problems I'm looking into the Craft CMS logs. However, at first I noticed there's a ton of stuff getting logged which is useless for me. Under this amount of logs, I can't find ...
judos's user avatar
  • 149
1 vote
1 answer
104 views

Set duration of 'newpassword' link validity via config/general?

Is it possible to modify how long the 'newpassword' links are valid for via a setting in config/general.php? (I've found defaultTokenDuration but it sounds like this might only be for the live preview ...
James Greig's user avatar
1 vote
1 answer
322 views

How can I configure multi-site base URLs where the subdomains are static but the domain name is dynamic?

For example, let's say I have two sites: abc.example.com and xyz.example.com but I want to also host test versions of those sites at example-test.com. It'd be nice if I could set the baseURLs to http:/...
Joshua Coady's user avatar
0 votes
0 answers
310 views

Multisite with unique domains not working with Forge config

I have a live install with a primary domain of https://marketing.vessul.co/ which works great. When I've added another site to this install and it's location is another folder such as /extra-site it ...
nathananderson's user avatar
1 vote
1 answer
102 views

Change maxRevisions setting per section

We'd like to keep the revisions feature active on our site, but a few of our content sections are synced with a third-party API and we don't need to keep a revision at all. Is there a way to set ...
Dalton Rooney's user avatar
2 votes
1 answer
585 views

Error using environment variable for email setting

I'm trying to create an environment variable for email settings, but it doesn't work. Here is my email setting at config/general.php 'dev' => [ '@host' => 'host', '@port' => '587', ...
Lee's user avatar
  • 139
2 votes
1 answer
142 views

Using element queries in general.php config file

Can i use element queries in general.php file? I wanted to set loginPath based on entry query, like this: 'loginPath' => Craft::$app->entries->section('login')->one()->url ?? false, ...
piotrpog's user avatar
  • 1,266
4 votes
1 answer
1k views

How do you set up live preview for headless Craft CMS installs connected to Gatsby?

How do you set up live preview for headless Craft CMS installs connected to Gatsby?
Anonymous's user avatar
1 vote
0 answers
174 views

Craft 3 multisite: site specific config

I'm trying to do something like this in general.php config for a multi-site setup: // ... 'production' => array( 'myVariable' => array( 'site1Handle' => '111', '...
Wei's user avatar
  • 439
0 votes
0 answers
30 views

Copy Live to a Test site on same domain?

I have copied my Craft 2.6 live site directory, and created a test directory on our webserver in an effort to create a test site. Also duplicated the db and changed the configure files to point to the ...
Juvat's user avatar
  • 1
0 votes
0 answers
2k views

Craft can’t connect to the database with the credentials in craft/config/db.php

I'm trying to upgrade from 2.7.10 to Craft 3. I follow the instructions/ docs to the letter, go to https://###.com/admin and am greeted with the above can't connect to database message. So far, I ...
deebie77's user avatar
1 vote
0 answers
319 views

How do I get Craft custom settings from inside a module?

Additional settings added to config/general.php are placed in _customSettings private object. This means they cannot be retrieved using Craft::$app->config->general->someCustomSetting. How ...
Ded Nolyxeux's user avatar
2 votes
2 answers
597 views

Deploying and syncing project.yaml

I have a Craft CMS site set up that deploys through TeamCity and am trying to set up a build step to auto run "./craft project-config/sync". I keep getting an error saying the file can't be found, I'...
WillBV's user avatar
  • 81
1 vote
1 answer
421 views

New Install, Permission Errors With /storage

I've configured Apache vHosts on a local box and installed a Craft 3 website onto it. This new instance will serve as my "staging" environment for an upcoming website. I've installed with composer ...
Palmtree Studios's user avatar
2 votes
2 answers
481 views

Laravel Forge not honoring Craft 3 maxUploadFileSize config setting

I have a Craft 3 site deployed to a Digital Ocean droplet via Laravel Forge. I have the maxUploadFileSize set to 256B (268435456 in bytes) in my config/general.php like so: <?php return [ // ...
Jonathan Simcoe's user avatar
1 vote
1 answer
471 views

Best practice for volume aliases in config files

I'm wondering about using a config/volumes.php file to specify volume aliases (instead of putting them in config/general.php). There's a comment in a previous codebase mentioning https://docs.craftcms....
plaintxt's user avatar
  • 468
1 vote
2 answers
405 views

Turning off a site in multi-site/multi-environment config

Given a multi site setup (domain1.com, domain2.com) that also uses multiple environments (dev, staging, production) - how would one configure one of the sites to be turned off in the production ...
foamcow's user avatar
  • 2,009
1 vote
1 answer
23 views

What files do you have to be aware of when migrating (i.e config files)?

What files do you have to be aware of when migrating a craft application from one domain to another? Are the specific files one should be aware of?
ememil's user avatar
  • 11
6 votes
2 answers
1k views

How do I prevent secrets beeing logged in the PHP error log?

Background: I'm running Craft Pro 3.1.19 on PHP 7.2.15 Craft CMS, by default, uses vlucas/phpdotenv to get the configuration (containing secrets / credentials and lots of other stuff) from .env ...
Knut Erik's user avatar
2 votes
1 answer
256 views

Use alias for site url based on root url defined as env var?

I was wondering if the following setup is a good practice. In my .env file I defined a single rootUrl var which contains the site root url like this: ROOT_URL="https://www.mydomain.test" In the ...
goemaeret's user avatar

1
2 3 4 5 6