All Questions

0
votes
0answers
4 views

How to add an Element sortOption to sort by number?

I have an Element. It's a Structure, with one level (not sure if that is relevant). I'd like to add a Sort Option that allows a user to sort the Element Index page for this Element by a number. The ...
0
votes
0answers
9 views

Feed me deletes my matrix field content

i have 2 matrix fields in my section which contain text-fields, multiselect-fields, radio-button-fields. The content of these matrix fields are deleted everytime i run my feed. But i don't import ...
0
votes
0answers
6 views

Edit Freeform PRO from frontend

I want edit form functionality with Freeform PRO. Seems like not possible. Any way we can do that? I see this answer Q: Freeform - have users update form on the frontend but it only works if I am ...
1
vote
0answers
14 views

Passing optional variable values into an include template

Craft noob here. I have an include file which I'm calling a "component" so I can reuse it across the site. The component is set up like this. <h2>{{ heading }}</h2> {{ bodyContent }} {% ...
1
vote
0answers
4 views

Sprout Forms - include hidden fields in notification emails

I need to include the contents of a hidden field in my form's notification emails. I know the field value is being captured, as I can see it in the CP, but it's not included in the emails. I thought ...
1
vote
0answers
9 views

Craft 3 Cannot Save Global Set

I am playing around with Craft 3 and for the life of me cannot get it to save an element programmatically. I am trying to save a Global Set from a module like so: $config = [ 'name' => "My ...
0
votes
0answers
10 views

How to force the language for sending system messages?

I use some default Craft controllers to perform front-end actions such as user's email update (with users/save-user as action value of user profile form). As my project is multilingual, I would like ...
0
votes
0answers
9 views

Transition content from deprecated fieldtype

I used a special input mask field on a Craft 2 installation. Now I upgraded to Craft 3. Since the fieldtype doesn't exist for Craft 3 I converted the field to a plaintext field. Now all the fields ...
1
vote
1answer
9 views

Can I have non-boolean TargetBlank output using HTMLPurifier and the Redactor plugin?

I'm using the Redactor plugin throughout a Craft 3 site and I'm also using a custom HTML Purifier config to clean up the HTML (surprise). { "HTML.ForbiddenElements": ["&nbsp;", "br"], "...
1
vote
1answer
19 views

Events documentation for Craft 3

I've been looking for an Event Reference doc for Craft 3 just like what we had for Craft 2, but couldn't find one. The only events doc I found for Craft 3 is the plugin updating guide: https://docs....
1
vote
0answers
9 views

FreeFrom recipient's name is a zero

When sending email notifications to users via FreeForm, the recipient's name is a zero; see screenshot. Looking at the documentation, it doesn't appear I can set the recipient's name in the heading ...
1
vote
0answers
17 views

Craft 3 Feed-Me Auto run all feed

I currently use Feed-Me to pull data from an API-Endpoint. This API-Endpoint does change from time to time, providing new elements with each change. I don't want to manually trigger the Feed-Me-...
1
vote
1answer
18 views

How can I load the templates from a module?

I'm creating a module that contains some predefined templates. How can I load them directly out of the vendor folder? I've tried doing Event::on(View::class, View::EVENT_REGISTER_SITE_TEMPLATE_ROOTS,...
0
votes
0answers
21 views

Plugin failed to install with mysql error message

I've sent this to craft support but wondered if anyone on here could shed any light on this for me. I'm working on an external dev site I've upgrade a craft2 site to craft3. Which was successful. ...
1
vote
1answer
18 views

Solspace Freeform upload multiple image files

I've had a good look around and can't find any template reference to uploading multiple images with Freeform. In settings i've allowed for 5 files in 'File Count'. I'm using the following template ...
1
vote
0answers
10 views

Commerce 2: How to get the tax amount of a line item, or the line item subtotal without taxes?

In Craft Commerce 1 we could get the tax amount for a line item by using lineItem.tax Now, in Craft Commerce 2, this always returns 0. How can I get a line item's (or variant's) tax amount, or ...
0
votes
0answers
13 views

Images on site down [on hold]

All the images on our site are down. I’m noticing the GD extension is showing an error. Is there something that needs to be done on our side to fix this?
0
votes
0answers
24 views

Localization - “not found” in CP on language selection

Folks: I'm creating a localized site on Craft2 and CraftCommerce. I have followed the instructions for creating a localized site but none of the content shows at the localized URL and the homepage ...
1
vote
0answers
23 views

XMLHttpRequest Craft Commerce Cart Update Issues

When using XMLHttpRequest to update cart like the following, I get a 500 error for 'lineItems': {[lineitem]: {'qty': value}} (and also {[lineitem]: {'remove': true}}, any other submission works); var ...
1
vote
1answer
14 views

Error with Contact Form plugin on submission

I am using the Craft Contact Form plugin (https://github.com/craftcms/contact-form) and am having an issue where I get an error page on submission. The form is submitting correctly (the submission is ...
1
vote
1answer
22 views

Ajax post request front-end csrf token

I'm trying to make a simple post request with ajax to a controller in plugin. The problem I'm having is that I always get a 400 Bad request because I don't send a valid CSRF Token. But I can't figure ...
1
vote
1answer
21 views

Get only enabled variants of a product

I would like to get all enabled variants for a product. I refer to the following question, where a method for limiting a for-loop is given: Disabled product variant still shows in {% for %} loop In ...
0
votes
0answers
12 views

redactor or ckeditor unable to add bullet points

I am unable to add bullets points to an entry, where am I going wrong? snapshot of the backend of entry using redactor snapshot of what appears on the frontend P.S i've also tried CKeditor but with ...
1
vote
0answers
9 views

How to access a digital products information on the products page in Craft Commerce?

I have created a digital product type and a digital product but strangely on the digital products template I can't access any information regarding the product like for example, entry.title. I'm ...
1
vote
1answer
23 views

Updates on live server without using Control Panel

I'll freely admit to being a bit of a newb when it comes to SSH but wanting to start utilizing it more for my Craft3 sites. Maybe this is an irrelevant question but is it possible to update craft on ...
1
vote
1answer
21 views

Filter Entries by Category fields & refresh URL and list with AJAX

I'm finding myself stuck with filtering entries that are related to categories using a category field. I'm looking to build a sub-navigation on a page, where I can select from a select field or from a ...
1
vote
1answer
23 views

Custom Clicklable Image

I've been using Craft CMS for a while, but haven't seen any way to get the following done: Looking to create a page with a large image on it. The image would be overlayed with buttons that pop-out a ...
1
vote
1answer
21 views

How to set Commerce 2 confirmation email in .env file?

We're just in the process of upgrading from Craft 2 with Commerce 1 to Craft 3 and Commerce 2. One of the issues we had before was that the client was getting confirmation emails for test orders. Is ...
1
vote
0answers
23 views

Order entries by a matrix field category

I have a lot of trouble in understanding the database/model structure and how to work with the query builder. I tried playing a bit with leftJoins but i cannot seem to make complex queries in craft 3. ...
1
vote
1answer
9 views

Pagination with users

How do I get pagination set up with the following? It should be easy but I'm getting in a muddle. {% set myUserQuery = craft.users().group('members').order('companyName asc').limit(10).find %} {% set ...
1
vote
2answers
16 views

Removing old Block Handles in Matrix Field?

I'm working with Matrix field. When adding and then removing and then adding again fields with the same handle I get the following error. Handle "videoUrl" has already been taken. Is there a way of ...
1
vote
0answers
28 views

How can I find out what type of entry is getting used?

I have an include that is being used for plain entries, and is also being used for categories. (Categories have their own urls) {% if entry is defined %} {% set entry = entry %} {% elseif ...
1
vote
1answer
11 views

“The license located at config/license.key belongs to gridserver.com”

Getting this notification at the top of the control panel. This is a solo/free license version of Craft. It happened after I updated my client's domain's DNS to point to my server. When I ...
1
vote
1answer
22 views

How to filter entries by tags array using ['or'] and by category not using or

This works for filtering by tag array {% set relatedToParam = ['or'] %} {% for id in selectedTagIds %} {% set relatedToParam = relatedToParam|merge([{ targetElement: id }]) %} {% ...
1
vote
0answers
20 views

Move an asset to another volume with volume specific OptimizedImages Field and on the entry a volume restricted Asset Field

I have three volumes: content, hero and overview. Each volume has his specific OptimizedImages Field(s). Asset Fields are restricted to its specific source volume. For example: A Super Table Field ...
1
vote
1answer
18 views

Display notification if no entries exist for status criteria and logged in user

I'm aiming to display disabled entries for a logged in user and a message if no entries with this criteria exist. I've tried two different ways without success. Version 1 gets all entries - live and ...
1
vote
1answer
14 views

Open pop on click of custom action and get filled data

I created a new custom action. A new button is added in getAvailableActions(), now when i click on that button i want to open a pop up box ( i used Default pop up. Template File path : /craft/...
0
votes
0answers
9 views

How do I get admin console back after fatal error on upgrade? {“error”:“Class 'craft\\events\\RegisterTemplateRootsEvent' not found”}

I attempted an upgrade to 3.04 (before a breakpoint) and received a fatal error {"error":"Class 'craft\events\RegisterTemplateRootsEvent' not found"}. The CP is not accessible and website is ...
1
vote
1answer
25 views

Sprout Forms Email

I have an entry where I select which form displays on the page. Is there a way for me on the entry using a text input for an email address to use that email address for the sending of emails via the ...
0
votes
0answers
29 views

No users added to database after initial Craft3 installation [closed]

I have just setup another Craft 3 site the same way I usually do, however this time my user credentials set in the craft setup process from the CLI haven't been added to the database. And every ...
1
vote
1answer
23 views

What variables are available to redirectToPostedUrl?

Craft's Web Controller has a redirectToPostedUrl method. Copied here for the sake of discussion: public function redirectToPostedUrl($object = null, string $default = null): YiiResponse { $url = ...
0
votes
0answers
29 views

Entries table with an inline toggle

I have a news item entry which have a toggle switch "pinned on frontpage". This is accessible through the edit resource page like normal but now they want an inline switch in the news entries overview ...
1
vote
1answer
34 views

Fetch the three entries before, and after, a given Structure entry, with wrapping

For a given structure entry, I need to return the previous three, and the next three entries as one array. But if the given entry is the last in the structure, I need the "next three" to wrap around ...
0
votes
0answers
8 views

Multi-site throwing a 404 — but only on staging server

I inherited a site and upgraded it from 2 » 3.1. The site is in both EN and ES. There's a button to toggle between languages and it works fine on my dev environment. site.co/en serves up English and ...
3
votes
1answer
28 views

Test for entry status

I want to test for the existence of disabled entries for the logged in author in a section. So far I have this: {% set profileEntryQuery = craft.entries() .section('profileEntry') .status(...
1
vote
1answer
42 views

Count entries with condition

I would like to count comments that belong to a certain entry (product). I have this so far: {% set comments = craft.entries().section('productcomments').all() %} {% set counter = 0 %} {% for ...
1
vote
1answer
19 views

How to modify element's data during import?

I'm trying to modify the element's data during the import. I'm using EVENT_STEP_BEFORE_ELEMENT_SAVE to modify the $contentData. I added some logging at each step and I can see that the $contentData is ...
1
vote
1answer
24 views

Restricting file size for an Assets Volume

I have a use case where I want to limit the allowed file size for a certain Assets Volume to 20kb. All other volumes should be allowed files no matter the size. I have looked at some other threads ...
1
vote
1answer
25 views

Language Switcher with Users

I have the following setup for a language switcher. I have Member Directory pages which are using Users (rather than Entires or Categories). How can I update this to get it working on these pages? {% ...
1
vote
1answer
20 views

Notes about your changes

On a CP edit entry page there is a box for 'Notes about your changes'. I have entered text in there and saved the entry, but it doesn't seem show up anywhere. How does it work?

15 30 50 per page