# Question
Title: Is it possible to reset super admin access if all current listed super admin'ers no longer work for the organisation?
We need to be able to edit those areas of the website which has super admin access only. The current listed members of super admin'ers who were from our previous hosting company no longer support us as the hosting company closed down and we moved to a new hosting company. We can only edit to 'staff' level of approval which for 90% of the content is fine but ultimately limiting. How can we regain full control of the website?

# Answer
> 2 votes
I wouldn't recommend changing the hash function to MD5 as it has been insecure since 1996 (no offense Jelle). What I would recommend doing is changing the email to a Super Admin row in that table to an email you have access to, then using the reset password functionality in EE. From there, you can reset that users password safely and go about cleaning up your Super Admin members however you see fit.

# Answer
> 0 votes
As long as you have database access you're good. If you go into the database (with phpmyadmin or simiar) you can find the exp\_members table. in this table find a super admins's record. choose to change this record: type in a new password and set the function to MD5 and click save. This should give you a reset password

---
Tags: super-admin
---


# Question
Title: Low Search singular/plural matching not working
ExpressionEngine v2.8.1

Low Search 3.1.5

I cannot get the singular/plural matching to work.

I've stripped the results template back to this:

```
{exp:low_search:results
    keywords:lang="en"
    keywords:inflect="yes"
}

  <h2>{title}</h2>
  <br class="clearFix" />

{/exp:low_search:results}

```

The following queries produce different results:

```
http://localhost:8080/test/results?keywords=beers

http://localhost:8080/test/results?keywords=beer

```

what am I doing wrong?

# Answer
My bad; singular/plural matching wasn't added until v4!
> 0 votes

---
Tags: ee2, low-search
---


# Question
Title: Has Anyone Migrate a Site from CraftCMS to ExpressionEngine?
Are there any 'How-To Guides' on switching from a Craft 2 site to ExpressionEngine?

I sit on a committee, where their developer switched them to Craft 2 maybe 5 years ago. Unfortunately, it is poorly set-up and the group that set-up no longer supports it. I've been helping them add new templates, adjust code, and make minor/medium changes, but have reached my limit in terms of being able to tell what's a restriction/limitation introduced by the original developer and their set-up versus the software.

I'm exploring what a clean install of Craft 3 might offer, as well as just moving them to ExpressionEngine 5, which I prefer. But it's for them not me. So far, everything I find is migrating from EE2 to Craft 2 or Craft 3 (which makes sense, since that was the great migration period).

But EE5 is superior to Craft 2 and on par with Craft 3, so I'm hoping someone has made the switch and has some ideas around best practices.

# Answer
> 0 votes
I've not done a Craft to EE migration but the process is the same from any system.

I'd first get your Craft data into an exportable format then use EE's Datagrab addon to import data - https://expressionengine.com/add-ons/datagrab \- I normally use XML where complex data structures are involved.

Obviously you'd need to set up EE channels/fields first so you can match your data sets.

Might be a good idea to set up a test EE install so you can test data imports and iron out any quirks before you commit to your development site.

---
Tags: ee5
---


# Question
Title: FreeForm Pro iOs file size too large, how to allow larger images or constrain/resize
EE 5.3.0 FreeForm 1.8.1

I am using FreeForm Pro to handle forms. I have users saying they are unable to upload images from their iPhone because they keep getting errors that say

```
* File size too large
* Could not upload file

```

I get the same result from my iPhone.

I have tried increasing the max file size in the field settings in FreeForm to 10,000 KB and have also tried to apply an image manipulation in the directory like so

Neither of these seem to be working and I keep getting the same error.

Is there something I'm missing?

# Answer
> 1 votes
have you checked your php max upload filesize?

# Answer
> 0 votes
How big is your photo from your iPhone ? It's maybe larger than 10megs each ?

---
Tags: solspace-freeform, file-uploads, image, uploads
---


# Question
Title: Prevent CSRF token expiring for EE powered kiosk
We are building a 'kiosk' interface into a site powered by EE (2.8.1) which makes various `POST` requests to other site templates as part of the flow.

The problem we are having is that because the kiosk needs to be always on, the `csrf_token` which is used to authenticate the `POST` requests is expiring (after 1 hour currently) and so said requests return a `403` (permission denied).

I had thought that there might be some way to refresh the `csrf_token`, but from a bit of research, it seems that these are intrinsically tied to the session's id (something along those lines anyway!), and so the same one is always returned if I post for a refreshed token.

Is there a way that I am missing that would enable us to keep making `POST` requests to other site templates *and* keep CSRF protection enabled?

# Answer
> 0 votes
some links that might help:

Debugging Form Expiration

Manage Session Length

Re the latter link, there are quite a few other addons for session managment on devot-ee

EDIT: Hi Mike, depends on where you do that. My experience is that the csrf token code as prescribed by EE documents works fine with forms but when it comes to javascript/ajax, apparently XID is still the way to go. One of my addons uses the XID method successfully in EE2.11.3. If you are using jquery, our ajax code shouldlook something like this

`$.ajax({
 url : EE.BASE + "url-to-your-php-code",
 type : "post",
 data : {
 "whatever-name" : whatever-value,
 "XID": EE.XID
 },... etc. etc.`

And "XID": CSRF\_TOKEN

also works - I just tested it.

Give that a try and see how you go?

# Answer
> 0 votes
why not just add a meta refresh every 30 minutes or something

---
Tags: ajax, security, csrf
---


# Question
Title: display File Meta Data when I upload a phptp
If I upload a photo I fill out title, credit and description, but I can't find out how I can show this information on my site!

# Answer
> 0 votes
Check the doc.. here https://docs.expressionengine.com/latest/fieldtypes/file.html. You need to use the tag pair.

---
Tags: file-uploads
---


# Question
Title: Anyone recommend a replacement for Postmaster addon?
For v5? I think the addon is not developed anymore and stopped at v2. Basic functions needed are: mailout confirmation on signup/registration specific to different groups.

Anything out there?

# Answer
> 0 votes
I know of a couple of guys who teamed up to make postmaster EE5 compatible. They have it available and plan to release it in the near future. However due to legal stuff it will only be available to people who own a license to postmaster. You can contact me for more info

---
Tags: postmaster, mailing
---


title: Good EE5 single sign-on solutions?

text:
# Question
Title: Good EE5 single sign-on solutions?
I'm considering implementing EE5 with SSO. Does anybody have experience or recommendations for this? I've found a miniOrange solution https://www.miniorange.com/expressionengine-single-sign-on-(sso) that might be good--any comments on that?

# Answer
> 1 votes
If your intention is simply to allow other authentication schemes to act as mechanisms for gaining access to EE, you might get what you need from the "Social Sign In" plugin from Reinos.nl

This does not offer access to the full SSO universe, but potentially covers a large proportion of it.

I have not used this plugin, but can recommend Reinos stuff in general, and commend them for providing good support too: unusual for an EE addon in my experience.

HTH

---
Tags: ee5, single-sign-on
---


# Question
Title: Database connection issues upgrading to EE5
I recently upgrade from EE2 to EE5 locally on my laptop before moving to a remote location. When moving to a remote location, I get database errors.

```
SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES)
ee/legacy/database/drivers/mysqli/mysqli_connection.php:78

```

Has anyone seen this? I need help figuring this out.

Thanks!

# Answer
> 3 votes
In EE 3/4/5, your database connection configuration lives in your `system/user/config/config.php` file. The configuration should look like this:

```
$config['database'] = array (
    'expressionengine' =>
        array (
            'database' => '',
            'hostname' => '',
            'username' => '',
            'password' => ''
        ),
);

```

Fill in the array with your appropriate values.

If this information is there and correct, you need to diagnose your MySQL running instance and verify your credentials actually work. I would recommend testing at the command line like so (when SSHed into your server):

```
mysql -h {mysql_server_address} -u {user_name} -p

```

This should then prompt you with a password, which if you get correct, should log you into the MySQL CLI. If this doesn't work from your command line, your server most likely can't connect to the MySQL server and you need to start from there.

# Answer
> 0 votes
Looks like you need to check that the updated installation has the correct information about how to access MySQL on your remote server.

In EE2 this information was stored in a separate file (database.php) in your config folder. In EE5 this information is included in the main config.php file - so it is possible that you made the changes but to the wrong file...

Good luck!

HTH

---
Tags: database
---


title: Structure - Can I add a URL node?

text:
# Question
Title: Structure - Can I add a URL node?
I'd like to add a link to an outside site to my {exp:structure:nav} output. Can I do this? In Taxonomy I'd add a node and set it to "Custom Link," but it appears I can only add actual entries within EE to Structure's trees.

# Answer
Only EE entries can live inside the Structure tree, because Structure is built off of the Pages module. There is a way to do this, though it requires a little bit of a work around.

Create a channel called something like External Links or Menu Links or something, and have only one single custom field for that channel called something like Link URL. And then you can create a template for that channel that looks something like this:

```
<?php
header( "Location: {exp:channel:entries}{link_url}{/exp:channel:entries}" );
exit;
?>

```

Then you can create entries in that channel, assign it where you want in the Structure tree, and make sure you use that template for those pages. It'll get the job done.

Pretty sure I learned this from the Structure documentation, so look there thouroughly and you may get a cleaner version of this answer.
> 1 votes

# Answer
Another option is to add a typical entry so it appears in the nav tree, then in Apache set up a redirect.
> 0 votes

# Answer
In the templates, create a template group for redirects, and the template "my-offsite-link" and just use a regular meta redirect in the template:

```
<!DOCTYPE HTML>
<html>
<head>
<title>My offsite link</title>
<meta http-equiv="REFRESH" content="0;url=http://www.my-offsite-link/">
</head>
<body>
</body>
</html>

```

Then create an entry in the Structure tree wherever you want, and point it to the template for redirection:

entry -\> Structure (in the tabs) -\> Structure Template -\> redirects/my-offsite-link
> 0 votes

---
Tags: structure, eeharbor
---


# Question
Title: How do I set up Expression Engine in development environment without the license?
I just purchased a license key but that is for the production environment. How do I install and setup Expression Engine in my development server?

# Answer
> 1 votes
As long as you have a valid license, there is no issue with duplication. Just use the license for your development environment, and push it to the production environment. If you already have production set up, just clone the repo to your development environment.

EllisLab is not made up of monsters; many people run EE applications with a duplicated development/production set up. They know that. If you start using the license for different production environments, then you are violating your license in a way that can get you in trouble.

Concerned? You just gave them a bunch of money. Shoot them an email if you are really worried about it. I have a few things in the wild with a repository setup between development and production. To really avoid any possible issues, host your development install **inside** your production environment.

```
https://www.example.com --> production install

https://www.example.com/dev --> development install

```

Then just set up your `.gitignore` file to ignore itself, and customize it for your dev and your production setup. It will take some time to setup right, but once it is right, you are golden.

# Answer
> 2 votes
No worries anymore, as EE 5.x is open source and doesn't need a license.

---
Tags: development, license, install
---


title: Preview is broken EE5

text:
# Question
Title: Preview is broken EE5
I'm trying to preview in article but I'm getting a bunch of errors on the page (see image below). What could it be?

# Answer
> 1 votes
Seems to be a server parameter setting, update, from ICU lib

