All Questions

Filter by
Sorted by
Tagged with
1
vote
1answer
12 views

Can't access control panel

I moved my website from local to an online test server via git. Everything works fine, except that I can
0
votes
0answers
15 views

After calling the controller method error from template. Craft CMS 3

https://prnt.sc/qqs50o I use the base plugin template from plugin factory.
2
votes
1answer
13 views

How to make an HTTP request from a plugin?

I'd like to be able to make HTTP requests from within my plugin to hit an endpoint and get a response. How can I do this?
0
votes
0answers
13 views

Adding a new site returns 503 Service Unavailable

I successfully installed Craft locally and my primary site is up and running, but when I add a new site with it's own base URL I cannot access it due to a HTTP 503 error. I've tried various ...
0
votes
0answers
16 views

How to handle two Redactor fields in one entry page in Craft 3.3?

I have an entry for blogs page. It contains 2 Redactor fields named content and body. I upgraded Craft 2 to Craft 3.3. Then the old editor changed to Redactor plugin, but that Redactor worked for body ...
1
vote
1answer
17 views

Commerce 2 Sales Not Present In Cart lineItems

I have an issue where sales and sale pricing seem not to be present in the cart. This is on an ecommerce flow where this was previously all working but I had moved onto other dev work on this site for ...
2
votes
1answer
18 views

A Streamlined Way to Export / Import Entries Between Environments?

Do any of you have a preferred workflow for exporting entries to be imported into another installation of Craft using plugins or migrations or other processes? I'd think this would be a good job for a ...
1
vote
1answer
12 views

How to reference specific asset subfolders in Craft 3

I am having trouble referencing specific subfolders in Assets in Craft 3 using Twig. The query that I've written is still showing all content, when I only want it to show content from a specific ...
0
votes
0answers
14 views

Block headerContent not rendering my HeaderBuilder?

I am using NEO plugin to structure my website. Currently I have create _layouts/base.twig file as my main file. Under that I am calling {% block headerContent %} {% endblock %} {% block ...
1
vote
0answers
8 views

How can I search for Craft Commerce orders with a specific product?

Is it possible to narrow the order query from the default order listview in the CP from Craft Commerce? Because I’ll want to show all orders with a specific product so I can export them.
0
votes
0answers
28 views

Get adress data of Order

This used to work in commerce 1: {{ order.billingAddress.firstName }} within a for loop of craft.orders.all(). No longer in Commerce 2. If I use this syntax I get Impossible to access an ...
0
votes
0answers
11 views

Error running garbage collection

When I run "./craft gc" or "./craft gc --delete-all-trashed=1" I get the following error: Running garbage collection ... Exception 'yii\base\InvalidConfigException' with message 'Invalid section ID: ...
1
vote
2answers
27 views

How to change the day of the week?

Good day! I display the day of the week on the site {{ now|date("l") }} How to change for example Monday to Mondays (on Mondays)? Thanks in advance :)
2
votes
1answer
38 views

How can I write a PHP script to zip and download an Assets subfolder?

I've searched everywhere but can't seem to get a straight answer. I want to write a php script to zip and download an entire subfolder in my assets directory. The subfolders are named based on a ...
1
vote
1answer
10 views

