Skip to main content

Questions tagged [config]

Craft configuration and settings.

Filter by
Sorted by
Tagged with
0 votes
0 answers
8 views

x-craft-preview pages being blocked due to access forbidden (403)

I'm working on a website using CraftCMS and got a warning from GSC saying pages were "Blocked due to access forbidden (403)" That never happened before, so I went to check and noticed that ...
Rafael Soares's user avatar
1 vote
1 answer
24 views

Config for template path switch

I seem to remember in a multisite Craft 3 setup I could specify the root template path for a site. Is this still possible? I have scoured the Craft 5 docs and can't see it mentioned in the general ...
joomkit's user avatar
  • 2,048
0 votes
0 answers
87 views

Can't convince Project Config to make new fields on production

I am trying to troubleshoot a problem with Project Config updates not fully working when applied to my production site. I am running a simple Git workflow: local Dev site -> git -> live ...
Jack's user avatar
  • 31
1 vote
1 answer
58 views

Craft site shows "service unavailable" - Admin site shows "craft not installed yet"

I'm in a bit of jam here. Our Craft v3 site went down overnight, seeminly for no reason, and is just showing "Service Unavailable - Our site is temporarily unavailable. Please try again later.&...
RobinH's user avatar
  • 43
1 vote
1 answer
50 views

Running Craft on a subpath

We are trying to run Craft CMS not under example.com but under example.com/subpath. So we want the following paths: Frontend: example.com/subpath controlPanel: example.com/subpath/admin In the .env ...
Leonardo's user avatar
  • 471
0 votes
0 answers
94 views

CRAFT_WEB_ROOT incorrect when trying to "Move Craft’s Files Below the Webroot"

I'm having trouble deploying a project: My web hoster automatically generates vhosts for each domain, with their respective webroot being /var/www/myuser/mydomain.com/; so I followed the Moving Craft’...
kindoflike's user avatar
1 vote
1 answer
110 views

I have an existing project called Craft cms v3.3, what should I do if I want to run it at local?(Mac OS)

I currently have a project that is definitely craft cms v3. I want to run it but this is the first time I keep stressing over it. Please help me
Phan Dương Ngọc Đô's user avatar
1 vote
1 answer
165 views

Help with configuring the @webroot alias

I have a hosting account running Craft 4.4.17 with a structure like this: home/ accname/ craft's usual files and folder arrangement domainname.tld <-- web root index....
Jonathan Schofield's user avatar
2 votes
2 answers
158 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 P.'s user avatar
  • 1,917
1 vote
1 answer
248 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
253 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
1 vote
1 answer
194 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
316 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
258 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
1 vote
1 answer
367 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
  • 73
2 votes
1 answer
295 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
  • 305
1 vote
1 answer
211 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
384 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
5 votes
1 answer
916 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
2k 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
500 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
64 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
344 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
168 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
256 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
  • 11.7k
3 votes
1 answer
691 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
  • 135
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
  • 666
0 votes
0 answers
52 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
1k 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
186 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
933 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,181
1 vote
1 answer
416 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
328 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
73 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
281 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
61 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
  • 666
1 vote
1 answer
329 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
  • 273
2 votes
2 answers
1k 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
673 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
191 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
488 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:/...
Josh Coady's user avatar
0 votes
0 answers
403 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
134 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
810 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
168 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, ...
Piotr Pogorzelski's user avatar
5 votes
1 answer
2k 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
  • 105
1 vote
0 answers
213 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
  • 459
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
398 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

1
2 3 4 5 6