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
2answers
30 views

Get System Activation email link

On my site a type of user can add new clients and I wanted to automate the activation email, so that when a new user is added then the client will get the activation email. But I'm getting an error ...
0
votes
0answers
31 views

craft commerce "Invalid payment or order. Please Review." on hasFlash('error')

Just trying to make a merchandise web shop with Craft CMS 3 and Craft Commerce 3. However, whenever payment is attempted to be made for merchandise on checkout page with commerce/payments/pay, there ...
0
votes
0answers
33 views

How to print variables inside a PHP Event?

I'm trying to work with the Sprout Forms events to grab a variable from the form and add it to a filename also uploaded through the same form. I am extremely stuck and so far I can't even confirm ...
0
votes
0answers
17 views

Importing fields from ExpressionEngine 2 to Craft

sorry if this is posted somewhere. I couldn't find it. I'm trying to export a site from EE2 to Craft 3. All the tutorials I've found only export/import the pages and it seems like you have to create ...
1
vote
3answers
71 views

SVG with <a> tag does not work

I want to put some links on an image. To be exact, this "Click here" would be a link. I supposed it would be possible with SVG image. However, tag does not work in web page powered by ...
0
votes
0answers
43 views

Locale URL /en not working - No such file or directory (/public)

Some values have been anonimized and are marked with %value% I followed the steps for setting up a local Craft CMS using composer and have the default site running on %domain%.test. Now I've made a ...
1
vote
1answer
27 views

Cache Excesive Assets Size

I have only been using Craft 3 for a short time and I am currently the webmaster of a too big news site. I just checked that the /storage folder is almost 80GB in size. All the size is in the /storage ...
1
vote
1answer
30 views

Wrong default mail view directory?

I have a throuble with email sending from Craft CMS 3. For example, I'm trying to send email based on a custom view placed in mail/test.php. So I wrote this code: \Craft::$app->mailer -&...
1
vote
1answer
38 views

Checkout Without Payment

Recently Craft provide checkout without payment but not working for me. I followed the instruction of craft doc. set config variable: allowCheckoutWithoutPayment https://craftcms.com/docs/commerce/3.x/...
2
votes
1answer
79 views

Ajax pagination in Craft

I followed this tutorial here on how to paginate without reloading the page: http://craftsnippets.com/articles/dynamic-pagination-for-craft-cms it uses Ajax to load in pagination without re-loading or ...
0
votes
0answers
30 views

Failed to publish entry when the autosave is not yet complete

When I publish an entry with that has Neo field, after I editing the Neo field and I click publish before the autosave is complete, the publish will take very long time and even gateway time out. This ...
1
vote
1answer
46 views

Sequential numbering from global field

I would like to add sequential numbering to each entry, which is obtained from a global field. After saving the entry, the global field should be assigned the next number (+1). Does anyone have any ...
1
vote
1answer
47 views

Upgrade to 3.5.8 causing Allowed memory size bytes exhausted error

I'm stepping through Craft release versions while updating a Craft v3 site that is many versions behind. 3.5.7 works fine, but after using $ composer require craftcms/cms:3.5.8 to update to 3.5.8, ...
1
vote
1answer
40 views

Freeform plugin: dynamic recipient

I'm developing a site in Craft 3. I have added Freeform PRO to it. I am just wondering if this is possible: I have created a form, and I want all the notifications of submissions sent to the admin (...
1
vote
1answer
68 views

Parse variable to new queue job

Is there a way to parse a variable to a queue job? I want to re-send some Craft commerce emails via a cron job, so have created a console controller for the cron job to run a command against. This ...
1
vote
1answer
58 views

Debugging Craft CMS templates on Visual Studio Code

Is there a way to debug templates used in craft cms on visual studio code? I tried doing it but I just get this error: "${workspaceFolder}' can not be resolved. Please open a folder." Any ...
1
vote
1answer
42 views