Error sending email: Process could not be started [The system cannot find the path specified. craft cms

I'm testing my email and I'm seeing the following error in the web logs: "Error sending email: Process could not be started [The system cannot find the path specified. craft cms" Does anyone know ...
0
votes
0answers
20 views

Getting 403 when trying to update from Craft 3.3.20.1

I just updated Craft Pro to 3.3.20.1 and went to run the next set of Craft updates (all from the cp). But now when accessing the updates page, the "checking for updates" spins continuously and I get ...
0
votes
0answers
15 views

How to create a filter for categories that are pulling from different channels and displaying them according to the URL

I am working on a categories page where the user is able to select on the dropdown which category to load. When the user selects from the dropdown eg. category1 he will be redirected to homepage/...
0
votes
0answers
16 views

Homepage shows but everything else puts out 404 errors

My homepage template is loading but everything else puts out a 404 error (server error). Can't access the control panel or any other sites. I have transferred my my project from a local server to a ...
0
votes
0answers
10 views

Error Connection Social Poster Plugin to Facebook

I'm having some trouble getting the Social Poster plugin to work with facebook. It's installed and I've set up my facebook app and have configured facebook in the providers tab of social poster. ...
1
vote
0answers
12 views

Multiple Entry Types on GraphQL Fragment

So I am building out a Gatsby Site, which is using Craft in Headless mode as it's content source. In one Section, I have three entry types. Currently they have identical fields, but may diverge in the ...
1
vote
0answers
7 views

Freeform: Change field conditions between multi-page forms

I'm trying to only show some fields on Page 2, if a condition from a <select> box is met on Page 1. However, when I add Field Rules, I only have access to fields from the same page of the form. ...
1
vote
1answer
10 views

How can I get field's value of entry in other site locale in my element-api endpoint?

I'd like to get a field value in 3 differents locales in the same element-api endpoint but I can't make a request similar to this one : craft.entries.siteId($siteId).id($entryId).one() in twig. <?...
0
votes
1answer
13 views

How to create a new site (locale: de-AT) based on another site (de) within same installation?

I manage a website with multiple languages. Each language has its own site and domain. Think: website.de and website.co.uk I have to add another site with different locale (de-AT) to the Craft CMS ...
1
vote
2answers
34 views

Lingering artifacts of deleted Sprout Forms plugin causing queue failure for updating search indexes

I noticed I had a task failure notification that I couldn't clear in my Craft 3 cp for updating search indexes. Found this in queue.log: 2020-01-15 20:02:44 [-][41673][-][error][craft\queue\...
0
votes
0answers
22 views

Get the current Entry data in PHP

I need to get the current page entry data in PHP just like twig {{ entry.fieldHandle }} or {{ entry.id }} . I will be using this in a custom module function like in the example below. // Example ...
0
votes
0answers
22 views

Issue with mcrypt extention in Craft 2.8.0

I upgraded Craft version from 2.6.x to 2.8.0 to make sure it runs properly in PHP 7.2 since mcrypt is no longer available in PHP 7.2+ . But after upgrades, I am getting serious errors when I visit ...
1
vote
1answer
11 views

Sprout Forms: empty phone field still shows error “Phone is invalid. Example format: (506) 234-5678”

Running Craft CMS 3.3.20 and Sprout Forms Pro 3.6.8 form has Phone field submit form with no value in Phone field form reloads with error message "Phone is invalid. Example format: (506) 234-5678" ...
0
votes
0answers
20 views

Combine AND and OR in a ElementQuery

I have a category with 2 levels. And I want to be able to let the user do a search based on those. The problem is that it needs to be AND between all level 1 categories, and OR within child categories....
1
vote
1answer
14 views

Number field when empty and value=0

Is there a way to differentiate the number field value empty and 0? I would like to display this field only when there's a value in the field even though the value is 0. But when I input 0 into ...
0
votes
0answers
28 views

Deprecation Warning: Use the all() function to fetch the query… in PHP

I am getting this warning message: "Looping through element queries directly has been deprecated. Use the all() function to fetch the query results before looping over them. " It is pointing out ...
1
vote
1answer
15 views

Get a hash’s key name

This is possibly more of a Twig thing, but if I have a hash… {% set hash = { "key": "value" } %} How can I output the key name? {% for value in hash %} <span class="{{ key }}">{{ ...
1
vote
1answer
16 views

Problem with data hash only storing last entry in loop

1: I'm creating a data hash object and then looping through a collection of entries to store the results of various macros in it: {% set data = {} %} {% set people = craft.entries().section('people')...
1
vote
1answer
21 views

Is it possible for photo's to be uploaded to a form?

I would like to create a form for competition entries. However, there needs to be the option for entrants to upload pictures with their entry form, is this possible? Many thanks
1
vote
1answer
12 views

Flush Compiled Templates Migration File breaks Craft Migration Setup from 3.0 to 3.3

I was attempting to upgrade my Craft CMS from 3.0 to 3.3.19 on my production site. I had tested this out on several dev environments and worked with no issue. However, when doing it live I ran into a ...
1
vote
1answer
16 views

FreeForm: Adding attributes to the honeypot field

I'm using VueJS too process and submit forms, and I would like to utilize the freeform honeypot functionality. The issue is that I am unable to add a v-model attribute to the honeypot field. I've ...
1
vote
1answer
15 views

Amazon S3 plugin uploading to different directory

I was using Amazon S3 with Craft 2 fine, now after updating and installing the plugin I am having issues. We use a folder inside our bucket as the root Assets location - e.g. /bucket-name//folder ...
0
votes
0answers
17 views

Matrix field not displaying after updating to Craft 3

According to the documentation, this should loop through all Matrix fields. {% for block in entry.fieldname.all() %} But it's showing nothing. Everything is showing in the CMS itself, but not on the ...
1
vote
1answer
20 views

Craft CMS shows disabled entry page

Entry is disabled https://monosnap.com/file/l8tgvr5Fxpw0OXPbpcwiI57JmZjL51 But despite that on its address I see its template loaded only without entry data. I expected to see 'Page Not Found'.
1
vote
1answer
32 views

Create a dynamic select element

I want to build a dynamic html select element that includes the prior five years, given the current year. So, since it is now 2020, the result would be: <select> <option value="2015">2015&...
0
votes
1answer
23 views

Is there a way to avoid content duplication on multi site setup?

I have just crated a multi site according to the instructions on Crafts page. Lets just say I have: siteone.com with template forlder templates/siteone sitetwo.com with template forlder templates/...
1
vote
1answer
36 views

Undefined index: siteSettings when updating entry types

I'm receiving an Undefined index: siteSettings when trying to save changes to entry types (both new and existing). Of course, this is only occurring on a production server - local server with up-to-...
0
votes
0answers
19 views

Memory Upgrade Issues

Problem Hi all, I have been struggling with issuing the command ./craft gc. It shows the following Delete all trashed items? (yes|no) [no]:yes Running garbage collection ... PHP Fatal Error 'yii\...
0
votes
0answers
31 views

How can i get the current applied route in CraftCMS?

I'm using a dynamic route that loads a template. I'm on a multisite setup with a language switch in the header menu. To be able to switch between sites or languages, the dynamic routes need to have ...
0
votes
0answers
22 views

Using @webroot in templates returns a different path, can't override in config

I'd like to use @webroot in my templates using the {{ alias('@webroot') }} tag. However, when I do this it returns a longer path than what is returned when I use @webroot in the control panel. For ...
0
votes
0answers
14 views

Migrating to Matrix using Feed Me and Element API

How can I use Element API to move my entry fields into a matrix-based content builder? I'm going off the docs found at https://docs.craftcms.com/feed-me/v4/guides/importing-into-matrix.html#setup-your-...
1
vote
1answer
30 views

How do I render pages with dynamic content from a json feed

I am building a module to show a job/vacancy-list and the detailpage of a job, the data is fetched from a remote json feed. Currently I have the following routes to a controller in my module return [...
0
votes
0answers
18 views

Is it possible to query entries based on values in a table field using GraphQL?

Is there a way to query table values using GraphQL, I see that it's expecting [QueryArgument], but I'm not sure how to use it. I would like to query entries where myTable has a row where col1 (text ...
1
vote
1answer
25 views

GraphQL - Get related entries based on tags field

I'm trying to retrieve entries related to the current entry, based on a tag field called topics. Simple stuff. Now, I use Craft's native GraphQL implementation so I'm bound to the possibilities this ...
0
votes
0answers
22 views

Patrol not forcing https on 404 pages

I've got a site set up with the Patrol plugin, and it forces the HTTPS and www on most pages fine. I've got the sslRoutingBaseUrl, sslRoutingEnabled, and sslRoutingRestrictedUrls set in my general.php ...
0
votes
0answers
16 views

How to save a product via PHP in Commerce 2?

I'm trying to save a new product with variants via PHP. $product = \Craft::$app->elements->createElement(\craft\commerce\elements\Product::class); $product->typeId = 1; $product->enabled =...

15 30 50 per page