All Questions

0
votes
0answers
5 views

Asset Upload Form Field Error States

I currently have an asset upload field, but I'm trying to make it call errors back if the image isn't an extension that's set within the field, allowing users to understand why the form didn't save. ...
1
vote
1answer
6 views

Moving site to subdomain

I am moving our current site to a subdomain and get this: "Craft CMS requires the PHP multibyte string extension in order to run." I have updated the $craftPath variable and System->General->...
0
votes
0answers
6 views

Next in structure if lightswitch field off?

I'm trying to get the next field in an entry if a passwordRequired Lightswitch Field is switched off. How would I go about that?
1
vote
1answer
6 views

AuthorizeNet CIM gateway in Commerce 1

Is there any barrier to using AuthorizeNet CIM gateway in Commerce 1? The vendor/omnipay/authorizenet folder has a CIMGateway class but there doesn't appear to be a corresponding ...
1
vote
1answer
11 views

Accessing Commerce product variant dimensions in the template

I have been unable to locate anything in the docs or any questions on here regarding how to print the dimensions associated with a variant in the template. All I have managed to find is how to print ...
1
vote
1answer
25 views

Good way to handle multisite fallback templates

So I've got a multisite going on. For most of the sites, most of the time, they'll be using the same templates. But I want a good way to handle siteX needing one template to be different from the ...
1
vote
1answer
13 views

Craft 3 Registration Form Success Redirect

Is it possible to redirect the user to a specific page after they successfully complete the front-end registration form (before activation)? I've tried adding: <input type="hidden" name="action" ...
1
vote
1answer
14 views

Connect to an external database from a Craft 2.x plugin

I recently saw a very helpful post about how to connect to an external database from a Craft plugin and I wanted to confirm I understood the implementation correctly. On this response the author ...
1
vote
0answers
16 views

Combining multiple categories based on URL segments

I have two category groups - brands and resources. Under these I have product videos and documentation entries - section ‘resources’. I’m using the brands categories elsewhere for products too so I’ve ...
1
vote
2answers
26 views

How to upload a template in Craft CMS 3 on an Ubuntu web server

Really new to this platform and could use some help with how to upload a theme/template which I downloaded from ThemeForest. The files are compatible with HTML 5 and Craft 3 is on an Ubuntu server.
1
vote
1answer
8 views

Plugin CKEditor outputs something with nothing?

I have a problem with the CkEditor for Craft CMS. If I leave the textfield empty and save it, the output in the browser will still contain <p>&nbsp;</p> when I want it to be blank. I ...
2
votes
1answer
19 views

Call function from plugin in template

In craft 2 I had a simple plugin that I used to run some php code. I could call the function like this. {{ craft.pluginname.functionname }} However I have been unable to do the same thing in craft 3....
1
vote
1answer
12 views

Possible to paginate product variants in Craft Commerce 2?

I am currently in the process of building a commerce 2 site with a very detailed level of nesting in the product options so we're looking to list all variants for a product. (Sounds silly, but it ...
1
vote
1answer
15 views

How do I create a structure side navigation that will show active parent list-item and active child list-item

A bit of a background on the project. I have a features structure section, that has 2 levels: Parent features & Child features. {% set features = craft.entries.section('features').all() %} My ...
1
vote
1answer
6 views

How do I get different URL Format with parent/child structures & how do I display different templates?

I need to create a features structure section for a website that will have parent features and child features. Q1: How do I get different URL Format for parent & child pages? I need the parent ...
2
votes
1answer
7 views

Including a variant segment in product type template route in Commerce 2

Is it possible to use a wildcard when specifying the template path for a Commerce 2 product type? I want to format my URLs as /type/product/variant Where 'variant' could be a custom field applied to ...
1
vote
0answers
20 views

Adjustables - Tax and VAT

I'm working on a custom payment gateway, and the concept of tax adjustments are giving me some headache. How is this adjustment system, especially regarding tax, supposed to be used? Would it be ...
1
vote
1answer
18 views

