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
17 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
45 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
32 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
37 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 ...
1
vote
1answer
86 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
20 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
1answer
44 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 ...
0
votes
0answers
47 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: ...
2
votes
1answer
62 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
0answers
338 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 ...
2
votes
0answers
21 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
20 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. <?...
1
vote
1answer
25 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
109 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
23 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 ...
2
votes
1answer
466 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
38 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\base\...
1
vote
1answer
33 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
321 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
26 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 ...
1
vote
1answer
44 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
41 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
108 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 ...
2
votes
1answer
24 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
43 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
48 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
1answer
84 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)?
1
vote
2answers
104 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 ...
2
votes
1answer
203 views

Imperavi Article (WYSIWYG editor)

Any plans on adding Imperavi's Article WYSIWYG editor to Craft CMS, like Redactor?
1
vote
1answer
147 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
98 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
2k 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 versions ...
1
vote
1answer
32 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)....
1
vote
1answer
19 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 ...
1
vote
1answer
51 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
43 views

\ns\prefix\Plugin::getInstance() returns null from another plugin in Craft 3

I'm building a plugin that extends the functionality of the Contact Form Tuner plugin and customize the email recipients based on different scenarios. The email addresses need to be managed in the ...
1
vote
0answers
51 views

Prevent Redactor from stripping tags like <span>

Is there any possible way to prevent <span> tags from being stripped from a Redactor field? I've tried all I can using custom Redactor and HTMLPurifier configs to no avail. Basically what I'm ...
1
vote
1answer
128 views

Choose not to save an element on EVENT_BEFORE_SAVE_ELEMENT

I want to do some server side checks to see if the entry should be saved or not. In my plugin I have something like that Event::on( Elements::class, Elements::EVENT_BEFORE_SAVE_ELEMENT, ...
0
votes
0answers
28 views

Craft3 DateTime is updating todays date on element save

I have an issue where my new element is saving with the current date and time. I won't want it to save with any kind of date/timestamp. Does craft just automatically put in the current date and time ...
1
vote
1answer
32 views

Can't import a complete url into an url field with feed-me

Description I have a JSON feed which contains an external URL like "https://example.com" (entries/external_link/url). There is no error in feed-me logs when I run it, all the text data and assets are ...
1
vote
2answers
143 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

Strange Link Problem

I am creating a blog with an index page that links to individual blog show pages. I'm having a weird issue where when I click on the title on the index page instead of it linking to: ...
0
votes
0answers
41 views

Toggle class on any tag in Redactor

Is it possible to toggle class on ANY tag in Redactor? This is my current code but it also switches tag to <p> (I guess that's default tag if no "tag" argument is set) when class toggles: { ...
1
vote
1answer
21 views

Image thumbnail generation (on S3/Cloudfront integration) returns blank when first generated

For a client site with S3/Cloudfront integration, we are seeing that images will not be able to load for the first time if they have not been generated before. I'm guessing this is because it takes ...
1
vote
1answer
63 views

Cannot go to site URL while logged in without index in URL

For some reason I can no longer go to my default site URL while I am logged in. Going to http://localhost:3001/craft-site/web/ gives me the following message in Chrome: ERR_TOO_MANY_REDIRECTS ...
1
vote
0answers
27 views

Is any way to add translations for Braintree Gateway dropin interface?

The correct way to add translation to an instance of braintree.dropin is to add options.translations array when calling the braintree.dropin.create method, for example: if ($dropinUi.data('locale') =...
2
votes
1answer
185 views

Is it possible to execute ./craft via cron?

I'm trying to execute Craft 3.3.X CLI commands via cron. I can execute ./craft from ssh no problem, but the same type of commands triggered via cron do not execute. These command works via SSH: # cd ...
1
vote
2answers
404 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\...
1
vote
2answers
527 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
38 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
5 6
7
8 9
32