All Questions

Filter by
Sorted by
Tagged with
0
votes
1answer
12 views

Parent are not set anymore after saveElement()

In this code I try to create a new Entry and set a Parent to it. The sectionId and the typeId are actually the same. $navigationItem = new Entry(); $navigationItem->typeId = 4; $navigationItem->...
0
votes
1answer
5 views

Display user photo within a User field type

I'm making a staff page with a User field type, so you select all the users you want displayed. I'm having trouble showing each user's photo though. This works: {% for user in block.staffList.all() %} ...
0
votes
0answers
5 views

Store Hours field in Matrix

I'm using the Store Hours plugin inside of a Matrix field along with a text input field. The global is called specialHours and the matrix has the same name. I access the text input like this which ...
0
votes
0answers
6 views

Find entries that use a specific block in their Matrix field

I am using this solution to get the latest article with a video. This works great, until I delete the matrix block in my latest entry with video, then it still finds that entry, but without any data. ...
0
votes
0answers
7 views

How can I find LinkIt Field values and the entries they're on?

We've got a sprawling site built up over 4+ years, and someone decided we'd no longer use X page, but now we'll use Y, and sadly the authors don't always know to use an entry, so they copy in the ~...
0
votes
1answer
20 views

Query entries with latest video field containing a URL

I would like to set up a query to find the latest news article that has a video attached to it ('video' is a matrix field with a block type that is also called 'video' and a field called 'videoUrl'). ...
1
vote
1answer
7 views

Using MySQL With just InnoDB storage engine

What are the implications if I create all the Craft database tables on the InnoDB storage engine? Will there be any performance problem?
0
votes
0answers
11 views

htpasswd exception for controller

I'm wondering if anyone's using .htpasswd for basic site security for a staging site that's in review (where we're testing front-end registrations so we don't want to force control panel logins, ...
0
votes
0answers
15 views

Total count of entries related to entry from another section (structure), including all levels within that section

I have two sections: Products (channel) and Accessories (structure). The Accessories section is a structure and can multiple levels to it, a Product may relate to a child (level 2) but not it's parent ...
1
vote
2answers
38 views

How to create a faceted search/facet filter in Craft Commerce

I want to create these kinds of filters on my Craft Commerce site: I have poked around with the Faceted Navigation plugin, but haven't gotten it to work the way I want yet (posted an issue about high ...
0
votes
1answer
14 views

Craft Commerce Upgrade Stuck

My installation of Craft Commerce seems stuck after purchasing the Pro license. Im getting similar errors throughout the site: Base table or view not found: 1146 Table 'craft_xxx....
0
votes
0answers
11 views

Freeform 3.X Can you post form from JamStack (full VueJS, React) websites?

