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
0 answers

Front-end form with Craft CMS returning error: Request missing required body param

I have copy pasted the form in the Craft CMS docs here into my project. I receive the error: Request missing required body param I found an answer on here that suggests I add:
1
vote
3 answers

Craft CMS project.yml not syncing correctly

I am using the latest version of Craft CMS with 'useProjectConfigFile' enabled. My development process involves creating/updating Craft settings locally, committing this to Git and then deploying to production. The changes are then sync'd the…
Pedro
  • 1,148
  • 4
  • 16
  • 35
1
vote
5 answers

PHP/SQL select based on sum result

I'm having a hard time limiting my query results based on sum. Example code: $rows = Entry::find() ->section('cities') ->select('state') ->having("sum(case when covered = '1' then 1 else 0 end) = 0") ->asArray() …
calipoop
  • 792
  • 9
  • 31
1
vote
2 answers

Gatsby: Re-execute page queries manually

Do you know if it's possible to re-execute Gatsby page queries (normal queries) manually? Note, This should happen in dev mode while gatsby develop runs. Background info: I'm trying to set up a draft environment with Gatsby and a Headless CMS (Craft…
urz0r
  • 462
  • 3
  • 8
1
vote
0 answers

How to create 2 columns using the batch filter in twig

Im trying to put Pictures into a gallery using the batch filter with twig. I want there to be 2 columns next to eachother, but the code seems not to create the second column. Everything goes into a single column. {% extends "_bildlayout" %} {% block…
1
vote
1 answer

Craft - Dynamically adding email recipients error

Currently working on dynamically adding email recipients into my Craft Contact Form. My current setup follows the instructions on the contact form github exactly. In my form I've added the following line:
Pimmesz
  • 335
  • 2
  • 8
  • 29
1
vote
1 answer

Call to undefined method craft\helpers\Stringy::langSpecificCharsArray() Craft 3

Hi I have problem with Craft CMS after deploy I have an error if try to login /admin/login I try to remove the vendor and install composer again but is the same. How I can fix this issue sometimes if a manual move is working and after deploy, I make…
1
vote
1 answer

Getting assets from single entry doesn't work after updating Craft to 3.2.1

I'm building a content website in Craft CMS. I use single entries to output images, but after I updated Craft to 3.2.1, this doesn't work. Everything else is working fine. I get this error: Twig Runtime Error – Twig\Error\RuntimeError Key "1" in…
1
vote
2 answers

invalidargumentexception credentials.json" does not exist

I am trying to use Google APIs with craft cms. To pull data from my calendar from Google. I modify the quickstsrt.php that Google had on Github. That works but when I went to add the code to my Craft plugin it's not able to find the JSON file…
Semesic
  • 39
  • 1
  • 5
1
vote
1 answer

How do I access an Entry by a specific attribute in Craft CMS?

I am looking for a programatic way to access an entry by an attribute in PHP, using Craft CMS 3. Here is what I have so far: Craft::$app->getEntries()->getEntryById('1234'); getEntryById() seems to be the only method available off of getEntries()…
ryanpcmcquen
  • 6,285
  • 3
  • 24
  • 37
1
vote
1 answer

Craft/Twig How to loop multiple key/value pairs and remove duplicates from that loop?

In Craft CMS, I have child entries where each child has a location with "city" and "country" values assigned to it. I'm looking to output a list of "City, Country" text but remove any duplicates as two or more children might share the same…
Jake
  • 13
  • 7
1
vote
0 answers

craftcms 3 plugin which imports channel entries

I try to finish a plugin which imports data into my craftcms project. I already created a console based method/service, which I trigger/run in my shell. Inside my method(s) I receive data (XML or JSON) I parse my data and try to create and fill an…
Thomas
  • 11
  • 1
1
vote
1 answer

Querying Global Fields in Craft CMS with CraftQL and Gatsby JS

I am using Craft in headless mode with the CraftQL plugin. My front end is built using Gatsby JS. I am able to query entries and output the data to my templates, however Global fields are not available. Here is my code: // gatsby-config.js plugins:…
matthewbeta
  • 696
  • 1
  • 7
  • 17
1
vote
1 answer

User registration using craft 3 cms

I wanted to build a commerce website using craft 3 cms. And I wanted to create parent registration form so each parent will have an account to use on the site. Then after they sign in I want them to be able to add their children. Is this possible to…
Kirubel
  • 1,461
  • 1
  • 14
  • 33
1
vote
2 answers

CraftCMS exception on first install (HTTP 503 – ServiceUnavailableHttpException)

I'm trying to install CraftCMS for the first time, and appear to have gone through all the steps on the installation guide - https://docs.craftcms.com/v3/installation.html#step-1-download-craft - yet I'm getting an Exception. HTTP 503 – Service…
Martyn
  • 6,031
  • 12
  • 55
  • 121