All Questions

0
votes
0answers
1 view

Is it possible to change the group that a user belongs in the front-end?

A little background: I working on a website running Craft v.3 Pro and Commerce v.2 Pro The user can register as a member from the front-end. They will be able to select only one of 3 different ...
0
votes
0answers
3 views

Get Entry by Specific ID

I have a Freeform Email Notification getting sent out where I'm trying to fetch the ID of a specific entry that the Email is associated to. The emails are working, yet the entry that it's returning is ...
0
votes
1answer
14 views

Error creating new volume

When creating a new volume (same process as the other 3 volume I currently have and which are fine, I'm running into the following error). Any help would be appreciated.
0
votes
0answers
6 views

How to manage multiple categories and entry url formats

I have a setup in craft2 like below: Section: products Url format: flowers/{productCategory.last.uri}/{slug} Categories: cat1 = Bouquets cat2 = Valentines days Url format: flowers/{slug} The ...
0
votes
0answers
4 views

Importing Commerce Variants from google sheet

How I should set up google sheet data to import Commerce Variants from it? It is necessary that the Variants are imported in the same way as this example. Thanks.
0
votes
0answers
11 views

Freeform Email Notification HTML template not found

I have set up Freeform Email Notifications, but I need them to be HTML templates within my templates folder to access the entry that the form is attached to. The problem is that Freeform keeps giving ...
0
votes
0answers
10 views

Get entries whose title has a keyword or related to a category's title

I am trying to get entries that either their title has the keyword or their category field title. I am getting them from my plugin, not twig. I tried like this: $keywordCategory= Category::find()->...
2
votes
0answers
6 views

How to add Setting Page in my plugin after updating plugin

I had created a plugin, but now I need to add a setting Page. If I remove plugin through composer remove and install it again through composer require, I get the setting page, but if I just update the ...
0
votes
0answers
6 views

Craftcommerce2: View all orders of a specific product?

I'm looking to generate a sales report for a specific product It should not be linked to a user's orders but just a general list of sales for that product and its variants Is this possible? Thanks
0
votes
0answers
7 views

Missing address and shipping info

Folks: I've had a site up and running for some time. All has been well until a recent move to a new server. Since the move, a very small percentage of transactions are coming through with no ...
0
votes
0answers
6 views

Entries associate with wrong site after unchecking “propegate entries across all enabled sites”

I have a channel that was enabled for one site, but we now need to be enabled for a second, pre-existing site. I want unique entries for each site, so I unchecked "propegate entries across all enabled ...
0
votes
0answers
9 views

Purge HTML but leave Line Breaks

I'm looking to purge all the html from a text field, but leave the line breaks in there. I currently have the following code, which makes line breaks happen, but unfortunately, people can add html to ...
0
votes
0answers
8 views

Commerce 2 — Guest checkout error: no customer email address exists on this cart

I'm having a problem with checking out as a Guest. Below is the design so you can see what I'm talking about... Although I'm entering an email address in the Guest Checkout email field — when I get ...
0
votes
0answers
6 views

Is it possible to use craft()->runController with variables in Craft 2

I'm trying to run a plugin 1 controller from plugin 2. I can get it to run and re-direct to plugin 1's controller but as it is not being run with posted variables I need to be able to tell plugin 2's ...
0
votes
0answers
18 views

How do I correctly send an external request to a module controller? runAction() is returning null

Craft 3.1.18 I have a simple controller VeteransController made using the updated Business Logic module. The purpose of this controller is to create a very simple endpoint for an external Vue ...
0
votes
0answers
10 views

Log is full of “SAVEPOINT LEVELx does not exist”

in the logs of two of our customers who are running on Craft 3.0.41.1 I see a lot of the following error messages: [warning][craft\db\mysql\Schema::releaseSavepoint] Tried to release a savepoint, but ...
0
votes
0answers
4 views

An unknown error occurred - no log entry

After copying files from a web server to my local devbox I am unable to open any 'Entries'. I keep getting two of the following error: "An unknown error occured." The assets section does open and I ...
0
votes
0answers
13 views

Craftcms 3 search form with filters

{% extends "_layouts/main" %} {# till nav #} {% block main %} <section class="content"> <h1>Search Results</h1> {% set searchParam = '' %} {# param handle #} ...
0
votes
1answer
14 views

Craft 3 - Matrix Block for currentUser

I have a matrix block named -> certificado with block -> certificados and fields -> nomeDoCurso, curso, certificado My matrix block has no entries, but is associated to a user. How can i fetch the ...
0
votes
1answer
13 views

Two entries same category

I have two different sections that share the same category group that I want to display both on browser at the same time only if the category is the same. Doing that in Craft CMS is possible. Thank ...
0
votes
0answers
11 views

entry has only NULL fields

I am trying to upgrade from Craft CMS 2 to Craft CMS 3. So far, everything is working and the site is up and running, with the exception of one template. That template (see code below) uses the ...
0
votes
1answer
14 views

How to cache a Guzzle Http request?

In my module I have the following: $client = new Client(['base_uri' => myBaseUri]); $response = $client->request('GET', myQueryString, [ 'headers' => [ 'Accept' ...
0
votes
0answers
7 views

Freeform Plugin: Form not redirecting to Success Page with Ajax

I have defined {{ siteUrl }}contact/success as my Return URL Ajax is turned on. I have uncommented the following in ajaxify.html if (response.returnUrl) { window.location.href = response....
0
votes
0answers
9 views

Guest entries are not able so save without being logged in

Guest Entries Issue: After some Craft 3 updates guest-entries is only saving entries in the section when i am logged in. It's not working anymore for "public" usage. But i can see an hidden CSRF ...
1
vote
1answer
15 views

How to use Saved Card in Craft Commerce

I was able to save cards by using savePaymentSource parameter in my payment form submitting at commerce/payments/pay. But how do I use these saved cards for making payments? I am using Stripe payment ...
0
votes
1answer
6 views

Freeform Plugin: Success Page and Submission ID - Template not Found

I am getting the following error when redirecting the form success message to a page. I am trying to pass in the submission ID... HTTP 404 – Not Found – yii\web\NotFoundHttpException Template not ...
0
votes
1answer
16 views

Order entries by content of their fields

Can I order entries by the content of a field every entry has? {% for entry in craft.entries.section('entries').order( *first time field of a matrix block within the entry* ).all() %}
0
votes
0answers
14 views

Craft 3 cannot upload file to entry in Control Panel

Cannot upload file to entry in CP from a form in the frontend of the site. The flash message in the CP is: Entry could not be saved. {% set section = craft.sections.getSectionByHandle('areaprivada') ...
1
vote
1answer
17 views

Get random entries from a section but keep the order of these when splitting the array

So I want to get 9 random entries from a section and I do this like so: {% set artists = craft.entries .section('artists') .artistImage(':notempty:') .with(['artistImage']) .orderBy('RAND()') ...
1
vote
0answers
20 views

Missing templates using PHPStorm when using Craft 3

Following code show a warning "template not found" in PHPStorm: {% extends '_layout' %}. When adding .twig this warning dissapears, but I'd like to keep extends and includes filetype agnostic. What ...
1
vote
1answer
16 views

How do you get the user id on the front-end?

I'm using Craft Pro to make a website where users have a private area. Users register and when login happens they are redirected to a page in the private area with respective info about that user. ...
1
vote
1answer
7 views

Multisort flag doesn't seem to work

The multisort flag for arrays doesn't work the way I'm trying it. This is how I'm using it. {% for conv in conversations|multisort(['postDate'],['SORT_DESC']) %} This is the error I keep getting. ...
0
votes
0answers
17 views

templatecachequeries entries with of 157.000 characters in query column

after enableling querycaching in craft3 I found rows in templatecachequeries with big amount of characters in the query field. I decoded it with base64 and got this as the largest entry: query_length:...
1
vote
1answer
13 views

How to get an element query into json (for vue) without extra data?

Lets say I want to get a list of category names and ids and pass them into JSON (for vue.js). This is how I'm currently doing it: {% set sections = craft.categories.group('teamCategory').select(['...
1
vote
1answer
19 views

How to display images in templates

I am new to Craft CMS and struggling to figure out how to display my logo in my template. The error message is: Variable "siteLogo" does not exist This is the code I am using: {% for asset in ...
1
vote
2answers
19 views

Searching a subset of fields

I have a section in Craft that has 36 fields, and I want to: set entries = craft.entries.section(sectionName).search(searchCriteria).all() where 'searchCriteria' searches only 6 of the 36 fields. ...
1
vote
1answer
22 views

Extend templates from outside templates directory

I have a setup where I'm using a component library that I have as an npm package. To use these components I need to extend templates that live outside of the /templates directory. So I need to achieve ...
2
votes
1answer
16 views

Maintaining order when getting by entries by ID

I'd like to get a certain set of entries in a specific order, but the element query comes back ordered by the default 'postDate desc' {% set ids = ['4213','3200','4204','4212'] %} {% set ...
1
vote
1answer
24 views

Show entries in the Control Panel as a grid, to reorder position

I am looking for a way to display entries in a (5er) grid in the Craft backend (Control Panel) and show only the featured images. I have a customer who has on her website a gallery, where 5 squares ...
1
vote
2answers
17 views

Multiple authors for an entry

The website I'm currently working on is a plattform where several 'subgroups' can post events but also have their own subpage. So the two affected secrions are 'event' and 'subgroup'. Currently, every ...
1
vote
1answer
29 views

How to move Craft from a subdirectory to public_html

I have my Craft 3 site all up and running on domain.com/2/ I need to move it to just domain.com The Craft files are all one level above public_html like they should be. Not sure what I need to ...
1
vote
1answer
9 views

'Unable to find component class 'FocusPoint_FocusPoint' - Craft CMS 3 Migrating from Focus Point Fields

I am migrating from Craft 2 to Craft 3 where images have Focus Point fields. I've followed Dan Hoerr's FocalPoint Migration (migration guide) And the php migrate script seems to have run successfully,...
0
votes
0answers
23 views

SEOmatic passing through variables

In my _layout.html, I render the SEOmatic stuff via {% hook 'seomaticRender' %} This works fine for basically all content singles/channels, etc. Now I have one template /newsletters/index.twig ...
0
votes
0answers
12 views

Live preview breaks if adding trailing slash to htaccess

I noticed after one of the latest updates that live preview is no longer working, I seem to have narrowed it down to htaccess file which we have modified to add a trailing slash to all urls. e.g. # ...
3
votes
1answer
27 views

How to create an advanced route with query strings?

I have a main structure as my navigation. Within this structure I have multiple image galleries. I want to make the image gallery's urls dynamic. If I define a gallery within the structure entry: ...
1
vote
1answer
14 views

RexEg Pattern to Exclude Using the Retour Plugin

The Retour plugin has this setting: Exclude Patterns - Regular expressions to match URLs that should be excluded from Retour. How would I exclude images (jpg and png) from being handled by Retour? My ...
1
vote
0answers
22 views

Non-admins can't create new entries with front-end form (ajax)

I'm hitting an issue where signed-in non-admin users can't create a new entry with a front-end entry form (but can edit existing ones). Everything works except for this single instance: ✓ Admin ...
1
vote
1answer
13 views

Craft Queues: Job Event

In Control Panel we can see the progress of a certain job. I would like to hook on events like "DONE" or "FAILED" and do certain things in Control Panel, e.g. reloading the page, or redirecting ...
1
vote
1answer
32 views

How to enforce capitalisation on users First Name and Last Name

We have developed a Craft 3 site that has user registration. Once a user account has been confirmed and activated, they are shown in a Contacts directory, which other users can search through. As the ...
1
vote
1answer
29 views

RequirePermission not working

I'm using the requirePermission tag in the templates for my Craft multisite. I only want users who have access to 'edit' that site be able to view it. My code is: {% requirePermission('editSite: (...

15 30 50 per page