What's the deal with Deno? We talk with a major contributor to find out. Listen now.

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
0
votes
0answers
4 views

Create a New Entry with Fields Populated from an Existing Entry Table

I am still learning how to work with craft on the back end but so far I can see it is a very powerful platform! I was wondering if there is a way that within an existing entry channel say "foo&...
1
vote
3answers
110 views

How do I iterate over a categories field in an entry

I'm using the Scout plugin to sync my entry data to an Algolia search index. In the transformer for the scout.php config file, I need to iterate over all of the categories in a category field on each ...
0
votes
1answer
9 views

Folders required to download when moving CRAFTCMS3 to another server?

If I'm downloading a Craft3 website one server in readiness to deploy onto a new server, which folders should I download aside from?: /templates /web *Also do I need to redownload the 'cpresources' ...
0
votes
1answer
10 views

can't login after move site to local - empty response

After migrating a site to local i can't login into the backend-part /admin/login. There is an error message in the browsers console log VM1974:1 POST http://great-site.localhost/index.php?p=admin/...
0
votes
0answers
34 views

Editing Images in Craft Cause Server to Hang

In the assets area when wanting to edit an image (focus point etc), the server hangs after double clicking an asset. If you checkmark an asset and then select Edit Image, set the focal point and ...
1
vote
2answers
44 views

Video Asset URLs not rendering

I'm trying to output the video files from within a block but get a Calling unknown method: craft\elements\db\AssetQuery::url() error when using the following: {{ block.video.videoFileWebm.url }} ...
0
votes
0answers
22 views

Tons of Apache TWIG errors on Craft 3 website

I'm only getting these errors on a select few pages of my website after upgrading from Craft 2 to Craft 3: TypeError: Argument 1 passed to craft\web\twig\variables\CraftVariable::entries() must be of ...
0
votes
0answers
17 views

How to remove the default cart notice after adding the line item?

I'd like to remove the default notice (Cart updated.) after adding the item into the cart. I have an event for checking the product with the warehouse system and have an error message for showing to ...
1
vote
3answers
523 views

Programmatically add entries to an Entry field (craft\fields\Entries)

I work with Craft 3. I have an Entries field in a global set, I am able to get the global set, and then "read" this field programmatically (in a plugin) to fetch the entries that where added to it by ...
0
votes
1answer
97 views

An unknown error has occurred in asset reindex

I am getting the error: An unknown error occurred for each file in a folder when I try Update Asset Indexes. The folder is a local folder that is outside of webroot. The files just contain json data....
1
vote
1answer
10 views

Using MySQL With just InnoDB storage engine

What are the implications if I create all the Craft database tables on the InnoDB storage engine? Will there be any performance problem?
1
vote
1answer
24 views

Export from Craft 3.4 to Craft 3.0 using Feedback

I have a very strange situation. A production site is running Craft3.0 - there is no easy way to get this site up to Craft3.4. This is not possible at present because of the server and upgrading PHP....
2
votes
2answers
84 views

Unable to register adjuster in module

Following https://docs.craftcms.com/commerce/v2/adjusters.html I am unable to register an adjuster in my module. in my Module.php file I have placed the following inside init() alongside other stuff ...
1
vote
2answers
34 views

Order entries by multiple matrix date field

I have a section with trainings. In each training entry there's a matrix field where we add a new block with a training date, location, etc. So each training has multiple matrix blocks. When I run an ...
1
vote
1answer
18 views

Display entry category

