We’re rewarding the question askers & reputations are being recalculated! Read more.

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
0answers
22 views

How to wire html template to twig extension? (Mainly `Twig\Error\SyntaxError: Unknown filter Error`)

I am going to use a Twig filter function by using Twig extension in my HTML file. I followed this guide. https://cameronspear.com/craft-cms-twig-filter-extension/ But when I run <p>{{ 123 | ...
1
vote
1answer
9 views

How to build a web page using different sections created in craft

I am a beginner in Craft. I have a Craft website. There is an HTML design with me. From admin, I divided the HTML into sections and created entries based on that. All the coding related to each ...
1
vote
1answer
12 views

Custom Token Authentication with Craft 3 Login Form

I am building token auth system in Craft 3. https://docs.craftcms.com/v3/dev/examples/login-form.html I used this Login Form. Now I am going to create my own token and save it in user profile. First ...
0
votes
0answers
11 views

Control panel - Entry indexes very slow

Craft CMS 3.3.15 PHP 7.1.3 MySQL 5.5.42 I have a structure with 360 entries. Right now in the CP it takes 3.5 - 10 seconds to load the first 50. And another 3.5 - 10 seconds for every additional ...
1
vote
1answer
18 views

How to debug or log some special variables in Craft CMS? (Especially in a controller)

I am going to debug the variables in controller files. But I couldn't figure out how I can debug it and show the values into front-end site or in log files. Do you have any ideas about this? What ...
0
votes
0answers
8 views

Exception Running garbage collection

When I run ./craft gc I get the following error: Running garbage collection ... Exception 'yii\base\InvalidConfigException' with message 'Invalid section ID: 30' The Section ID of 30 that it's ...
1
vote
1answer
7 views

ERROR 1370 (42000) alter routine command denied to user

I am trying to upload my DB using MySQL Workbench but am getting this error: ERROR 1370 (42000) at line 4534: alter routine command denied to user 'detectalocal'@'%' for routine 'detectalocal....
1
vote
1answer
13 views

“Could not find composer.json file” error in CraftCMS 3

I recently updated my CraftCMS 3 with the help of Composer. When I try to install a plugin with the plugin store, I get an error saying that Craft couldn't find my composer.json file. He proposes me ...
0
votes
0answers
8 views

Is it possible to build its own html form template and loop on tabs/fields with form-builder-3 plugin?

Is it possible to build its own html form template and loop on tabs/fields ? Instead of using this : {{ craft.fb.form(form) }} I'd like to add disabled attribute by default on my submit button. And I'...
1
vote
1answer
9 views

Search return wrong result with special character like @#! in Craft 3

I have implemented search in Craft 3, but it returns wrong result when I enter some special characters like @#!. Is there a way to prevent it?
1
vote
1answer
19 views

Related Entries Relationships

I am building a site where I have users, companies and content. Currently my users are standard Craft users, and my companies and content are entries within a channel. I have a field in my content ...
0
votes
0answers
9 views

Flexible List Template for Entry Types

Not sure what I'm missing here or maybe it's not as simple as I think it is, but I'm trying to create a listing template for entry types and I don't want to create a template folder or file for each ...
1
vote
1answer
54 views

Fetch Entries with Tags Only

I'm trying to get all the entries which have tags associated with them. At the moment I'm doing: $entries = Entry::find()->with('tags')->all(); and then filtering the results in PHP as ...
1
vote
1answer
20 views

Select specific fields from query

