Questions tagged [config]

Craft configuration and settings.

Filter by
Sorted by
Tagged with
1
vote
1answer
20 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! ...
1
vote
2answers
24 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 ...
1
vote
1answer
39 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 ...
0
votes
1answer
13 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 ...
1
vote
0answers
36 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 ...
6
votes
2answers
867 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 ...
4
votes
1answer
802 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?
1
vote
1answer
85 views

Allowing CRAFT_TEMPLATE_PATH in index.php from .env variable

It appears on Craft 3.1.8 that I can't set the CRAFT_TEMPLATE_PATH from .env without throwing a PHP notice error. This appears to be because the .env is loaded after the defines and I want to access ...
2
votes
2answers
535 views

Auto-login on account activation

Anybody got any suggestions on debugging autoLoginAfterAccountActivation and activateAccountSuccessPath not working? These are set in general.php of my config but when a user activates their account ...
0
votes
0answers
34 views

baseCpUrl doesn't seem to work as I'd expect

We have a couple of different repos doing various things all on the same URL. All of these have a web folder equivalent and want to be above the root. With that in mind, I've set up the following ...
4
votes
4answers
924 views

Is it possible to stop Craft from logging so much?

I've got a Craft CMS installation that is set to production mode. I notice that my logs get flooded with a bunch of entries which don't seem very useful. For example, in a matter of several days, I'...
1
vote
3answers
246 views

Links breaking with double domain

When calling my links, they're appearing and trying to link like so: testurl.com/university/testurl.com/university/arizona-state/ Really it should just be testurl.com/university/arizona-state/ ...
2
votes
1answer
137 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\...
1
vote
2answers
314 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.
4
votes
1answer
7k views

How do I properly set assets paths?

I'm having a problem getting my asset URLs to print properly in templates. The site is using a multi-environment configuration (dev/stage/live) with localized content (en/es/da) and shared assets. ...
0
votes
0answers
15 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,...
0
votes
0answers
67 views

Config baseUrl / assetBasePath

I've been away from using Craft (and web development in general) for a while now. I'm having trouble getting the assets paths working for a site in my config, I gather things have changed since I last ...
0
votes
0answers
11 views

Different unix users for Craft config and Craft process

I want to configure Craft to run as user craftcms and have configuration owner craftowner. The purpose is to make configuration read-only to craftcms, so that there can be no changes to the ...
1
vote
2answers
26 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 ...
0
votes
0answers
18 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 ...
2
votes
1answer
199 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 ...
2
votes
2answers
199 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 ...
2
votes
1answer
70 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 ...
1
vote
1answer
79 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?
1
vote
1answer
99 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 ...
1
vote
1answer
51 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 ...
1
vote
1answer
61 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.
1
vote
1answer
31 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 ...
1
vote
1answer
84 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 ...
1
vote
1answer
38 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 ...
1
vote
1answer
70 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:/...
6
votes
2answers
3k views

HTML Purifier Config File

I noticed the following new feature in Craft CMS 2.6.2973: Added the “HTML Purifier Config” setting to Rich Text fields. I can't see any mention or any example of config files in the Craft CMS docs ...
0
votes
0answers
190 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 ...
1
vote
1answer
33 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 ...
2
votes
1answer
239 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', ...
2
votes
1answer
86 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, ...
2
votes
1answer
716 views

Problem with Site Running Both HTTP & HTTPs

So we're trying to set-up a site to run both HTTP & HTTPs version in parallel for SEO auditing before making the full switch to HTTPs. We followed Ben's answer on this SE question to make it work: ...
1
vote
1answer
1k views

Craft 3 Admin not loading cpresources files over HTTPS

I have a Craft 3 install on my client's Windows machine running Apache, PHP and MySQL. We purchased an SSL certificate but the main Admin login page (on SSL) keeps loading cpresources assets over ...
3
votes
2answers
601 views

setPasswordPath being ignored

Any idea why the following would be ignored following a frontend new password form? The user group does not have access to the control panel. 'setPasswordPath' => 'account/login/password/new', ...
1
vote
1answer
241 views

Change public URL for user photos

We run all our images through a CDN to perform various manipulations. This works create for any image managed via assets, but I'm a bit stuck on any image that has a cpresources URL. In particular I'm ...
1
vote
0answers
82 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', '...
0
votes
0answers
1k 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 ...
0
votes
0answers
27 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 ...
1
vote
0answers
161 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 ...
4
votes
2answers
2k views

General Settings > logo in the template

I have uploaded a logo in the General Settings, which I understand changes the logo on the login page. I was wondering if there was anyway to display this same logo in the site's template? I know I ...
2
votes
2answers
546 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'...
1
vote
1answer
330 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 ...
2
votes
2answers
396 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 [ // ...
1
vote
1answer
392 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....
1
vote
2answers
301 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 ...

1
2 3 4 5