Questions tagged [craft3]

For use with questions relating to the Craft 3 version of Craft CMS, including the Beta and RC releases.

Filter by
Sorted by
Tagged with
1
vote
0answers
8 views

GraphQL next does not accept 'relatedToCategories'

I'm trying to get the next project in the "projects" section but with the same category. So because I can't do it in one query (the value of my category is in the result), I do another query ...
1
vote
1answer
24 views

How does Craft CMS gets data from a 3rd part API?

I have an event page for viewing movies showtime and i want to connect to a 3rd party api to get the movie's info ( show time, cinema name,...etc ) how to do it? can i do this without having to create ...
1
vote
1answer
19 views

Craft CMS admin intermittent internal server errors

I'm getting intermittent Internal server errors in Craft admin. This has happened out of the blue on an active site. Craft pro 3.041 phperrors.log: PHP Notice: Undefined index: constraint_name in /...
1
vote
1answer
28 views

How to make "Wheel Form" fields in JSON format using API

I've installed a "wheel form" plugin on headless CMS. Now how do I make this form JSON format using API or write PHP code for display on the frontend?
1
vote
1answer
16 views

How do I add an import page to Craft CMS

I need an to add an import page to a craft CMS. But although I have experience as a full stack programmer I don't see how to add a page to the menu of the CMS. How is this done? Can anyone tell me? I ...
1
vote
1answer
31 views

How to Add “Enabled Globally” in each entry page?

I want to Add "Enabled Globally" in each entry page So when users create a new page, it will set English as the default content (apply to other languages), then the user can edit on specific ...
1
vote
1answer
20 views

Check for existing jobs in queue

Is it possible in code to search for a job/list out all jobs? I have built a plugin that scans an external API and I want to scan on an interval as well as allow the user to fire off a manual scan. I ...
0
votes
0answers
9 views

Custom Plugin JS load order/breaking in Control Panel

We have site that has a small custom plugin. One of the things this custom plugin does is run a small bit of JS that allows the 'Importable' plugin to work on table fields within a matrix. The JS that ...
0
votes
0answers
26 views

Contact Form not sending email with most recent version of template

Platform: Craft Solo 3.7.21 P&T Contact Form plug in 2.2.7 Redactor 2.8.8 I am trying to use the Contact Form plugin and having problems when using the latest version of the API. I have an old ...
2
votes
1answer
43 views

How to make custom element types restorable?

In Craft CMS 3, custom element types support soft-deletion out of the box. But once soft-deleted, there is now way to restore elements that are now listed in the Trashed status, the only available ...
2
votes
2answers
28 views

How to get multiple image array using API or PHP query

This is a single asset field to upload multiple images so how to get all images using the query. I have three images here but I am getting one image using this code $home = \craft\elements\Entry::...
1
vote
1answer
53 views

DOM hash url in entry slug

I try to set the slug of an entry to a url using a hash. https://url.spec.whatwg.org/#dom-url-hash However it seems not possible by default, craftcms changes the hash to a dash. I need that as ...
2
votes
1answer
36 views

Free Shipping toggle switch in product editor doesn't work

Hi in the product editor of Craft Commerce by default there is a toggle switch for Free Shipping on the right side column. I have the base rate set up as a standard flat rate charge but wanted to know ...
0
votes
0answers
11 views

sourceSnapshot not populated in lineItem adjustment

I'm querying the order, and from the order I'm looping through the line items returned from getLineItems(). When I then dump the line item, calling getAdjustments(), the sourceSnapshot never seems to ...
1
vote
1answer
13 views

Craft Commerce Checkout: How to prevent payment link from bypassing shipping section in nav-checkout

I'm using checkout.twig in the CraftCMS shop checkout examples templates. As the user proceeds though the checkout process, this nav strip appears at the top of each page and marks their progress. The ...
2
votes
2answers
36 views

How to reliably determine if an entry is being duplicated?

On a Craft 3.7 site, I need to make some changes when duplicating an element: set the dateCreated, dateUpdate & postDate to the current date ensure the entry is disabled clear the value of an ...
0
votes
1answer
18 views

