Questions tagged [craftcms]

Craft CMS is a web content management system written in PHP and built on the Yii PHP framework.

Craft CMS

Craft CMS is a web content management system written in PHP and built on the Yii PHP framework. It is extendable with plugins.

Resources

243 questions
1
vote
1 answer

Front-end form with Craft CMS for users to submit entries not working?

I've put together an entry form to allow registered users to submit content. I followed the example given in the Craft 3 Docs but it still doesn't seem to work. Was hoping someone could see what I can't. Here is the code I'm using for my form. {%…
Tom
  • 13
  • 5
1
vote
1 answer

Create a Craft 3 module which only initializes on certain pages/after certain events

I have created a module which performs an action after a after a user logs in: Event::on(User::className(), User::EVENT_AFTER_LOGIN, function ($event) { $this->moduleService->action(); }); At the moment, the only way I can get…
Claire Mcevoy
  • 43
  • 1
  • 5
1
vote
1 answer

Cloning a Craft CMS project to XAMPP

I am fairly new to git and I am looking to clone a repo to XAMPP. From what I understand I should be able to just clone it to HTDOCS and it should work if all the dependencies are installed. I get this error message when I visit the project folder…
1
vote
1 answer

Redactor inside Craft CMS is not applying format classes

I'm having trouble getting Craft 3 to apply the custom classes that I've created in my Standard.json file. I have set up the Redactor config in the Craft CP to use Standard. My Standard.json file looks like this: { "buttons": ["formatting",…
Tom Smee
  • 11
  • 2
1
vote
1 answer

"Weighted" random order in Craft CMS

I have a field in a channel called "weight" where the user can set a number between 0-1000. On page load I want to generate a random number between 0 and "weight" for each entery, and then sort the enteries based on these numbers. How can I do this…
1
vote
1 answer

matrix twig loop rows - odd one color and even alternating colors

I'm trying to loop through rows that result in the following: row 1 - white row 2 - gray row 3 - white row 4 - navy row 5 - white row 6 - gray row 7 - white row 8 - navy And etc... I have the following, which obviously only works for the first 5…
1
vote
1 answer

Cannot access CraftCMS 3 plugin store from local windows environment/MAMP

I have installed craft CMS 3 via composer, running on MAMP (windows 10) and successfully created a few templates and entries. However, When I try to access the plugin store I see the following error on the page: "The Plugin Store is not available,…
1
vote
0 answers

Craft CMS keep craft users logged between multiple environment

I am trying to make a multi-environment website with Craft CMS with each environment being a different language. Is there a way to make my Craft Users stay logged in when clicking on a different language and changing environment. I have my two…
1
vote
0 answers

Craft CMS Manager Craftman - No such file or directory: '//docker-compose.yml'

I have used the craftman cms manager for installing craft cms on my computer, and few weeks ago I was able to run the installation of craft locally and that worked fine. But, today I have tried to setup the new project by running this…
Leff
  • 1,968
  • 24
  • 97
  • 201
1
vote
0 answers

Using the Craft CMS Element API V1

I am trying to use the Craft CMS Element API. Due to an older version of PHP I am using version 1 (there is a version 1 branch). Per the installation instructions I: 1) Uploaded the elementapi/ folder to my craft/plugins/ folder: 2) Went to…
Molly Harper
  • 2,363
  • 3
  • 26
  • 35
0
votes
1 answer

DDEV Share not loading images or CSS on Craft CMS

I am trying to use the Ddev share command to view my local Craft sites on seperate devices using the ddev share command. The share url is working however my site is only loading the html and not images or css (these appear to be using the…
Matt B
  • 11
  • 1
0
votes
1 answer

ddev not starting correctly

I am new to ddev and am using mac os 13. I used the following tutorial. https://ddev.com/get-started/ But when I run the ddev start command, ddev doesn't work properly. Related to this, the docker container also does not start properly The command…
Madhawa
  • 134
  • 1
  • 10
0
votes
1 answer

CraftCMS 3 Install from Backup - HTTP 503 - Service Unavailable HTTP Exception

I messed my CraftCMS installation up trying to run an update. I uploaded my local backup files to the server, but now I get a 503 error and I can't figure out how to fix it. HTTP 503 - Service Unavailable craft\web\ServiceUnavailableHttpException in…
0
votes
0 answers

How can i add Unique value validation for custom field in created entry type for control panel in craft cms 3

I have created new field as field type entries..in that added one custom field named code.. so in the control panel, I have an entries type that can insert that code in the craft_content table.. now I want to add unique code value validation.. so…
developer
  • 1
  • 1
0
votes
0 answers

Craft CMS 4 & Enupal Stripe Payment Plugin - Production Environment Issue

I've installed the Enupal Stripe payments plugin on my Craft CMS 4 website. It's working well locally but when I try to create a payment form on the production environment I get this error: Database Exception – yii\db\Exception SQLSTATE[42S02]: Base…
George Bleasdale
  • 343
  • 7
  • 16