I can't find any documentation concerning the use of the plugin Freeform from external websites made using VueJS/React etc.. Is it possible ? Also, can you retrieve a form's Modeling (with fields, ...
1
vote
1answer
18 views

Display entry category

I know this is a really suck egg question, but I finding the Craft docs far less straightforward than EE (I'm just switching over), and so I'm struggling with the easy task of displaying an entry's ...
2
votes
1answer
23 views

How to configure the system messages <link> url?

we have got a multisite environment and have imported users with different preferred languages (de and en). Therefore we made a module, cause the feedme plugin doens't set the preferred language https:...
1
vote
0answers
13 views

Paypal Express Redirecting to Undefined

I'm moving a site from craftcms/commerce-paypal to craft/commerce-paypal-checkout but I'm having an issue with the redirect after payment. Steps to reproduce: Choose Paypal as my gateway I choose pay ...
1
vote
2answers
23 views

Matrix fields don't load!

I have some matrix fields defined: But when I use the matrix blocks inside of an entry - I don't get all blocks - just the richText ones. I tested it out - just the richtText Matrix blocks will be ...
1
vote
1answer
15 views

Loading assets cross-domain with SSL or non-SSL option

Here's a unique situation. I have three websites. All assets are stored at the domain of the first site: domain.com/files/* The first two sites run completely over SSL. No problem. The third site ...
1
vote
2answers
33 views

Order entries by multiple matrix date field

I have a section with trainings. In each training entry there's a matrix field where we add a new block with a training date, location, etc. So each training has multiple matrix blocks. When I run an ...
1
vote
1answer
21 views

Commerce - variant URL param

I noticed that variants can have their own URL when i outputted URL of line item in the cart. Url looks something like that: http://localhost/test/web/test-prod?variant=27 Is there any way to change ...
1
vote
1answer
25 views

javascript module question

Hi hope you can help with this and hoping it's simple. I need to write a javascript module and would like to use the js tag: {% js %} //script here {% endjs %} This is good because it only ...
0
votes
0answers
20 views

Suggestion for field layout for an ancestor table

I need to create an ancestor tree where you can specify (in a single entry) the names of ancestors about 3 levels deep. Basically, I need a table with varying column numbers (2 at first level, 4 at ...
2
votes
2answers
32 views

Enironment Variable being rendered literal

OK, So created 2 variables in my local .env file ASSET_BASE_URL="https://mysite.local/resources" ASSET_BASE_PATH="/Volumes/yada/yada/yada/resources" Then in the CP, created a new ...
0
votes
0answers
13 views

Address validation error on add to cart

When using EVENT_DEFINE_RULES in module adding items to cart fails as address validation is run. Should address validation only happen when address fields are present in the post data to 'commerce/...
1
vote
1answer
23 views

Craft 2 new locale and dealing with root-relative links

Hi I am adding new locale which is jp and I have a huge problem with href tag. Our paragraph field have href links using relative link like this: <a href="/page_a"> page a</a> ...
0
votes
0answers
14 views

How to override filename saved in Sprout Forms?

After a form is saved I need to concatenate together the {{proposalCompanyName}} handle with the {{proposalFileUpload}} handle so that the saved filename in the Assets folder is proposalCompanyName....
0
votes
0answers
21 views

Filter entries by specific child field of a field?

Is it possible to create a query which filters the results by a child of a field? For example I have an address field which has multiple fields amongst other a country field. I would like to fetch the ...
0
votes
0answers
20 views

Dropdown form fields are not submitting properly

I am having issues with an entry form that updates current entries. I have a field called "Driver Type" and its handle is "driverType". It is set as a drop-down field on the admin ...
1
vote
1answer
24 views

Grouping Super Table Results via Twig Multidimensional Array

I'm trying to loop through a Super Table array and group results based on a category ('contribution'). I've gotten pretty far but I'm struggling creating an array in Twig that gives me what I need (I ...
0
votes
1answer
29 views

Change matrixblock field value before save element

So i have a Matrix with one type of matrixblocks. These all have a field for a custom id which should be set by the system, if empty, before the entry is saved. I can access the individual ...
1
vote
1answer
17 views

LineItems not showing in CMS

I'm scratching my head. My orders are shown perfectly except for one product. I have no idea why so I looked at the Order object before saving and I can't seem to figure out why he won't show the ...
1
vote
2answers
45 views

Add product to cart using code in Craft Commerce plugin

I want to add a specific product to a cart using its ID. I have created a module which runs on Order::EVENT_BEFORE_ADD_LINE_ITEM event. Here I am able to capture the current cart using the below code $...
0
votes
0answers
11 views

Event or hook to access when needing to show session messages via AJAX within Asset Events in the control panel

I am using EVENT_BEFORE_HANDLE_FILE on the asset class to moderate images before they are uploaded. I am setting session errors which show fine on the frontend templates on page refresh, however in ...
1
vote
1answer
10 views

Stop image upload if moderation fails using EVENT_BEFORE_HANDLE_FILE

I have a frontend form where images can be uploaded. I am handling the image moderation within EVENT_BEFORE_HANDLE_FILE on the Asset class. I am setting session errors for any moderation issues ...
0
votes
0answers
19 views

Craft 3 Hosting on Azure

I'm a newbie with Craft. I want to host Craft 3 application (with TWIG templates) on Azure app services. I couldn't find documentation of Craft's documentation. Any help will be appreciated. Thanks in ...
0
votes
0answers
19 views

Path to asset file shows “Template not found!”

I have a headless Craft CMS site and now the frontend development should start. I have absolutely no frontend or templates as I only worked on the backend. The asset url got created at /images. If for ...
2
votes
1answer
21 views

“Single” Entry page gives 404, even though it's enabled

I added a new Single Entry on my site and populated it with content. When I try to access it at the URL I set, it only returns a 404 error, as if the page were disabled. It's not disabled, though. I ...
0
votes
0answers
11 views

Fail validation of frontend form if field value is not unique

I was surprised to see that there is no plugin in the store for the purpose of requiring unique values on fields. I need to create a form that will not let front end users create an account if they ...
1
vote
2answers
18 views

How to query EntryQuery for multiple sections with varying types

I think the best way to pose this question is by giving an example: Given a variable $query of type craft\elements\db\EntryQuery, I'd like to get entries from 2 different sections: "people" ...
0
votes
1answer
24 views

Changing Image transforms for different media queries

Is it possible to set different image transforms for different media queries? I have a grid layout containing 1 large image and four smaller images on large screens. I have created two image ...
1
vote
2answers
37 views

Site moved to new server - Error 500

I inherited a site running craft and I was asked to move it to my server to host it. The other developer zipped the files and made a database dump for me. Usually, when I move a site, they have Cpanel ...
0
votes
0answers
31 views

Getting access to file in headless cms + GraphQL error

I have a headless Craft site running in a vagrant machine. The site got published for the frontend development in React. My base asset url is xyz.com/images. When I want to open an image from the ...
1
vote
1answer
13 views

Get UI elements of entry in front end

Is is possible to get UI-elements of Craft 3.5 in the front end? Specifically wanting to get hold of the headers I use to separate fields of products. This is my current code: {% set layout = product....
0
votes
0answers
8 views

Adding a specific field to search() parameter that contains an object

I'm currently running a search which contains an object {query:query, subLeft: true, subRight: true} {% set query = craft.request.getParam('q') %} {% set entries = craft.entries.section('example')....
0
votes
0answers
36 views

Stuck upgrade from Craft 3.4

Getting a bit stuck on a site upgrade from 3.4 (3.4.29.1). After updating via composer getting DB errors. Initially: Integrity constraint violation: SQLSTATE[23000]: Integrity constraint violation: ...
0
votes
1answer
22 views

Database Connection Error after updating from Craft 2 to 3

Good evening all, I am updating a small site from Craft 2 to 3, and after following the instructions in the documents, I loaded up the backend of my site and was greeted with the install screen. I ...
0
votes
0answers
6 views

External GraphQL API support with Twig

I have external GraphQL API's to get data which will be used in Twig Templates. This has nothing to do with Craft data or Craft's content. Is there a way to call GraphQL from Twig template instead of ...
1
vote
1answer
14 views

Translate icon appears but no translations exist

I have a site in development that i replicated from another project. The other project was multi lingual and had some fields that were translated. This new site does not require any translations but ...
0
votes
0answers
11 views

Error when setting field length on global

I have set up several globals to store the URLs of a company’s social media accounts. Each one is a plain text field, and each one is limited to 254 characters. This works fine with three of them, but ...
2
votes
1answer
26 views

Using Sprig's live search but show all entries first

I want to display all results in the games section to start with, then once you search, it shows the filtered results. Sprig's starting point I think assumes that you're showing nothing, like a normal ...
1
vote
1answer
16 views

Empty cart should remove coupon discounts in commerce

Is there anyway to remove all the discounts if cart becomes empty?

15 30 50 per page
1
2 3 4 5
251