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
1answer
57 views

Weird issue with craft/setup command

I have been trying to install Craft CMS on Windows. I tried composer: composer create-project craftcms/craft d:\temp\craft After that when I try to craft setup there is a loop on the console which ...
1
vote
1answer
136 views

PHP Core Warning – yii\base\ErrorException Module 'newrelic' already loaded craft 3

I upgraded Craft 2 to Craft 3.3. Sometimes I am getting an error in admin like below when saving entries or taking some URL. PHP Core Warning – yii\base\ErrorException Module 'newrelic' already ...
0
votes
0answers
16 views

Load category values based on another category field

I'm really new to Craft CMS, I have a site where I need to do something like this: There are 2 categories, Brand and Model (Models have a relation to Brands via category field). In entries I have 2 ...
0
votes
1answer
36 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
33 views

Filtering by lightswitch fields

Bit of an unusual one and sure must be missing something but know if we have a defined lightswitch field we want to filter against it can quite easily be done so like this: {{ craft.products().myField(...
1
vote
1answer
73 views

Input and Use Twig Variable in External JS Script Across Different Pages

I have created a _layout.twig file which acts as my base to hold content on the page -> _layout.twig: <!DOCTYPE html> <html lang="{{ craft.app.language }}"> <head> ...
1
vote
1answer
15 views

Entries field templating only when entry is added

I have a section type Structure called How to videos, in which I have field type Entries. Now, when I select "Products" in the field type 'Entries'. I only want the selected Entries Products ...
1
vote
1answer
24 views

Image Transforms not generated - permission problem?

Since I installed my Craft based website on the production server the image transforms are no longer generated. The tasks runs through more than 5000 images but doesn't generate new ones. There have ...
1
vote
1answer
42 views

Maintaining and deploying many multi-site from a single codebase

We're developing an application that uses a multi-site Craft back-end with a JS front-end, making use of GraphQL. The intention is to maintain a single codebase that can be used to deploy new and ...
2
votes
2answers
966 views

Moved Craft 3 site to new server and getting “No primary site exists” error

I moved a Craft 3 site to a new server. The previous server was a plain vanilla Ubuntu 16 LTS LAMP stack. The new web server is a Bitnami Ubuntu 16 LTS with a LAP stack (no local MySQL). In the new ...
1
vote
1answer
32 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
13 views

returning HTML in $event->sender->addErrors doesn't work

I have a plugin which is checking if there is a duplicate entry before save. I'm trying to give the user back an anchor to the entry which exists so my client can switch without searching for it in a ...
1
vote
1answer
21 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/...
1
vote
1answer
50 views

Do the number of Sites in a Multi-Site have a practical limit?

My use case is creating microsites for hundreds to thousands of customers, allowing them to edit/create their own site. Currently it is set up with channels with auto-created entries for users and no ...
1
vote
1answer
33 views

Deleting Duplicate Fields Brings down Craft Website and Server

I have somehow managed to duplicate some fields in my Craft install (see image of unused fields). When I delete the unused duplicates I create a server error and can't access Craft. To rectify I had ...
1
vote
1answer
91 views

Disable activation link email for a specific user group

I am developing a website which is having two user groups. The users of first user group will have self activation email with account activation link while second user group will be activated by admin ...
1
vote
2answers
37 views

Twig template outputting blank page on non-“dev” environment

I've created a base twig template which contains some basic "maintenance mode" logic. This works perfectly as long as the main ENVIRONMENT in the .env file is set as dev, but fails for ...
1
vote
1answer
22 views

Craft search only shows results matching 'title' of entries

I´m doing a search on Blog entries, i want to get all relevant entries searching on several fields, and seems that only matches the title. I try already using search(query), now i added the fields, ...
1
vote
1answer
29 views

German special characters like umlauts (ä, ö, ü) are not converted correctly with convertFilenamesToAscii

Filenames with German special characters are not converted correctly with convertFilenamesToAscii, e.g. ä, ö, ü are converted in a, o, u in contrast to ae, oe, ue in slugs with limitAutoSlugsToAscii.
1
vote
1answer
94 views

How to add a custom panel to the debug bar?

I'm working on porting a Yii2 component to Craft CMS as a plugin. This Yii2 component provides a debug bar custom panel that I'd like to enable in Craft CMS too. In classic Yii2 applications, this is ...
1
vote
1answer
37 views

Store phonetics in plain text field

I need to store phonetics for word definitions in a plain text field. An example would be something like "Craft Website" => \ ˈkraft ˈweb-ˌsīt \, like you'd see in a dictionary. If I try saving \ ...
1
vote
1answer
24 views

Error on functions in queue: “Session does not exist in a console request.”

I already experienced this same problem with Craft Commerce a while ago (Error on functions in queue: "Session does not exist in a console request.") and got a solution that solved the ...
1
vote
1answer
15 views

Folders required to download when moving a Craft 3 installation to another server?

If I'm downloading a Craft 3 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
0answers
54 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
121 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
0answers
40 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
53 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
27 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
20 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
580 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
99 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
11 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
25 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
85 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
38 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
19 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
339 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
28 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
16 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
43 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
15 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
53 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 $...
1
vote
1answer
70 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
32 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
22 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
41 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
563 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
22 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" ...
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
9 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
2 3 4 5
32