Discord Link dead? [closed]

Anyone have the correct invite link for discord? The one on the craft site is invalid. Here is the one on the website: https://discord.com/invite/uuDFCTX
0
votes
0answers
23 views

500 errors, fix them then lose plugins and site won't load

I've been going around in circles. Moved a site yesterday, all seemed OK. Went to install a plugin this evening, and got a fatal error (I had been getting the same error when transferring the site, ...
0
votes
0answers
32 views

Guest Entries form freezing site after Craft update

I'm using this answer along with the Guest Entries plugin to allow guest users to edit entries via a frontend form. It was working beautifully before, and after updating Craft it's now taking ages and ...
0
votes
0answers
19 views

Need help combining an item with free shipping and an item with paid for shipping

Hi I'm going around in circles with Craft Commerce shipping functionality and I don't mind saying I'm pretty confused. This should, however, be fairly simple to solve... hopefully. My website has a ...
1
vote
1answer
32 views

How to create a follow system "button" for "Event" entries?

First of all, Please excuse my English Q: I have a section called "Events" And and has some entries On the front-end i have a list of card "Events" and each card has a "...
1
vote
1answer
22 views

What's the attribute of a Matrix field to add error message

I try to validate some fields before saving the entry, if the field is invalid, prevent the entry from saving and return the error message, I'm doing it via Element::EVENT_BEFORE_SAVE event. It works ...
0
votes
1answer
33 views

How to bind JavaScript events to entry form fields in the control panel

When adding an entry, there is a field called resource id, I want to build a front end event on this field, after the value input or changed, trigger ajax to call an external api to check whether the ...
1
vote
1answer
13 views

Composer Unexpected end of file on new plugin

I'm making a new Plugin for CraftCMS, it works fine locally but when I call the services class on our staging server it throws a Syntax Error, Unexpected end of file. I've installed them both through ...
1
vote
1answer
10 views

Settings for redactor's plugin Special characters

Is there a way to adjust Special Characters plugin's list of characters in Redactor settings (or in other config file)? I can make the changes I need (reduce plugins menu, add new characters) directly ...
1
vote
1answer
20 views

how to write db-commands on custom table (PHP syntax) inside twig file?

if i have a custom table (ct_table) and i have to use MySQLi commands on it using the PHP syntax, it won't work if i put the PHP snippets inside a twig file. So are there any tools or official methods ...
0
votes
0answers
24 views

internal server error when creating new field

whenever i try to save a new field I get an internal server error in the backend of craft 3. This happens whenever i want to create or modify a field that has an input like date, plain text, reactor......
1
vote
1answer
33 views

Do i need a [ Craft PRO ] to create accounts/User management for my LMS website?

I'm still a new to Craft and trying to make an LMS website when i started to search about the [ Sign up/Sign in ] i read that the official docs : https://craftcms.com/knowledge-base/front-end-user-...
1
vote
1answer
12 views

Limit elementSelectField to specific sections

