Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [config]

Craft configuration and settings.

0
votes
0answers
17 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
14 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 ...
-1
votes
0answers
43 views

Craft 3.1 - problem with importing from project,yaml

I have problem with importing settings from project.yaml file. What i did: Create craft project using composer. Craft 3.1 was already set inside composer.json Put project.yaml taken from other ...
3
votes
2answers
23 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 ...
0
votes
0answers
25 views

What is a “dev” environment?

I'm working on a recommendation for general config settings and giving some clarity as to what each of the environments in the general config are for. I'd like some feedback on what I'm saying here: ...
1
vote
1answer
19 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 ...
1
vote
2answers
73 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
1answer
76 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 ....
0
votes
0answers
83 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
47 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
27 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
25 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
20 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
32 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
85 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
67 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="...
0
votes
0answers
114 views

Remove .html and .php extensions (apache)

When using Craft3, I was under the impression that omitScriptNameInUrls (when set to true) would remove .php extensions from my urls. However, I have come to find out that not only can I visit every ...
1
vote
1answer
34 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
vote
1answer
36 views

Is it possible to change the amount of time a user stays logged in for?

Our users are getting logged out after 1 day. Is there a setting that changes how long users’ sessions will last?
3
votes
1answer
260 views

help setting up web root to point to /web

I'm new to Craft 3 and I need help getting the web root to point to /web. I can't figure it out. If I use the url "mysite.com/web" everything works fine. Any help would be gratefully received.
0
votes
0answers
56 views

How to do multi-environment app config (config/app.php)?

