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
1answer
14 views

Search query for assets

I build a search component, and it works fine. Now I would like to show all the uploaded assets from a specific page ("Downloads") in the search results that include the search key. How can ...
0
votes
0answers
36 views

Craft CMS site with 5 second server responses?

After recent changes on our Craft site and the DB, we are experiencing 5-second server response times. The server checks out and it looks like scripts or the DB itself causing this as a basic HTML ...
1
vote
1answer
36 views

Is there a way to query for structure Entries that have no Parent?

Suppose I have a structure Section with Entries like this: Parent A Child X Parent B Parent C Child Y How would I return this list of Entries? [Parent A, Parent B, Parent C]
0
votes
0answers
15 views

Category’s group (1) is not enabled for site (1). when moving site?

I've moved my site over, importing from the previous one using the project folder. When trying to do a feedme import I'm getting the following error with Categories: Category’s group (1) is not ...
1
vote
1answer
25 views

Can some one explain Event rules in plugins

So here is what I see in a controller: $event->rules['cpActionTrigger1'] = 'plugin/default/do-something'; What does the first part 'cpActionTrigger1' refer to and what does the second part refer ...
1
vote
1answer
16 views

Multiple login forms

I have a need for 2 different login forms: customers and professionals. Each login form is slightly different in markup and heading and has different linkages to the registrations form(s) if a visitor ...
1
vote
1answer
27 views

Filter a channel entry by dropdown value inside a matrix related filed

I have a channel called 'people' where a dropdown is used to say if they like 'cricket' or 'football' Inside a matrix related entry I am trying to show what they like from that dropdown field value ...
1
vote
2answers
59 views

Specific emails failing in queue

I have craft 3.7.11 with commerce 3.4.2 installed. The majority of site emails send correctly, but every few days, one order status change email fails. The prior emails for these orders send correctly,...
0
votes
1answer
22 views

How to alter CP entry edit form

On an entry edit form I'd like to alter the options in a multiselect field to be user relative. Is there something like a form_alter hook?
0
votes
0answers
40 views

Craft not using correct URL on Entries' list link button

I'm using Craft as a headless CMS and when I click on the entry link at the entries' list it uses the Craft Server URL instead of the correct frontend URL (See images). For example: https://craft-...
0
votes
0answers
19 views

Commerce Shipping/Tax Estimates

