Questions tagged [config]

Craft configuration and settings.

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

getParam not working after update of CDN at server

Recently, my team had tried to set up a CDN for the server since then the craft.request.getParam or craft.app.request.getParam not working anymore at the server, even we had revert back the changes. I ...
1
vote
1answer
29 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
17 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
26 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
48 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.
2
votes
1answer
43 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 ...
0
votes
0answers
22 views

How to configure Craft to work with Redis replicas?

We have an existing load balanced / HA deployment of Craft 3.4, to which I want to add support for the redis replica we have available, but I can't work out how to correctly configure this in config/...
1
vote
1answer
19 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
27 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:/...
0
votes
0answers
17 views

Craft CMS + Nginx redirection

I am using the latest version of Craft CMS with Nginx server. My problem is, in my site settings i setup 4 websites that are as below: German (de-de) [default] German English (en-de) Austria (de-at) ...
0
votes
0answers
75 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 ...
0
votes
0answers
24 views

Max Backups General Config Is not removing old sql backup files

Reading the docs here https://docs.craftcms.com/v3/config/config-settings.html I was under the impression if I set this config in my general config it'll delete my db sql dumps in my storage folder ...
1
vote
1answer
20 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
55 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', ...
0
votes
0answers
13 views

Can I set custom get variables in the verifyEmailSuccessPath config?

After the user has verified the email address, I want it to get redirected to /dashboard/profile?verify=1 I was under the impression that setting it in the general.php config file would be possible. ...
2
votes
1answer
35 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, ...
4
votes
1answer
418 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
0answers
54 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
22 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 ...
0
votes
0answers
662 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 ...
1
vote
0answers
78 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 ...
2
votes
2answers
359 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
208 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
247 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
252 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
184 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
vote
1answer
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?
4
votes
1answer
694 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 ...
2
votes
1answer
151 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 ...
1
vote
1answer
64 views

How to load entries data in the General Configuration file?

I'm trying to set dynamic paths for values such as activateAccountSuccessPath. This kind of code below from my routes.php file works very well: use craft\elements\Entry; $myAccount = Entry::find()-&...
1
vote
1answer
649 views

Invalid path alias

I'm not sure if I understand the alias concept entirely So I want to create an alias. I write a variable into my .env File: SITE_URL_DE="http://hello.local" Then I put it into my general.php File:...
1
vote
0answers
280 views

Strange Redactor Config error when importing colleague's database

Description I am getting this error after importing a database supplied from my colleague. I have deleted the vendors directory and composer lock file in an attempt to re-install Redactor. I have ...
1
vote
1answer
63 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
0answers
165 views

baseUrl and trailing slash Craft 3

Despite setting baseUrl alias with trailing slash it appears it gets stripped off in Craft 3. CRAFTENV_BASE_URL="https://domain.test/" 'aliases' => [ '@siteUrl' => getenv('...
1
vote
2answers
502 views

Web folder content moved up a level - Craft Path settings

I use subdomains for staging environments. That meant in Craft 2 I had to move the public_html folder content up a level and change $craftPath = '../craft'; To: $craftPath = 'craft'; I'm getting ...
1
vote
0answers
249 views

HTML Purifier Allow <script

I understand the implications of having a script tag in my redactor field. But I am importing approx. 5k articles in to a Redactor field, some of which have various tags from embedded Podcasts, ...
1
vote
1answer
160 views

Routing: How can I ignore a parameter in route definition?

I'm trying to route users to a "locations" structure entry that normally has a URL structure that looks like: locations/<slug> My client wants to use the structure of links from their old site ...
3
votes
2answers
144 views

Overriding isSystemOn setting for a single page

I have a staging site that has the isSystemOn set to false since I don't want people to stumble upon the site and be able to view content. I would like to have 1 page still "visible" though. This URL ...
1
vote
1answer
228 views

Craft 3 setPasswordPath config not working for front end users

How do I change the link that's sent in a forgot password email that's sent to front end users in Craft 3? The setPasswordPath config isn't working for me. The users don't have access to the CP. In ...
2
votes
3answers
502 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'...
2
votes
1answer
543 views

Working locally after cloning Craft 3 from Hyperlane

I'm trying out the recommended Hyperlane hosting with Craft CMS. After installing on Hyperlane, I then clone the repo on to my local machine and run 'composer install'. That runs fine, and I create a ....
1
vote
1answer
628 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 ...
1
vote
1answer
230 views

Craft 3 large log file sizes

I've noticed that Craft 3 log files in storage/logs e.g. web-404s.log and web.log don't seem to have a max size or rotate like with Craft 2. The web-404s.log file is nearly 10 megs for 1 site now. ...
2
votes
1answer
107 views

Change name of Singles

Is there an updated version for Craft 3 showing how to change the name of 'Singles' and 'Structures'? https://www.youtube.com/watch?v=ObC4mhXjiOE
1
vote
1answer
135 views

What does defaultTokenDuration affect besides hidden entries' share links?

Per this answer, configuring defaultTokenDuration is the way to change the lifespan of hidden entries' share links from the default 24 hours. The v2 docs describes this as affecting "system tokens" ...
1
vote
1answer
88 views

Possible to set Forgotten Password path in config?

Looking at the documentation here: https://docs.craftcms.com/v2/config-settings.html#users I have set loginPath, invalidUserTokenPath and setPasswordPath. However, it appears that there isn't a ...
2
votes
0answers
73 views

Can you make Craft 2 Stateless?

So we are moving to Google App Engine Flexible which means we cannot store sessions on files. So I wanted to know if anyone has been able to make Craft 2 Stateless and how was it accomplished? Thanks....
2
votes
1answer
301 views

Config for devMode not showing when true

I am using .env to set environment to local: # .ENV The environment Craft is currently running in ('dev', 'staging', 'production', etc.) CRAFTENV_CRAFT_ENVIRONMENT="local" My general config looks ...
1
vote
1answer
98 views

How can I set a custom URI for the confirmation link of account email update from a front-end form?

I have a front-end form to update user's email address, like this example: <form method="post" accept-charset="UTF-8" enctype="multipart/form-data"> {{ csrfInput() }} <input type="...
1
vote
1answer
140 views

Disable entry versioning

Had a quick search online and I can't find a way to disable entry versioning. Is this possible? There's some plugins that do this but I'm hoping there's some config I can set somewhere?

1
2 3 4 5