Use NGINX to proxy a Craft CMS site hosted on apache into an existing site

I have a Craft CMS blog site that is hosted on an apache web server. I would like to proxy that site to my Flask-based web app at http://example.com/blog/ where http://example.com is the main URL for ...
0
votes
0answers
33 views

Query Entry where number field is conditional to value

I am trying to get entries where a specific number field is bigger than the given value. But Craft is giving me the following response: Am i missing something or is this not supported for number ...
0
votes
0answers
16 views

Redactor plugin: breakline is added double

I have a simple field, with this config: { "buttons": [ "bold", "italic", "link" ], "breakline": true } What I want is to just ...
1
vote
1answer
30 views

Console command ./craft db/restore expects "info" table. Why?

Why does the console command ./craft db/restore expect the info table to exist and contain a row? There is also no option to ignore a non-existing info or empty info table. When we create automated ...
0
votes
0answers
19 views

Searching a Maps field inside Matrix

I have a bunch of entries, each one with a Matrix field, consisting of a "Location" block type, with "Map" field (Ether Maps). I need to output some JSON, following a keyword ...
0
votes
0answers
12 views

Is it possible when using the DateTime field in Freeform to block dates AND times?

I'm using the freeform plugin for a reservation system. The enduser can book a date and time (30 min intervals). Blocking dates seem straightforward but I don't know if it's possible to block a ...
0
votes
0answers
24 views

SEOMatic Entries not rendering SEO Options Tab

Following an upgrade from Craft 2.6 to 3.6, the SEOMatic plugin is not rendering the SEO Tab for the entries. Any ideas on why this would be? I've updated the settings in the SEO Content in the ...
0
votes
0answers
37 views

Join multiple tables in element-api

My problem is the following: I have a website with products which contains ratings. I have an element-api endpoint to get the products. I want to sort the products based on the average rating or the ...
2
votes
1answer
28 views

Get a list of last level categories in an entry - Craft CMS 3

I saw some similar questions, but not specific like this. I have a list of categories, some have only 1 level, other go to 2nd level hierarchy. Entries can have up to 4 categories related, and they ...
1
vote
3answers
112 views

CSS file not being read by other templates

So I am making a new craft cms website, I have my page entries linked to the template pages/_entry.html, which works fine. I then made another type of pages called news, linked to the template news/...
1
vote
1answer
192 views

How to use Sprig to filter categories using a dropdown

I'm having an issue where I'm adding a dropdown to my search to filter through the first parent attribute in a category (Winter 2020, Spring 2021, and so on). The search field works, but nothing ...
0
votes
1answer
79 views

Import large number of entries every day - 1 million

I have a shopping product feed that is generated every day with around a million products. This can be in any format needed - CSV, JSON, XML etc, and will live on an S3 bucket. Each day, I need to ...
0
votes
0answers
33 views

Automatic Asset Cache Clear

I have a large website that various users need to upload important documents (assets) to frequently. I need to have the Craft asset cache clear every time a new asset is uploaded. The other option I'...
1
vote
1answer
38 views

Access env variables in custom php files

Craft Version 3.2 PHP Version 7.2 Below is my folder structure: Root - Other Craft Folder - Web - Services - Db.php - env file I want to read the connection string of the SQL ...
0
votes
0answers
37 views

craft cms how to modify redactor image upload path

So for my assets field types, I have the Asset Location (Where selected assets should be stored.) set to: {owner.type.name}/{owner.slug} this neatly puts all the files I upload via the asset field ...
4
votes
1answer
77 views

Modified A-Z grouping

I'm trying to output the alphabet where certain letters are enabled/clickable based on whether any entries from a specific section start with that letter. Here's the UI: Getting the A-Z is easy ...
0
votes
0answers
49 views

Internal Server Error after upgrading from craftcms 2 to 3

I just upgraded from Craft 2 to 3.6.14 (latest). I was able to successfully to the upgrade. I am able to get into the admin and was even able to install the feed-me plugin. I ported over all the files ...
1
vote
2answers
37 views

