All Questions

2
votes
1answer
11 views

How to show entires from past 12 months?

I need to display entries from the past 12 months. I'd like to create an entry query and set the timeframe of the entries I need.
1
vote
1answer
18 views

hashing form fields to prevent tampering

I have a front end form for entry creation. I have a few options I don't want tampered with. The docs for |hash say "Prefixes the given string with a keyed-hash message authentication code (HMAC), for ...
2
votes
1answer
25 views

How Do You Add A Form on a Page to Gate the Content?

I am new to Craft, but one of my clients has a website built in Craft. They would like to "gate" the content on a page of their website. A. Is it possible to gate content in the Craft CMS? Client ...
0
votes
1answer
23 views

Entry not saving when Redactor bold

I'm having a weird issue with the Rich Text Editor (Redactor -> simple.json, only "bold" and "italic") on newly added fields and only ONE (that i know of) older field. Every time i add a "bold" format ...
1
vote
1answer
19 views

Craft 3 Module Working but Throwing Errors in web.log

I'm seeing a lot of "Invalid argument" errors in the web.log for a "Multiple Option Variant" module I have running. It seems to be working just fine on the site, but curious as to what the issue might ...
0
votes
0answers
15 views

PHPThumb plugin is not creating thumbnails

I've installed the PHPThumb plugin, confirmed that imagick is installed and working, confirmed the permissions on the preview folder, spun around and said the magic charm three times. No effect. ...
1
vote
1answer
13 views

Create several subcategories without using the GUI in craft

I have to create the following categories hierachically : One book has between 1 and 150 chapters. I have to do this for several books. Dealing with chapters is painful using the GUI. Is there any ...
2
votes
0answers
24 views

Charge plugin cannot end subscription

Craft 2.x using latest Charge plugin... When ending a subscription using the Charge area of the control panel I'm unable to end the subscription because I get the error: Page Not Found Unable to ...
0
votes
0answers
12 views

Weighted Search Plugin Excerpt Not Loading

