People who code: we want your input. Take the Survey

Questions tagged [craft2]

Questions specific to the Craft 2 version of Craft CMS; avoid using for questions applicable to all or multiple versions.

Filter by
Sorted by
Tagged with
0
votes
0answers
19 views

Internal Server Error after upgrading from craftcms 2 to 3

I just upgraded from Craft 2 to 3.6.14 (latest). I was able to successfully to the upgrade. I am able to get into the admin and was even able to install the feed-me plugin. I ported over all the files ...
0
votes
0answers
12 views

When Asset is Located in Root of Asset Volume - asset.getPath() Does Not Return the Volume as Part of the File Path

Context Asset Volume: staff (I'm using an S3 bucket as the source type) Image location: staff/john-smith.jpg Version: Craft 2.7.8 Results I expected that this query {{ staff.portrait[0].getPath() }} ...
1
vote
1answer
27 views

Upload file issue on Craft 2.9.2

This issue is occurring on Craft 2.9.2. The assets are stored on Amazon AWS (S3). When I try to uploaded a new asset (of any size, even very small), the progress bar moves to 100% position but remains ...
0
votes
0answers
10 views

ArrayHelper::stringToArray creates sometimes index array

It looks like the craftcms 2 ArrayHelper created indexed array on large strings. But I'll need a none indexed array. Any ideas what I'll do wrong? Running on php 7.1. $playerIds = ArrayHelper::...
1
vote
1answer
19 views

Import Plugin on localhost Craft 2 crashes

I'm using the import plugin by Bob Oldehampsink on a localhost Craft2 site, but, although it appears to have installed successfully, when I attempt to upload the .csv file and click on 'next,' I'm met ...
1
vote
1answer
34 views

Display list of assets that are in use?

I am very new to Craft and how it works. I've got a client with a Craft site (v2.9.2), that I help them with. It was created by another developer. I want to help them tidy up their Assets. There are ...
1
vote
1answer
127 views

Running Craft CMS 2 on MySQL 8.0+ (Any major considerations?)

Yes, that's not a typo. This is for a Craft 2 site (long story). Because MySQL 5.6 is EOL in a few weeks, I am validating how feasible it can be to run under MySQL 8.0, there's not really any option ...
0
votes
0answers
26 views

How to get a specific category by index

I have 4 level product categories. For the menu I am building I need to pick a second category in all top level categories So I get top level categories like so {% set lv1Categories = craft....
1
vote
2answers
279 views

mkdir(): Permission denied

I have an old craft 2 installation. When I want to go to the frontend I get: mkdir(): Permission denied 745 { 746 if ($permissions == null) 747 { 748 $permissions = ...
0
votes
0answers
12 views

Can't list S3 buckets from Craft behind a firewall

We are using Craft2, and want to move the assets to Amazon AWS S3. We have two instances of Craft2, one on AWS, and one on a onprem server. The bucket is made (and is on eu-west-1) and the IAM user ...
0
votes
0answers
24 views

Why do image Transformations never finish rendering regardless if I use GD2 or ImageMagick?

I'm running Craft 2 with PHP 5.6.40 on a Windows 2019 Server under IIS (x64, non-thread-safe, FastCGI). PHP -m doesn't show any issues with my extensions, regardless if I use GD2 or ImageMagick. But ...
1
vote
1answer
23 views

Admin panel not working without language code

I've migrated a website with CraftCms 2 from local to a pre-production server. Everything is working fine but, I don't know why, I only can go to the admin panel with locale code before /admin. I mean,...
1
vote
1answer
95 views

Send email notification to user's email when their entry has been enabled

Running craft 2 on a customer's site. They have users that sign up on the site to receive personalized quotes. What I'd like to do is send an email notification to that user after an admin has enabled ...
0
votes
0answers
9 views

Craft 2: edit a value in a matrix field

This should be fairly easy but I can't figure it out: $criteria = craft()->elements->getCriteria(ElementType::Entry); $criteria->section = 'news'; $entries = $criteria->first(); // a ...
0
votes
0answers
16 views

Custom Plugin forms.textareaField Redactor buttons not rendering

I am struggling with how to get Redactor to show the source and image buttons within a custom plugin. Are there only certain buttons that are allowed if you are extending textareaField? Below is the ...
1
vote
1answer
53 views

German special characters like umlauts (ä, ö, ü) are not converted correctly with convertFilenamesToAscii

Filenames with German special characters are not converted correctly with convertFilenamesToAscii, e.g. ä, ö, ü are converted in a, o, u in contrast to ae, oe, ue in slugs with limitAutoSlugsToAscii.
1
vote
1answer
30 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> ...
1
vote
1answer
45 views

How I add security header on the front-end on Craft CMS

I have Mod_headers installed and active on my server, I know that Craft adds some headers from PHP but only for Control Panel requests. How can I add security headers to the front-end? Thank you
0
votes
0answers
16 views

How to add attr to redactor 2 formattingAdd object config

I have searched all over the web for the documentation that fits into my working usecase for redactor 2, The working solutions I have gotten off the web and works for me isn't on the redactor ...
1
vote
1answer
24 views

Use locale not included in Craft

I have to develop a website under Craft CMS 2 and going to Locale Options I see I can add a language, but I need to use a language that is not included in the official codes for the representation of ...
1
vote
1answer
71 views

Users not fully deleting from the database

From the admin, if I delete a user they disappear from the admin list but not from the users database table. Looking through the code I can see UsersService.php has a function deleteUser which calls ...
1
vote
1answer
26 views

Craft 2: possible to control plugin triggering order?

I have a Craft site which has 2 different plugins listening to the same event (the Contact Form beforeSend event). The outcome is one is being triggered before the other and this is causing issues. Is ...
1
vote
1answer
112 views

Assets (in assets folder) failing to load locally [Craft 2]

I'm trying to get my Craft 2 site running locally again (it worked at one point but now does not). I have gotten all the db related issues (seemingly) done and dusted and the admin loads fine, but it ...
1
vote
1answer
81 views

How to filter entries with null value in date field?

I have date field in entry that is empty therefore has null value. I'd like to filter entries that have date field value equal to null. How would I set that parameter on element criteria object? I don'...
0
votes
1answer
32 views

How get entries between mutiple dates, ordered by date?

I'll import (event) entries with feedme in craftcms 2 from an API who I'll can't change. The api gives the startdate off the events in a dateTime object. The allDay events have a date without time. ...
1
vote
1answer
600 views

Checking which version of Craft CMS a site is using

I've been asked to look at Craft CMS site where my would-be client has been ghosted by his previous developer. I have no handover information and only FTP and phpmyadmin access presently. Looking ...
0
votes
1answer
49 views

How do I upgrade the MYSQL database from Craft 2 to Craft 3 on GoDaddy

How do I upgrade my MySQL DB for a Craft 2 site to Craft 3. I don't have access to the SSH server or use of Composer, so I have to move files via FTP and do everything manually. My client is on ...
1
vote
1answer
121 views

Craft Internal Server Error

I am getting the following error: Internal Server Error CDbCommand failed to execute the SQL statement: SQLSTATE[42000]: Syntax error or access violation: 1055 Expression #34 of SELECT list is not in ...
0
votes
1answer
36 views

Using action as a key in a query string

I've been tasked with recreating an API within our Craft 2.X installation. For whatever reason, the API specifies the resource it is requesting with the query string parameter action. For example, ...
1
vote
1answer
150 views

Implement hreflang with multi sites

I currently have multi site config. One site have 2 locales. My configuration like so: 'example.com' => array( 'siteUrl' => array( 'us_en' => 'https://www.example.com/', '...
1
vote
1answer
92 views

How to create an entry with MySQL?

I'm trying to create a new entry from within the database. The section is defined in craft_sections, and the entries for craft_elements, and craft_entries seem correct after the script is run, but no ...
1
vote
1answer
82 views

Just upgraded to Craft 3, environmentVariables changed or stopped working

In my Craft 2 install, I had many links in Twig templates like this: <link rel="stylesheet" href="{{ craft.config.environmentVariables.baseUrl }}assets/css/styles.css"> I recently upgraded to ...
1
vote
2answers
87 views

Craft CMS 2 Task progression

In Craft CMS 2, I've created a task for updating Craft Commerce products from an Excel file. Everything's working correctly except the UI progression bar. The progression bar in control panel stays at ...
1
vote
1answer
31 views

Craft 2: What would prevent most cached template chunks from showing up in the `templatecaches` table?

I am working on a Craft 2 site that is exhibiting some rather poor performance characteristics. On production, we use memcache for caching, and monitoring on the server shows disappointing cache hit ...
1
vote
1answer
38 views

Copy of Craft instance generates “An unknown error occurred” for login

I needed to create a second instance of a craft 2.0 instance and so I copied the current instance to a new instance. I followed the directions found here: https://craftcms.com/guides/duplicating-a-...
1
vote
2answers
72 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
74 views

Receiving duplicate Sprout Form submissions

We're seeing duplicate submissions. It's between 2 - 15 of the same submissions, usually 7. They come in irregularly over the next couple minutes after the first one. And only sometimes. They are all ...
1
vote
1answer
65 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 ...
0
votes
1answer
27 views

Invalidate cache on new order

I have a list of orders from Commerce 1 (Craft 2) in the frontend. I want to invalidate the cache when a new order is placed but it doesn't work: {% set latestOrder = craft.commerce.orders.first() %}...
1
vote
1answer
99 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
1answer
123 views

'If/else' statement inside 'nav' tag

Craft CMS V2. Comment Plugin: verbb comment <ul> {% nav comment in comments %} {% if comment.isFlagged() == false %} <li> {% include '_forms/templates/...
1
vote
1answer
21 views

Hide flagged (inappropriate) comments from comment list

Craft CMS V2. Comment Plugin: verbb comment {% set comments = craft.comments.all({ limit: 10, status: 'approved' }) %} {% for comment in comments %} {{ comment.comment }} {% endfor %} ...
1
vote
1answer
25 views

How can I add fields in the Sprout design your form?

I am using Craft CMS 2.7.3 and sprout forms 2.6.0 version. I have created a dropdown field in the craft cms -> fields. How can I fetch this field or render this field in the Sprout form design? Even ...
0
votes
0answers
26 views

Copy Live to a Test site on same domain?

I have copied my Craft 2.6 live site directory, and created a test directory on our webserver in an effort to create a test site. Also duplicated the db and changed the configure files to point to the ...
2
votes
1answer
104 views

Programatically add lines to a Super Table field

I am trying to add new lines into a SuperTable field of an entry from my plugin. Following the Developper sample, I am able to change set lines to this SuperTable field. But it is replacing the ...
1
vote
1answer
235 views

Looping Entries in Super Table, display row details

I have a Super Tables field, containing related entries: I'd like to display the field name (ie 'English Links') in a template, but can't figure out how, the following outputs a string of values and ...
1
vote
1answer
21 views

Importing fields into A&M Forms plugin

I'm currently using the A&M Forms plugin and was wondering if I can import fields from the native Craft 2 fields? I have already created 20 or so fields that I will use in both the native ...
0
votes
1answer
31 views

Form fields not visible after creating content fields using A&M Forms plugin

I'm new to Craft 2, and I created about 20 new form fields in the Settings>Content>Fields section. I created a new group for them to go in. Then, I went to create a new Form, but I cannot see those ...
1
vote
2answers
163 views

Which twig file is being used and how?

I have a page in Craft (2.x) that displays several links and I was able to find which twig file had those links by searching the code base of twigs. Those links point to some Angular code with links ...
1
vote
1answer
304 views

Local DB SQL 'CDbException' Errors on Craft 2 site

Just tried to get a local site working again but getting all sorts of issues. I have updated the website online and downloaded the database, installed locally. I have also the craft/app folder to my ...