Questions tagged [craft2]

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

25 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
3
votes
0answers
103 views

Can you make Craft 2 Stateless?

So we are moving to Google App Engine Flexible which means we cannot store sessions on files. So I wanted to know if anyone has been able to make Craft 2 Stateless and how was it accomplished? Thanks....
2
votes
1answer
256 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 ...
2
votes
0answers
313 views

Order entries by custom date field

I want to modify this query so that the dated entries are sorted in descending order on a custom field called 'startDate'. Have tried adding .order('startDate') to the end of the craft.entries(query)....
1
vote
0answers
106 views

Freeform submission only works if 'devMode' => true

I have a locally running form via Solspace's Freeform plugin (Craft2) which perfectly runs on my local setup, but fails silently without any logs or messages on my live-setup. The form is submitting ...
1
vote
0answers
15 views

Templating not displaying after Craft server migration

A small team and I have inherited a Craft 2 site. We are brand new to craft with no previous experience with it. In wanting to work on offline copies of the sight the team is attempting to migrate the ...
1
vote
1answer
115 views

Craft error on NFS filesystem

I have a Craft 2 install that's been working fine until recently when the admin page is giving an error: file_put_contents(): Exclusive locks are not supported for this stream The front end is fine....
1
vote
0answers
28 views

Shipping and billing addresses dissapear when close and open the page

I have the following problem. When I set shipping and billing address on my cart and exit the page, the addresses are cleared once I open the page again. Is it possible to disable this behavior? ...
1
vote
0answers
91 views

Avoiding includeJsFile, includeJS from caching

In my template, I have an includeJSFile that loads properly on the first load, but disappears on subsequent loads. The includeJSFile is outside the caching tags, so I'm not sure why this is still ...
1
vote
0answers
28 views

modifyEntrySources hook with reverse relations

Is it possible to do a reverse relation query in a custom entry source? https://docs.craftcms.com/v2/plugins/hooks-reference.html#modifyentrysources I have two entry sections, one called courses and ...
0
votes
0answers
13 views

Entry Looping Template With Javascript and 500 Internal Server Error

I'm working with a looping mechanism in my Twig code that loops through entries and displays them for a kiosk type of application. The loop itself works for the most part, although after a few hrs, it ...
0
votes
0answers
19 views

Send email from two different addresses using SMTP

I have a configured and fully working Craft 2 website that sends emails using the SMTP settings I have set in the admin panel. I am in need to send a specific email in a certain situation from a ...
0
votes
0answers
16 views

How can I stop a user registration thank you page being cached in Craft 2

I seem to have an issue with a thank you page on user registration in craft 2. The thank you page gets passed a modified users id which is shown to the the registrant. However some odd occasions have ...
0
votes
0answers
13 views

Include File In Multiple Plug-Ins

In Craft 2, I would like to share the same include file among several different plug-ins. Is this possible, and, if so, where in the directory structure would that include file go? Thanks
0
votes
0answers
25 views

How to manipulate child dropdown menu items depends on parent dropdown menu?

I have two dropdown menu, one of them is parent and the other one is child menu. I want to change child menu items depends on parent menu items. For instances, if I choice 'Suggestions' on parent menu,...
0
votes
0answers
13 views

Craft 2 cannot connect to db after pw reset

This is a MySql/Craft question. I recently had difficulty in gaining access to MySql Workbench (which I use to access the MySql database to which my CraftCMS app connects). After numerous attempts, ...
0
votes
0answers
20 views

Adding A Soft Delete in Craft 2 Entries

I've been thinking of adding a "Soft Delete" or just perhaps a means in which deleting in certain sections (e.g. News) will archive the entry with an update, rather than deleting it. As I ...
0
votes
0answers
50 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
14 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() }} ...
0
votes
0answers
14 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::...
0
votes
0answers
30 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....
0
votes
0answers
28 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 ...
0
votes
1answer
61 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 ...
0
votes
0answers
28 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 ...
0
votes
0answers
24 views

Why does $entry['slug'] and $entry->slug return different values?

I'm writing a simple plugin for 'Craft 2' and It seems that a slug of an entry is returned if you reffer it like: $entry['slug'] but calling $entry->slug returns same value as entry title. Is ...
0
votes
0answers
47 views

CP doesn't recognize update from 2.7.3 to 2.7.4

I have a site running Craft 2.7.3. My update flow is to make sure that my development branch is up to date (with no outstanding commits) and that my local db is up to date with production. I then ...