I am using the Weighted Search plugin on Craft 3. Everything works except the excerpt does not load. My code is below. {% set query = craft.request.getParam('searchQuery') %} {% set results = ...
1
vote
1answer
19 views

Update field setting value using getFieldByHandle

I need to update the limit setting for Images allowed to be empty, so as to allow for no limit. How do I go about updating the 'limit' setting? $fieldsService = Craft::$app->getFields(); $field = $...
1
vote
1answer
23 views

Removing the LivePreview and Share Buttons?

Is there a way to deactivate this functionality? We dont want our clients to use it just yet. I could delete them with my Module's js, but it is triggered after the site is build and the "popping" ...
1
vote
0answers
17 views

Entries sorted by title have some entries not alphabetical

I have the following code to return some grants, but whilst most of the entries are coming back alphabetically ordered, after the last "Z" entry, there are a few more entries also alphabetically ...
0
votes
1answer
19 views

Update Asset Indexes gives “getFileList() is not implemented”

Thank you in advance for any tips on this. Barely-related-background: I made a mistake on my development machine. In gparted, I chose "ignore" instead of "cancel". This is called 'choosing poorly'. ...
1
vote
1answer
16 views

Craft install failed with error php7 not found, but server has php 7 installed

I'm trying to install a backup from production site which is running craft 3.0.26 to a UAT site. While installing, faced an error regarding PHP versions. Since both the sites are in the same server, ...
1
vote
1answer
30 views

Forcing a / with .htaccess

After redirecting a website to https environment I had the difficulty that .php/ was added to the url which resulted in double content. I have been able to get past this mistake but now I need to ...
0
votes
0answers
15 views

Freeform - Save form and Complete Later

I am going to have a multi page form which is quite long. I would like it so that a user could save the form and complete it later. (Maybe by way of them entering an email address and a unique link to ...
1
vote
1answer
41 views

Element API, VueJs and Imager!

I'm trying to do something akin to Andrew's excellent article whereby I have a 'more' button that spits out 6 more entries at a time. I'm nearly there, but running into some issues. I don't get past ...
0
votes
0answers
23 views

How to exclude some fields from the searchindex using the RegisterElementSearchableAttributesEvent event?

Context I had big issues on a Craft 2 multilingual site with dozens of thousands of entries that were using Matrix fields. The site had become extremely slow (almost unusable), especially when ...
1
vote
1answer
20 views

plugins route post controller?

I am developing a custom authentication plugin for Craft 3. But I can't route to my Controller via POST request with my login form. Request via GET work
1
vote
0answers
29 views

Unable to add data via migration to a new field

When I am creating a new field (and I've tried plain text, redactor, supertable and matrix field) and associating it with an existing entry type (using the Control Panel to do so), I run into an issue ...
0
votes
0answers
23 views

Craft 3 Admin not loading cpresources files over HTTPS

I have a Craft 3 install on my client's Windows machine running Apache, PHP and MySQL. We purchased an SSL certificate but the main Admin login page (on SSL) keeps loading cpresources assets over ...
0
votes
0answers
48 views

Craft 3: Restrict access to Element API

I'd like to find out what the best approach is to harden the API and restricting access to it. I currently use: <?php use Craft; use craft\elements\Entry; use craft\helpers\UrlHelper; function ...
1
vote
2answers
27 views

Craft Commerce: where to modify data sent to gateway (need to send customer data)?

I'm using Braintree with Craft Commerce using this Omnipay Braintree Gateway for Craft Commerce https://github.com/samuelbirch/craftcommerce-braintree It's working well, but I noticed that some ...
1
vote
1answer
38 views

Craft 3 large log file sizes

I've noticed that Craft 3 log files in storage/logs e.g. web-404s.log and web.log don't seem to have a max size or rotate like with Craft 2. The web-404s.log file is nearly 10 megs for 1 site now. ...
1
vote
1answer
41 views

where command sql query not working

My problem is that I can't update the specific $userId. have the values I've selected. I also get an error: Call to a member function where() on integer I just started to learn Craft. It can be ...
1
vote
1answer
29 views

Reducing memory usage?

I have a relatively simple task which is exposing an issue with efficiency. In that it isn't very efficient and the server cries and quits. Here's the high level overview: There's a category called "...
1
vote
1answer
22 views

Filter by category and update URL

This may be a simple question but I am not sure how to approach it - again trying to work out best practice for these things! I have a "single" at /our-work, which among other things displays a ...
1
vote
1answer
27 views

Craft 3 validate new password in change password

I'm trying to validate user's new password and confirm password in my custom plugin init(). Event::on(User::class, User::EVENT_BEFORE_SAVE, function(Event $event) { $formData = $_POST; $...
1
vote
1answer
21 views

Integration with MailChimp et al

Is anyone aware of a solution for using Craft user data with something like MailChimp? This is a very simple use case of sending newsletters/announcements to registered Craft users. Would be even ...
1
vote
1answer
40 views

Force redirect from HTTP to HTTPS via htaccess with multisite installation

I'm using Craft CMS 3 multisite installation with more than 20 website based on subdomains. There are websites: website.com one.website.com two.website.com with identical url paths but different ...
1
vote
1answer
22 views

Craft CP and a11y

Is there some documentation/summary to which degree Craft's CP supports accessibility (a11y), WCAG2 compliance? Especially support for color blindness and keyboard only usage is requested in an ...
1
vote
1answer
20 views

Plugin not displayed on Plugins Section

I'm trying to install Sprout Report plugin, so I downloaded from here so I followed the instructions from the plugin documentation site: here According to that documentation the zip folder from ...
1
vote
2answers
25 views

Storing data for page in twig

I'm using craft-stripecheckout to accept payments on my site, but want to email the user with the custom fields after they have been redirected. Easiest way to describe this is below: Page 1 - User ...
1
vote
2answers
30 views

URL Structure - advise and thoughts of best approach?

I am currently building a website for Hot Tubs and within this there will be New Tubs, Used Tubs and Hire Tubs (each will be a top level page on the navigation, and each tub will have a details page). ...
1
vote
1answer
36 views

White space added to start of template's

There is white space being added to the start of my templates. This isn't really an issue but because its happening to an RSS template that is breaking the feed and causing it to not validate. When ...
1
vote
1answer
19 views

Tasks runs only after admin is logged in

I have a plugin which runs a task on order complete. The tasks runs successfully without any errors. But the problem is the task is only completed when admin is logged in. So if someone has completed ...
1
vote
2answers
24 views

How to disable plugin Disable and Uninstall?

I am developing a site with a customer logged in area. I don't want anyone to access the section if they are logged out and instead redirect them to the login form. I could just add {% requireLogin %...
1
vote
1answer
30 views

Updating fails (except it does indeed update)

Updating Craft (and sometimes plugins like Commerce) through Craft 3 admin gives errors. Usually undefined, but have gotten "Backend fetch failed" most recently. Once I refresh the window, it seems to ...
1
vote
1answer
21 views

Could not find a unique URI for this element

Suddenly, I can't add any entry to a structure. When I try to save a record, I've got "Could not find a unique URI for this element“. Although, the slug is perfectly valid and unique, but whatever I ...
1
vote
0answers
21 views

Product variant association

On my Products details page I have 2 selects. The 1st select list out the Primary variants. Based on the selected Primary variant the 2nd select is auto-completed in with Secondary variants that have ...
2
votes
1answer
18 views

Craft 3 query children of sub categories

Just wondering how to only query the children on subcategories. For example... Food ├── Fruit │ ├── Apples │ ├── Bananas │ └── Oranges └── Vegetables ├── Brussels sprouts ├── Carrots ...
1
vote
1answer
72 views

Craft 3 Element API Authentication/Login

First things first: This is quite similar to this, yet different. I'm trying to get authentication/login for Element-API for Craft 3 to work. Meaning I would like to restrict access to certain ...
1
vote
1answer
31 views

P&T Contact Form v1 adding code for 'beforeSend'

Very new to Craft, so can someone please tell me what class/file I'd add the 'The beforeSend event' code, as I'd like to filter out some spam? The documentation https://docs.craftcms.com/v2/plugins/...
1
vote
2answers
21 views

Nested category navigation

I am trying to achieve the following markup for my categories navigation: <h3><a href="categoryurl">Top Category One</a></h3> <ul> <li><a href="categoryurl"&...
1
vote
1answer
10 views

Getting a entry link created by current User

I am trying to create a link that would allow a logged in user to access their profile from the front end. Basically, the user has one page they can edit from the front end when logged in, and I'd ...
2
votes
1answer
26 views

Change name of Singles

Is there an updated version for Craft 3 showing how to change the name of 'Singles' and 'Structures'? https://www.youtube.com/watch?v=ObC4mhXjiOE
1
vote
1answer
63 views

Incorrect user-level lock name - Local Vagrant Environment - Craft 3

When creating a new field, I received a Database Exception error - SQLSTATE[42000]: Syntax error or access violation: 3057 Incorrect user-level lock name '/var/www/storage/runtime/compiled_classes/...
1
vote
0answers
15 views

Product in nested navigation

I'm currenty running Craft (v3) Commerce (v2) and have a difficult structure. This is my menu now: single home page. single about page. channel blog page. It has to be with the products in the menu,...
1
vote
1answer
30 views

Unable to update Craft: 'requires yiisoft/yii2-queue 2.1.0'

I've got another update issue with the following error. Can anyone help? craftcms/cms 3.0.27 requires yiisoft/yii2-queue 2.1.0 -> satisfiable by yiisoft/yii2-queue[2.1.0] but these ...
1
vote
2answers
35 views

Craft 3 protecting a page with a password?

I have used the Guest Entries to create a plugin where anonymous users can create a entry. I have a password field on each entry. Now I want the guests who have created the entry to be able to login ...

15 30 50 per page