All Questions

Filter by
Sorted by
Tagged with
0
votes
0answers
2 views

craft 3 multisite: site specific config

I'm trying to do something like this in general.php config for a multi site setup: // ... 'production' => array( 'myVariable' => array( 'site1Handle' => '111', '...
0
votes
0answers
6 views

yii\base\Exception - while saving nested structure entry

while saving a nested structure entry, we're having the following error. The invalid ID is the parent one. Your help is welcome. Nicolas yii\base\Exception - POST Invalid entry ID: 6518 ...
1
vote
1answer
6 views

Display nested category

I have an entry which has a category field 'productCategory' and the chosen category is a nested one (3 deep), I want to output the category and where it's nested, but by using the field's name: {{ ...
1
vote
1answer
10 views

Craft paginate not working in merge Queries

My Code: {% set Entries = craft.entries.section('not loanConsultants').search(searchQuery).orderBy('dateCreated desc').all() %} {% set loanConsultants = craft.entries.section('...
1
vote
3answers
12 views

Freeform - using multiple fields on the same form

I have a set of very long forms. Many of these forms require repetitive field types - example: one of my forms requires the "date" field 15 times. Another form requires at least 30 single line text ...
1
vote
1answer
12 views

Craft console app within windows batch script

I try to create a simple deployment batch script that would work on windows. To do that, I need to interact with Craft console app. How do I pass multiple commands to it to perform installation? I ...
1
vote
1answer
13 views

What is the correct way to attribute FreeForm submissions to users?

I'm using FreeForm and need to create a relationship between form submissions and the user that submitted them. To accomplish this I created a hidden variable on my form called userId. I use ...
0
votes
0answers
10 views

How html title is generated in entry index page in CP

I am trying to find out how HTML title is generated in entry index page in Control Panel. i know it is generated in src/templates/_elements/element.html file by $this->hook('cp.elements.element',...
1
vote
1answer
25 views

Using {% cache %} tags around {% template %} includes (or in Header)

I was wondering if it makes sense to wrap these {% cache %} around {% include %} tags that call a separate file with params. Is it better to just include them in the actual file itself? For example, ...
1
vote
0answers
13 views

How can I show only the sale discount applied to a completed order

I have two orders for the same product. One placed with a sale on the product enabled and the other with the same sale on the product disabled. On the order details template for customers I have the ...
0
votes
0answers
7 views

Commerce preferred currency - user/customer setting

Is there a way for users/customers to set a custom/preferred currency that would be applied to any future carts (assuming more than one currency was available)? Was looking at whether could do this ...
1
vote
1answer
25 views

Redirect to template from controller and pass data

I am building a custom login process which follow these steps: Request user email (submits to custom controller) Check if user has an account If they have an account, show a form requesting their ...
0
votes
0answers
9 views

Deprecated Warning: safeHtml

I'm getting a Deprecated Warning on the property safeHtml: The embedded asset property safeHtml is now deprecated. Use a combination of the isSafe() method and the code property instead. This is ...
0
votes
0answers
15 views

My plugins will not enable on my Dev Site (Macbook and MAMP). What can I do?

I have upgraded my development site to Craft CMS 3.3.9 and when I went tyo enable my plugins, the pop up message appeared stating they were enabled, however, the plugin still shows as disabled. Why is ...
0
votes
0answers
12 views

Issues with Solspace Calendar

If anyone has used the solspace calendar for craft perhaps you may be able to guide me in the right direction. I'm using it as an event manager and I have my events listed as a grid, but I'm having ...
1
vote
1answer
29 views

In entries query, is there a way to check if matrix block is used?

I would like to get entries if a matrix field is used. Something like this: {% set query = craft.entries() .section('blog') .search('myMatrixField|length') .limit(10) %}
0
votes
0answers
24 views

How to get current site (locale) api / plugin

For my form plugin I'm using a global set of fields. These can be set in 2 languages default and en. Problem is whenever I try to output them I cant dynamically make them use the current site locale/...
1
vote
0answers
13 views

EVENT_AFTER_CREATE_SUBSCRIPTION can someone confirm this means successful purchase?

Regarding Event: EVENT_AFTER_CREATE_SUBSCRIPTION https://docs.craftcms.com/commerce/api/v2/craft-commerce-services-subscriptions.html#events The document states "The event that is triggered after a ...
1
vote
1answer
20 views

Images not saving to images folder in web directory

I have been following along the Up and Running with Craft 3 tutorial on craftquest.io I created the assets volume as directed with the absolute file path /c/xampp/htdocs/craftCMS/craftetest/web/...
0
votes
0answers
7 views

Errors relating to svg sanitizer (sanitizer.php) when trying to access setting

Need help to figure out how to resolve this issue.
1
vote
0answers
24 views

Can't finish install, getting error

I am receiving this error when installing via shell: PHP Warning: Unsupported declare 'strict_types' PHP Fatal error: Default value for parameters with a class type hint can only be NULL Each ...
1
vote
1answer
12 views

Can't access “settings”

I can access "settings" in the control panel. Getting these errors: Please help. yii\base\ErrorException: Undefined property: DOMElement::$tagName in /home/I/ingvildholmno/vendor/enshrined/svg-...
1
vote
1answer
22 views

Calling Craft Console Commands from Plugin?

I am in the process of building a plugin that has a controller that accepts a HTTP request. If the token and request are valid, I would like to call a Craft Console Command from within the plugin (e.g....
0
votes
0answers
34 views

general.php not working on staging site

Craft 3.3.8 Locally everything is working as expected. However when I set up the staging site config values are not being respected. I have allowAdminChanges set to true for staging, however when ...
1
vote
1answer
13 views

Show Category Title only where an entry has been included in an Entries field

I have a Category Group with an Entries field assigned so the admin can select which existing Entries should fall within a given category. An Entry can be assigned to multiple categories. On the ...
1
vote
1answer
13 views

How to return a hierarchical list of a site's page structure using the ElementAPI

I'm experimenting with using Craft in a headless way and am successfully using the Element API to return all the data required to show individual pages. However, to be able to show sub navigation and ...
0
votes
0answers
12 views

Payment currency not allowed

Craft 3.3.8 Commerce 2 Lite Version If I change the base currency from default(USD) to NZD or AU in the setting CP > Commerce > Store Settings > Payment Currencies and browse to /shop/ or ...
0
votes
0answers
8 views

Output category hierarchy in Element API

I am looking to output categories in a level hierarchical format. I have multiple categories, with different levels of categories. Entries can be related to different levels of those categories. ...
1
vote
1answer
20 views

How to check if an entry is enabled for a particular site?

Is there a way to find out if an entry is enabled for a particular site? I know there's the enabledForSite property, but it doesn't look like it accepts any arguments. Ideally I'd like to do ...
0
votes
0answers
10 views

Enupal PDF plugin: Passing Variable to Template

I'm using the Enupal PDF plugin and am trying to pass a variable ID into my template that generates the PDF... I'm assuming the following documents how to pass the variable through to the template - (...
1
vote
1answer
23 views

craftcms/vue-asset Related Error on Craft and Plugin Update

When updating my plugins or craft I get the following error... Error: The "https://composer.craftcms.com/p/nystudio107/craft-imageoptimize-imgix/...
0
votes
0answers
6 views

trigger javascript when block is added to matrix or supertable

I need to run javascript to modify a field-input when the user edits an entry and adds a block/row to a matrix or super-table field. Is there an event to listen on or some callback to hook in? ...
1
vote
0answers
20 views

Ad Wizard custom field asset

I'm using plugin Ad Wizard, supported custom fields. Trying include additional asset field for html5 animated banners. Here is dump array: ["groupId"]=> string(1) "1" ["assetId"]=> ...
1
vote
1answer
25 views

Busted control panel after migration

Recently migrated a site from staging server (Digital Ocean VPS) to client's production server – pretty basic shared hosting (their choice). They were running PHP 5.3 so got them to upgrade to PHP 7.3....
0
votes
0answers
10 views

For loop and dplyr for loop issue [migrated]

I need to filter by Gender for each prevalence I calculate, and I want to loop through each type of Race to getting the proper numerator and denominator. But I keep getting the same error. for(i in ...
1
vote
0answers
10 views

Search if Super Table Field Has Rows

I have a section with a super table field, and I only want to display entries in that section if the super table field has rows (so basically a "not empty" search). How do I do this? I tried using the ...
1
vote
1answer
15 views

Craft Commerce: discount taxation

Is there a way in Craft Commerce to apply discounts to the net order total (eg the subtotal/before tax is applied to the order)? Out of the box this seems to discount from the basket/order total.
1
vote
1answer
15 views

How to eager load user Images (photoUrl)?

I've been trying to eager load user Photos, but it does not seem to work. Here's my stripped down code: {% set entries = craft.users({ group: 'coWorkers', orderBy: 'lastName', with: [ ...
1
vote
1answer
22 views

Custom module controller getView()->renderTemplate() path not working

Module loads and controller actions work. Craft 3.3.7. I'm trying to find out what is the path to use to render the view. From the Doc: return $this->renderTemplate('plugin-handle/path/to/...
1
vote
1answer
11 views

How can I add fields in the Sprout design your form?

I am using Craft CMS 2.7.3 and sprout forms 2.6.0 version. I have created a dropdown field in the craft cms -> fields. How can I fetch this field or render this field in the Sprout form design? Even ...
2
votes
1answer
23 views

Asset field empty in graphql query response

I have a problem with a graphql query which includes an asset field. The asset field is always an empty array. There are no errors in the graphiql tool. The graphql api is not public unfortunately ...
1
vote
1answer
14 views

Is it possible to populate a user field in the CP using custom logic upon registration?

Whenever a user is registered in the control panel, we'd like to have a special field (something like a special member id) that is populated either by manual entry or, if the field is left empty, run ...
1
vote
0answers
17 views

Getting value from response (Craft Commerce)

I'm in the process of adapting the old RealEx gateway to work in Commerce 2 since that's what we're using and there isn't native support in V2. I've got payments and 3D secure working, now I'm trying ...
1
vote
1answer
14 views

What is the best approach for multi categories filtering

I need a solution for a good filter approach in Craft. I used 3 Categories related to an entry (Project). The 3 Categories are (Type / State / Location) How do I have to set up the routes for the ...
1
vote
1answer
26 views

How to disable plugin when unable to log in?

I'm getting a blank page for both the front end and the CP/admin, and am tyring to figure out why. I changed my hard drive at about the same time as making a bunch of changes to a plugin, so just ...
0
votes
0answers
41 views

Craft CMS Github Actions

Has anybody created any Craft CMS specific GitHub actions or workflows? I am creating a test Craft website and testing CI so I'm interested to see if anybody has already come up with something. ...
0
votes
1answer
20 views

Is it possible to add to cart with a radio input rather than a select?

I'd like to add a digital product to the cart using a radio input but all the template examples I see use select. Is it possible to use a radio input? With Select (working): <select name="...
1
vote
1answer
18 views

Social Poster Setup Qeustion

When using a plugin such as Social Provider https://verbb.io/craft-plugins/social-poster/docs/providers/facebook and setting up LinkedIn/Twitter/Facebook do you have your clients login and follow the ...
0
votes
0answers
19 views

Plugin development | Update/push relation to existing one, not override

I am currently trying to update entries for a user. The problem is: If i am saving a new relation, it's overriding the one before. My .csv customUserId customEnryId 22 1000 22 ...
0
votes
0answers
8 views

404 on /admin/cpresources since server move

We've moved to a DigitalOcean server and are getting a blank screen when trying to access a plugin. Permissions are all set to 755 (tried 777 also) for cpresources. But we're getting this error in ...

15 30 50 per page