Icons not loading in admin

In some instances of my websites the icons don't load properly. Everything else in the website works, but the icons don't load. The other websites on the same server with the same php.ini file don't ...
0
votes
0answers
47 views

Variable "entry" does not exist - error on homepage single entry

Relatively new to CraftCMS and getting Twig error "Variable "entry" does not exist" on my home page. Noticed another post said to leave URI blank which should fix but didn't. Just ...
1
vote
1answer
37 views

block.type.handle Content Builder Matrix loop

I am attempting to make use of the method listed here https://nystudio107.com/blog/creating-a-content-builder-in-craft-cms twig template: {% extends '_layouts/base.twig' %} {% block sectionHeader %} ...
2
votes
1answer
33 views

Password Update form accepting any data for currentPassword

I'm adding an update password form. This is not a reset password in case of a forgotten pw, but a form that allows users to update at their leisure. I have the current password field name="...
0
votes
0answers
41 views

Why does a cart get added with no Order Number?

Sometimes, the cart gets added without the id as below. Any ideas, please? (Craft Commerce version is 2.2.19)
1
vote
1answer
51 views

Programatically create a Neo block with children

I already discovered how to create a neo block programmatically from this post: How can I set a Neo field's values from my plugin/module? However, I don't know how I can create a neo block with ...
1
vote
1answer
53 views

How would I detect whether an entry's asset field has been updated on save?

We need to send a notification email when an entry's asset field, Custom Image, has been updated on entry save. We're able to do this consistently for text fields but I'm having trouble doing the same ...
1
vote
1answer
97 views

/.craft commands not running from root

I can't run /.craft commands and get the following error: Craft can’t connect to the database. Check your connection settings. Unknown command: image-optimize/optimize/create Caused by: Exception ...
1
vote
4answers
49 views

Querying all content entries for a page

I'm new to Craft CMS and I'm trying to build a new website using Craft. I want my client to be able to change the order of displaying contents of a page by dragging and rearranging them in the Admin ...
1
vote
1answer
33 views

Freeform to show via Vue Js

I have 3 freeforms - form 1, form 2 and form 3. I want a select option on which I click and the necessary form opens as per the selection. Can I render the Freeform which are build using VUE js Select ...
1
vote
1answer
42 views

Sending E-Mails via SMTP with email address that contains special characters

I got a problem with some smtp settings in my craft 3.5.14. The domain of my client uses special characters like (ö, ä, ü) and therefore for their email addresses. In this case my client only use the ...
0
votes
0answers
80 views

Get categories with the number of entries

I would like to retrieve the categories of a group, the name and their fields, but with each one the number of entries that have this category assigned. It's like this question but I'm not using twig ...
0
votes
0answers
44 views

Complex Autocomplete

I want to write a more complex autocomplete search for a craft site. I know there are already some posts here that go in that direction. As they also tried, I approach this problem first by using the ...
1
vote
1answer
47 views

How can I make make the class of an entry link "active" if entry is the current url?

I'm currently using the below jQuery but it's buggy as it relies on looking for 'similar' URL and not the exact URL. Is there a way it can be done just using Twig? {% set mainNavigation = craft....
1
vote
2answers
65 views

Rendering form from Entry Field

I'm trying to pass an entry field type "Formfield" into a template. I have it working without passing any custom values through but when I do it outside of the render tag, No matter what I ...
1
vote
0answers
23 views

Removing or hiding certain fields from the CP new entry for a specific user group

I'm trying to make some fields unavailable for a certain user group when they create or edit a new entry. These fields should only be available to admin users. I had implemented this by extending the ...
2
votes
1answer
30 views

Title Format - Object Label instead of Value

I am trying to get the label from an object instead of its value to use as the automatic title for my entries. For example: I have an entry that contains a dropdown with the handle exampleOne with ...

1 2
3
4 5
35