How do I limit this elementSelectField to only allow entries within a certain section? {{ forms.elementSelectField({ label: 'Blog post', name: 'blogpost', elementType: 'craft\\elements\\Entry', ...
1
vote
1answer
27 views

Redirect to Craft CMS Website Results in 403 "Request forbidden by administrative rules"

My Setup I added a stripe checkout redirect from my craft website using Stripe Checkout so I can accept payments from customers using payments handled by stripe. In simple, I use AJAX on the frontend ...
0
votes
0answers
21 views

HTTP 400 – Bad Request – yii\web\BadRequestHttpException

Hi I'm getting this error on every other save when in the page editor in Craft CMS: HTTP 404 – Not Found – yii\web\NotFoundHttpException Draft not found The only things I am certain of are: The error ...
0
votes
0answers
9 views

How to select entries based on site group?

I have multiple sites with multiple languages. In Craft 3, each language is a separate site, we can group them by site group. For example, In the USA site group, I have USA - English and USA - Chinese....
0
votes
0answers
21 views

Craft Commerce/Sprig - change add to cart button dependent on what is in cart

I am using Craft Commerce with Sprig and I am hoping to get some help with the add to cart button, which I need to change dynamically dependent on what is already in the cart. Essentially I have two ...
2
votes
2answers
183 views

Get array of titles instead of whole collection of entries' attributes

I know that to get the entries I can do: craft.entries.all() but instead of getting the whole collection of entries, I would like to get an array of titles from those entries (or any other field). ...
0
votes
0answers
10 views

How to apply discount after taxes in Craft Commerce

I have a unique situation where the discount applied must be done AFTER taxes are applied to the total cart price. Can I reorganize the discounts to come after tax? Or is there another way to make it ...
0
votes
0answers
15 views

How to display entry on home page from backend

I am using a version of 3.6 I want to display data on the homepage from the backend when I'm trying with {{ entry.displayName }} then getting an error Variable "entry" does not exist. how to ...
1
vote
1answer
24 views

Eager loading a photo within a matrix field

Thanks to some help recieved on another question I have discovered Eager loading which makes a lot of sense. I am now trying to output an image from a matrix field. I am part way there as my imageAlt ...
1
vote
1answer
27 views

Output post category

I have created a blog channel and a blog category along with a category field. Now I wish output the category within the blog post. {% set categoryEntry = craft.categories().group('blog') %} {% set ...
1
vote
1answer
21 views

Output Matrix field within Channel

Very new to craft and hence sorry if this is very basic. I have created a service channel which contains some matrix fields. One for a list and one for button. My approach here may be wrong and hence ...
0
votes
0answers
31 views

Craft CMS starts throwing HTTP status 500 after a few hours of uptime

I'm working on a "hello world" Craft CMS deployment to AWS ECS. To build my Craft CMS Docker images I use the official base image craftcms/nginx:8.0. The first few hours after the deployment,...
0
votes
0answers
32 views

How can we create the Martix type field?

In Plugin development, I have created a field, Is it possible to create a field as a matrix field or I will have to create custom add more functionality?
0
votes
0answers
77 views

SQLSTATE[HY000]: General error: 1525 Incorrect DATETIME value: ''

My website is running on Fortrabbit with the following settings: PHP version 7.4.15 OS version Linux 4.15.0-50-generic Database driver & version MySQL 8.0.23 Image driver & version Imagick ...
1
vote
1answer
27 views

How to display controller response on twig template?

In the plugin, I created a form and after the process, return the below response from the controller and redirect to the template. I am trying to print the response to the template but it's not ...
0
votes
0answers
18 views

CraftCMS + ReactJS (NextJS) send form

I build a website which has the frontend in NextJS and the backend is Craft. Everything works fine except for the emails. Does anyone have any experience on how I can send the submitted form to the ...
1
vote
2answers
55 views

Generating srcset in a similar way to WordPress

I come from a WordPress background, so I'm attempting to create responsive images the way I'm accustomed to with WordPress. Perhaps that's the wrong approach, I'm not sure. In WordPress I would ...
1
vote
1answer
22 views

Post Request Required Error Solspace Freeform

I installed Solspace Freeform onto a new site and am getting this error on form submission.
0
votes
0answers
50 views

Guzzle fatal error using Craft Guzzle client

Using the code below to get 3rd party API $uri = $baseUri . '/area/' . $areaId . '.geojson?api_key=' . $mapAPIkey; $client = Craft::createGuzzleClient(); $response= $client->request('...
0
votes
0answers
17 views

Error uploading to asset field from front end form

I'm getting an error when uploading to an asset field from a front end form during entry creation. SQLSTATE[22P02]: Invalid text representation: 7 ERROR: invalid input syntax for type integer: "...
1
vote
2answers
102 views

Send automated emails to users that haven't logged in for X amount of time

What would be the preferred method to send an automated email to users that haven't logged in for a set amount of time? Let's say for a month. Are there any plugins that have this feature, or will it ...
0
votes
0answers
10 views

Running a a join query in a plugin with a background job API call

I'm working on a plugin and need some steering. I have two sets of entries that are linked by a foreign key value. (They are not related entries but lsoaname value corresponds to a field in 2nd set of ...

1
2 3 4 5
35