All Questions

Filter by
Sorted by
Tagged with
0
votes
0answers
7 views

Craft 3 doesn't translate static strings

I am making a website with Craft 3 and I have some static text that needs to be translated. I followed Craft's documentation on it. I created my translations/fr/site.php file and use the {{ 'String'|...
1
vote
0answers
10 views

Pass Craft Field String to Javascript Function

I tried different solutions given here, here and here. But I get nothing to work, probably missing something small and simple. I have this variable in a .js File: var dziFilesUrl = 'http://...
0
votes
0answers
7 views

How do I pass custom field contents from cart to order

cart.billingAddress and cart.shippingAddress are both are set to the same address and include custom1 and custom2 fields. After submitting the order, order.shippingAddress and order.billingAddress ...
1
vote
2answers
19 views

HTTP 503 – Service Unavailable error

I've cloned a Craft 3 repo that was created by another developer and I'm trying to get it running on my local server but I get HTTP 503 – Service Unavailable – craft\web\...
0
votes
0answers
13 views

Form structure using Matrix and Super Table

I'm quite new to Craft3, and I have to create a complex form which contains selection of product series and setting up the quantities of the products from that series, as well as quantities of ...
1
vote
2answers
18 views

Querying across relationships in a template

I have two Sections on my site: Country and Alert. The Alert section has a relation with Country via an "Entries" field. An Alert represents something that is happening in a particular country for a ...
1
vote
2answers
24 views

Generating Webp Images - Webp Installed but not Generating Images

I'm struggling to generate webp images on my forge server. Here is my process in Craft 3. ssh in to the server (forge) Install wepb sudo apt-get install webp Check it is installed and getting piacked ...
1
vote
0answers
31 views

Dynamic Element API

How can we write Element API configuration files to dynamically output JSON payloads in Craft 3.3? The goal is to create a generic function which only needs endpoint definitions to recursively loop ...
1
vote
0answers
20 views

Cannot get asset from custom user field, with no-admin account

I would like to get a file of custom user field, which is "asset", and provide a link to the file for the user. However, the asset file cannot be gotten. The length of the asset field is zero. In ...
1
vote
0answers
17 views

Craft Table/Tabular static entry input field

Is there a way to set up a Craft CMS entry field to have a table with predefined rows and columns? I have tried with the native Craft Table field, but it allows users to add rows or edit default ...
1
vote
0answers
36 views

How to authenticate as a Craft user with a frontend tool like Next.js, Nuxt.js, or create-react-app?

We're looking to use Craft CMS as an application platform (handling content storage, user authentication, etc) for an upcoming project while leveraging something like Next.js on the front-end. Here's ...
2
votes
1answer
15 views

URL structure for structure section

This seems like it should be straight forward. I need to set-up a structure section with a parent page which uses the same section entry and same template. So the parent would have 'parent' as the ...
0
votes
0answers
24 views

How does “Use this field's values as search keywords” work with a Matrix field?

I'm fine-tuning a search results page and have noticed that "Use this field's values as search keywords" is included both on the matrix field itself, and within each block type / sub-field. I ...
1
vote
1answer
28 views

Any ./craft command throws error

When I attempt to run any ./craft it throws an error, for example: $ ./craft resave/entries Exception 'yii\base\UnknownMethodException' with message 'Calling unknown method: craft\console\Request::...
2
votes
1answer
15 views

How to route 404 errors for multi-site Craft?

Craft looks for /templates/404 by default. What do you do if you have multiple sites?
1
vote
0answers
16 views

How to get an Entry in structure and all of its children and it's children's children with Element APi?

How do I get all of an entry's children using the Element API? I want to return something like: data: [ title: 'Root Entry' uri: 'root-entry' children: [ { title: '...
1
vote
1answer
44 views

Reuse items from array with forloop

I have a loop of a list of regions on a project, this could be an infinite list of areas as my client's customer-base grows. The project branding has four key colours, I have these in an array: {% ...
1
vote
0answers
33 views

Is there a way to include partials in Craft without setting a path?