I'm trying to get tags out of the underlying craft DB and serve it as a REST endpoint - however, I'm only interested in exposing the tag id and title, so my data should look like this: {id: 1, title:...
1
vote
1answer
24 views

Steps for integrating an HTML design to a website page and managing its content from backend

I am a beginner to Craft CMS. I have an HTML design for Craft integration. I need to covert this to a live URL page on my website. Also, I need to manage its content from the backend. I think we need ...
1
vote
1answer
19 views

Server's IP in URLs in cached templates

I'm running Craft CMS 3.3.11 on an EC2 machine with Apache and Load Balancer. After upgrading to Craft 3, I'm having issues with caching. I use relative paths to resources/assets in my templates (...
1
vote
1answer
15 views

Plugin (SyncDB) issue breaking site and unable to do anything

I was in the process of setting up the UNION co SyncDB plugin and must have misconfigured something as I now get the following error: "Undefined index: skipTables" and seem to be completely locked out ...
0
votes
0answers
22 views

Contact form plugin ajax submit URL not working

I am using contact form plugin for forms in my craft website. For avoiding page redirection, I followed ajax submit for the form, but it is not redirected to controller code. My form is as below:- ...
1
vote
0answers
9 views

Modify preview targets and save them

I'm using the following Event hook : Event::on(Entry::class, Entry::EVENT_REGISTER_PREVIEW_TARGETS, function ($event) { } The $event variable contains an array with the current $previewTargets as ...
1
vote
1answer
14 views

Internal Server Error when adding new Fields

I was adding new fields to my Craft 3 install using the field manager plugin. Suddenly I am seeing a Internal Server Error when trying to access the admin area. The front end looks fine. Anyone know ...
1
vote
1answer
53 views

Central Craft CMS management for agencies

We have now more than 60 active website running on Craft CMS and have been able to keep our lives somewhat straightforward when it comes to the development side of things (eg. code repository access, ...
1
vote
0answers
12 views

Limitation on number of users for Craft Calendar 2.x

We are considering using Solspace Craft Calendar 2.x for our new start up users to use as a rostering tool. Is there any limitation on number of users we can subscribe to use Calendar 2.x? We are ...
0
votes
0answers
18 views

User Event before Login - check if user has password and logged in before

Is there a User Event before the authentication is fired? I want to show a message if the user doesn't have a password yet and if it's his first login / check if he never logged in before - All in ...
1
vote
1answer
18 views

How to correctly format API requests for Mandrill using Fetch plugin? Getting error “you must specify a key value”

I want to use the Fetch plugin (v 1.2.0; Craft Pro 3.3.13) to send messages from a Twig template in some circumstances. To test the setup, I'm just trying to ping Mandrill, according to the /users/...
1
vote
1answer
26 views

How can I debug `craft\web\User::_validateUserAgentAndIp()` warnings

On a production site, we're seeing a ton of the following warning in our web.log files for (seemingly) every request, creating a ton of noise in the logs and making it hard to spot "real" issues: &...
2
votes
1answer
27 views

Craft 2 FormBuilder 2 equivalent plugin in Craft 3

Is there any plugin equivalent to Craft 2 FormBuilder 2 plugin in Craft 3? My Craft 2 website forms are built with FormBuilder 2. I upgraded the website to Craft 3, but FormBuilder 2 is not working. I ...
1
vote
2answers
30 views

Matrix loop (nesting?) issue using switch

First let me say this: I'm new to Craft and Twig. So: my apologies for probably overlooking the obvious. I hope you can offer me some help... I've been trying for a couple of days to solve this puzzle....
0
votes
0answers
15 views

Nginx config - cachebusting rewrite for multiple server blocks/domains?

So I have a Craft CMS multi-site setup on a Forge-managed VPS... (and oh boy I wish there was more documentation on setting this up, huge thanks to Philip for helping me get to this point) The ...
0
votes
0answers
11 views

How-to display a specifc optgroup from a field

based on "how-to display a dropdown field wth optgroups", I would like to display only labels of a specific optgroup. Any suggestens how to do that? Thanks.
2
votes
1answer
34 views

Finding the correct actions url

struggling to decipher how to link a plugins controller to an action route. The docs say to use "https://pluginfactory.io/" to scaffold one, but what it generates is a different structure to what the ...
2
votes
2answers
54 views

API access to Craft 3

Does anyone know if there is an API for CRAFT 3 where I can authenticate to and query (CRUD) all the elements (channels, etc.) I have created on it? Thanks.
1
vote
0answers
54 views

change core element index pages

Is it possible to change core elements index pages -like entry index page- by plugin in PHP way, like extending their twig, using events, hooks and not manipulating DOM with Javascript? Currently ...
0
votes
0answers
20 views

Craft Plugin Store not working

I have installed the latest version of Craft and I tried to open the Plugin Store. I get the following message: Der Plug-in-Store ist nicht erreichbar. Bitte versuchen Sie es zu einem späteren ...
0
votes
0answers
50 views

Restful API using Craft 3 with JWT

I want to make a Restful API with JWT in order to be able to make calls to it. I have this in /config/app.php: return [ 'modules' => [ 'my-module' => \modules\Module::class, ...
1
vote
1answer
25 views

“Redactor plugin not found” – How to properly implement Craft plugins providing Redactor plugins?

TL;DR What is the correct/recommended way to implement a Redactor plugin within a Craft plugin? My intention I'd like to implement a Craft CMS 3 plugin that adds a new Reactor plugin. Normally (...
1
vote
0answers
8 views

How to auto disable “Enabled for Site” for certain sites (or groups) when creating a new entry

We have a mutli-country/language website with Craft 3 for many countries/languages. When we create an entry (ecommerce product to be exact) in the English sites we dont want to enable it for other ...
1
vote
0answers
22 views

Freeform Lite - Dynamic Notifications

I am wondering if you can offer some help with an issues I am having. I am using Freeform Lite and I have a hidden field with the entry title as the value. Is it possible to use that value for ...
0
votes
0answers
18 views

Craft 3 match all categories using relatedTo in a module controller

I am trying to perform an entry query using relatedTo to get entries that match all categories. I know how to achieve this with 'and' in twig but I can't seem to find the correct syntax to use in a ...
1
vote
1answer
19 views

Deprecation Errors - How to Fix?

We are in development of our new site in Craft 3 and we are getting some deprecation errors. This is keeping us from using Craft Commerce for our ordering page. Any suggestions on how to fix this? ...
1
vote
2answers
24 views

Craft Query by Category and Tag

I am trying to find the last four Channel entries (Named: Post) with a Category relatedTo "Support" (id: 458) AND Tag relatedTo: "Widget1" (id: 469) I've had success using Category or Tag but not both:...
0
votes
1answer
19 views

Order related entries by number of categories they have in common with current entry

I'm creating a list of similar entries which displays entries that share the same categories as the current entry. My code looks like this: {% set categories = craft.categories.relatedTo(entry) %} {% ...
1
vote
2answers
44 views

Two plugins contain the same function name so they're conflicting

I'm trying to use a filter function from a plugin, but it turns out two plugins that I have installed have the same function name and the wrong one is getting called. For now I edited the vendor files ...
1
vote
1answer
14 views

Live Preview not showing content, Craft 3

I use the same templates for live preview as for the front end. Until a recent change in Craft 3, they worked fine for live preview, then they stopped showing most fields. I use a lot of includes to ...
1
vote
1answer
22 views

Override max-length on the Title format field

We're using entry properties in the Title format field to automate titles for some channels. However we've ran into the issue of this field having a max-length set on it. I understand why this exists ...
0
votes
0answers
22 views

How to add custom GraphQL directives?

In addition to the pre-defined directives, is it possible to add more? I need to apply a custom function to a field before GraphQL output. In the documentation, there is a limited list of ...
1
vote
0answers
24 views

Craft 3, Freeform form not submitting file upload

I have a simple form with a file upload field in built with the latest version of Craft 3 and Freeform and I haven't been able to get the file upload to the field to work. When you submit the form ...
1
vote
1answer
13 views

Flash message in control panel

In short, I've got an extra background process running that syncs content for a given section to an external application as well whenever an entry in that section is saved and a certain toggle is set ...
1
vote
0answers
23 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', '...
1
vote
1answer
17 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
1answer
20 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',...