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
0
votes
0answers
6 views

How to get the previous or next two entries with images and

To expand upon How to get the previous or next two entries I was wondering how I can also add the image and an input from each entry. I have simplified the html-structure in this example but ...
1
vote
1answer
18 views

Query Entries based on current Entry's related Entries

I'm wanting to show related articles based on the current article's related Markets. How do I get the current markets and filter relevant posts based on those related markets? This is what I have so ...
1
vote
1answer
20 views

How to create a category filter for a portfolio site?

I want to create a category filter similar to this website http://www.mypoorbrain.com/ (just a random website i found with the desired effect). Basically I want the categories to be displayed ...
1
vote
1answer
15 views

Existing contents get deleted on Live Preview when adding new content on a matrix field

When I add a new content for a matrix block field on an existing entry, all its previous contents gets deleted from the Live Preview, except for the editor which still has the previous contents. And ...
1
vote
1answer
12 views

How to disable the Javascript “actions/queue/run” on frontend?

After upgraded our Craft from 3.3 to 3.4.14 we have noticed that there is a new Javascript on the footer of the homepage (frontend) that runs "index.php?p=actions/queue/run". We run the tasks via ...
1
vote
1answer
23 views

How to search based on a Multi select category field in Craft 3?

I have a blog section with multi select categories. I want to filter all the blogs based on that multi select categories in the website. When I tried .search('category:ui-ux OR category:web-designs')...
2
votes
1answer
27 views

Dynamically populating select input fields using jquery $.load and twig template

EDIT: the below code now works! I have two select inputs, the choice of 1 should populate the second. I have an external twig file (data.twig) (MAKE SURE TO PUT THIS IN YOUR TEMPLATES FOLDER) that ...
0
votes
0answers
13 views

Add additional entry fields to backend search