To separate code and avoid duplication I am trying to split up recurring pieces of twig code into partials (think of a nav or a block of services for example). I tried using include but Craft ...
0
votes
0answers
21 views

Craft and Algolia

I am trying to implement Algolia into Craft 3 and am having a few headaches. I am using scout to update my indexes which seems to be working as expected and am using the instantsearch.js ...
1
vote
1answer
7 views

GraphQL private schema returning public schema scope

I am setting up GraphQL on my Craft project, v3.3.16.3 I have a public schema exposing a public entry type, and a private schema exposing a private entry type. When I switch between them in the ...
1
vote
2answers
29 views

Is there a way to make conditional input fields in Craft CMS?

I'd like to use conditional fields in my CMS instance. I found an old plugin called Reasons. I'm not sure it's compatible with Craft 3, so I'm looking for a workaround.
1
vote
1answer
8 views

Craft 3 replacement for the Craft 2 fileCache component?

I'm upgrading a plugin from Craft 2 to Craft 3 and it looks like the fileCache component is no more. What has replaced it in Craft 3?
1
vote
1answer
21 views

Use sidebar nav icons in modules and plugins

When adding a navigation item, there is the option to specify an icon, but it seems to have to be a path to an SVG. I can see that Craft has its own icon library, and it has an icon I want to use. I ...
1
vote
1answer
24 views

How does a CMS work ? How to add articles and manage them? [closed]

I would like to design a news outlet website, if that's the correct name. I've drawn a little sketch and I have a pretty good idea about the user interface; things like the site logo, nav-bar, ...
1
vote
1answer
20 views

Get products that are in stock

In Craft Commerce 2, how can I query products that are in stock? These are products without variants. Edit: Perhaps this is a Craft-bug? This particular product type used to support variants - but ...
1
vote
0answers
17 views

Using Feed Me between 2 Craft instances

If we wanted to use FeedMe to import changes from a staging server to production, what would be the best plugin (etc.) to use for content feed that Production would use to import items from staging?
0
votes
0answers
22 views

Do not send email activation on public registration while keeping the requireEmailVerification setting on