I know this is a really suck egg question, but I finding the Craft docs far less straightforward than EE (I'm just switching over), and so I'm struggling with the easy task of displaying an entry's ...
2
votes
3answers
327 views

How to deploy website from dev to staging from localhost to remote server using composer

I want to upload all my Craft files along with the database to an Ubuntu server using composer. This server is an EC2 instance of AWS. Thanks for the help!
0
votes
1answer
25 views

Changing Image transforms for different media queries

Is it possible to set different image transforms for different media queries? I have a grid layout containing 1 large image and four smaller images on large screens. I have created two image ...
0
votes
0answers
14 views

Address validation error on add to cart

When using EVENT_DEFINE_RULES in module adding items to cart fails as address validation is run. Should address validation only happen when address fields are present in the post data to 'commerce/...
0
votes
1answer
42 views

if statement in a template not working

I am making a condition to use a certain template for a specific article category, but it's not working and giving me an error. {% extends "_layout" %} {% set title = category.title %} {% block ...
0
votes
0answers
14 views

How to override filename saved in Sprout Forms?

After a form is saved I need to concatenate together the {{proposalCompanyName}} handle with the {{proposalFileUpload}} handle so that the saved filename in the Assets folder is proposalCompanyName....
1
vote
2answers
46 views

Add product to cart using code in Craft Commerce plugin

I want to add a specific product to a cart using its ID. I have created a module which runs on Order::EVENT_BEFORE_ADD_LINE_ITEM event. Here I am able to capture the current cart using the below code $...
0
votes
1answer
30 views

Change matrixblock field value before save element

So i have a Matrix with one type of matrixblocks. These all have a field for a custom id which should be set by the system, if empty, before the entry is saved. I can access the individual ...
1
vote
1answer
53 views

How to add class to ul ol tag in redactor by using formattingAdd

I try to add a class to tag ul by field Redactor. I have prepered special config file for Redactor. For example in Redactor field a have a created simple list so i select this list and next from ...
0
votes
0answers
26 views

Craft 3 Hosting on Azure

I'm a newbie with Craft. I want to host Craft 3 application (with TWIG templates) on Azure app services. I couldn't find documentation of Craft's documentation. Any help will be appreciated. Thanks in ...
0
votes
0answers
20 views

Path to asset file shows “Template not found!”

I have a headless Craft CMS site and now the frontend development should start. I have absolutely no frontend or templates as I only worked on the backend. The asset url got created at /images. If for ...
0
votes
0answers
37 views

Stuck upgrade from Craft 3.4

Getting a bit stuck on a site upgrade from 3.4 (3.4.29.1). After updating via composer getting DB errors. Initially: Integrity constraint violation: SQLSTATE[23000]: Integrity constraint violation: ...
0
votes
1answer
553 views

ERR_EMPTY_RESPONSE when accessing order data (MAMP)

I've got a local installation of Craft 3.0.37 and Craft Commerce 2.0.0-beta.15 running on MAMP. When completing an order, an empty response is given by the browser. The same thing happens when trying ...
1
vote
2answers
18 views

How to query EntryQuery for multiple sections with varying types

I think the best way to pose this question is by giving an example: Given a variable $query of type craft\elements\db\EntryQuery, I'd like to get entries from 2 different sections: "people" ...
0
votes
0answers
32 views

Getting access to file in headless cms + GraphQL error

I have a headless Craft site running in a vagrant machine. The site got published for the frontend development in React. My base asset url is xyz.com/images. When I want to open an image from the ...
1
vote
1answer
13 views

Get UI elements of entry in front end

Is is possible to get UI-elements of Craft 3.5 in the front end? Specifically wanting to get hold of the headers I use to separate fields of products. This is my current code: {% set layout = product....
0
votes
0answers
8 views

Adding a specific field to search() parameter that contains an object

I'm currently running a search which contains an object {query:query, subLeft: true, subRight: true} {% set query = craft.request.getParam('q') %} {% set entries = craft.entries.section('example')....
1
vote
1answer
17 views

Null Length Error on Craft Version 3

I am not super fluent in Twig and I inherited a website from a company that built the site in Craft v2. The site was upgraded to version 3 of Craft recently and one of the template pages is throwing ...
1
vote
1answer
32 views

Update entry title for all sites

I'm working on a Craft project that has 3 sites. The content for one section is pulled from an API using a console script which runs every 5 minutes. This has been working fine but I've discovered a ...
2
votes
1answer
18 views

Use own/custom field inside Craft Table

I made my own, fairly simple field inside a Module for Craft 3.x. What settings do i need to define to make it usable inside a table?
1
vote
4answers
454 views

With a categories field, how do I query only the *selected* categories?

Suppose we have a category group that allows for any number of levels to its structure. We also have a category field that allows for choosing any number of categories from that group. In our example,...
0
votes
0answers
18 views

{% nav %} not properly working after {% children %}

The {% nav %} does not work for me as expected. After the last call of {% children %} but still inside the {% ifchildren %} the id of the last child element is used. Only after {% endifchildren %} ...
0
votes
0answers
10 views

Recognizing Twig tags in VS code live server

I'm not sure if this is the correct place to ask this, but seeing as I'm developing with Craft I thought I'd give it a try. Does anyone know if it's possible for the Live Server plugin for VS Code to ...
0
votes
0answers
10 views

Custom shipping methods in Commerce 2

I've been looking at the documentation for a long time now and can't figure out how to create several custom shipping methods in Commerce 2. Does anyone have any examples of how this can be achieved? ...
1
vote
1answer
56 views

How to build a web page using different sections created in Craft

I am a beginner in Craft. I have a Craft website. There is an HTML design with me. From admin, I divided the HTML into sections and created entries based on that. All the coding related to each ...
0
votes
0answers
20 views

Getting Events from Solspace Calendar using Element API

I am trying to pull the events from my calendar or calendars through the element api but I am running into an issue with the element type. I found an older post that gave examples but they no longer ...
1
vote
1answer
12 views

How to add custom options or fields to an Order Adjuster?

How do you add options or custom fields to an OrderAdjuster in Commerce 2? I'm migrating a website from Craft2 to Craft3 and need this, this is how I do it in Commerce 2: $promotionsAdjuster->...
8
votes
5answers
2k views

How do you set a user's group on a registration form?

In a registration form with public signup possible, how do you set the user group for a particular form? As a stop-gap I am attempting to use the following code: function init() { craft()->on(...
0
votes
0answers
16 views

How to edit interactive “properties for sale” map

I'm trying to edit a section on the following webpage: https://edengardensepping.com.au/now-selling I am new to Craft and this has been a website handed to us to be updated after being built by ...
0
votes
0answers
40 views

Search results not showing all entries

I have a search results page that doesn't show all matching results. The result entries that do show appear to older entries that have smaller ID numbers, although I'm not sure if that has anything to ...
2
votes
1answer
227 views

How does Craft CMS cache with Redis?

I don't understand how Craft CMS processes cache with Redis especially when saving to database/s? My environment: Craft Pro 3.4.8 PostgreSQL 12.2 PHP-FPM 7.4.3 Redis 5.0.7 I followed examples from ...
1
vote
1answer
91 views

Update Cart’s address ID from plugin

I want to try and stop Commerce 3 creating a new customer address if it’s a duplicate of an existing one. As an example, a store selling digital products has a checkout form that simply asks for the ...
1
vote
2answers
43 views

Guest user registration using Commerce 3

I have just started using Craft Commerce (only Lite version currently) and I'm currently trying to get to grips with what is possible. My question is regarding subscriptions. The site that I'm working ...
1
vote
1answer
64 views

How many simultaneous visitors Craft CMS can handle?

I am looking for a CMS as a backbone for front-end work and I like CraftCMS by its interface and structure, so I wonder if CraftCMS is capable for this project. In practice, most of the work will be ...
1
vote
2answers
15 views

Getting an zero index and count for an entry list

I currently have an entries field which outputs a list of related entries on page. I'm trying to find a way to display two values for these entries. The first would be a zero index. I'm trying to ...
0
votes
0answers
23 views

Website Stuck on Load after few requests

I'm facing a weird issue here. I'm developing a CraftCMS based website and all seem to be working fine, until after a few requests (clicking around 4 ~ 5 requests) the website seem to keep loading and ...

1
2 3 4 5
32