Within the checkout flow, I am looking to offer an up to date 'shipping/tax' estimation. Looking through the Craft Commerce docs, I found the 'Estimate Cart Addresses' (https://craftcms.com/docs/...
0
votes
0answers
13 views

Images get stuck as temporary when uploaded to an Asset Field in a Matrix Block where the storage path contains the block ID

I'm facing an issue, and possibly a bug or an un-fixable kind of logical issue, where I have a Matrix Block with an Assets Field inside of it. The storage path for the Assets field is pointing to a ...
0
votes
0answers
15 views

How to change site propagation for channels without duplicating all entries over all sites

We currently have setup a template and quite a few sites for the same template up and running using the multi site manager. For all sites the base entries are the same so we first used the setting on ...
1
vote
1answer
28 views

Matrix query fails when using multiple fields

I am on Craft3.5 and trying to build a matrix block query where I would like to return results from two different matrix blocks. The docs seem to suggest that this is possible. This is the code I ...
1
vote
1answer
17 views

How to convert currency is there any way or any plugin available?

I am working on E-commerce website and I am using craft commerce for that.Is there any way or any plugin available for that?
0
votes
1answer
16 views

How can I revert a migrations from the control panel?

Is it possible to revert a migrations from the control panel?
1
vote
1answer
20 views

I am working on a plugin and I have to use a method of one controller in another controller's method?

As I have a method name statistics() in my defaultController and I have to use the same method in viewController is there any way to do so?
1
vote
1answer
34 views

Commerce: Is there any way to give a discount for Product A if the costumer buy 3 Product B?

In Craft Commerce 3, there is a Order Condition Formula that allow us to condition for the discount. So here is my Case. I have product A and Product B, so I will give a discount to Product A if the ...
1
vote
1answer
60 views

How to add a class to an image figure in redactor?

Using Redactor Custom Styles plugin we're adding a button with options to toggle classes on figures. It mostly works except for images. Here's an entry in our redactor config. "customStyles":...
1
vote
1answer
21 views

What are the minimum permissions to show the Craft debug toolbar?

To help validate a process is in place, we would like to allow a tester to login and view the Craft debug toolbar to see the logs. Currently, we have given the tester Admin, but we would like to only ...
1
vote
1answer
21 views

Craft Plugin Implementation: How to get handle of Field in getInputHtml() function

How to get handle of Field in getInputHtml() function. This is my function: public function getInputHtml($value, ElementInterface $element = null): string { $name='test'; ...
1
vote
1answer
30 views

global variable {{ siteUrl }} in multilingual sites

In multilingual sites the global variable {{ siteUrl }} should not point to the URL with "/de/" if it is included in the templates head section for pointing to a global js-file or css-file (...
0
votes
0answers
39 views

Localization for "Home" site (eg https://example.com/de" results in 403 — Forbidden

I have set up a multilingual site in Craft CMS and the localization (via url-slug eg. .../de/...) works on all pages. However, on the home site (index.twig) this leads to an error message "403 - ...
0
votes
1answer
50 views

Regular Expression replace not working within Twig Template

I'm attempting to capture 4 attributes of an Attributes of an tag and injecting inline styles to the style attribute. Craft CMS and Twig templates are being used to generate HTML emails here, hence ...
1
vote
1answer
42 views

Can't register custom adjuster with Craft CMS commerce

following https://craftcms.com/docs/commerce/3.x/extend/adjusters.html#writing-an-adjuster I am trying to make a custom adjuster: I placed class myPlugin extends Plugin{ Event::on( ...
1
vote
0answers
32 views

Element API relatedTo not working

I'm creating a lazy load/infinite scroll based on the tutorial but I want it to grab entries that are in categories. It doesn't seem to be doing anything with it at all though. It's returning the list ...
0
votes
0answers
19 views

Unable to save/edit system messages due to "a sever error occured"

I am trying to send the user activation email to registered users, however the email sent is blank and in the email settings of the backend I cannot edit or save the System Messages. On the backend it ...
0
votes
0answers
20 views

How can I add a new event from the front end to a solspace calendar event field added to the user profile

I am trying to add a new event from the front end to a solspace calendar event field I added to the user profile. I created a calendar event field then added it to the user profiles. I can add an ...
1
vote
1answer
14 views

Is event fired in Sprout email when entry is disabled

I'm at Sprout Email 4.4.9 and wondering if the plugin is built to send email when entry gets disabled status on event "When an entry is saved" under send rule {not entry.enabled ? true}
1
vote
1answer
41 views

Search within matrix Block content

I have a frontend search form and I want to search within a matrix block. I have checked the box to make this field searchable. And I'm using the expanded search plugin. Here is my results code {% ...
0
votes
0answers
21 views

Migrate one entry with content from local to server

I want to migrate 1 entry with content (Matrix Block) from locally to the server? How do I do that? In wordpress it is pretty simple, but here I don't find an option. I tried the Migration Assistant ...
0
votes
1answer
46 views

Contact Form - Not sending emails

I am getting test emails but not contact form email? {% macro errorList(errors) %} {% if errors %} {{ ul(errors, {class: 'errors'}) }} {% endif %} {% endmacro %} {% set message = ...
0
votes
0answers
11 views

Error when making CSV file from craft commerce orders

So I have a _export.csv file that contains code like this: {% spaceless %} {% set slug = craft.request.getSegment(2) %} {% set product = craft.products.status(null).slug(slug).one() %} {% ...
0
votes
1answer
26 views

Craft3 CMS Website Search form is not updating results if I do a new search?

I'm upgrading a website from Craft2 to Craft3 on the previous website I implemented website search and work without any issues, but on the new site, I can do an initial search and get results without ...
0
votes
0answers
9 views

Query date field, timezone not taken into consideration

I'm trying to query a custom table on a DATETIME field. My timezone is UTC+2 and the dates stored in the database are UTC. shiftEnd in database: note that the shifts ends at 08:35 UTC, in my timezone ...
1
vote
1answer
27 views

Entries not being related

I am trying to query all entry elements related to a category but I am only able to get some of the entries to show up when I run craft.entry().relatedTo(category) I have a matrix field in the entries ...
0
votes
0answers
8 views

Sales not applying to products

I'm having trouble getting sales to apply to products. I'm running craft 3.7.2 and Commerce 3.3.5.1. The product I'm attempting to apply the sale to is marked as promotable. As far as the sale, I've ...
0
votes
0answers
20 views

Multisite shareable content issue

I need to create a multisite with 12 websites, all 12 websites have 2 languages, country default and english. I want to share the content between these websites. I can duplicate the pages and ...
1
vote
1answer
24 views

Sort Repeater fields alphabetically

I have a supertable with over 79 repeater fields. Is there a way I can sort these fields in the frontend alphabetically? For example I have: Romania Germany Austria ... On the frontend I would like ...
1
vote
1answer
22 views

Install a plugin in a unit test

I'm writing some unit tests for a plugin I've made using codeception. I need to test the installation of another plugin during a test. Defining the plugin in codeception.yml doesn't work, the plugin ...
1
vote
0answers
47 views

Help with understanding Controller routing

I'm building a module, and all is going well. I can access all "routes" except actionIndex. I have a controller named SendController.php And, I can access the method below using "...
1
vote
2answers
38 views

Supertable bilingual (multi-site)

I want to save a supertable with different infos on two different siteId of an entry. It works fine with all the other fields i'm using: the value is saved separately to each different language. But ...
0
votes
1answer
60 views

Project config issues with multi-node clusters?

We have experienced issues with Craft updates since the project config feature was released. Typically we run a multi-node application cluster that auto-scales up/down as needed. The current theory on ...
0
votes
0answers
21 views

Craft CMS Freeform unable to override value of invisible/hidden field

In my control panel, I have a hidden field type with name 'Payment Amount' and handle name 'paymentAmount'. I am trying to modify its value to be the same as another field of the same form called '...
1
vote
1answer
36 views

UrlManager::EVENT_REGISTER_CP_URL_RULES event not firing in custom plugin

I'm working on building out a custom plugin for Craft 3 to create a new element type called Events. Following the Craft docs for creating edit pages, I hit the point where I'm trying to register my ...
1
vote
1answer
24 views

Craft Script: Environment variable GLOBAL_DB_DRIVER was neither 'mysql' nor 'pgsql'

I keep getting the error Environment variable GLOBAL_DB_DRIVER was neither 'mysql' nor 'pgsql'. Aborting. when trying to pull the database from the production server to staging using Craft Script. I ...
1
vote
1answer
23 views

input fields in getpaymentformhtml auto click out of card holder information

To reproduce issue: <label for="card-element"> {{stripeGateway.getPaymentFormHtml({})|raw}} </label> Then whenever I click either the First Name or Last Name input field my ...
2
votes
2answers
22 views

How to reference a specific Sprout Form by handle?

I need to reference specific entries from my Sprout Form so that I can grab the data the user uploaded through that form to use to make changes in the database. I am stuck here with this error ...
0
votes
0answers
13 views

User mapping with Socializer plugin

I'm currently working on Instagram login part of my project with Socializer plugin for Craft CMS. I went through docs and did everything that was described there. I have app on facebook for developers,...

1
2
3 4 5
35