The search field in the craft backend entry section searches the title and slug field by default. Is it possible to add custom entry fields to this search function (in my case e.g. a custom item ...
1
vote
1answer
34 views

What is causing Craft CP assets(JS/CSS) to appear in front-end pages?

Perhaps in some way related to this, I've got a couple of front-end pages on our website that pull in the following files, which seem to all be CP files. These two pages each utilize plugins I've ...
0
votes
0answers
14 views

How to add new Matrix block to entry field in php?

$draft = new Drafts(); var_dump($entry->slug); $draftEntry = Entry::find()->slug($entry->slug)->one(); $draftEntry->typeId = 32; ...
1
vote
1answer
15 views

“Field Limit is too big for your chosen Column Type” error on already existing fields when updating matrix

I'm getting the following error when I'm trying to update a matrix: "Field Limit is too big for your chosen Column Type."" I'm trying to add a new block type but this error keeps getting up on ...
1
vote
1answer
31 views

Can fields be reused with a different name per section?

I've got a redactor field used on several sections, and category groups. Is there a way to change the displayed name per section in the edit form? On a category group the field is, 'Category ...
0
votes
0answers
8 views

Craft Commerce cart carrying over to other sites

I've never noticed this before and am wondering if this is what is supposed to happen. I have my main site and a subdomain set up, I've never noticed my orders carrying over from one site cart to the ...
0
votes
0answers
11 views

Redactor Link Encoding create 404 errors

Has anyone come across scrambled link encoding in Redactor resulting in 404 errors? How do we solve this? What should be: https://www.dazeddigital.com/​f​a​s​h​i​o​n​/​a​r​t​i​c​l​e​/​3​3​0​3​0​/​1​...
1
vote
2answers
30 views

Frontend Form Search Users based on Tags

Context: I'm trying to build a search form that will filter users based on Name, Skills and School. Users who have any of the search criteria should appear in my results. Name Is a fuzzy keyword ...
1
vote
2answers
31 views

How to display multiple entry loops on the homepage (Single section type)

I've been learning Craft 3 for a couple weeks and I've run into a little snag. I have a homepage that I would like to display multiple entry loops and/or types. However, I cannot find how to do this ...
1
vote
1answer
36 views

Get entries related to tags with a score & order by

TL:DR; How do I add a custom sorting to Craft? I am currently building a system which is very tag-centric. I am rebuilding my side project in CraftCMS (https://email.subscribeto.at/) which was custom ...
1
vote
1answer
24 views

Uploading Asset Doesn't Clear GraphQl Cache with VueJS/Axios

Context: I have a VueJS method that uses a form and Axios to upload an asset to an entry's asset field. The method successfully uploads the asset to the entry, and I can prove that fact via the ...
0
votes
0answers
48 views

Overwrite template-files

I want to use one template on several Craft websites (different installations, not multi-sites). Is there a way in Craft I can do something like this? I want to update/overwrite the /templates/core/ ...
1
vote
3answers
51 views

Craft v3 gives 500 error on installation… how to get v2 instead

I installed Craft v3 on a live server running Debian 10, apache, latest PHP, and Mariadb. My structure is /var/www/html, and everything except for the files in "web" are in the www folder (along with ...
1
vote
1answer
23 views

How to implement “cookie consent message” to visitors of our website using Craft 3

I want to implement cookie using message to the visitors of our site. How we will implement this in craft 3? A sample message is "Hi there, we use cookies to offer you a better browsing experience ...
0
votes
0answers
7 views

Cache Control Panel resources

Is it possible to enable Browser Caching for the cp resources? Did not find anything in the documentation about it and my custom set headers in nginx does not work for them. I am working with craft 3 ...
1
vote
1answer
9 views

Matrix-field with a category-field to output category-title on single entry page

Me and categories, always giving trouble :) On blogs, we are using a matrix field and in one of the matrix-types, I have a category field. This is to output the title of the category. {% extends "...
0
votes
0answers
23 views

MySQL Problem fetching the info row

since yesterday i have been trying to setup Craft CMS for the first time, but the installation fails and tells me to check the logs. The database account has all rights. (This is only a part of the ...
0
votes
0answers
18 views

Graphql total results / pageinfo when searching with pagination

I'm trying to build something to search my data that is stored in Craft with graphql. To make pagination work I want to know how many results there are in total. I'm doing a query like this: query($...
1
vote
1answer
15 views

Site Headers Showing x-robots-tag: none

I am having issues with search engines picking up my Craft site. I'm seeing x-robots-tag: none when reviewing my site's headers - which is shorthand for "no-index and no-follow". The following is ...
1
vote
1answer
11 views

Customizing the destination after user activates the account

I would like to ask about activation e-mail which is sent to new user. Once the user clicks the link, it redirects to homepage. Is it possible to change the destination? I would rather like to make ...
0
votes
1answer
24 views

Calls to /actions return 400 Bad Request

I'm trying to use jquery ( and/or VueJS with axios) to delete an asset from a frontend form (user is logged in and they have permissions to delete assets from this volume) I have an HTML element that ...
0
votes
0answers
11 views

Linking to uploaded assets in blog posts

I have a craft site which I'm trying to add a blog post to and I'm fumbling with something quite basic. I've uploaded an image to the asssets section and when I get the use the "copy reference tag" ...
1
vote
1answer
12 views

How to work getFieldValue for assets

I have been implementing my own PHP plugin code. In that, I need to get an asset field in user info. If I can get if the asset is set on the field or not, it is enough. I can get the values of text ...
0
votes
0answers
23 views

How to allow multiple entries to have the same slug?

Users create an account and their profile (domain.com/userName) is a template pulling info from craft users. Each user can create entries, all stored in a Structure section (domain.com/userName/...
0
votes
0answers
8 views

HTML Output Different from Template Order

I am trying to load some JS from a template into my main layout.twig. I have a block at the bottom of my layout.twig called {% block js %}. It's pulling in some Twig code, so it needs to be in a Twig ...
0
votes
0answers
17 views

Passing variables to email template not working

I am building a Craft plugin which sends emails to users of a subscribed list. I'm trying to get Craft to send the email with a Twig template and pass in variables to that template. So far I've been ...
1
vote
1answer
25 views

Import / Aggregation DB - with 50 Million Records - Best Practice?

I'm working on my second Craft project ever. (First was an ultra-simple site just to learn the basics.) With this new project I need to accomplish 2 things... (1) - Private - Import/aggregate mass ...
0
votes
0answers
19 views

Assets out of web folder cannot be seen by non-admin user

I would like to put some assets out of web folder because of security reason. There is internal folder just under project root. The assets are surely put in correct folder. And, the assets are set on ...
0
votes
1answer
15 views

Export from Craft 3.4 to Craft 3.0 using Feedback

I have a very strange situation. A production site is running Craft3.0 - there is no easy way to get this site up to Craft3.4. This is not possible at present because of the server and upgrading PHP....
0
votes
0answers
26 views

Parent/Children Users

I'm building a site for a soccer school, where parents will register their children into classes. Aside from a standard registration page, I want to assign photos to children so parents can quickly ...
0
votes
0answers
17 views

Elements::EVENT_AFTER_SAVE_ELEMENT - Event handler (in module) being called multiple times on creating a single element

Newbie to Craft CMS. I'm trying to send a push notification to an Android device from a Craft CMS module when an Entry of a particular type (NewsItem) is created / published. Here is the relevant code ...
1
vote
1answer
20 views

Get email address from registration form

I have a user registration form setup to redirect to another template on submit. That template then includes the following: {% set email = craft.app.request.getBodyParam('email') -%} <p>Thank ...
1
vote
1answer
10 views

Cast Entry to appropriate type to access fields and functions in module

Newbie to Craft CMS. I am trying to send a push notification to an app when an entry of specific type (NewsItem) is saved, and I'm doing so via a Craft Module. I got this code snippet from another ...
0
votes
1answer
27 views

Import a large number of assets via feedme

I have 224,559 assets (images) I need to import and assign to entries. Assets are currently stored in folders that match their original asset id. Imported assets will be stored on s3. I'm using feedme ...
1
vote
1answer
19 views

How to recover a previous draft?

I pasted in incorrect copy in my product description window in the dashboard, then updated the entry. Is there a way to find/revert to my previous draft? Thank you.
0
votes
0answers
9 views

Front end form - Adding tags field - Craft 3

I've followed this old guide which didnt work, probably due to it being for Craft 2, so I modified it to what I assumed would work. I changed the /actions/tags/createTag to /actions/tags/create-tag ...
0
votes
0answers
20 views

Craft CMS Push Notifications

I'm new to Craft CMS (I'm using Ver.3). I am trying to use it to create content which is consumed by an Android app. What I am looking for is some way to hook a PHP script into the system so that ...
0
votes
0answers
7 views

Save Structure Entry Order via Frontend Form

I have a site where users log-in using frontend forms, and access a listing of their posts on the site. The entry type is a structure, and I'm looking to give the user the ability to re-order their ...
1
vote
1answer
25 views

Do something on save of an entry

if that entry is in a particular section, then I want to do some task. I can't really find the event docs I need to do that. Everything I've come across has been for Craft 2. Any steps for a hint?
1
vote
2answers
22 views

How to call abstract method from interface

I would like to use a method of fileExists. It belongs to VolumeInterface. https://docs.craftcms.com/api/v3/craft-base-volumeinterface.html I suppose the code would be like \craft\base\Volume::...
0
votes
0answers
20 views

How to add class to ul ol tag in redactor by using formattingAdd

I try to add a class to tag ul by field Redactor. I have prepered special config file for Redactor. For example in Redactor field a have a created simple list so i select this list and next from ...
0
votes
0answers
26 views

Entries search parameter for date value in matrix field no longer working in Craft 3

We have a large festival events site where each performance is stored in a matrix field called dates which uses a single block which has a datetime field (date only). So if an event is on 3 different ...
0
votes
1answer
30 views

if statement in a template not working

I am making a condition to use a certain template for a specific article category, but it's not working and giving me an error. {% extends "_layout" %} {% set title = category.title %} {% block ...

1
2 3 4 5
30