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

What will happen if we change the field type in the fields (settings -> fields) in craft 3?

I am a beginner in craft cms. I just want to know, what will happen if we change the field type in the fields (settings -> fields) in craft 3?
1
vote
2answers
26 views

Proper way to implement array of objects as Craft field

I'm using Craft CMS for the first time and have a question about the proper/best practice to store what would equate to an array of objects (or just a plain array) in Javascript or JSON. Say I'd like ...
1
vote
1answer
12 views

How to reference a user related to entry input in if statement

I am having trouble referencing a user in an if statement: {% set otherEntry = craft.entries().section('other').userFieldInOtherEntry("{externalVariable}").one() %} {% if currentUser is relatedTo(...
0
votes
1answer
14 views

Database Exception: Column not found: 1054 Unknown column 'position' in 'order clause'

I deployed the project from the git repository on hosting. When trying to open the homepage I get the following error: Database Exception SQLSTATE[42S22]: Column not found: 1054 Unknown column '...
1
vote
1answer
37 views

Get address 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 ...
1
vote
2answers
10 views

Redactor image button not showing up

I have seen a few questions the same as this, but none with answers that work. I am trying to use redactor to allow for dynamic blog posts to be written by my team. In my redactor set up file I have: ...
0
votes
0answers
7 views

Edit Order data after transaction capture

I am trying to create a plugin for Craft Commerce that manipulates order data after a payment has been captured. I'm trying to hook into the "After Capture Transaction" event like this: Event::on( ...
1
vote
1answer
24 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\...
1
vote
1answer
13 views

Entry Search Unbearably Slow

Anyone have any tips on speeding up entry searches? Ours are currently taking about 90 seconds per search. Some stats about our Craft database: Entries: 336,000 Relations: 4,390,000 (!!!) Search ...
0
votes
0answers
26 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
14 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 ...
1
vote
1answer
24 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
2answers
645 views

Craft 3 How to get custom user field values

I have following custom fields for users. favouriteEntries - 'entry' type field with multiple entries per user notificationPreference - Lightswitch field My plugin should email notifications to ...
2
votes
1answer
44 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 ...
0
votes
1answer
245 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 ...
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 ...
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 ...
0
votes
0answers
14 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
81 views

Flat pricing for different currencies with sales

I am trying to implement flat pricing for Craft (ie. different fixed prices for products, based on the currency). I have it working thanks to this post (Craft Commerce: Hard code different product ...
0
votes
0answers
16 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/...
1
vote
0answers
15 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
9 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
0answers
30 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
40 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-...
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
47 views

Craft CMS 3 Rich Text Editor

Is there a rich text editor for Craft CMS which supports both HTML source code edit as well as adding images by URL (not uploading to assets)?
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 ...
2
votes
1answer
704 views

Contact Form AJAX not working in Craft 3

This is my first Craft website, and after trying out Craft 2 I decided it would be a good idea to have move my site to Craft 3 for longevity. I used to the free Contact Form plugin and managed to ...
1
vote
1answer
31 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 [...
1
vote
1answer
26 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 ...
1
vote
1answer
23 views

How to loop through Craft CMS query in Angular

Given the following query sample, how can I loop through the entries past the first array in Angular? Here is the query sample: query sample ($section: [String], $type: [String], $slug: [String]) { ...
2
votes
1answer
22 views

Invalid KML file using SmartMap Plugin

I'm using SmartMap for Craft3 to develop this filterable map for Columbia, Missouri. Here's the staging site: http://visionzerodev.org/map-alpha/ This works brilliantly. Huzzah. Now, I also need to ...
1
vote
1answer
14 views

How can I access the Gateways services?

I have been trying to access craft\commerce\services\Gateways; from a plugin but I can't figure out how I need to access it. I've used the following: $gateways = Commerce::getInstance()->commerce-&...
1
vote
1answer
49 views

Craft CMS 3 - Manual database backup

Since my hosting provider is blocking mysqldump on its server, I'm trying to do a manual backup of my database in order to import the DB into my test environment. I'm stuck on the elements to ignore ...
2
votes
2answers
407 views

Redactor formattingAdd not working

I've used redactor's custom formatting option before, but now I can't get anything to work. Here's what my file currently looks like: { "buttons": [ "formatting", "bold", "...
2
votes
1answer
27 views

Revisions limit

To extend the revisions limit I currently edit the "vendor/craftcms/cms/src/templates/_includes/revisionmenu.html" file. But I have to do it after each Craft CMS update. Is there a better way to do ...
1
vote
1answer
23 views

Group by related entries field

I have a channel of Musical Compositions: Now all these Compositions have a Composer. All the composers are stored in a separate channel and then linked with their respective compositions trough a ...
2
votes
1answer
27 views

Craft's control panel search function returning inconsistent results

When I search for titles of entries in the Craft control panel, I get odd results: I have an entry called Fake Story about the Economy. If I search for that exact title, I get no results. If I ...
1
vote
2answers
70 views

Matrix field within a matrix field

I am working on a product page where I want to give the option to the user to select between which sections they want to use eg banner section, description section, video section etc. Now since the ...
1
vote
1answer
28 views

Calling unknown method: craft\models\Section::hasUrls() - Craft 3 upgrade

I am migrating a site from Craft 2 - Craft 3. In my sitemap template I have the following code; {% for section in craft.sections.getAllSections() %} {# We only care about sections that have URLs #} ...
1
vote
1answer
33 views

Imperavi Article (WYSIWYG editor)

Any plans on adding Imperavi's Article WYSIWYG editor to Craft CMS, like Redactor?
1
vote
1answer
169 views

How to find my Craft ID account details

I am developing a website on Craft CMS and now I need to change the domain for my Craft account. Because it's giving me an error "The license located at config/license.key belongs to...." I do not ...
1
vote
1answer
28 views

order and limit the occurrences of related categories

I'm generating a list of all related categories of the entries listed on the page. {% for entry in entries %} {% set categories = craft.categories.group('functieGroep').level(2).relatedTo(entry)....
3
votes
2answers
2k views

How to query an entry by a custom field in Craft 3

How do you query an Element by a custom field in Craft 3? My first try, according to craftcms/docs was: $country = Entry::find() ->section('countries') ->where(...
1
vote
1answer
60 views

ext-zip trouble

Issue: craftcms/cms 3.3.9 requires ext-zip * -> the requested PHP extension zip is missing from your system. Details: I am running on MAMP Pro 5.3. Currently using PHP 7.3.3 (but previous ...
1
vote
1answer
13 views

$order->dateOrdered returns a string value the first time and DateTime after that. [Order got through event]

I am using the Commerce 2 plugin and I am experiencing a very odd issue. Once an order is complete I want to use the dateOrdered property to create a csv which I send through a request endpoint. That ...
6
votes
2answers
523 views

How to setup assets in multi site where each site should have its own assets?

I have a setup with multi sites that are separate domains. site-a.com site-b.com I would also like to have assets separate for each site, like so: site-a.com/images/picture1.jpg site-b.com/...
1
vote
1answer
25 views

project.yaml synchronize error (not usable anymore)

I had a table field and created a new super table field to try something. After that I removed my table field and gave my super table field the same handle like the old table field had. I did it ...
1
vote
1answer
458 views

Craft 3: admin is showing “500 Internal Server Error” (apache) after fresh install

Just successfully installed a fresh copy of Craft CMS via web browser method under: http://kultursprung.org Frontend is visible but the admin is showing raw Apache error 500 after fresh install: http:...