Is there a way to not send Email Activation on public registrations while keeping the requireEmailVerification setting on. Because, I have two type of users. The one is the off street registration (...
0
votes
0answers
18 views

ElementAPI: How to trigger the Custom service php file when a endpoint is loaded

I am Using Craft 3.3.11 version I have a php file in plugin/elementapi/src/services/EapiServices.php and the same file within vendor/craftcms/element-api/src/services/EapiServices.php When ...
2
votes
1answer
19 views

How to get image url from matrix field

I have an image in a matrix-field, but can't get the url from it. dump(block.image.one().url) says NULL. My code is: {% if entry.hero %} {% for block in entry.hero %} {% if block.type == 'hero'...
1
vote
1answer
17 views

help changing footer on home page

I wonder if you can help. I need to make some changes to the text on the bottom part of our home-page but I'm not sure how to. This site was designed for us by another agency and although I have ...
1
vote
0answers
26 views

Customize Stripe payment intent forms when using Stripe for Craft Commerce (commerce-stripe) plugin [duplicate]

Is it possible to style the fields contained in the Stripe Intents form when using this plugin? Currently the form seems to load with all the interactions but with minimal styling. I'd like to have ...
0
votes
0answers
8 views

Rendering a Wheel-Form from a controller passing variables vs Rendering a Wheel-Form and calling controller actions via js?

I've been working module concept, using Wheel-Form. I can use the Wheel-Form(WF) plugin to save forms in the WF database, so the basic functionality is working. I want to: 1) use Wheel-Form to ...
1
vote
1answer
15 views

How do you output the Image Caption on an asset?

When you double-click an asset you can set the Image Caption: How do you structure the query to output this Image Caption "field?"
0
votes
0answers
12 views

404 shows “Internal Server Error” only on staging environment

Might be a duplicate, but couldn't find this exact question here. I have a pretty basic 404.twig template that should be catching things, as described here: https://docs.craftcms.com/v3/routing.html ...
0
votes
0answers
11 views

Conditionally test for a category level

I want to display different code blocks if a category level is 1 or 2 or 3 – on a category page, but finding this hard to do, if I'm on an entry page I can use: {% if entry.level == 1 %} how can I ...
0
votes
0answers
14 views

Craft CMS security scans: upload of over-the-limit file hangs the system; should it throw exception/error?

We are putting our new Craft CMS 3.2 install (dev environment) through some security scan paces, including uploads of 500Mb files. We'd expect to throw an exception message/error page on an over-the-...
1
vote
1answer
20 views

Applying coupon codes via URL

I was wondering if it was possible to allow a customer to apply a coupon code using a URL or URL params in Commerce 2. I haven’t been able to find any questions on stack exchange or on the web, but ...
0
votes
0answers
17 views

Frontend Form for editing entries HTTP Exception

I took the example form of the craft CMS Entry Form Documentation page and tried to use it on a test site. However i always get a HttpException after submitting the Frontend Form. Here's the Stack ...
1
vote
1answer
16 views

Let admin create price offers/quotes for customers in Commerce

Does anyone know of a plugin (or coming functionality in Commerce 3 or 4) that allows admin to create price offers/quotes for a customer and then send it to the customer's email for review? Scenario ...
1
vote
1answer
17 views

Delete entries from database

I believe I made a mistake by creating about 15,000 entries in a Structure section. It has caused a lot of problems and so I decided to start again with a Channel section instead. I tried deleting the ...
1
vote
1answer
13 views

Allowing duplicate slugs in category paths

Again, I've had a look online but couldn't figure out what I had to do. Say I've got a category structure like the below: Category 1 Saturday Sunday Category 2 Saturday Sunday How can I allow ...
1
vote
0answers
26 views

Craft 3 memcached session storage in load balanced environment

I'm getting the good old session expired popup every minute in the admin panel which is odd given that memcached should be properly configured: php.ini session.auto_start = 0 session.save_handler=...
0
votes
0answers
22 views

How to get previous and next entry using the native GraphQL API?

How do I turn these Craft queries into a GraphQL one? // entry.twig entry.getPrev({ section: "contentHub" }) entry.getNext({ section: "contentHub" }) I want to get the previous and next entry using ...
0
votes
0answers
10 views

Cart total before shipping and tax (but with discounts)?

Wanting to check this out but it appears that there is no property or method to get a total of all lineItems in a cart plus any discounts (so without any tax or shipping (ie. other adjustments)). It ...
1
vote
1answer
24 views

Copy of Craft instance generates “An unknown error occurred” for login

I needed to create a second instance of a craft 2.0 instance and so I copied the current instance to a new instance. I followed the directions found here: https://craftcms.com/guides/duplicating-a-...
1
vote
1answer
31 views

Template not found error when template file does exist

I am getting a Template not found error. Template not found error: case-studies/_category However the template does exist (see screenshot). I have tried clearing the template cache but still the ...
1
vote
1answer
16 views

Error 'form[fieldName] : <fieldName> is invalid' while submitting multiple checkboxes

I have a form with multiple checkboxes in it. However, when submitting the form it returns an error like this: {"success":false,"errors":{"formDate":["Date is invalid."]}} template: <input type="...
1
vote
1answer
24 views

Fetch locale entries does not work in Live Preview

I need to display booth local and localized entries in the same page. So I fetch the different localized entries like this : {% set localeEntry = craft.entries.id(myEntry.id).site('default').one() %} ...
0
votes
0answers
24 views

Set redirect URL according to some conditions

I implemented an API and in one controller I need to open a webview for the user to enter some data from another site and then come back to my site. I am having trouble setting the redirect URL since ...
1
vote
0answers
23 views

Using multiple elementTypes in Element API

I am currently trying to create an autocomplete search with the element-api. I need results from two different elementTypes: Product::class Entry::class How do I get results out of both elementTypes ...

15 30 50 per page