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

Image not displaying using Craft CMS

I'm new to using Craft CMS and trying to successfully make an image display. I have set up a field with the handle heroImage and this is the code I have within the template. {% set image = entry.heroImage.one() %}
Sam
  • 13
  • 4
1
vote
1 answer

Dynamic path for images in javascript with lightgallery plugin

I'm working on a project in craft cms and I want to make a gallery block that is added as an entry in craft. After doing some research I was trying to do it with dynamic mode of lightgallery plugin. The problem is that in dynamic mode, both sources…
1
vote
2 answers

vuex unknown action type

Im having to use craft on a project, I have used Vue.js on the front end but cant get the VUEX store to fire actions: My Vue store file is as follows: import Vue from "vue"; import Vuex from "vuex"; import bookingFunnel from…
Graham Morby
  • 123
  • 2
  • 11
1
vote
1 answer

CraftCMS 3.6.4 - 503 Error when logged out of control panel

Getting a 503 Service Unavailable when trying to access the site (both local and remote) only when I'm not logged in to the control panel. The error appears to stem from vendor/craftcms/cms/src/web/Controller.php line 63: protected $allowAnonymous…
Matanya
  • 6,233
  • 9
  • 47
  • 80
1
vote
1 answer

Pass template literals into includes

I'd like to create DRY code by passing template literals into a twig {% includes 'X' %} as variables so they can be used in the includes code (examples below). I have seen that you can pass a variable into a includes, like the below: {% include…
Wally
  • 705
  • 1
  • 9
  • 24
1
vote
0 answers

Enable batching for apollo nuxt

I have read many articles showing how to accomplish this but I am still not seeing my GQL requests being batched. Here is my code which works in the sense that it gets my data but I am getting a page load time of ~4sec. My queries are local to my…
Joe Hill
  • 11
  • 5
1
vote
1 answer

CraftCMS backend forms whitespace issue

There's a strange issue with a legacy CraftCMS backend we've inherited. On the backend I am unable to submit forms that update the entries, in fact the SAVE button does nothing. Upon investigation it seems as though some whitespaces are being…
1
vote
1 answer

Retrieve order details after order is placed in craft commerce

so I have added this code below inside Module.php and the purpose is to get specific order details and pass them to a trustpilot script code which is also pasted below. I am not sure what data $order variable will return so I did a dd() on that…
aslamdoctor
  • 3,753
  • 11
  • 53
  • 95
1
vote
1 answer

CraftCMS - show category of entries fields in content-type

I'm making a website for a bicycleshop. The shop has different 'frames' and you can 'build' your own bike by choosing a frame and the components you want (groupset, wheel, pedals, ...). In the back-end I have a content-type 'components' that exist…
user3346696
  • 169
  • 1
  • 4
  • 17
1
vote
1 answer

Cannot call a Craft 3 module's action

I'm trying to setup a controller action that can be called by a cron job. I have a controller living inside modules/chill/controllers/NotificationController with the action actionIndex running in Homestead at http://chill.test. When calling the url…
1
vote
0 answers

.ENV parsing issue (on Windows server)

Has anyone had issues with Craft parsing a .env on Windows Server? Dotenv is throwing an exception (FileException - invalid name) when parsing the first line of my .env, which is just a comment. I can remove that line and then i complains about…
1
vote
0 answers

How can i query entries by a field that are within a matrix?

Each entry has a matrix field with fields including start date, end date, location etc I need to list and display only the entries after now. I am able to filter them by {% set queryEntries = craft.entries({ section: ['events'], }) %} {% for…
DumbDevGirl42069
  • 891
  • 5
  • 18
  • 47
1
vote
1 answer

Admin panel not working without language code in url in CraftCms2

I've migrated a website with CraftCms 2 from local to a pre-production server. Everything is working fine but, I don't know why, I only can go to the admin panel with locale code before /admin. I mean, if I write domain.com/admin, it doesn't work.…
1
vote
0 answers

Craft CMS 3 - Internal Server Error on certain pages

After upgrading to Craft 3 from 2, I'm getting a 500 Internal Server Error on a select few pages. For example: /reports (Doesn't work) /reports/slug (Works) /publications (Doesn't work) /publications/slug (Works) For some reason it's not the same…
Joe Berthelot
  • 467
  • 2
  • 4
  • 16
1
vote
0 answers

Entry Form example from Craft docs doesn't work

I'm very new to Craft and come from the ExpressionEngine world. I'm learning how to create a front-end entry form. I've setup a section, created some fields and made a template for the form to make entries. {% macro errorList(errors) %} {% if…
Zonamaster
  • 43
  • 8
1 2
3
16 17