> I encountered this issue too, this problem may not be always related to PHP version, I have seen the problem on my customer server with PHP 5.6 version.
>
> The INTL\_IDNA\_VARIANT\_UTS46 constant is available in PHP 5.4.0 but the intl extension uses the ICU system lib and some servers have a really old version of the ICU lib. Support for UTS 46 Unicode IDNA Compatibility Processing was added in ICU 4.6 and released on
>
> In most cases, this happens on hosting providers who sell shared hostings and did not fixed this issue on their side don't want to assist their customers to update the ICU lib "because it's shared hosting"

Source: https://forum.codeigniter.com/thread-69780.html

---
Tags: ee5
---


# Question
Title: Best practices for importing matrix data
I have some pages that display various information about specific college majors, including a table for the names of employers who hire the major and a table for job titles of those majors (http://career.uga.edu/classof2016/major\_summary16/accounting\_-\_bachelors16). At the moment, the employer names are not connected with the job titles.

For each record/specific major/page, I need to display a new table with an employer name in the first column and all of the associated job titles in the second column.

I have started by adding a new matrix field to the existing data channel. I can use this to manually enter and display data the way I need to, but I have a significant number of records to import and I don't know if that will work with the Matrix field.

So here's my question: is there a preferred and/or simpler, native way to format a table that will display what I need?

Would it be better to create a new channel for the major, employer name, job title fields, and then pull that into the template that displays the existing data for each major using a relationship field?

Any suggestions would be appreciated.

# Answer
A matrix (or native grid field) can become unwiedly with a lot of records so I'd go down the relationship route. Create a new channel for the data, you can then use relationship field(s) to associate them with any other channel you want.
> 1 votes

---
Tags: matrix, import, datagrab
---


title: Preload text for AMP

text:
# Question
Title: Preload text for AMP
I'm trying to replace code within the body of an article depending on whether it is the AMP version or not.

For example, an article with an embedded image that begins with

# Answer
> 2 votes
There's no native way of doing this as far as I know so you'd probably need to do this programmatically via a custom addon that rewrites IMG tag based on the URL segment.

This is a classic case where using a fluid fieldtype for "body" content is useful, that would make swapping IMG tags based on URL segment a piece of cake!

---
Tags: preload-replace
---


# Question
Title: Simple search error when no results found
I'm using simple search with EE 5.2.1. Searches work fine when there is a matching result, but I get the following error when no results are found:

Warning array\_unique() expects parameter 1 to be array, null given ee/EllisLab/Addons/search/mod.search.php, line 1147

Severity: E\_WARNING Warning count(): Parameter must be an array or an object that implements Countable ee/EllisLab/Addons/search/mod.search.php, line 1147

Severity: E\_WARNING Warning Cannot modify header information - headers already sent by (output started at ee/legacy/core/Exceptions.php:120) ee/legacy/libraries/Functions.php, line 393

Severity: E\_WARNING

# Answer
I updated EE to 5.3.0 and it fixed the issue.
> 1 votes

---
Tags: simple-search
---


# Question
Title: Saving takes minutes - Timeout when saving an edited entry
I have raised the question a month ago here

I need to come back to this. We still have this issue. EE 5.3 with Publisher (but only one language at use for the moment). The website did run for about 10 days without any issue (it was copied from a developer space to the live-domain). All of a sudden when saving some of the edited entries it takes minutes to save them back so that we encounter a Request Timeout. We checked with the hosting company, they do not see what happens and no errors are logged. We have enough memory and we could remove the Timeout with the htaccess. It takes 4 to 6 minutes on some of the entries to be correctly saved.

We have no idea why EE takes that long for an entry save? There are no relationship stuff in those entries that take that long. There are no Bloqs fields in those entries. Some of the Bloqs field entries do save normally.

I have installed a copy of the site on an other server to check if we get any difference. It has the same behavior on this copy. The same entries do take minutes to update.

Is there someone who can help us to investigate and solve the problem? How could we make visible what EE is trying to do in this long time? My customer and I are getting a bit nervous now.

Some help is really appreciated.

# Answer
> 0 votes
We finally exported the live db and imported it to the earlier developer server. There we had no problem now to save as expected. Both server seemed to be identical as far as we could find out. We exported the db again from developer and imported it back to the live site. The savings behave now normally like they did almost 3 weeks ago. What the problem really was is unknown. Let's see if it happens again or is fixed definitive.

---
Tags: channel-entries, saving
---


# Question
Title: Error when replacing URLs with Deeploy Helper
I copy a db from one server to another server and change URL with Deeploy Helper. I get this error message. I also copied to another different server too to double check, and it gives the same error. The new URLs are in place and the site seems to work. But I don't feel comfortable. What could be the reason for this error? I might add: it's EE 5.3 / Deeploy Helper 4.2.2

```
SQLSTATE[HY000]: General error: 1364 Field 'item_id' doesn't have a default value:

```

INSERT INTO `exp_revision_tracker` (`item_table`, `item_field`, `item_data`, `item_author_id`, `item_date`) VALUES ('-', 'hop\_deeploy\_helper', '{\\"base\_url\\":\\"https:\\/\\/www.octave2sbox.ch\\/\\",\\"site\_url\\":\\"{base\_url}\\",\\"theme\_folder\_url\\":\\"{base\_url}themes\\/\\",\\"captcha\_url\\":\\"{base\_url}images\\/captchas\\/\\",\\"captcha\_path\\":\\"{base\_path}images\\/captchas\\/\\",\\"theme\_folder\_path\\":\\"{base\_path}themes\\/\\",\\"emoticon\_url\\":\\"{base\_url}images\\/smileys\\/\\",\\"channel::1::channel\_url\\":\\"https:\\/\\/www.octave2sbox.ch\\/\\",\\"channel::1::comment\_url\\":\\"\\",\\"channel::1::search\_results\_url\\":\\"\\",\\"channel::2::channel\_url\\":\\"https:\\/\\/www.octave2sbox.ch\\/\\",\\"channel::2::comment\_url\\":\\"\\",\\"channel::2::search\_results\_url\\":\\"\\",\\"channel::3::channel\_url\\":\\"https:\\/\\/www.octave2sbox.ch\\/downloads-videos\\",\\"channel::3::comment\_url\\":\\"\\",\\"channel::3::search\_results\_url\\":\\"https:\\/\\/www.octave2sbox.ch\\/downloads-videos\\/details\\/\\",\\"channel::4::channel\_url\\":\\"https:\\/\\/www.octave2sbox.ch\\/linienverkehr\\",\\"channel::4::comment\_url\\":\\"\\",\\"channel::4::search\_results\_url\\":\\"https:\\/\\/www.octave2sbox.ch\\/linienverkehr\\/details\\",\\"channel::5::channel\_url\\":\\"https:\\/\\/www.octave2sbox.ch\\/\\",\\"channel::5::comment\_url\\":\\"\\",\\"channel::5::search\_results\_url\\":\\"https:\\/\\/www.octave2sbox.ch\\/bedarfsverkehr\\/details\\",\\"channel::6::channel\_url\\":\\"https:\\/\\/www.octave2sbox.ch\\/\\",\\"channel::6::comment\_url\\":\\"\\",\\"channel::6::search\_results\_url\\":\\"https:\\/\\/www.octave2sbox.ch\\/eisenbahnverkehr\\/details\\",\\"channel::7::channel\_url\\":\\"https:\\/\\/www.octave2sbox.ch\\/\\",\\"channel::7::comment\_url\\":\\"\\",\\"channel::7::search\_results\_url\\":\\"\\",\\"channel::8::channel\_url\\":\\"https:\\/\\/www.octave2sbox.ch\\/\\",\\"channel::8::comment\_url\\":\\"\\",\\"channel::8::search\_results\_url\\":\\"https:\\/\\/www.octave2sbox.ch\\/blaulicht-und-industrie\\",\\"channel::9::channel\_url\\":\\"https:\\/\\/www.octave2sbox.ch\\/\\",\\"channel::9::comment\_url\\":\\"\\",\\"channel::9::search\_results\_url\\":\\"https:\\/\\/www.octave2sbox.ch\\/news\\/text\\",\\"channel::10::channel\_url\\":\\"https:\\/\\/www.octave2sbox.ch\\/\\",\\"channel::10::comment\_url\\":\\"\\",\\"channel::10::search\_results\_url\\":\\"\\",\\"channel::11::channel\_url\\":\\"https:\\/\\/www.octave2sbox.ch\\/\\",\\"channel::11::comment\_url\\":\\"\\",\\"channel::11::search\_results\_url\\":\\"https:\\/\\/www.octave2sbox.ch\\/dienstleistungen\\",\\"channel::12::channel\_url\\":\\"https:\\/\\/www.octave2sbox.ch\\/\\",\\"channel::12::comment\_url\\":\\"\\",\\"channel::12::search\_results\_url\\":\\"\\",\\"channel::13::channel\_url\\":\\"https:\\/\\/www.octave2sbox.ch\\/\\",\\"channel::13::comment\_url\\":\\"\\",\\"channel::13::search\_results\_url\\":\\"https:\\/\\/www.octave2sbox.ch\\/unternehmen\\",\\"channel::14::channel\_url\\":\\"https:\\/\\/www.octave2sbox.ch\\/\\",\\"channel::14::comment\_url\\":\\"\\",\\"channel::14::search\_results\_url\\":\\"https:\\/\\/www.octave2sbox.ch\\/qualitaetsmanagement\\",\\"channel::15::channel\_url\\":\\"https:\\/\\/www.octave2sbox.ch\\/\\",\\"channel::15::comment\_url\\":\\"\\",\\"channel::15::search\_results\_url\\":\\"\\",\\"channel::16::channel\_url\\":\\"https:\\/\\/www.octave2sbox.ch\\/\\",\\"channel::16::comment\_url\\":\\"\\",\\"channel::16::search\_results\_url\\":\\"https:\\/\\/www.octave2sbox.ch\\/mitgliedschaften\\",\\"channel::17::channel\_url\\":\\"https:\\/\\/www.octave2sbox.ch\\/\\",\\"channel::17::comment\_url\\":\\"\\",\\"channel::17::search\_results\_url\\":\\"https:\\/\\/www.octave2sbox.ch\\/referenzen\\",\\"channel::18::channel\_url\\":\\"https:\\/\\/www.octave2sbox.ch\\/\\",\\"channel::18::comment\_url\\":\\"\\",\\"channel::18::search\_results\_url\\":\\"https:\\/\\/www.octave2sbox.ch\\/management\\",\\"channel::19::channel\_url\\":\\"https:\\/\\/www.octave2sbox.ch\\/\\",\\"channel::19::comment\_url\\":\\"\\",\\"channel::19::search\_results\_url\\":\\"https:\\/\\/www.octave2sbox.ch\\/events\\",\\"channel::20::channel\_url\\":\\"https:\\/\\/www.octave2sbox.ch\\/\\",\\"channel::20::comment\_url\\":\\"\\",\\"channel::20::search\_results\_url\\":\\"\\",\\"channel::21::channel\_url\\":\\"https:\\/\\/www.octave2sbox.ch\\/\\",\\"channel::21::comment\_url\\":\\"\\",\\"channel::21::search\_results\_url\\":\\"https:\\/\\/www.octave2sbox.ch\\/standorte\\",\\"channel::22::channel\_url\\":\\"https:\\/\\/www.octave2sbox.ch\\/\\",\\"channel::22::comment\_url\\":\\"\\",\\"channel::22::search\_results\_url\\":\\"https:\\/\\/www.octave2sbox.ch\\/kundenservice\\",\\"channel::23::channel\_url\\":\\"https:\\/\\/www.octave2sbox.ch\\/\\",\\"channel::23::comment\_url\\":\\"\\",\\"channel::23::search\_results\_url\\":\\"\\",\\"channel::24::channel\_url\\":\\"https:\\/\\/www.octave2sbox.ch\\/\\",\\"channel::24::comment\_url\\":\\"\\",\\"channel::24::search\_results\_url\\":\\"\\",\\"channel::25::channel\_url\\":\\"https:\\/\\/www.octave2sbox.ch\\/\\",\\"channel::25::comment\_url\\":\\"\\",\\"channel::25::search\_results\_url\\":\\"\\",\\"channel::26::channel\_url\\":\\"https:\\/\\/www.octave2sbox.ch\\/\\",\\"channel::26::comment\_url\\":\\"\\",\\"channel::26::search\_results\_url\\":\\"\\",\\"channel::27::channel\_url\\":\\"https:\\/\\/www.octave2sbox.ch\\/\\",\\"channel::27::comment\_url\\":\\"\\",\\"channel::27::search\_results\_url\\":\\"\\",\\"channel::28::channel\_url\\":\\"https:\\/\\/www.octave2sbox.ch\\/\\",\\"channel::28::comment\_url\\":\\"\\",\\"channel::28::search\_results\_url\\":\\"https:\\/\\/www.octave2sbox.ch\\/karriere\\",\\"channel::29::channel\_url\\":\\"https:\\/\\/www.octave2sbox.ch\\/\\",\\"channel::29::comment\_url\\":\\"\\",\\"channel::29::search\_results\_url\\":\\"https:\\/\\/www.octave2sbox.ch\\/karriere\\/offene\_stellen\\",\\"channel::30::channel\_url\\":\\"https:\\/\\/www.octave2sbox.ch\\/\\",\\"channel::30::comment\_url\\":\\"\\",\\"channel::30::search\_results\_url\\":\\"https:\\/\\/www.octave2sbox.ch\\/lehrstellen\\",\\"channel::31::channel\_url\\":\\"https:\\/\\/www.octave2sbox.ch\\/\\",\\"channel::31::comment\_url\\":\\"\\",\\"channel::31::search\_results\_url\\":\\"\\",\\"channel::32::channel\_url\\":\\"https:\\/\\/www.octave2sbox.ch\\/\\",\\"channel::32::comment\_url\\":\\"\\",\\"channel::32::search\_results\_url\\":\\"https:\\/\\/www.octave2sbox.ch\\/news\\/text\\",\\"upload\_dest::1::server\_path\\":\\"\\/home\\/octave2s\\/public\_html\\/images\\/avatars\\/\\",\\"upload\_dest::1::url\\":\\"https:\\/\\/www.octave2sbox.ch\\/images\\/avatars\\/\\",\\"upload\_dest::2::server\_path\\":\\"\\/home\\/octave2s\\/public\_html\\/images\\/avatars\\/default\\/\\",\\"upload\_dest::2::url\\":\\"https:\\/\\/www.octave2sbox.ch\\/images\\/avatars\\/default\\/\\",\\"upload\_dest::3::server\_path\\":\\"\\/\\",\\"upload\_dest::3::url\\":\\"https:\\/\\/www.octave2sbox.ch\\/images\\/member\_photos\\/\\",\\"upload\_dest::4::server\_path\\":\\"\\/home\\/octave2s\\/public\_html\\/images\\/signature\_attachments\\/\\",\\"upload\_dest::4::url\\":\\"https:\\/\\/www.octave2sbox.ch\\/images\\/signature\_attachments\\/\\",\\"upload\_dest::5::server\_path\\":\\"\\/home\\/octave2s\\/public\_html\\/images\\/pm\_attachments\\/\\",\\"upload\_dest::5::url\\":\\"https:\\/\\/www.octave2sbox.ch\\/images\\/pm\_attachments\\/\\",\\"upload\_dest::6::server\_path\\":\\"\\/home\\/octave2s\\/public\_html\\/images\\/uploads\\/\\",\\"upload\_dest::6::url\\":\\"https:\\/\\/www.octave2sbox.ch\\/images\\/uploads\\/\\",\\"upload\_dest::7::server\_path\\":\\"\\/home\\/octave2s\\/public\_html\\/images\\/headers\\/\\",\\"upload\_dest::7::url\\":\\"https:\\/\\/www.octave2sbox.ch\\/images\\/headers\\/\\",\\"upload\_dest::8::server\_path\\":\\"\\/home\\/octave2s\\/public\_html\\/pdf\_docs\\/\\",\\"upload\_dest::8::url\\":\\"https:\\/\\/www.octave2sbox.ch\\/pdf\_docs\\/\\",\\"upload\_dest::9::server\_path\\":\\"\\/home\\/octave2s\\/public\_html\\/images\\/small\_headers\\/\\",\\"upload\_dest::9::url\\":\\"https:\\/\\/www.octave2sbox.ch\\/images\\/small\_headers\\/\\",\\"upload\_dest::10::server\_path\\":\\"\\/home\\/octave2s\\/public\_html\\/images\\/thumbnails\\/\\",\\"upload\_dest::10::url\\":\\"https:\\/\\/www.octave2sbox.ch\\/images\\/thumbnails\\/\\",\\"upload\_dest::11::server\_path\\":\\"\\/home\\/octave2s\\/public\_html\\/images\\/logos\\/\\",\\"upload\_dest::11::url\\":\\"https:\\/\\/www.octave2sbox.ch\\/images\\/logos\\/\\",\\"upload\_dest::12::server\_path\\":\\"\\/home\\/octave2s\\/public\_html\\/images\\/portraits\\/\\",\\"upload\_dest::12::url\\":\\"https:\\/\\/www.octave2sbox.ch\\/images\\/portraits\\/\\",\\"upload\_dest::13::server\_path\\":\\"\\/home\\/octave2s\\/public\_html\\/images\\/news\_media\\/\\",\\"upload\_dest::13::url\\":\\"https:\\/\\/www.octave2sbox.ch\\/images\\/news\_media\\/\\",\\"upload\_dest::14::server\_path\\":\\"\\/home\\/octave2s\\/public\_html\\/medien\_downloads\\/\\",\\"upload\_dest::14::url\\":\\"https:\\/\\/www.octave2sbox.ch\\/medien\_downloads\\/\\",\\"upload\_dest::15::server\_path\\":\\"\\/home\\/octave2s\\/public\_html\\/images\\/bildergalerie\\/\\",\\"upload\_dest::15::url\\":\\"https:\\/\\/www.octave2sbox.ch\\/images\\/bildergalerie\\/\\"}', 1, 1578493566)

ee/legacy/database/drivers/mysqli/mysqli\_connection.php:117 Stack Trace: Please include when reporting this error

```
#0 ee/legacy/database/drivers/mysqli/mysqli_driver.php(112): CI_DB_mysqli_connection->query('INSERT INTO `ex...')
#1 ee/legacy/database/DB_driver.php(270): CI_DB_mysqli_driver->_execute('INSERT INTO `ex...')
#2 ee/legacy/database/DB_driver.php(180): CI_DB_driver->simple_query('INSERT INTO `ex...')
#3 ee/legacy/database/DB_active_rec.php(1371): CI_DB_driver->query('INSERT INTO `ex...')
#4 ee/EllisLab/ExpressionEngine/Service/Model/Query/Insert.php(75): CI_DB_active_record->insert('revision_tracke...')
#5 ee/EllisLab/ExpressionEngine/Service/Model/Query/Update.php(99): EllisLab\ExpressionEngine\Service\Model\Query\Insert->actOnGateway(Object(EllisLab\ExpressionEngine\Service\Model\SyntheticGateway), Object(EllisLab\ExpressionEngine\Model\Revision\RevisionTracker))
#6 ee/EllisLab/ExpressionEngine/Service/Model/Query/Insert.php(39): EllisLab\ExpressionEngine\Service\Model\Query\Update->doWork(Object(EllisLab\ExpressionEngine\Model\Revision\RevisionTracker))
#7 ee/EllisLab/ExpressionEngine/Service/Model/Query/Insert.php(27): EllisLab\ExpressionEngine\Service\Model\Query\Insert->doWork(Object(EllisLab\ExpressionEngine\Model\Revision\RevisionTracker))
#8 ee/EllisLab/ExpressionEngine/Service/Model/DataStore.php(282): EllisLab\ExpressionEngine\Service\Model\Query\Insert->run()
#9 ee/EllisLab/ExpressionEngine/Service/Model/DataStore.php(238): EllisLab\ExpressionEngine\Service\Model\DataStore->runQuery('Insert', Object(EllisLab\ExpressionEngine\Service\Model\Query\Builder))
#10 ee/EllisLab/ExpressionEngine/Service/Model/Query/Builder.php(79): EllisLab\ExpressionEngine\Service\Model\DataStore->insertQuery(Object(EllisLab\ExpressionEngine\Service\Model\Query\Builder))
#11 ee/EllisLab/ExpressionEngine/Service/Model/Model.php(355): EllisLab\ExpressionEngine\Service\Model\Query\Builder->insert()
#12 user/addons/hop_deeploy_helper/mcp.hop_deeploy_helper.php(597): EllisLab\ExpressionEngine\Service\Model\Model->save()
#13 [internal function]: Hop_deeploy_helper_mcp->save()
#14 ee/EllisLab/ExpressionEngine/Controller/Addons/Addons.php(1662): call_user_func_array(Array, Array)
#15 ee/EllisLab/ExpressionEngine/Controller/Addons/Addons.php(946): EllisLab\ExpressionEngine\Controller\Addons\Addons->getModuleSettings('hop_deeploy_hel...', 'save', Array)
#16 [internal function]: EllisLab\ExpressionEngine\Controller\Addons\Addons->settings('hop_deeploy_hel...', 'save')
#17 ee/EllisLab/ExpressionEngine/Core/Core.php(241): call_user_func_array(Array, Array)
#18 ee/EllisLab/ExpressionEngine/Core/Core.php(110): EllisLab\ExpressionEngine\Core\Core->runController(Array)
#19 ee/EllisLab/ExpressionEngine/Boot/boot.php(151): EllisLab\ExpressionEngine\Core\Core->run(Object(EllisLab\ExpressionEngine\Core\Request))
#20 admin.php(153): require_once('...')
#20 admin.php(153): require_once('...')

```

# Answer
We sorted it out. The error always happened when we imported the db from the live server to the developer server and wanted to change there URLs and paths with Deeploy Helper.

After we reexported the db from the developer server and reimported it at either the two dbs we got no error messages from Deploy Helper anymore.

It looks as if the db file from the live server had some strange content, because we also got rid of the problem mentioned in this entry Saving takes minutes - Timeout when saving an edited entry at the same time.

What exactly the reason for this trouble was is unknown.

I also want to add that a copy of the live site we installed on a complete new server place produced the same problem. Only importing to the original developer server did remove the trouble and let us save normally. And the exported db from that developer place did also remove the problem on the lave site and on the fresh installed copy on another server.

This was a very special experience where I am not able to understand why and how such things can happen.
> 1 votes

# Answer
As far as I'm aware Deeploy helper only works with EE3, there may have been some changes in EE5 that stop it working.

I suggest dropping https://www.hopstudios.com an email to see if they can fix it.
> 0 votes

---
Tags: deployment
---


# Question
Title: Channel Entry Model how do I get file url in grid field?
This question follows this one

```
$entry = ee('Model')->get('ChannelEntry')
->filter('entry_id', $entry_id)
->first();

$entry->$field_id_5; // NULL

```

$field\_id\_5 is a grid field that stores images.

How am I supposed to get what I need to build the urls to the images ?

# Answer
You've probably already found a workaround to this, but thought I'd throw in my 2¢ for others that are trying to get models to work.

Models seem to be decent to use if you're doing simple things with simple fields. For my needs, I've usually found it lacking (like the case with these grid fields, category filtering, etc.) and after my scouring of docs and source code, **I can't honestly recommend using *Channel Entry* Models for anything**. If someone does know the correct way using Channel Entry Models, please provide an answer so we can upvote it.

That said, I've taken to the alternative—querying the database using EE's Active Record. So in your case, you can get the field by using

```
$query = ee()->db->where('entry_id', $entry_id)->get('channel_grid_field_5');

// Check if we actually have any results
if (!$query->num_rows()){
    return; // Or however you want to handle this
}

// Iterate over every possible row
$images = [];
foreach($query->result_array() as $row){
    // The particular column name for one of my grid fields is 10. You'll
    // need to figure out which one(s) you need to reference for your needs.
    $images[] = $row['col_id_10'];
}

```

Now that you have your array of images, you need to parse them to derive your URL. They will yield something like `{filedir_8}best_puppy.jpg`. You can either hardcode what `{filedir_X}` is supposed to be or run another database query against the `upload_prefs` table:

```
$image_urls = [];
foreach($images as $image){

    // Extract the directory id from image path
    $filedir_id = preg_replace('/^\{\w_(\d+)\}.+$/', '$1', $image);

    // Get the url path from the table
    $filedir_query = ee()->db->select('url')->where('id', $filedir_id)->get('upload_prefs');
    if (!$filedir_query->num_rows()){
        return;
    }

    // Extract the actual path since it's prepended by `{base_url}`
    $path = str_replace('{base_url}', '', $filedir_query->row_array()['url']);
    // Extract the file name
    $filename = preg_replace('/\{filedir_\d+\}(.+)/', '$1', $image);

    // Prepend the protocol, domain, and path to the filename
    $image_urls[] = "https://cdn.example.com/$path$filename";
}

```

Voila! Your very own URL to the file.

Relevant Resources
> 2 votes

---
Tags: channel-entries, database, channel-images
---


# Question
Title: Can't upload PPT file; Getting "File not allowed"
I'd like to be able to upload PPT files in the CP, but I'm getting the "File not allowed" error. Can anyone tell me how to resolve this? This is in EE5 5.3.0--all the solutions I've seen have been in the EE2 format.

I've tried adding this to mimes.php with no success:

```
$config['mime_whitelist_additions'] = array(
  'application/vnd.ms-powerpoint'
);

```

Then I refresh the CP and try again, getting the same error.

Any ideas?

# Answer
There are a few mime types for .ppt files, try adding these:

.ppt application/mspowerpoint

.ppt application/powerpoint

.ppt application/vnd.ms-powerpoint

.ppt application/x-mspowerpoint
> 1 votes

---
Tags: file-uploads, ee5
---


title: Meta Title Breaking After Apostrophe

text:
# Question
Title: Meta Title Breaking After Apostrophe
EE 5.2.2

The title meta tag from the default site html-wrapper template is this `<meta property="og:title" content="{layout:og_title}">`. It is working great for everything except if there's an apostrophe in the title, in which case the output stops before the apostrophe. So the title `Love Doesn't Stop` is rendered as `Love Doesn`.

I've tried other options such as using conditionals to pull the `{title}` from the channel entry itself, which, when I view the page source, renders `Love Doesn’t Stop` but still uses `Love Doesn` when linking out.

I have also tried changing the actual title from `Love Doesn't Stop` to `Love Doesn’t Stop`, but the same thing still happens: I end up with `Love Doesn`.

Is this an EE problem or an HTML problem?

Thanks.

# Answer
Try using the attr\_safe modifier on your tag (where the value is generated, not the layout tag) - https://docs.expressionengine.com/latest/templates/variable-modifiers.html#attr\_safe \- that will convert special characters to HTML entities which should work.
> 1 votes

# Answer
I have the same problem. I also have a similar issue with Channel names where I have to include the unicode character, or the name will be truncated in the layout tag. (But then I still end up with html characters in the title tag).

attr\_safe doesn't seem to work consistently and I haven't had any luck trying to use its unicode\_punctuation= parameter either.

Did you find anything that worked for you?
> 0 votes

---
Tags: templates, html, title, metadata, meta
---


# Question
Title: Use the same Assets library across multiple sites
I'm developing two sites to work off the Multi-Site Manager in EE 5.2.2 and ideally would like them to share the same image library as the same logos, adverts and some other images are used on both sites, handled by several content authors who will manage content across both sites. I've configured the EE File Manager on both sites to point to the same directory for the top-level image folder: `{base_url}/images/uploads/` and I've installed the Assets add-on v.3.3.3 (from EE Harbor) as the means to manage the image library.

My issues are:

(a) When you make a change in Assets on Site A (upload a new image, create a new sub-folder, etc) you have to manually update the index in Assets on Site B in order to see the changes reflected there (or vice versa), a step that content authors would have to remember to do all the time in order to see the up-to-date library;

(b) This is duplicating the folders and files in the Assets tables in the EE database - which kind of defeats my aim of not having duplicates of the same image file across both sites.

I expect one workaround might be to have shared images just stored in Site A's library and reference their url when displaying on Site B but the content authors are not going to be fiddling with code like that.

Does anyone know of a way to avoid those two issues or is that just how it works in MSM?

Thanks.

# Answer
> 0 votes
Unclear what benefit you are getting from using Assets, but I think that is complicating things for you.

Have you considered using buzzingpixel's "Treasury" add-on to manage your image storage alongside Ansel? From what I understand it should be possible to configure Treasury to store all the images in a single location (e.g. S3, local server) and access them directly from Ansel's interface(s).

My understanding of the Treasury / Ansel license (and Assets too I think) is that they are sold on a 'per site' basis - so you'd need to buy two of everything for it to work with your configuration.

HTH

---
Tags: assets, file-uploads, multi-site-manager, file-manager, eeharbor
---


title: How To Fire Addon Method With Cron Job

text:
# Question
Title: How To Fire Addon Method With Cron Job
EE 5.3.0

I have a feature that compares and updates data from different services using various APIs. I set it up to trigger based on url ACT id and a key. The script works fine and now I want to make it run automatically two times per day.

To do this I wanted to use a cron job. My webserver is HostGator, dedicated server, which has a cron job section in the cPanel. I've set up a test to run every minute and return the results to me via email. This is not working and I have changed the command to many different things, none of which work.

The script is set up to return a reply of `testing` when there is the ACT ID and the key of `test` in the url, so `https://www.domain.com/ACT=42&key=test` prints `testing`.

I've tried setting this up as a cron job using cURL in several different ways.

`curl --silent --compressed https://www.domain.com/ACT=42&key=test`

`curl -s "https://www.domain.com?ACT=42&key=test"`

`curl "https://www.domain.com/ACT=42&key=test"`

Nothing is sending an email so I have no idea if this is even working.

When I contacted HostGator support the rep gave me a bunch of links on how to set up a cron job, which didn't help. I've done this before on a shared HostGator server for an import addon and it worked fine, ran the script, got the email, etc. But for this I'm not getting anything and I'm at a bit of a loss.

Any help would be greatly appreciated.

# Answer
> 1 votes
After confirming your extension is installed with module.

Have you registered your action in table `exp_actions`? If no, then first register your action with respected method name. If yes, then make sure method name which you've specified in the `exp_actions` should be declared in the `mod.plugin_name.php`. And check with just echoing sample text. After confirming this you can go for setting up CRON.

And, that method is accessible with `website_url/?ACT=your_action_id`. Same url you've to add it into the CRON job and check accordingly.

Try by setting your CRON URL by below way:-

```
wget https://domain_name.com/index.php?ACT=action_id &> /dev/null

```

I hope it will works for you.

---
Tags: add-on, add-on-development, cron, action, curl
---


# Question
Title: Issue with sticky option change not saving
I have a weird situation I've never seen before where turning the sticky option off in an entry and hitting save results in a 404 page in the CP. The change never saves. Here's a video of the issue: https://d.pr/v/NLgN2A

This is EE 4.3.8.

Not sure how to even begin troubleshooting.

# Answer
> 0 votes
I've seen similar wobblies caused by more stricter server side mod\_security rules being triggered. So the first place I'd look is whether saving + sticky triggers one or more mod\_security rules.

---
Tags: ee4
---


# Question
Title: How can i use json data in a template that i want to convert using angular2react package. I want to make it dynamic but template is static
I want to take json data and put it in my template. Actually i am using angular2react package to use angularjs code in my reactjs project

This is my component: const component= { template :`<input type=\"number\" ng-model=\"size\" name=\"size\" min=\"0\" max=\"10\" integer />{{size}}<br />`

}

export default component;

This is the json data:

"modelView": { "components": \[ { "resource": "virtualDomains.StudentCourseList", "name": "Testingpageresource", "type": "resource", "staticData": \[\] }, { "components": \[ { "allowDelete": false, "components": \[ { "readonly": false, "name": "Testingpageblock\_grid\_text", "model": "SCBCRSE\_CRSE\_NUMB", "label": "Testingpageblock\_grid\_text", "loadInitially": true, "type": "text", "parameters": {}, "validation": {}, "required": false }, { "readonly": false, "name": "Testingpageblock\_grid\_child\_2", "model": "SCBCRSE\_EFF\_TERM", "label": "Testingpageblock\_grid\_child\_2", "loadInitially": true, "type": "text", "parameters": {}, "validation": {}, "required": false } \], "onSave": "alert(\\"Something\\");", "onError": "{{size}}
", "allowNew": true, "pageSize": 5, "loadInitially": true, "type": "grid", "name": "Testingpageblock\_grid", "allowModify": true, "model": "Testingpageresource", "allowReload": true, "parameters": {} }

I need the onError data and need to put it in the template to be able to use for angular2react

# Answer
It's good to start with what version of EE you're working with so we all know.

I'm not familiar with the angularjs package you're using, but I know how to get tag data into your templates.

First you need an add-on that is installed where you can work with your json object in php and parse into tagdata. (if you don't have this there's a whole process that I can go over with you)

Assuming the class for this method is named `My_class`, you would have a method within it that looks something like this:

```
function get_on_error_tagdata ( $json ) {
    $object = json_decode( $json, true );
    $variables = array();
    foreach ( $object['onError'] as $key => $value ) {
        $variables[$key] = $value
    }
    return ee()->TMPL->parse_variables_row( ee()->TMPL->tagdata, $variables );
}

```

Now, I'm not sure how you're getting your `$json` object in the first place, but assuming you already have it you'll have to work with it to make sure it's parsed into the `$variables` array properly, but once you have that you'll be able to access those values on the frontend like this:

```
{exp:my_class:get_on_error_tagdata}
    {allowNew}
    {pageSize}
    {loadInitially}
    {type}
    {etc}
{/exp:my_class:get_on_error_tagdata}

```

You can also pass values to your class using that tag as well by adding `my_value='{whatever data you want the class to have}'` inside the opening tag and inside of your method add `$value = ee()->TMPL->fetch_param('my_value');`

I hope this helps.
> 0 votes

---
Tags: templates, json
---


# Question
Title: Get all entries where expiration date is within last 12 months
I know this is more of a SQL question, but I'm having trouble getting EE to cooperate. I have entries that expire, and want to show only entries which have expired in the last 12 months. I tried:

```
 SELECT entry_id, title, expiration_date
 FROM exp_channel_titles
 WHERE expiration_date BETWEEN date_sub(Now(), INTERVAL 12 MONTH) AND Now();

```

I get zero results.

# Answer
> 2 votes
Could you not use native parameters for this?

```
{exp:channel:entries channel="mychannel" show_expired="only" start_on="-12 months"}

```

# Answer
> 1 votes
As far as I can tell, you must use use Unix Timestamp (ugh) to get proper results.

So:

```
SELECT entry_id, title, expiration_date
FROM exp_channel_titles
WHERE expiration_date
BETWEEN
  unix_timestamp(date_sub(Now(), INTERVAL 12 MONTH))
AND
  unix_timestamp(Now());

```

# Answer
> 0 votes
For the datetime fields here is a small change, on the other hand it does not return exactly one year it takes 11 months to have exactly one year of data

```
  SELECT entry_id, title, expiration_date
    FROM exp_channel_titles
    WHERE expiration_date
    BETWEEN
      date_sub(Now(), INTERVAL 11 MONTH)
    AND
      Now()
    ORDER BY expiration_date DESC

```

---
Tags: query, mysql, sql
---


# Question
Title: EE 5.x - How to suppress login/logout confirmation page
on EE 2.x the Freemember addon allowed to directly redirect the user after login/logout to a specified page (avoiding the default login/logout confirmation page).

Since the Freemember addon is EOL, how can I achieve the same thing on EE 5.x ?

# Answer
> 2 votes
Not sure it's really possibly without editing core files at this point. I don't have time to test this, but I'll throw out a small guess based on hooks.

For login, you'd need to try one of these hooks:

```
member_member_login_multi($hook_data)
member_member_login_single($hook_data)
member_member_login_start()

```

I'm guessing the first two hooks occur after the splash page, so that's out. If not, that could be a key place to take over control with an extension and see where you can go from there.

The last hook is going to happen probably before the splash page **and** before the user is logged in, so what you'd have to do is (if it's possible) scrap the `$_POST` data for login info, and then instantiate the auth class, and log in the member yourself (provided you can even still do this in EE 5.X). You can always try this:

```
ee()->load->library('auth');
$sess = ee()->auth->authenticate_username("my_test_user", "my_test_pass");
var_dump($sess);

```

somewhere to see if you can even still do that. If you can, you can take control with the `member_member_login_start()` hook and then redirect, and `die()` at the end of it.

For logout; I'm too tired to type up any more, but similar ideas. Test the log out hooks, and if you can take control of one before it hits the splash screen (and you have the where withall to properly log the user out with you're own code and the auth and/or session library) you can redirect there most likely.

**Caution with this one if you proceed. Make sure members are fully logged in and out if you take control of auth and session.**

Also, this may break the basic auth loop (bad password? try again; bad user? try again; too many log in attempts? wait a while; etc...).

# Answer
> 0 votes
A cruder but effective work-around (instead of rolling an add-on) is simply to submit the login form via an AJAX call and do the redirect to where ever via javascript. The login activity will still trigger the splash screen, but it won't be visible / shown to the user.

HTH

---
Tags: redirects
---


# Question
Title: Get Category ID from URL title of URL segment?
My Url: http://somelink.com/package/view/a-hald-day-trip-to-the-zoo

//my code below... from url above i want to use entry title category id as my category id below, the url above and my code below have below to separate channels but they share categories groups//

```
    {exp:channel:entries
        channel="departures"
        category="{last_segment_category_id}"
        limit="10"
        dynamic="no"
    }
       <p>{title}</p>
   {/exp:channel:entries}

```

//But this code above Does not work!, i tried using cat2seg but i think this works with category url and not url title//

# Answer
`{last_segment_category_id}` is not a variable provided directly by ExpressionEngine. So to get this value you need to install an add-on - it is not clear from your question what add-ons you are using (or what version of EE...).

To get a value from the variable `{last_segment_category_id}` you will need to have installed either **URL Helper** addon (from here) or **Low Seg2Cat** (from here), both of which define this variable.

It is probably worth checking which of these you are using (or install one). I am not sure what happens to the variable if you install both add-ons...

You also could achieve something like this result using **cat2** (here) but with different tag syntax.

HTH.
> 1 votes

---
Tags: categories, entries, related
---


# Question
Title: ExpressionEngine 5.3 - Retrieve URL_TITLE from a different channel
I've done some searching but I haven't found an answer. Or if I have it was a little over my head and I may have missed it.

I'm working on a website that has a catalog of specific publications. Essentially, I want to show, first, a list of available titles. As far as I've ready the only way to show one of each title, and not each entry, is through an {exp:query SELECT DISTINCT...} string. That's fine. That's getting the single entry from each of the available titles. (For more information, I'm returning all of that information as inline elements so they'll be arranged nicely on the page.)

So, here's the issue I'm seeing; the exp:query pulls from exp\_channel\_data\_field\_15, which does not contain the URL\_Titles. If I run an {exp:channel:entries...} tag within the tags of the query it just returns everything in the channel. I tried to filter it out by only getting one that looks for the specific entry\_id, as they match, but I haven't been able to modify the SQL query to include that and still only return the single result per title.

I looked into relationships, but since this is a query function I don't think it will work?

So, to recap. I have a channel that has a list of publications (multiple issues of multiple titles) that includes URL\_title. I'm not able to generate the only-unique entries of the title names without the exp query. But that exp query runs on a record that doesn't have the url\_title.

Is there a way to do this that I'm overlooking? Is there another way to list the unique title entries to only show one of each title that I'm not using?

# Answer
```
{exp:channel:category_archive channel="msdc" style="linear"}
{categories}
{exp:channel:entries channel="msdc" category="{category_id}" limit="1"}
{category_image}
{/exp:channel:entries}
{/categories}
{/exp:channel:category_archive}

```

Seems like it may be double-dipping or not optimized, but it shows one from each category.
> 0 votes

---
Tags: url-title, ee5
---


title: EE won't let me post, edit, submit

text:
# Question
Title: EE won't let me post, edit, submit
So here's something weird that's happened: the site is still generating previously created content on our site -- http://www.comicsreporter.com -- and I can get to EE, and open posts, but I can't save an edit, can't submit anything, and can't search for a posting by name. I also can't save changes to configurations -- like I can click "off" on Auto Check but it doesn't save. In all cases, saving, submitting, or searching returns me to the CP Home page.

Help? We're running an old-ass version (1.4.1), but any help via any version might be appreciated.

# Answer
> 1 votes
There's a seemingly identical EE1 post on the EL forums for this issue. You might want to try making the following changes to config.php:

```
$conf['secure_forms'] = "n";
$conf['require_ip_for_login'] = "n";
$conf['require_ip_for_posting'] = "n";

```

This will disable some useful security features but it could be a viable short term workaround.

I'd also suggest updating to the latest EE1 release (if not EE2) ASAP. I wouldn't want to guess how many bugs and compatibility issues there are in 1.4.1.

# Answer
> 1 votes
here is the fix. this worked for me on 2.25.2020. you hosting company can do this for you.

"I have investigated the issue and checked server logs, according to them, the issue could have been caused by triggered ModSecurity rule.

ModSecurity is an Apache module which works as a web application firewall. It blocks known exploits and provides protection from a range of attacks against web applications. Sometimes ModSecurity has conflicts with some scripts and plugins which may result in false-positive blocks, thus it is not possible to predict or avoid it, unfortunately.

I whitelisted this rule for your account, so please check it on your side now."

---
Tags: control-panel, ee1
---


# Question
Title: ckeditor for expressionengine version 1?
i am using version 1.6.7 , and i need to install a CK-editor to ability format the text in the entry process , and all the documentation said that i should be using at least a version 2 and larger, so there is any way to install any plugin ?

# Answer
You can try to install MX Universal Editor, but I can't guarantee anything about this.

http://wiseupstudio.com/expressionengine/mx-universal-editor.html
> 1 votes

---
Tags: editor, richtext, ckeditor, text-formatting, textarea
---


# Question
Title: How to list all Playa choices for a given entry in a multi-entry listing
I want to create an XML file that can list multiple entries - straightforward enough. But for each entry, I also want to list all of the sibling entries chosen in the Playa field for that entry. That's where things get tricky.

Putting the Playa content directly into the XML field gets no listing of the Playa choices at all, but when I tried embedding a template...I only see something that looks like (but isn't) the closing XML tag, not the beginning XML tag nor any of the expected Playa children (related titles).

What am I doing wrong?

The code for the primary XML-generation template is:

```
<root>{exp:channel:entries channel="spc-content" category="5" orderby="title" status="Migrated" sort="asc" limit="100"}
  <entry>
      <title>{title}</title>
      <related>{embed="group/embed-xml-related" the_id="{entry_id}"}</related>
  </entry>
{/exp:channel:entries}
</root>

```

The code for that embedded template is

```
{exp:playa:children field="playa" entry_id="{embed:entry_id}" limit="15" status="open|Featured|Created|Migrated"}
{title}
{/exp:playa:children}

```

The output is:

```
<root>
<entry>
<title>TKB Trading’s Blush Beige</title>
<related/>
</entry>
<entry>
<title>TKB Trading’s Bolera</title>
<related/>
</entry>
<entry>
<title>TKB Trading’s Brilliant Gold</title>
<related/>
</entry>
...
(and so on, until it lists 100 entries)
...
</root>

```

# Answer
Your embed is using the `{exp:playa:children}` tag, not the `{exp:playa:siblings}` tag, which you would want to use for outputting siblings from a `playa` field.

Also, you are using your embed variable property incorrectly. You are setting this variable:

```
the_id="{entry_id}"

```

So to access that in your embed, you'll need to use this embed variable:

```
{embed:the_id}

```
> 0 votes

---
Tags: playa, embeds, xml
---


# Question
Title: Is this possible? ee5 / tab / custom view
Before i dive in too deep, i just wanted to ask the community here if what i'm trying to achieve is possible.

Essentially, i want to create a tab on the entry PUBLISH page let's call it Extra. Then i want to take complete ownership of the contents of that tab and place a bunch of php code in there for some non-EE related functionality. I simply need to do this within a publish tab in EE to grab the entry\_id while a user is editing it. I did this in EE2 via Accessories, but those have been deprecated since and i'm assuming this is an option.

Is this doable? OR can you suggest a way of doing this another way?

# Answer
Yes it is possible. If you create a module, you can set up a tab file that allows you to do what you want:

https://docs.expressionengine.com/latest/development/modules.html#the-tab-file-tabmodule\_namephp
> 0 votes

---
Tags: entry, publish-layout, entryid
---


# Question
Title: $_SERVER['HTTP_ACCEPT'] is blank when caching is enabled
I had some working code within a template making use of the php variable $\_SERVER\['HTTP\_ACCEPT'\], to check for webp image format support from the user's browser. This was working fine, but after turning on template caching, the output for

`<?php echo $_SERVER['HTTP_ACCEPT']; ?>`

is blank. Whether the php is processed via output or input doesn't appear to impact its blank value.

I'm using 5.2.4

Has anyone else experienced this? If so, any ideas on a reason or workaround?

# Answer
> 0 votes
I'm not sure native EE caching even works with PHP enabled templates. I don't think it does (but don't have time to test right now). But if it does:

So this is a general overview, but when you cache an entire template, what gets cached is the *output* of the template. No dynamic pieces will really function, because what is cached is the output. So for example:

```
{!-- this is our template with PHP turned that is a cached template --}
{exp:channel:entries entry_id="1"}
    <h1>{title}</h1>
    <h2><?php echo "PHP"; ?></h2>
{/exp:channel:entries}

```

This will result in a cached output that will render like this:

```
<h1>My Entry Title</h1>
<h2>PHP</h2>

```

Now, let's look at the template with a dynamic input, where a `POST` variable has a value of "PHP Post TEST" (so `test_post_string` POST value is "PHP Post TEST"):

```
{!-- this is our template with PHP turned that is a cached template --}
{exp:channel:entries entry_id="1"}
    <h1>{title}</h1>
    <h2><?php echo $_POST["test_post_string"]; ?></h2>
{/exp:channel:entries}

```

The output of this template when it get's cached will be:

```
<h1>My Entry Title</h1>
<h2>PHP Post TEST</h2>

```

So that is how that template will be cached. Until that cache is cleared, no matter what you `POST` to that template and route (say `$_POST["test_post_string"] = "hello"`), it will still render the same cache output, where that POST variable had that original string.

So that dynamic portion of the template is just cached. So you need a more complex solution if you want some dynamic aspect of a template that gets cached to work.

---
Tags: templates, template-scripting, caching
---


title: Splitting front-end and backend

text:
# Question
Title: Splitting front-end and backend
Is it possible to split the frontend from the backend and host them on separate servers, for expressionengine?

# Answer
> 0 votes
Yes you could. The thing you'll need to watch is how you handle/serve URL's and assets (img/files) as your CP domain will likely be different to your front-end website domain. Just bear that in mind when populating the front-end.

---
Tags: ee2, ee5, server
---


# Question
Title: Add new Channel ID access to multiple member groups via SQL Query
I have created a new channel (in this case ID#32) on an existing EE site install, and I need to assign it to 270 existing member groups.

Rather than clicking into every single member group and manually adding the the new channel under the '**Allowed Channels**' list, I was thinking it would be easier to write an SQL Query to the '**exp\_channel\_member\_groups**' table so all **group\_id**'s (that do not have a row stating the new/required **channel\_id #32** number to have a row created etc, so you would have (for example) **group\_id 01 channel\_id 32** on so on.

Can anyone advise on the correct EE/SQL scripting I would need in order to get this to happen?

Many thanks in advance for any help on this :-)

# Answer
If you have access to a SQL Utility like Sequel Pro and a code editor it is pretty easy to do.

First you need to get a list of the groups that don't have the channel\_id set.

Using the SQL Query tab of your utility enter a command like this (replace "7" with the channel\_id of the one you've added):

```
SELECT DISTINCT group_id FROM exp_channel_member_groups WHERE channel_id <> 7;

```

This will give you a list of **group\_id**'s in the output area of the Query window.

Select the list of **group\_id**'s and copy them.

Now create a bit of SQL in a code editor (if it is any good you can paste in the list of group\_ids and build the VALUES rows in one hit) to get some code that looks a bit like this:

```
INSERT INTO `exp_channel_member_groups` (`group_id`, `channel_id`)
VALUES
    (Your_group_id, channel_id_from_list_1),
    (Your_group_id, channel_id_from_list_2),
    (Your_group_id, channel_id_from_list_3),
    .... etc ...
    (Your_group_id, channel_id_from_list_last);

```

Run that in your SQL utility query area and you'll get the updated data into the table.

HTH
> 1 votes

---
Tags: members, channel, query, sql, query-module
---


title: tracking query parameter

text:
# Question
Title: tracking query parameter
We need to store a query parameter (gclid) in a cookie - if it exists. Using Cookie Plus on an EE 2.8 installation.

ie: domain.com/page?gclid=12345

How can I detect that the query exists and then how do I grab the data in the query? I believe this would work if it was segments: {if segment\_2=="gclid"} {exp:cookie\_plus:set name="cookie" value="{segment\_3}" seconds="86400"} {/if}

# Answer
> 1 votes
Given your outdated EE version, I'm not sure there are any viable add-on's that can help you with this (maybe Mo' Variables if you can get an old version?).

A quick search shows this add-on:

https://devot-ee.com/add-ons/pg

Might do the trick. And there maybe other plugins if you search for them. If not...

You have two options. The first would be to craft a plugin that can grab, parse, and return query variables you ask it for. Then you could (probably) do something like this:

```
{exp:cookie_plus:set
    name="cookie"
    value="{exp:my_query_plugin:get query='gclid'}"
    seconds="86400"
    parse="inward"}

```

Not sure all of that would work with EE 2.8, I have no access to an install earlier than EE 4.

The second is to simply skip using templating to get this done. It's easily done in JS:

https://davidwalsh.name/query-string-javascript
https://developer.mozilla.org/en-US/docs/Web/API/Document/cookie

You can test if the query param exists, and if so, set a cookie in JS.

---
Tags: query
---


# Question
Title: Freeform not sending with DXF / DWG but does with other extensions
The idea is that visitors can upload a DWG or DXF file using freeform. So we can make a calculation for them. But issue is, that Freeform is sending and saving the submissions while uploading PDF / DOC / JPG etc. etc. But when sending DWG / DXF it won't save and won't e-mail. It's just refreshing to it's own page.

Contacted Solspace about it, but they said i'm doing something wrong. All extensions are allowed and also uploading DWG / DXF in filemanager / assets is working fine. So it must be a issue in freeform?!

Thanks in advance!

W.

```
                    {exp:freeform_next:form form_id="2" return="/contact/bedankt"}

                <div class="row">
                    <div class="col-xl-2">
                        <label for="naam">Naam</label>
                    </div>
                    <div class="col-xl-10">
                        <input type="text" class="form-control" name="naam" placeholder="Uw naam"/>

                    </div>
                </div>
                <div class="row">
                    <div class="col-xl-2">
                        <label for="bedrijfsnaam">Bedrijfsnaam</label>
                    </div>
                    <div class="col-xl-10">
                        <input type="text" class="form-control" name="bedrijfsnaam" placeholder="Uw bedrijfsnaam"/>
                    </div>
                </div>
                <div class="row">
                    <div class="col-xl-2">
                        <label for="telefoon">Telefoon</label>
                    </div>
                    <div class="col-xl-10">
                        <input type="text" class="form-control" name="telefoon" placeholder="Uw telefoonnummer"/>
                    </div>
                </div>
                <div class="row">
                    <div class="col-xl-2">
                        <label for="email">E-mail</label>
                    </div>
                    <div class="col-xl-10">
                        <input type="text" class="form-control" name="email" placeholder="Uw naam"/>
                    </div>
                </div>
                <div class="row">
                    <div class="col-xl-2">
                        <label for="bericht">Bestand</label>
                    </div>
                    <div class="col-xl-10">
                        {field:bestand:render_input}
                    </div>
                </div>
                <div class="row">
                    <div class="col-xl-2">
                        <label for="bericht">Bericht</label>
                    </div>
                    <div class="col-xl-10">
                        <textarea class="form-control" name="bericht" placeholder="Uw bericht" rows="6"></textarea>
                    </div>
                </div>
                <div class="row">
                    <div class="col-xl-10 offset-xl-2">
                        <input type="submit" class="btn btn-danger" value="Versturen">
                    </div>
                </div>
                {/exp:freeform_next:form}

```

# Answer
If memory serves me, you may need to add those mime types to the mimes.php file It's buried in /system/ee/EllisLab/ExpressionEngine/Config/mimes.php
> 0 votes

# Answer
Thank you for response, don't think that's the issue. Because when using assets or EE's default filemanager it will upload without any problem. To be certain I have added these mimes already. Without positive result.

Solspace Support told me the same, but it's not an EE issue I guess. Because EE can handle the DXF, but only issue is sending it by Solspace freeform next.
> 0 votes

---
Tags: solspace-freeform, ee5, solspace-freeform-next
---


title: Can I load pages into cache en masse?

text:
# Question
Title: Can I load pages into cache en masse?
It looks like when you have template caching on, a page gets cached after it's visited. Then subsequent visits are served from cache.

When something triggers the cache to empty, such as an entry being edited, the "user visiting the page for it to cache" process starts again.

But my non-cached page speed is around 3 seconds, and I'd rather avoid anybody hitting this. Is there any way to load pages into cache en masse? If not, maybe a server script that gets all pages via cURL might work?

# Answer
You can achieve this using CE Cache; however, the add-on hasn't been updated since EE 3 (it works with EE 4 and 5 though). This allows you have to have cache tags and cache breaking set-up, with the option to warm cache after a cache item has been deleted.

If you don't want to use that add-on, you'll have to make your own cache warming extension. However, this is only an easy solution if you're using the Pages module or the Structure add-on and any particular entry has specific related URL. Anything past that, and you'll be writing site specific rules for your channel entries/routes in your extension. The EE native caching might have a table that lists URI routes for cache items, and you could tap into that probably.

And if you implement some form of cache warming yourself, please **remember** to stagger your cURL requests, otherwise you can practically DOS your own site.
> 1 votes

---
Tags: cache
---


# Question
Title: Cookie Plus reading cookies on first page load
I'm using Mo'Variables and Cookie Plus to read the current query string on a url. The cookie value doesn't update until a second page load occurs. I can see the cookie value is set correctly in the browser - but Cookie Plus just isn't outputting the current value. Here is the code I'm using:

`{if query_string != ""}
{exp:cookie_plus:set name="cookie" value="{query_string}" seconds="86400" parse="inward"}
{/if}`

and `{exp:cookie_plus:get name="cookie"}` to read the cookie.

Is there any workaround to instantly output the current cookie value? Using EE 2.8 currently.

# Answer
> 1 votes
The answer from witrin on this question (three answers down or so) is the reason why you you are having this problem.

https://stackoverflow.com/questions/3230133/accessing-cookie-immediately-after-setcookie

When you set the cookie via Cookie Plus, I assume it uses the `setcookie()` method. This sets a header to be sent to the client; when the client receives the cookie header, it creates the cookie. The cookie **does not exist in your PHP execution cycle of first visit, just the header to be sent**. On refresh, the cookie is sent back to your server as part of the response, and your execution can then see the cookie.

This is appropriate. A client can be configured to not create cookies; this would mean that even though your header was sent, a cookie was not created. As I said, when you set a cookie in PHP, you're essentially setting a request to be sent to the client to create the cookie.

If for some reason you need to retrieve the cookie in the same execution as you set it, the best you can do is the work around from witrin's answer (some of the other answers' work around might work for you as well). Note that with this method, the cookie is not guaranteed to be created by the client; but this won't be an issue: 99.999% of your real person traffic is just using a regular web browser that will create the cookie when the header is sent, so it's a safe bet it will be created.

If you have to retrieve the cookie immediately after it was created (on client first visit), you can also do so asynchronously via JavaScript.

https://developer.mozilla.org/en-US/docs/Web/API/Document/cookie

---
Tags: cookies
---


# Question
Title: Take input as localized time of the user via channel form
Am trying to store localized time of the user via a date field in a channel form. My server timezone is set to GMT.

Wanted to display the time and date field to the non-logged in users in their timezone automatically on the frontend.

Am using EE 2.11.9 Would prefer to set the time zone for the users who will post entries during registration.

Probably get the location of the visitors by browser prompt or are there other elegant ways to do that?

Any pointers as to how I can accomplish that.

# Answer
AFAIK there is no automatic way to do this kind of time zone adjustment in EE.

EE stores times relative to the server's location timezone, or relative a different timezone if you specify it in the CP. Dynamically modifying the server's default timezone on the fly is not a sensible option, so whatever you do will require you to modify the times shown to the user relative to the stored 'EE server time' for the event.

In light of this you have two options: dynamically modifying the displayed value in php or in javascript.

* In php you can do this using the `DateTimeZone` object - once you know what timezone you want to use, you'll need code something like this to set the value

```
    $localTimezone = new DateTimeZone($time_zone_code);
    $displayDateTime = new DateTime('NOW', $localTimezone);

```
* In Javascript you can do this using the javascript `Date()` class `getTimezoneOffset` method to get the difference **in minutes** between UTC time and the local time for the browser running the script - something like:

```
    var localTime = new Date();
    var localTimeZoneDifference = localTime.getTimezoneOffset();

```

Depending on what option you choose, you could then store either the `$time_zone_code` (e.g. 'GMT') value or `localTimeZoneDifference` value (e.g. `120`) in a field linked to your user.

Whichever option you choose you'll still need to do more work to actually deploy the approach to give you the time outputs you want. Javascript might be a better option as the browser already knows about time zone differences through the `Date()` class. To use php you'd need to use an add-on to get you the time zone information. If you ask the authors there might be an EE2 version of the *IP Geo Locator* plugin available, or if not you maybe can rig up something that uses the EE *IP to Nation* plugin.

HTH
> 1 votes

---
Tags: safecracker, date, time, datetime, localization
---


# Question
Title: Any tips on performance tuning Structure?
I use Structure for titles, breadcrumbs, nav, etc. I turned on debugging output, and it turns out titles (exp:structure:titletrail) and breadcrumbs (exp:structure:breadcrumb) are really performance intensive, taking my 1 second load to 2.x seconds, each getting the "warning/yellow background" in the EE load stack. Any suggestions on what I might do to tweak performance?

**EDIT**: The breadcrumb and titletrail tags now *each* add about 1.5 seconds to my page load time and 50MB in my template stack. I've since added several (like 200) more entries, making the total entries managed by Structure to several hundred. Oddly, the nav\_advanced tag takes almost nothing.

Perhaps the amount of entries managed by Structure have something to do with this performance hit? I read on EE's Pages Module page that very few pages should be used with this. If Structure is based on Pages, does it also inherit this limitation?

# Answer
> 0 votes
I ended up performing the SQL query manually vs. calling the exp:structure:breadcrumbs tag. Takes almost no time.

```
<nav class="breadcrumbs">
        <ul class="breadcrumb">
            {exp:query sql="SELECT parent.lft, parent.rgt,expt.title, expt.entry_id, expt.url_title as bcurltitle, cd.field_id_32 as bcpage FROM exp_structure AS node, exp_structure AS parent INNER JOIN exp_channel_titles AS expt ON parent.entry_id = expt.entry_id INNER JOIN exp_channel_data_field_32 AS cd ON parent.entry_id = cd.entry_id WHERE node.lft BETWEEN parent.lft AND parent.rgt AND node.entry_id = '{entry_id}' AND expt.site_id = '1' ORDER BY parent.lft"}
                <li><a href="/{segment_1}/{bcurltitle}">{bcpage}</a></li>
            {/exp:query}
        </ul>
</nav>

```

If Structure performs better I'd prefer to use the breadcrumbs tag, but for now this is my solution.

---
Tags: structure
---


# Question
Title: Display Category Image/Description based on Category Id in url Query String
I'm working on an EE2 site (yes I know it's old) and we have a super search search results page that displays results from one particular category based on the url.

What I need to do is get the category id from the url which looks like this:

h`ttps://domain.com/articles/results/search&keywords=&category=COVID-19&catId=799/`

Once I have that I can display the category info. Is there a way to do this?

Have tried mo variables but this `-- {get:catId} --` outputs `-- --` so I can't work with that.

# Answer
> 1 votes
I solved this by adding a `?` just before `catId=799` and then mo variables worked as expected.

# Answer
> 0 votes
Your working solution is not correct.

To avoid confusion for anyone finding this I'm adding this additional answer.

The URI standard says that you should start a query element of a URI with the `?` symbol. Subsequently you can separate multiple elements of your query using one of several delimiters, `&` and `;` both are common and work.

So to be correct your URL should have the format:

`https://domain.com/articles/results/search?keywords=&category=COVID-19&catId=799/`

I'm not sure why putting the `?` half-way through the variables works at all, but presumably mo'variables is scanning the URL for the ? and turning what follows into variables. I'm guessing with your solution you cannot retrieve the value for `category` or `keywords`.

Anyhow, HTH...

---
Tags: categories, supersearch, ee2.11
---


# Question
Title: Freeform {if form:has_errors} outside {exp:freeform:next}
Im using {exp:freeform\_next:render form="my\_form"} to display my form in collapse DIV. Form is only shown as user clicks on button.

How can i use {if form:has\_errors}show{/if} or similar to show DIV as errors are found?

# Answer
I think all you need to do is rearrange the layout of your HTML to allow use of the `{if form:has_errors...}` conditional at the point where you add the HTML for the hidden DIV. If you can do this you can use this conditional to force-add the css style to the div involved when an error is present. Something like...

```
<div class="{if form:has_errors}show{if:else}collapse{/if}">
... form here ...
</div>

```

If you cannot rearrange the HTML to use the `has_errors` conditional in that way you have two choices:

1. Create the form in earlier in a template layout stack and push it into an layout variable, and then you can test the completed HTML for the error state when you insert the layout variable in the final layout
2. Add some javascript to the page that looks for a marker generated by the `has_errors` conditional (e.g. put in a named hidden div within the form) and use that to add the `show` class to the form as a whole.

HTH
> 0 votes

---
Tags: solspace-freeform
---


# Question
Title: Uncaught Error: Class 'PDO' not found when I upgrade to PHP 7.2
I am running EE 5.3.0, hosted on Media Temple. I have been trying to upgrade to PHP 7.2 but when I do I get the white screen of death with the following error message in ee\_wizard:

> Fatal error: Uncaught Error: Class 'PDO' not found in /home/mydomain/public\_html/ee\_wizard/index.php:243 Stack trace: #0 /home/mydomain/public\_html/ee\_wizard/index.php(131): check\_db(Array) 1 {main} thrown in /home/mydomain/public\_html/ee\_wizard/index.php on line 243

I also get similar Fatal error messages when I attempt to run the site after enabling PHP 7.2.

I could really use some guidance on a way to fix this problem.

Here is what my php.ini file looks like relative to PDO:

```
[Pdo]
; Whether to pool ODBC connections. Can be one of "strict", "relaxed" or "off"
; http://php.net/pdo-odbc.connection-pooling
;pdo_odbc.connection_pooling=strict

;pdo_odbc.db2_instance_name

[Pdo_mysql]
; If mysqlnd is used: Number of cache slots for the internal result set cache
; http://php.net/pdo_mysql.cache_size
pdo_mysql.cache_size = 2000

; Default socket name for local MySQL connects.  If empty, uses the built-in
; MySQL defaults.
; http://php.net/pdo_mysql.default-socket
pdo_mysql.default_socket=

```

# Answer
> 1 votes
Check with your host that your site has the PDO module enabled. This is pretty important as PDO (php Data Object) is an interface that enables php to access MySQL databases.

EE relies upon MySQL, and so not having access would be a fairly fatal error for it. So sounds like the error message you are getting is the right one!

It is unlikely that the php instance your host uses is missing the PDO module, but it is possible that the configuration of your 7.2 instance does not enable its use. This may be due to a typo in your php.ini file (or equivalent, depends on your hosting setup).

HTH

# Answer
> 0 votes
JCOGS answer is 99% likely correct. You do not have the PDO module installed. As a boilerplate command for installing dependencies for most PHP CMS and software, when setting up a server/sand-box (of course, read your software's installation instructions to see if you need anything else), I run this:

```
add-apt-repository ppa:ondrej/php
apt-get update
apt-get install -y apache2 git curl php7.2 mysql-server mysql-client php7.2-mysql php7.2-gd php7.2-bcmath php7.2-bz2 php7.2-cli php7.2-curl php7.2-intl php7.2-json php7.2-mbstring php7.2-opcache php7.2-soap php7.2-sqlite3 php7.2-xml php7.2-xsl php7.2-zip libapache2-mod-php7.2

```

Running just

```
apt-get install -y mysql-server mysql-client php7.2-mysql

```

Should get you going if that's all you're missing.

---
Tags: php, php-errors
---


title: White screen when not logged in

text:
# Question
Title: White screen when not logged in
We have two servers running identical instances of an EE 5.2.4, using PHP 7.x via IIS. Our production machine works fine, no issues. Our backup server is the issue.

On the backup server: I can log into CP with no issues, and once logged in, I can view the site and all's well. If I'm not logged in / authenticated, I get the white screen of death. I've enabled debugging, and set $debug = 2 in index.php, so that everyone can see any errors (nothing shown), checked all debug options in CP, I've checked PHP logs, MySql logs, Event Viewer, everything I can think of. No errors are shown. Today I started commenting out template sections out of desperation, with no luck.

Clearly, something is different between the two servers. Is there anything obvious that I'm overlooking that would be bypassed when an admin is logged in, while viewing the site that would trigger for a non-authenticated user? Has anyone else dealt with this issue?

# Answer
> 1 votes
After digging as deeply as I knew how, I eventually took a backup sql script of the production and backup databases, along with the site files from both servers and used WinMerge to compare both. I found entries in the table "exp\_template\_no\_access" in the backup server db, but not in production.

Those entries lead me to discover that there were no permissions assigned to a particular template used throughout the site, only on the backup server. We're unsure if someone mis-clicked or if this can occur when/if someone updates the physical template file rather than going through the EE admin dashboard. You can find this by accessing the template, then the "Access" tab.

Rather than displaying "Access Denied", or perhaps something similar like "You don't have access to this template", EE just shows the infamous White Screen of Death. No errors, no helpful tips to help me dig through the myriad of settings to track this down, in spite of error settings being turned on. I couldn't get a template access notification. Perhaps I missed something in my debug efforts. Fun times.

Thanks to @jphansen and @jrothafer for all of your help! Hopefully this answer will help someone else if they run into a similar issue.

# Answer
> 0 votes
Thanks for the earlier answer, this just expands on it slightly. I had the same issue which also had me tearing my hair out for a while with the unhelpful White Screen of Death.

This is looking like an EE issue that arises when restoring a backed-up database. In this case, the database was migrated from one functioning v5.3.0 installation (PHPv7.1 / CentOS6) to an upgraded server (PHPv7.3.16 / CentOS7).

As described, the *exp\_template\_no\_access* table in the destination db displayed entries not found in the source db:

This is displayed in the Control Panel as **unchecked** *Allowed member groups* entries:

Once re-checked, the frontend pages appear again.

> We're unsure if someone mis-clicked or if this can occur when/if someone updates the physical template file rather than going through the EE admin...

In this case the only update made to this template was to the code in the browser Control Panel entry (the EE admin). The non-logged-in view may have already been broken, or broke immediately after the template update - it wasn't being monitored. Because this template was the default master layout for the site, all pages appeared blank except to a Super Admin.

Other templates updated in the same way subsequently did **not** seem to have their Access permissions altered. This may suggest a one-off issue manifesting after restoration of the database.

A quick test Export of the source db and then Import into a new db (using PHPMyAdmin on the same CentOS6 server) did **not** show any population of the *exp\_template\_no\_access* table.

---
Tags: error, white-screen-of-death
---


# Question
Title: Force URL titles to auto increment and be unqiue
Since using EE 3, I've noticed ExpressionEngine doesn't automatically make the url\_titles unique - instead giving an error message and telling the user. Is there any way to bring back the functionality of EE 2 where a number was added to make it unique automatically?

Thanks, Dan

# Answer
> 0 votes
You could try Willow's Smart URL at the ExpressionEngine addon page. It works well, although only up to 10 repetitions I think.

---
Tags: ee3
---


title: simple-registration doesn't work

text:
# Question
Title: simple-registration doesn't work
I have an ee4 site - migrated from ee2. The simple-registration addon (v1.6.3) does not work anymore. Also everything is entered, it throws errors:

Could you please give some support? What might be the problem?

# Answer
@JCOGS Design

Thanks, you gave me the right idea. It had to do with the honeypot setting in the congig file. When updating the addon during the migration from ee2 to ee4 these settings were overwritten and were therefore no longer assigned correctly. Therefore the registration was not possible.

After resetting the values the addon works as usual again.
> 0 votes

---
Tags: simple-registration
---


# Question
Title: What is the MySQL function for exp_members password column?
I forgot to save my password and am unable to get MAMP Pro's postfix working so I can't resend the password to myself from my local machine, unfortunately.

What is the MySQL function used to generate the encrypted string in the exp\_members password column?

Is it either MD5 or SHA1 or a combination of something else all together?

# Answer
> 10 votes
As far as I know ExpressionEngine will use one or the other, SHA1 or MD5 (I *believe* SHA1 is the default). In my test it actually worked to use either one when replacing the password, allowing me to login just fine in both cases.

You can use MySQL to generate a new password hash for yourself. For example either `SELECT SHA1('pass123')` or `SELECT MD5('pass123')` will generate a string for you.

The following MySQL query would set your new password to "pass123" (where your `member_id` is 1):

```
UPDATE exp_members
SET password = SHA1('pass123')
WHERE member_id = 1

```

Or if you don't want to use MySQL then this online SHA1 hash generator or MD5 hash generator tool also works. Just copy the string and then using PHPMyAdmin, Sequel Pro, or similar, find your user record in the `exp_members` table and replace your current `password` with the new string .

# Answer
> 1 votes
Why not just use the password reset / forgot password function. It's generally accessible at

```
http://{domain}/{member_trigger}/forgot_password

```

Where `{domain}` is your domain name, and `{member_trigger}` is whatever term you set to trigger member registration and login. Default is 'member' but I believe you're encourage to set it to something else.

# Answer
> 1 votes
I want to post an update to this question for EE 5 because the current answer is pretty outdated.

In order to set a member's password in the DB, you'll need to know what the hash algorithm is. From `/system/ee/legacy/libraries/Auth.php` we can see the possible options that EE might use:

```
private $hash_algos = array(
    128     => 'sha512',
    64      => 'sha256',
    40      => 'sha1',
    32      => 'md5'
);

```

When updating a password, the system will use the first available hash algorithm (in order of most to least secure) to encrypt the password in the database. This array has keys defining the length of the salt value, and values are the name of a valid algorithm to be used by PHP's hash().

---

Aside: if you need to reset a user's `salt` too, it needs to be a string of length matching the above `key`. Example: if the hash algorithm being used is `sha256`, the `salt` needs to be `64` characters long (as seen in the key/value above), `md5` would require a `32` character string, etc.

The Auth library uses the following logic to generate the salt:

```
for ($i = 0; $i < $h_byte_size; $i++)
{
    $salt .= chr(mt_rand(33, 126));
}

```

which equates to a string of length `key` with random ASCII characters between `!` (33) and `~` (126).

---

The following is returned from `hash_password()`:

```
return array(
    'salt'      => $salt,
    'password'  => hash($this->hash_algos[$h_byte_size], $salt.$password)
);

```

which gets called from `update_password()` and the values are written directly to the database.

**In summary, if you need to manually reset a member's password (ex: `test`) directly in the database, you can run the following MySQL query:**

```
UPDATE exp_members
SET password = SHA2(CONCAT(salt, 'test'), 512)
WHERE member_id = 1234;

```

which is the MySQL equivalent to what `hash_password()` does.

This query uses the existing salt, and you may need to replace `512` to match the algorithm used on the server (from https://stackoverflow.com/questions/12612279/hashing-an-entire-column-using-sha512).

---
Tags: ee2, mysql, password, super-admin
---


# Question
Title: Error While Updating 3.0.6 to 3.5.17 Stopped | Step 2 of 3
During the update from 2.0 to 3.5.17 the update keeps stopping at this point:

**Oops, there was an error An unexpected error occurred while performing the update Please correct the avatar path in your config file. Please see 3.1.0 version notes. SQLSTATE\[23000\]: Integrity constraint violation: 1062 Duplicate entry '1-Mijheer.png' for key 'unq\_folder\_id\__file\_name': ALTER TABLE exp\_assets\_files CONVERT TO CHARACTER SET utf8 COLLATE utf8\_unicode\_ci**

I have added the path to the avatar, but I can't solve the other lines. Hope someone can help me.

# Answer
> 0 votes
that looks like there's something amiss with the upload folders. Would have to be able to see the setup to diagnose

# Answer
> 0 votes
It seems unlikely that your avatar path is the actual issue. Please read into your constraint violation.

`1062 Duplicate entry '1-Mijheer.png' for key 'unq_folder_id__file_name': ALTER TABLE exp_assets_files CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci`

You appear to be using the Assets add-on. The point where you are stopped in the upgrade is an update script that is running an `ALTER` on all tables in your database, which fails when it reaches that Assets table:

```
ALTER TABLE exp_assets_files CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci

```

It fails due to the constraint. You have an integrity issue to sort out in that table clearly. That assets table has a `UNIQUE` index based on the `folder_id` and `file_name` columns. You most likely have two (or more) rows in that table that have matching `folder_id` and `file_name` (which creates the index value, `folder_id` being `1` and `file_name` being `Mijheer.png`).

You probably just have to query that table possibly like this:

```
SELECT * FROM
    exp_assets_files
    WHERE folder_id = 1
    AND file_name LIKE "%Mijheer.png%";

```

And remove duplicate rows at your own discretion.

**Do not do this without a secure backup of your database, and understand that removing rows from that table may result in incomplete records you'll have to repair after your upgrade**

You might even be able to just run an Assets re-index before running the upgrade and that might fix it. Just try that anyways before your next upgrade attempt. Worth a shot.

---
Tags: update
---


# Question
Title: How to translate a string in custom form
I am very new to Expression Engine. I have a template file and added a new text filed in it. Now I want to translate the string into multiple languages.

Where I need to include my translated string.

Please do help me.

Thanks.

# Answer
> 1 votes
ExpressionEngine does not have multi-lingual features in its base configuration, but you can add these via an add-on: there are at least two very good options available.

Both are powerful multi-lingual solutions that make it possible to build and manage true multi-lingual sites. Both are from well respected commercial providers, are widely used and are well supported.

If you don't want to translate the whole site and just want to translate a few words you might be better off sorting out a solution yourself. How that works very much depends on what you are trying to do: if you explain more about what your aim is maybe someone can offer a clearer answer on the self-build route.

As a general house-keeping rule, questions about ExpressionEngine are usually more usefully answered if you include basic information about your set-up in your question - in particular letting people know what version of EE you are working with, and if your question extends into areas such as add-ons, or php etc including information about what versions of those you are using also.

HTH

---
Tags: transcribe, multi-language, translation
---


# Question
Title: How to make a drop-down field use categories?
I have a field called 'Genre' in a channel called 'Games.' I made my list as categories.

I created a category group called 'Genres' and added all my various genres.

Now, I want to create a field type in the 'Games' channel that is a drop-down. This drop-down should connect to the values I put in the category group called 'Genres'

I can't seem to figure this out, though I could swear I have done this in the past on a project.

# Answer
In EE5 there is an easy solution: create a channel called "Genres" and put your categories into a field in that channel, then you can tell EE to populate your Select field using the values from that channel.

There are other options that are more complicated than this - there are (AFAIK) no easy ways to tell EE to populate a select using the content of a category.

HTH
> 1 votes

---
Tags: categories, relationships, category-group
---


# Question
Title: What field type should I use for currency?
Can someone explain in (easy English) the difference between Number and Integer/Decimal? I understand Integer and Decimal... What is the point of Number? Should I use Number for product prices?

# Answer
> 1 votes
In the field **Text Field** the four types of **Allowed content** (i.e. what you are allowed to put into the field if EE will let you save the entry it is part of) are:

* **All** \- any content (text or numbers) is OK
* **Number** \- content entered must as a number (i.e. numerals only - integer or decimals are OK)
* **Integer** \- content entered must be an integer (i.e. numerals only, no decimal point)
* **Decimal** \- content entered must be a decimal number (i.e. including a decimal point) - words entered are rejected, integers entered are converted to decimals

HTH

---
Tags: fields
---


# Question
Title: Question on Expressionengine url structure
Is it possible to effectively bypass the **template-group/template** structure and have urls such as:

*domain.com/{url\_title}*

where the entry url title is obviously the first segment. Is it even doable and what would be the most efficient and easiest way of doing it? I guess it would need an add-on but I can't seem to find one. It's for a very small site with just two separate template pages and perhaps 10-20 entries.

Would the Pages module be any good for this?

# Answer
Like, multiple different ways, depending on what you want to do.

One way:

```
{!-- template: teamplate.group/index.html (default template group) --}

{exp:channel:entries
    {if segment_1}
    url_title="{segment_1}"
    {if:else}
    url_title="home-page-entry-url-title"
    {/if}}

    ... maybe use a homepage partial here if no segment 1, otherwise use a segment 1 partial ...

{/exp:channel:entries}

```

Another way: Use template routes: https://docs.expressionengine.com/latest/templates/routes.html

Another way: Use the Pages module to assign specific entries to specific URLs.

Another way: Purchase the Structure add-on and assign entries (better than the Pages module if you have a lot (20+) entries you want to work with).

There are other ways as well that I can't think of off the top of my head. If you expand on your question on why you want to do this, how many entries we are talking about, etc.. (more context please) we can help you better.
> 4 votes

---
Tags: url-title, pages
---


title: Where to download 3.5.17?

text:
# Question
Title: Where to download 3.5.17?
We inherited an EE site, and are working with the client to upgrade from v2.10.1 to the latest v5. We are working on the initial 2-\>3 upgrade and found some instructions here.

Step 4, unfortunately, has a broken download link:

> Download the latest release of ExpressionEngine (either ExpressionEngine Core or the standard edition, whichever your site is currently running) and unzip the files to a folder on your computer.

I assume since these are dated instructions, when they say "latest release", they actually mean download v3.5.17.

Where else might we get the files needed?

# Answer
I believe this is the right file https://github.com/ExpressionEngine/ExpressionEngine/releases/tag/3.5.17

If you're upgrading a site from an earlier EE version, remember to follow the instruction under the heading "If you're installing from the repository". You may already have an existing `system/user/config/config.php` file with variable assignations that may be relevant.
> 2 votes

---
Tags: ee2, ee3, upgrade, ee2-upgrades
---