How to browse uploaded assets on the front end?

I have a frontend entry form which included a file field to upload files to the entry. All works fine. I even have a delete function to remove individual uploaded files from the entry. The problem ...
1
vote
1answer
20 views

Ran the Craft Updater from Control Panel the current install is no longer working

The previous install (3.0.34) was working fine until I ran the updater from the CP. The update failed with error (couldn't access web.config (IIS)) Now loading CP or front end displays the following ...
1
vote
1answer
16 views

Migrate sprout forms

Is there any way to migrate the configuration of a Sprout Form between my local environment and the production environment? I'm on Craft 3. Ideally, I'd love to generate a migration using the ...
1
vote
1answer
10 views

How to determine if a user's email has changed

I'm trying to determine if a user has changed their email address via a front-end form. From what I've gleaned, the best way to do this would be by checking the existing record during users....
2
votes
1answer
15 views

ImageOptimize not using image url specified in my multi-environment setup and my volume config

When I output my ImageOptimize field in the template, my images are not showing up. If you inspect the image url, it's missing a folder name I'm specifying as part of the url in my multi-environment ...
1
vote
1answer
18 views

Maximum execution time exceeded when adding or updating plugins from the Control Panel

When I try to install or update a plugin from the Control Panel, I see a message "Updating Composer Dependencies" and then the following error occurs. I'm running Craft on a local environment. ...
0
votes
0answers
20 views

Using Label instead of Value from Dropdown

I currently have this dropdown on a front-end form, the problem I'm having is that it's saving the value where I really want to use the label in my templates such as United Kingdom instead of ...
1
vote
0answers
16 views

Merging Entries - Craft 2 worked but not Craft 3

I have this code which merged entries when in Craft 2 {% set entriesOne = craft.entries.section('publications').search('nonMembers:0').ids() %} {% set entriesTwo = craft.entries.section('...
0
votes
0answers
5 views

Some (but not all) controller action routes return 404 on staging server

I've created a module for a project that has several actions, all of which are called through AJAX. Each is a post request that sends over any required params plus the CSRF token using the method ...
1
vote
0answers
19 views

Element type vs. Field type - or: Element type without database storage?

I have already searched for information on this topic but I did not find much. I hope I did not overlook something. My problem is the following: I want to try to write a plugin that lists entries ...
1
vote
1answer
8 views

Sprout Forms and Multi-site on Craft 3

Is it at all possible to get forms to display per site and not all forms displaying to a site admin user? Also an admin user doesn't seem to be able to run reports on there own site, without being an ...
1
vote
1answer
18 views

Craft subdomains

I am looking at creating an events site, and am thinking about using subdomains for each event. They will all be micro-sites listing exhibitors, timetables etc. I would like the domain structure to be ...
1
vote
1answer
18 views

Added custom entry details fields

I'm looking to add a custom fields to the details section on the right of the entry edit view in the control panel. I know that in Craft 2 this was possible using: Craft::$app->view->hook('cp....
1
vote
1answer
18 views

Same content on different slugs

I hope someone can help me to understand this. I have a Channel called eg. "My channel". In that channel i have two entries: Post 1 and Post 2. Those two entries have different titles and content. ...
1
vote
1answer
11 views

Check if title field has a string in ElementAPI

I am trying to retrieve search suggestions for a search form. I sent the parameter entered by the user, but how do I do it in the criteria? I tried this: 'criteria' => [ 'search' => 'title: ...
1
vote
1answer
11 views

ElementCriteriaModel combine with 'and' and 'or' filters

Saying I want to convert the following SQL query into ElementCriteriaModel: SELECT * FROM users WHERE fieldA = 1 AND (fieldB = 1 or fieldC = 1) I can't find a way in ElementCriteriaModel to do so. {...
0
votes
1answer
48 views

CSRF in “Headless” Applications

There are a number of answers here about how to send CSRF tokens along with AJAX requests, but I think my question is a little different. Please excuse the abstractness here: In a headless ...
1
vote
1answer
27 views

Assets page “An unknown error occurred”

I'm suddenly unable to load my site's assets page. All of my asset sources are local, and loading the main assets page or any source folder or subfolder results in "An unknown error occurred." being ...
1
vote
1answer
12 views

Getting Commerce Products using Element API in Craft 3

I am trying to get Products using the Element API plugin. I set the 'elementType' to Commerce_Products, CommerceProducts, etc.., but the endpoint keeps returning: Endpoint has an invalid ...
2
votes
2answers
19 views

How can I add Google MarkerClusterer library to Smart Map?

I started to work with Craft CMS a couple month ago, I have a client that wants to have a clustered map, I went over Smart Map documentation but I couldn't find anything about on how to add Google ...
1
vote
1answer
28 views

Freeform: Remove default styling injection

I seem to be stuck with a simple -- but quite annoying -- question. I'm setting my own styling for a form and keep running into issues where I'm fighting with Freeform's default styling. I'm not ...
1
vote
1answer
6 views

Offline update then upload files to server

What's the best way to update Craft offline and then upload the files to the server? Reason I'm asking is because my updates often fail because of too low PHP memory and I don't have control over the ...
1
vote
1answer
23 views

order by Table Number Field

% set entriesList = craft.entries.section('parks').relatedTo(entry.Line.one()).all %} {% if entriesList|length %} <div id="found-in" class="park"> <ul> {% for ...
0
votes
1answer
31 views

Displaying related image assets from another section with twig

I have a site that shows upcoming football matches in a table, and I would like to include the clubs' logos next to each club name. I have the following sections and entry types, both generated using ...
1
vote
1answer
16 views

Front End Entry Form Select Dropdown Error

My front-end new entry form works, but when I add the complexity of a dropdown to the mix - it error's and doesn't save the entry. (I found this out with trial and error, removing fields until I found ...
1
vote
1answer
18 views

Install Zoho CRM SDK (or any SDK for that matter)

For a client I need to connect a rather complex contact form with the Zoho CRM. They're offering a PHP SDK which sounds great, but I can't get it to work. It's very likely that I'm just stupid, ...
1
vote
1answer
8 views

Unable able to update Freeform Pro from 2.2 to 2.5

I continue to get this error each time I try to update Freefrom. I don't was to alter the table structure since data exists.
1
vote
1answer
24 views

AJAX CSRF Producing Inconsistent Results

I am using CSRF tokens in a form on CraftCMS. Submissions are successful with a standard configuration. Introducing "fresh" CSRF tokens via AJAX on page load is causing some trouble. This is ...
1
vote
1answer
29 views

How to debug a payment gateway error

I created a payment gateway for Commerce 2. When I try to make a payment, an error happens and the flash error I get is this "Invalid payment or order. Please review.". I don't know if my gateway is ...
1
vote
1answer
15 views

Closure in plugin class/ saving and passing a public property

I am struggling with closure and saving a variable. In my class somePlugin i do have a public var $customerId , which should be updated after i execute my setUser() function. To do so i have a setter ...
1
vote
2answers
25 views

Search products and entries with pagination

Is there any way of searching both entries and products at the same time? Wanting a single search on the site which will return all entries and products containing the searched for phrase. Looked at ...
0
votes
0answers
31 views

PHP error on URL routing - 404 page not found

I've suddenly got PHP errors on some, but not all, 'static' URL requests. The solution was to add routes for these URLs. Craft should automatically find directories that match URLs, so what would be ...
1
vote
2answers
34 views

Append custom sitemap to sitemap index

I have a custom generated sitemap which I'd like to append to my SEOmatic sitemap.xml file. Is this possible? I suppose the simple alternative would be to just add an extra sitemap to Google Search ...

15 30 50 per page