I'm trying to setup different mail settings per environment. Here is my mail component that I'm defining in config/app.php: 'components' => [ 'mailer' => function() { // Get the ...
1
vote
1answer
40 views

HappyLager Demo Site Forcing 'https://' on XAMPP

When I try to load the demo site in my browser I get the following error: https://imgur.com/8jVvweN "Your connection is not secure" I have added the following to my hosts file: 127.0.0.7 ...
2
votes
1answer
19 views

Does the Craft config var “cache” exist?

I'm reviewing the code on a project that has the following defined in the main config.php as a boolean: cache => true Looking at the docs this doesn't seem to be referenced anywhere. Does the ...
1
vote
1answer
112 views

Local MAMP site keeps redirecting to live production site

I've imported a craft install and its database from a production site to make some changes to it. I've set it up to work locally in MAMP but whenever I go to example.local it keeps redirecting me to ...
0
votes
1answer
40 views

Craft 2: Locale throwing 404 in frontend

I have my two locales set up as described in the official documentation. I am able to translate my pages and fields in the CP as supposed to and have two versions ready in the backend, both with a ...
2
votes
1answer
102 views

How to transfer Craft configuration changes separate from web conent

I am busy reworking a reasonably large website that is already in Craft. The production site is updated with new content several times a day. My current work is an interface redesign. I have a local ...
2
votes
1answer
244 views

Default settings for HTML purifier and how to extend it

Is there a default.json file for the html purifier settings in Craft? Now we can configure this I want to extend to include the stripping on non-breaking spaces. However, I don't want to just extend ...
1
vote
1answer
726 views

Craft 3: Struggling with CRAFT_BASE_PATH and CRAFT_VENDOR_PATH

I am struggling with the definition of CRAFT_BASE_PATH and CRAFT_VENDOR_PATH in web/index.php: My absolute URLs are as follows: /home/xxx/public_html/craft/ (not publicly accessible) and home/xxx/...
3
votes
1answer
388 views

Auto enable/install plugin through config

Is it possible to auto enable/install a plugin through config (or another way) rather than having to do this through the database?
3
votes
2answers
2k views

Craft 3: how can I set dynamic Base URL in sites setting?

Sites localized versions are setup using Base URL like this: — http://{baseUrl}/en/ — http://{baseUrl}/fr/ But {baseUrl} variables are not transformed using craft.app.sites.getAllSites(). {% set ...
4
votes
1answer
258 views

Issues upgrading Craft 2 to 3 - Keep seeing Install Screen not Update screen

I'm trying to update my development site on MAMP from Craft 2 to 3. I've installed Composer and tried both upgrade methods (keeping the current directory structure & using the new structure). But ...
1
vote
1answer
200 views

Manual Update 500 error

Downloaded latest release, pushed app-new to server, renamed app to app-old, renamed app-new to app. Try to go to admin, and I get a 500 error. Server error log shows. 2017-11-15 12:29:29 Error ...
1
vote
2answers
607 views

Exclude path in NGINX config (for FastCGI Caching)

I've got a Craft 2 site on an NGINX server that uses FastCGI Caching (based on Static Page Caching with Craft CMS), but I've got a few pages that have some dynamic content that I'd like to exclude ...
1
vote
1answer
92 views

Why does index.php persists in my URL?

I've gone through all the steps here to remove index.php https://craftcms.com/support/remove-index.php The .htacess file is the default one that came with Craft on install <IfModule mod_rewrite....
1
vote
3answers
206 views

Craft on digital ocean Ubuntu: Craft can’t connect to the database with the credentials in craft/config/db.php

I have been working locally on MAMP and now have deployed the site to Digital Ocean using this guide. However I can't access the site. for page links I get the service unavailable error, and for the ...
0
votes
1answer
402 views

Craft 3: Enabling Memcache

Is there any configuration hint for enabling memcache in Craft 3? I'm on 3-beta-24 I added 'cacheMethod' => 'memcache', to config/general.php, but this did neither cause any hits on memcache nor ...
1
vote
1answer
73 views

Can I get the value of an environment variable in routes.php (or other config files)?

I am trying to get the value of an environment variable (defined in the general.php config file) in the routes.php config file. Is it possible or not? I tried $environmentVariables = craft()->...
2
votes
1answer
59 views

Multiple localhost config settings

Me and my coworker work on the same Craft project. We work locally with MAMP but access the database online, which works fine. For the assets I'd like to define separate localhost basepaths, since ...
2
votes
2answers
83 views

compiled_templates folder using up inodes on Ubuntu 14.04 Server

My server has gone down twice in the last 3 weeks because of an excessive number of files being created in the compiled_templates folder. This causes all of the inodes on our server to be used up ...
1
vote
1answer
160 views

Can't send emails

I've got an "escapeshellcmd() has been disabled for security reasons" warning whenever I try to send an email using Craft (user activation email), is there a way around it?
3
votes
1answer
77 views

Production siteUrl being used in staging environment

I'm using the following multi-env config. My dev config works as expected. However, when I visit my staging site, it is setting the siteUrl to the production Url <?php // Dev URL $...
1
vote
2answers
723 views

Upload file size limits to 256MB

I have run into a problem of file sizes maxing out on 256MB. On PHP side I have upload_max_filesize & post_max_size set to 1GB I've created a simple PHP script to test upload size and managed to ...
2
votes
1answer
229 views

Homestead DB config

Is it possible to have multiple local database configurations? I have just setup homestead but I work in a team who use MAMP, and MAMP username password is root whereas homestead uses homestead and ...
5
votes
2answers
991 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 ...
1
vote
2answers
84 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
879 views

Customizing front-end login/logout redirects

I have "manage" link that redirects to domain.com/login. "login" is custom front-end page that after logging in redirects to homepage. After logging in when I click "manage" again the domain.com/login ...
2
votes
2answers
406 views

“Your session has ended” modal popping up constantly

I know many other folks have posted this question over the years, but unfortunately none of the answers given so far are fixing this for me. The problem: after logging-in on my staging server (this ...
3
votes
1answer
39 views

Different setPasswordSuccessPath for different user groups

I have a couple different user groups that access the front end of our site and I would like to send them to different paths depending on their user group after setting their password. Is it possible ...
2
votes
1answer
351 views

Tips for running Craft in Microsoft IIS

My client prefers to use a Microsoft IIS hosting environment he already has. After some gnashing of teeth I have managed to get it working there, but it is painfully slow (unlike my local LAMP version)...
5
votes
2answers
281 views

Can I set an environment var for SMTP mail servers?

Pretty straight forward here, I'd like to use MailTrap for devMode and then use an SMTP service (Mandrill or like) for production. I looked through the General Config Settings docs but didn't see ...