title: Assets field inside grid inside fluid

text:
# Question
Title: Assets field inside grid inside fluid
I’m having an issue where I'm using Assets (EEharbor) inside a EE Grid, inside an EE Fluid field. I think I have the tags correctly set up, it’s outputting the correct number of results (files) from the assets field, but all the rendered tags have the same content.

Has anyone encountered this before? This is my mark up.

```
{cf_fluid}
    {cf_fluid:cf_fluid_downloads}
         {content}
            {content:download_title}<br>
            {content:file_downloads}
                {content:file_downloads:filename}
                {content:file_downloads:title}<br>
            {/content:file_downloads}
        {/content}
   {/cf_fluid:cf_fluid_downloads}
{/cf_fluid}

```

Thanks

# Answer
> 0 votes
I think Assets is not supported within Fluid field natively.

# Answer
> 0 votes
According to the docs...

> For now, you can add an Assets field to a Fluid field by putting it inside a Grid field.

---
Tags: assets, pixelandtonic, grid, ee4, fluid-field
---


# Question
Title: Attachment not sending with outgoing email when using System Utilities>Communicate
I am using EE 5.3.2 and have set up Mailgun SMTP in the settings. When I send an email through the Communicate utility, the email sends just fine, but if I try to add an attachment to the email, the attachment fails to send. I have tested using SMTP, sendmail, and PHP Mail in the Outgoing email settings, and in all cases, the email will send but the attachment does not get attached. I want to be able to send an email with attachment to email addresses or user groups, which the communicate page seems like it should work for, except the attachment issue. Has anyone run into this/solved it?

Thanks!

# Answer
This issue is caused by the HTML form which is displayed not having `enctype="multipart/form-data"` set in the `<form>` tag. This causes $\_FILES to be NULL.

I have edited lines 40 and 90 within ee/legacy/helpers/form\_helper.php:

`$form = '<form enctype="multipart/form-data" action="'.$action.'"';`

Which seems to have resolved my issue for now. I believe my change will be lost when updating ee? Please recommend a better solution.

Thank you
> 1 votes

---
Tags: email, attachment
---


# Question
Title: Can't move an entry to another channel in EE5
It used to be in EE2 you could move an entry to another channel that shared the same fieldset. I can't seem to do that anymore in EE5 (Options tab \> Channel). Does anyone know how I can change an entry's channel definition in EE5? I can go into exp\_channel\_titles I suppose if I need to, but maybe there's a more intuitive way?

# Answer
In EE5 you are able to assign other defined fields in addition to a field group. In EE2 you can only assign a field group to a channel. I think this could be the reason you can't reassign an entry to another channel.

If your channels have the same fields, then you can try doing the change in the Channel Titles table.

Hope this helps.
> 1 votes

---
Tags: channel
---


# Question
Title: Can I see a file's public URL from inside File Manager?
In EE2 I used to be able to mouse-over a file in File Manager to see its public URL. But in EE5 I only see control panel-based URLs (for edit or download). While I can naturally go into the Edit Upload Directory \> Upload Directory, then prefix this to the file name, it would be easier to have the public link somewhere for easy copying. Is this possible?

# Answer
Not currently but it looks like a method of copying file URL's may be coming in EE6.
> 0 votes

---
Tags: file-manager
---


# Question
Title: Cartthrob: How to allow checkout with zero shipping for collection but charged by weight for normal orders?
Using Cartthrob 4.6.2 I need to be able to allow a customer to select an option to make online payment as usual through the current gateway but select whether to be able to collect from store (which zeroes the shipping) or have the order shipped (which incurs the charges as set out in the 'by weight - threshold' shipping options)

# Answer
> 0 votes
Just thinking out aloud - could you set up a discount that gives free shipping then trigger that discount at whatever point you needed it. You can always revoke the discount for if the customer wants to go back to normal shipping.

---
Tags: cartthrob, shipping, checkout
---


title: How to use segment_1 dynamically?

text:
# Question
Title: How to use segment_1 dynamically?
I would like to use segment\_1 in my address to refer to different locations. For example, my-site.com/haiti, my-site.com/anchorage or my-site.com/portland. But they would always be directed to the same template group and template ({embed="HeWo/main"}).

The only way I know how to do this is to create a separate template group for each location. Otherwise I just receive an error message. I was looking at Template Groups and imagine it might be possible to use that to accomplish this but couldn't figure out how to do that.

Thanks for your help!

# Answer
You have lots of options, which is best will depend on what your site design / data looks like. The following suggestions are not in a recommended order, just trying to separate out your options:

* You can access the content of the first nine segments directly within EE templates via URL Segment Variables \- so in your case the content of segment\_1 is available as `{segment_1}` and you can use this to direct conditional statements in your template: for example

```
   {if segment_1 == 'haiti'}
    << template code for haiti >>
   {if:elseif segment_1 == 'portland'}
    << template code for portland >>
   {if:else}
   << Ooops! Segment not found >>
   {/if}

```
* You could set up template groups for each of your cities - put the template you want to load for a city in the template called `index.html` that is saved within the template group with the correct name. Then when EE sees a URL `https://your.domain/city` it will try to process the template in group `city`.
* You could use the Template Routes system in EE to route all URLs with city names (of your choice) to a particular template. Though I would be cautious of this approach - EE's Template Route system is not easy to work with, there are some quirks in how it is implemented, and you can waste a lot of time chasing around to get even simple things to work... But in principle, if the template you want to use for *haiti* and *portland* is called `coastal.html` in template group `places` you could add a rule like the example given for a route for the `places/coastal` template to ensure that portland and haiti are routed to it...

```
/{portland|haiti}

```
* If the content relating to a city primarily sits within a single channel entry you could enable the built-in add-on "Pages" and then define an explicit path for each channel-entry you plan to use using the format you describe.

So lots of options. If it was my choice, I would go for the first option (using conditionals to control content / flow).

> **NB:** If you are going to use the **segment\_x conditional approach** (option 1 above) and want to apply it to the root (i.e. https://your.domain/) this will **only** work if you also set the site's 404 page to point to the default template. Then when EE gets a combination of segments it can't recognise / process it puts processing onto your default page, and you can access the segments and do something with them. Without the 404 you just get a not very helpful EE error page.

HTH

*PS - always helpful to include details of your EE system / version in your questions as sometimes this information is helpful in giving more complete / accurate answers... ;)*

**Follow up to answer (from comments)**

From what you have said in your comments you've got the following in your template...

```
{if segment_1 == ""}
    {embed="HeWo/main"}
{/if}
{if segment_1 == 'haiti'}
    {embed="HeWo/main"}
{if:elseif segment_1 == 'portland'}
    {embed="HeWo/main"}
{if:else}
    << Ooops! Segment not found >>
{/if}

```

Not sure if this is your actual code, or just a test template. As you have it written currently it appears that if the URL has no segment (e.g. https://your.domain/) or has the first segment `haiti` or `portland` (e.g. https://your.domain/portland) you include in the template the content generated by the embed `HeWo/main`.

You could achieve the same result with much more concise code...

```
{if segment_1 == "" || segment_1 == "portland" || segment_1 == "haiti"}
    {embed="HeWo/main"}
{if:else}
    << Ooops! Segment not found >>
{/if}

```

Also not clear why you are using an embed and not passing anything to it - the value of embeds is that they allow you to nest calls to things like `{exp:channel:entries}` and so usually this is linked to some value in the calling template which is passed to the embed. If all you are doing is using the embed as a convienient place for some common template code, you can get better results putting the code into a template partial as the `embed` system in EE introduces quite a lot of processing overhead that is not present if you use a template partial. Or it might be that you could just put your code into the template and skip the embed completely. It might be that you are planning for your embed to refer to the `segment_1` segment variable (and so do not need to pass a variable to the embed); an unusual way of using embeds.
> 1 votes

---
Tags: templates, template-routes
---


title: Where is the spam folder?

text:
# Question
Title: Where is the spam folder?
Using Freeform Lite 1.5.2 for EE. How do I find and review the spam folder? It appears it may be catching too many false positives. What can i do to ratchet back the sensitivity?

Also, why am I the only person who can successfully upload a file through these forms? Thanks.

# Answer
Freeform for EE currently does not have a built-in Spam Folder feature yet. It is only available on Freeform for Craft at this time.
> 0 votes

---
Tags: solspace-freeform
---


title: Ability to add custom Canonical link

text:
# Question
Title: Ability to add custom Canonical link
Is there any way to add custom Canonical link, title, meta description and keywords with any addon in EE?

# Answer
> 6 votes
Take a look at SEO Lite http://devot-ee.com/add-ons/seolite

But really, you can just build this into your templates/field groups without the use of an add-on.

# Answer
> 5 votes
You don't need an add-on to do this. Just add those items to your templates. You have complete control over every piece of markup in ExpressionEngine, so when it comes to adding any markup to any page generated by EE, it is never a question of "is there a way".

If we could see how you've setup your templates (and know whether you're using shared bits of code for parts of your templates, etc), we could offer more advanced guidance, but to answer your question: yes, and here's the simplest example:

```
{exp:channel:entries channel="news" limit="1" require_entry="yes"}
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8" />
    <meta name="description" content="{news_description}" />
    <link rel="canonical" href="{title_permalink="news/entry"}"/>
    <title>{title}</title>
</head>
<body>
    <h1>{title}</h1>
    {news_entry}
</body>
</html>
{/exp:channel:entries}

```

# Answer
> 2 votes
ee-garage.com has an extremely complete addon \>\> nsm better meta.
Also, the keyword meta tag is no longer included in search engine bot data mining. Good luck

# Answer
> 1 votes
I find this template code works well as a basic canonical link generator:

```
{if segment_3}
  <link rel="canonical" href="{site_url}{segment_1}/{segment_2}/{segment_3}">
{if:elseif segment_2}
  <link rel="canonical" href="{site_url}{segment_1}/{segment_2}">
{if:elseif segment_1 == "your-default-template-group"}
  <link rel="canonical" href="{site_url}">
{if:else}
  <link rel="canonical" href="{site_url}{segment_1}">
{/if}

```
* "your-default-template-group" *segment\_1* will be removed if home page
* expand to *segment\_4* etc if necessary
* add final trailing slashes if preferred

---
Tags: seo
---


# Question
Title: EE.com downloads of old versions corrupted
I have an ancient site running EE 2.9.2. We're in the middle of a redesign, but it won't be ready before our host shuts off PHP 5.6 support. And PHP 7 support was added between 2.9.2 and 2.11.9.

I have two EE2 licenses on expressionengine.com, but when I download them, I get a 1 KB .zip file that doesn't open. Archive Utility chokes on it, BetterZip chokes on it, and I even downloaded WinZip for Mac, which says "End-of-central-directory signature not found." and then crashes.

Is this a known issue? Is there any way to get a working download of EE 2.11.9?

# Answer
Previous versions of ExpressionEngine are available on Github: https://github.com/ExpressionEngine/ExpressionEngine

See the guidance **If you're installing from the repository** but you should already have a *config.php* to use.

v2.11.9 is currently here: https://github.com/ExpressionEngine/ExpressionEngine/releases/tag/2.10.1
> 3 votes

---
Tags: ee2, php7
---


# Question
Title: Cannot use SMTP email sending protocol without errors, in System Settings : Outgoing Email
I want to get EE's *Outgoing Email* working with the **SMTP Protocol** so that I can tag my messages using an SPF record, to avoid being marked as spam on delivery: https://support.google.com/a/answer/33786

I've tried settings in *System Settings : General Settings : Outgoing Email* for two entirely different SMTP servers without success.

This was tested using the Communicate panel in *Developer : Utilities*.

I'm having to conclude that EE is somehow not passing on correct credentials for sending messages. There's nothing conflicting in *config.php* or *index.php*

**Any other tests I can try?**

# Gmail (G Suite) SMTP Relay

I worked with G Suite Support as far as we could go before they referred me back to EE. A *500 POST* error appeared in the server log for a failed test. Gmail error page was:

> Failed to authenticate password. Error: 535-5.7.8 Username and Password not accepted. Learn more at 535 5.7.8 https://support.google.com/mail/?p=BadCredentials u35sm1903136uah.1 - gsmtp Unable to send email using PHP SMTP. Your server might not be configured to send mail using this method.

Relevant EE settings in */cp/settings/email*:

* Address: \[G Suite Gmail address\]
* Character encoding: UTF-8
* Protocol: SMTP
* Newline character: \r\n
* Server address: smtp-relay.gmail.com
* Server port: 587
* Username: \[G Suite Gmail address\]
* Password: \[application-specific password\]
* Connection type: STARTTLS

Gmail SMTP relay service settings:

* Allowed senders: Only addresses in my domains
* Only accept mail from the specified IP addresses: Yes
* Allowed IP addresses: \[IP of sending server\]
* Require SMTP Authentication: Yes (also tried No)
* Require TLS encryption: Yes

Gmail Allow per-user outbound gateways: On

# VPS hosting provider's SMTP

Also used user/password authentication and STARTTLS. Error was **403 Forbidden** page. This triggered the server to block me as a spammer... Once unblocked, same error.

# Answer
> 0 votes
Have you tested with a non-Gmail email account to make sure the EE side is good? I've never had an issue with EE SMTP but never use Gmail.

If that all works it could be something on your server that's getting in the way, might be worth asking your web host to investigate.

---
Tags: email, ee5, settings
---


# Question
Title: Entry Save goes to error page after 5.3.2 Update
Starting after the 5.3.2 update, clicking on 'save' or "save and close" in an entry creates the following error output. The entry **does** save, but these warnings are confusing to users, since the page has no additional styles or links or confirmation that the save worked.

Extensive googling on the subject has turned up nothing, so I'm wondering if its a new bug.

**Error Page Content:**

```
**Notice**
Undefined index: pages__pages_uri
ee/EllisLab/Addons/pages/tab.pages.php, line 155

Severity: E_NOTICE

**Warning**
Cannot modify header information - headers already sent by (output started at ee/legacy/core/Exceptions.php:120)
ee/legacy/core/Input.php, line 238

Severity: E_WARNING

**Warning**
Cannot modify header information - headers already sent by (output started at ee/legacy/core/Exceptions.php:120)
ee/legacy/core/Input.php, line 238

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
Check this pull request on github: https://github.com/ExpressionEngine/ExpressionEngine/pull/412

Basically- system/ee/EllisLab/Addons/pages/tab.pages.php around line 155:

```
if ($data['pages__pages_uri'] == '' OR $data['pages__pages_uri'] == lang('example_uri')) {

change to

if (empty($data['pages__pages_uri']) OR $data['pages__pages_uri'] == lang('example_uri')) {

```

Should do the trick.
> 0 votes

---
Tags: pages, headers
---


# Question
Title: Structure Module breaks after 1000 entries
I cannot reorder pages after reaching 1000 entries in Structure. I get the following error:

"Reordering Failed\n\nYour Structure Tree appears to be out of date.\n\nSomeone else may be editing or you may have another tab with a newer Structure tree.\n\nPlease refresh and try reordering again"

If I delete #1000 and get to 999 it works fine. Why would there be a limit? I can't get EEHarbor to respond to me. Any ideas? Thanks!

# Answer
> 1 votes
https://www.php.net/manual/en/info.configuration.php#ini.max-input-vars

Try upping this PHP runtime value (either in your actual PHP `ini` file or in your `system/index.php` file via `ini_set`).

Like, really, try upping it to 50000.

---
Tags: structure
---


# Question
Title: Use php inside entry-field instead of snippet
How is it possible to use php inside an entry-field? When I write e.g. in the summary-field

```
test <?php echo 'bla'; ?> test

```

I get exactly the same string in the frontend:

```
test <?php echo 'bla'; ?> test

```

How can I manage that the php-command is executed? The template where I am trying to use this allows php to be parsed; changing parsing-stage from output to input changes nothing.

UPDATE 1: I am working with EE 5.3.2

UPDATE 2: The reason I want to do this is the following: I have a snippet which contains the number of mailinglist-subscribers; it just shows the pure number. In (only) one/some of my entries I want to show this number, like "The mailinglist contains 32673 subscribers". If I could use the snippet (like I could in a template) I just would write "The mailinglist contains { snip\_number } subscribers." As I assume that the allow-ee-code-plugin might be deprecated for EE5 and is not futuresafe I tried to realize it with php like

```
The mailinglist contains <?php echo(file_get_contents('/path/getnumbers.php'));?>

```

UPDATE 3: It seems that the allow-eecode-plugin still is working with EE 5.3.x (as JCOGS points out in his comment). For me with the snippet/partial it still does not work, as

```
{exp:allow_eecode query="y"}{summary}{/exp:allow_eecode}

```

allows to parse an exp:query-tag which I enter in the summary-field, but not a snippet/partial.

# Answer
> 2 votes
So if you only want a snippet to display on certain entries, you can apply that via a field and small code addition to your template(s). I understand you have a lot of templates and don't want to add more; there is no reason to add more. You can just edit the templates you currently use for these entries, and they'll work either way. In this example, just add a toggle field with a short-name of `show_subscriber_numbers` to your channel.

https://docs.expressionengine.com/latest/fieldtypes/toggle.html

Here is an example using a toggle field in EE 5+:

```
{if show_subscriber_numbers}
    <p>
        The mailinglist contains {snip_number} subscribers.
    </p>
{/if}

```

Then you can just toggle the snippet on and off in the channel entry. No need for new templates or switching templates, just add the code to the templates you already use for this channel. It's not clear yet if you have further requirements, but based on what you've updated, that should work just fine without any add-on's or ill-advised work-arounds.

**EDIT**

The only thing I can think is if for some particular reason you need to output this subscriber count in the *middle* of some text/RTE/Wygwam/whatever content field that this solution wouldn't satifisy. If that is the case, a self-authored plugin could also solve this problem.

# Answer
> 1 votes
It is possible with a bit of messing around you could achieve what you are trying to do by installing the Allow EE Code add-on. This add-on makes it possible to evalute EE template code placed **within** entries in EE channels - to use you simply bracket the template output you want to have evaluated between an `{exp:allow_eecode}` tag pair. So it might be that if you put your php code within a pair of EE Code tags you'll be able to evaluate it.

Possibly a better solution would be to have a really good think about why you might ever want or need to do this: **Allow EE Code** is helpful in a handful of edge-cases, but in almost every circumstance there is a solution that works well without resorting to this kind of dodge.

If you explain a bit more about why you want to do this, maybe someone can help you find that better solution.

*NB. To get the best assistance in this forum, it helps hugely if you give some information about the EE setup you are using - different versions of EE have different quirks / characteristics, so knowing if you are on EE2 or EE5 makes a difference... etc.*

---
Tags: php, snippets, template-partials, allow-eecode
---


# Question
Title: odd even columns in expressionengine with bootstrap
I have an issue with looping output for a channel with Bootstrap. What I want to archive is this:

row col 8 col 4

row col 4 col 4 col 4

row col 8 col 4

row col 4 col 4 col 4

and so on. This would be for a blog index page listing all the posts. What I'm looking for is a way to output with the 8 and 4 columns in one row. Its an issue of getting the 8 and 4 columns to have separate posts. Could I use 'switch'? I would like to do this without any plugins.

I can loop the col 4 easy without an issue. Simple code below:

```
<!-- Journal Section -->
<section>
    <div>
        <!-- /.container -->
        <div>
            <!-- /.row -->
            {exp:channel:entries}
            <!-- .col-8 -->
            <div class="wrap col-lg-8 col-sm-12 content-item">
                <a href="{title_permalink=journal/notes}">
                    <img src="{journal_lead_image}{image:url:journal-lead-landscape}{/journal_lead_image}" alt=""
                        title="">
                </a>
                <div class="content_meta">
                    <h5><a href="{title_permalink=journal/notes}">{title}</a></h5>
                </div>
                <p class="item_summary">{journal_summary.</p>
            </div>
            <!-- /.col-8 -->

            <!-- .col-4 -->
            <div class="wrap col-lg-4 col-sm-12 content-item">
                <a href="{title_permalink=journal/notes}">
                    <img src="{journal_lead_image}{image:url:journal-lead-portrait}{/journal_lead_image}" alt=""
                        title="">
                </a>
                <div class="content_meta">
                    <h5><a href="{title_permalink=journal/notes}">{title}</a></h5>
                </div>
                <p class="item_summary">{journal_summary}</p>
            </div>
            <!-- /.col-4 -->
            {/exp:channel:entries}
        </div> <!-- /.row -->
    </div> <!-- /.container -->
</section>
<!-- Journal Section -->

```

Any help would be appreciated.

# Answer
Yes you could use switch also.

```
{exp:channel:entries}
  <div class="wrap {switch='col-lg-4|col-lg-8'} col-sm-12 content-item">
    ...
  </div>
{/exp:channel:entries}

```

Would output alternating containers with the correct col-lg class:

```
<div class="wrap col-lg-4 col-sm-12 content-item">
  ...
</div>
<div class="wrap col-lg-8 col-sm-12 content-item">
  ..
</div>

```
> 2 votes

# Answer
I think you are asking for a method that allows you to alternate between two row layouts while processing the output of a `channel:entries` tag.

One way to do this is to make use of EE's internal counter, and its conditional processing options - in particular the modulus operator.

Construct the template code for the two alternate rows and then put them into your template using a structure like this:

```
{exp:channel:entries... }
{if count % 2 == 1}

... do stuff for the first row type ...

{if:else}

... do stuff for the second row type ...

{/if}
{/exp:channel:entries}

```

That's it.

`count` is a variable that counts up loops within the output of the `channel:entries` tag.

The modulus operation `count % 2` returns 1 on the first and every subsequent 'odd' row, and 0 on every 'even' row.

HTH

*NB. In general it helps if you can provide some basic information about your EE setup - in particular what version of EE you are using; doing so will make it easier for others to give you appropriate suggestions.*
> 0 votes

---
Tags: grid, switch, bootstrap
---


title: Private pages for users

text:
# Question
Title: Private pages for users
is it possible in expressionengine 5 to have private pages?

I know it's possible to create a forum but what about pages with content just for registered users?

Thanks in advance for your help.

# Answer
> 2 votes
Yes private pages are easily do-able. There are numerous approaches, here's one using a template to control who can view content.

Create a template and add some conditional tags to determine if the person is logged out (show login form), or logged in (show the content)

**Assuming that anyone that is logged in can see content**

```
{if logged_out}
  YOUR LOGIN FORM
{/if}

{if logged_in}
  YOUR PRIVATE CONTENT
{/if}

```

**Only allow access to a specific member group**

```
{if logged_out}
  YOUR LOGIN FORM
{/if}

<!-- only allow member group 5 to access content -->
{if logged_in_group_id == "5"}
  YOUR PRIVATE CONTENT
{/if}

<!-- if logged in member group is not 5 -->
{if logged_in_group_id != "5"}
 You're logged in but not allowed to see content
{/if}

```

# Answer
> 1 votes
EE doc search works pretty well these days, and the info is all there.

Login and registration: https://docs.expressionengine.com/latest/member/index.html

Member groups: https://docs.expressionengine.com/latest/control-panel/member-manager.html#member-groups

Controlling access to templates: https://docs.expressionengine.com/latest/control-panel/template-manager.html#access

# Answer
> 0 votes
There's also the method of going into a template's settings, Access tab, and checking "Enable HTTP Authentication". That checkbox, combined with the member groups you check to have access right above it can also password-protect certain templates.

---
Tags: ee5, users
---


# Question
Title: Can a member group upload a file in an entry, but not access File Manager?
I have a member group where a member can only edit their own entries. Their entry contains a File field. I thought if I went to the Upload Directory preferences and select their group to access this Upload Directory, it would be fine. But when trying to upload, they get the error, "You are not authorized to perform this action."

Going into the Member Group settings and allowing them access to File Manager fixed this. But I'd rather they not have access to the File Manager (lots more than they need). Any ideas on how to let them upload a file, but NOT access the File Manager? (Or am I doing something wrong?)

# Answer
> 0 votes
For now I'm hiding the link to "Files" in the CP. Done by:

Go to /www/system/ee/EllisLab/ExpressionEngine/View/\_shared/header.php, search for 'icon-files', then the line above that, change

```
<?php if (ee()->cp->allowed_group('can_access_files'): ?>

```

to

```
<?php if (ee()->cp->allowed_group('can_access_files') && ee()->session->userdata('group_id') !== 6): ?>

```

Where 6 is the member group. I'd rather not have to do this every time I update EE, so I'm still hoping I'm doing something wrong, or this is a bug that will be eventually fixed.

---
Tags: members, file-manager
---


# Question
Title: Simplify segment conditional documentation
Exist an interesting method to simplify a multiple conditional:

If you want to execute the code when url\_title not equal to "portfolio" neither equal to "photos" use this condition:

```
{if segment_2 != "portfolio" && segment_2 != "photos"}
    <p>Conditional content.</p>
{/if}

```

Or as a simple way:

```
{if ! "portfolio|photos" *= segment_2}
    I am here
{/if}

```

It works fine, does exist a documentation for this pattern:

```
segment_2 != "portfolio" && segment_2 != "photos"

```

to

```
! "portfolio|photos" *= segment_2  ?

```

I didn't find it.

# Answer
> 2 votes
The conditional operators that work in EE are listed in the documentation.

The two conditional forms you talk about are not equivalent, they just happen to give the same outputs for the inputs you describe.

The first form (with the `&&` in it) only fires if the url\_title is not `portfolio` and also not `photos`. So if you tested the url\_title `hot` with this conditional it would return TRUE (since `hot` is neither `portfolio` nor `photos`).

The `*=` term in second form tests to see if the the content of first term (in your example the string `portfolio|photos` contains the value in segment\_2. When you add the negative operator (`!`) this returns TRUE only if the content of segment\_2 is not contained within the string. This is similar in function to the first conditional but not the same: it will return "FALSE" for any circumstance where the content of segment\_2 is found in your string - so not only for the url\_titles `portfolio` and `photos` but also `hot`, `folio` and `port` (and many more).

So while the first conditional only looks for the two terms specified, the second looks for any combination of letters that might appear within the conjoined strings you have used. Which means the second conditional is not a simplification of the first, it is different to the first but under some conditions provides similar outputs.

HTH

---
Tags: conditionals, segments
---


# Question
Title: How to use a php hook to pull data into PayPal from Simple Cart
I was wondering how to connect Simple Cart add-on to PayPal using the PHP hooks.

I'm new to using hooks, but would appreciate an example to get me going. I would like to display the 'price', 'qty' and 'entry\_id' for an item and pass these to PayPal 'Buy Now' button form code, if that's the correct way.

https://docs.reinos.nl/simple-cart/#php-api

```
<?php
ee()->load->add_package_path(PATH_THIRD . 'simple_cart/');
ee()->load->library('simple_cart_api');
ee()->load->remove_package_path(PATH_THIRD . 'simple_cart/');

//save_cart_entry
ee()->simple_cart_api->add_cart_entry($entry_id = 0, $price = 0, $qty = 1, $tax = 0, $time = 1200, $extra_param = array(), $increment = true);
?>

<form action="https://www.paypal.com/au/cgi-bin/webscr" method="post" target="paypal">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="info@wabisabi-press.co.uk">
<input type="hidden" name="currency_code" value="UKP">
<input type="hidden" name="item_name" value="">
<input type="hidden" name="item_number" value="">
<input type="hidden" name="add" value="1">
<input type="hidden" name="amount" value="">
<input type="hidden" name="upload" value="1">
<input type="hidden" name="no_shipping" value="2">
<input type="hidden" name="no_note" value="1">
<input type="hidden" name="undefined_quantity" value="">
<input class="cart-btn cart-btn-secondary small_hide mr-2" type="submit" name="buy_now" id="buy_now_265" value="Buy Now">
</form>

```

# Answer
The documentation for simple-cart indicates that in order to add an entry to the cart you would need to already know the **entry\_id**, **price** and **quantity** of the item you want to add to the cart.

Since presumably these would be held in php variables already, and I'm guessing you would use these variables in the `add_cart_entry` call, can you not simply add these values to the paypal form too?
> 0 votes

---
Tags: php, hook, shopping-cart, paypal
---


title: Submitting edited entries in Freeform

text:
# Question
Title: Submitting edited entries in Freeform
Is it possible using Freeform for users to log in and edit their form submission in multiple visits, and only send an email notification once they have finished with the form and change its status to eg ‘completed’, (meaning they can then no longer edit it)?

(Using EE5 and assume that Freeform Next would be the way to go, unless Classic is the only way to handle it.)

# Answer
> 0 votes
Unfortunately this is not currently possible with editing of Freeform submissions. There's no way to suppress or differentiate between email notifications when initially submitting / editing / finish editing.

The closest you might get to stimulating this would be to use the Dynamic Template Notifications feature and have 2 or 3 different templates that load the form. The first one could have no notifications setup at all, and be meant to be the initial submit of the form. The second (or however many other ones necessary) can also have no notifications setup, and then the final template could have the notifications setup with the Dynamic Template Notifications option to finally send out the notification. :)

# Answer
> 0 votes
I might be crazy, but a long time ago in EE2 + FreeForm Pro, I could have sworn on multi-page forms a user could do, say, the first page, leave the website, then come back, and it would be populated. The user would need to submit and go to another page for it to save, though.

---
Tags: solspace-freeform
---


title: File Structure in EE

text:
# Question
Title: File Structure in EE
Just downloaded EE. Looking to use it for a project. I'm confused on there default file structure, I've found where my template lives... I'm just confused on all the other junk in the way.

I would like to have just an assets folder etc. Below is what I have now. Is there a way I can reorganize this but still keep all the necessary EE files in place?

# Answer
> 0 votes
Yes and no.

No, you can't totally reorganize the **system/user/templates** structure - ExpressionEngine needs the basic filesystem layout to be in place in order to work.

Yes, you can do as you please in your template directory (it looks like you are using **default\_site**). You already have a **blog.group** directory, so you can make an **assets.group** directory along side of it to store your asset files. Any other template files you create would reference your asset files like this:

```
<link rel="stylesheet" href="{site_url}system/user/templates/default_site/assets.group/style.css" />

```

For what it is worth, I am in the habit of moving the **system** directory above the document root and creating a symbolic link from the document root to my template's asset directory, like so:

```
css -> ../system/user/templates/default_site/assets.group/css
fonts -> ../system/user/templates/default_site/assets.group/fonts
img -> ../system/user/templates/default_site/assets.group/img
js -> ../system/user/templates/default_site/assets.group/js

```

This makes the site a bit more secure and makes asset pathing cleaner.

# Answer
> 0 votes
This is an old post, but since it was bumped to the homepage, I'll add my 2 cents.

Your assets folder can be where ever you like. If they are public assets you can keep them organized in your web root as is common practice. They do not have to be stored in your templates folder, or within your ee system folder.

I'm not 100% what your asking when you mentioned "I'm just confused on all the other junk in the way." But if it helps, the 'default\_site' folder is just that, as ExpressionEngine, via MSM can host multiple sites from one install, so there needs to be a way to identify them in the file hierarchy. You can change the name of your site in the CP from 'default\_site' to what you prefer. The 'blog.group' folder indicates your template group as you see it in 'Template Manager' within the CP. It would translate to the path/url yourdomain.com/blog/index.

# Answer
> 0 votes
On some sites I start at "default.site" directory as my root. Saves lots of clicking/expanding.

---
Tags: templates, structure, file-manager
---


title: Problem with Grid fields?

text:
# Question
Title: Problem with Grid fields?
I have this kind of code structure. `foo` and `bar` are both Grid fields.

```
{if "{foo:total_rows}" > 0 OR "{bar:total_rows}" > 0}
  {if "{foo:total_rows}" > 0}
       {foo}
          {foo:a}
          {foo:b}
          {foo:c}
       {/foo}
  {/if}
{/if}

```

The problem is that {foo:a},{foo:b} and {foo:c} is not outputting anything.

However, when I do this

```
{if "{foo:total_rows}" > 0 OR "{bar:total_rows}" > 0}

   {foo}
      {foo:a}
      {foo:b}
      {foo:c}
   {/foo}

   {if "{foo:total_rows}" > 0}
        {foo}
           {foo:a}
           {foo:b}
           {foo:c}
        {/foo}
    {/if}
{/if}

```

I get

```
{foo}{/foo}abc

```

a, b, and c are the contents of {foo:a},{foo:b} and {foo:c} respectively.

What is the problem here? Is this a parse order issue?

# Answer
> 0 votes
Looks odd that {foo} is not recognised at first.

Have you tried modifying

```
{if "{foo:total_rows}" > 0}

```

It looks like you could be comparing a string to a number. What does

```
{if {foo:total_rows} > 0}

```

give you?

Also, what happens if you test removing the outer if?

# Answer
> 0 votes
This could be related to a bug that causes PREG\_BACKTRACK\_LIMIT\_ERROR when parsing tag pairs. Essentially the regular expression thats used to find chunks of the template by pairing opening and closing tags doesn't perform efficiently enough in some cases. Here is the bug report.

The bug report contains a work around that may work for you. In `system/expressionengine/libraries/api/Api_channel_fields.php` change line `1852` (this line number is from the 2.9.2 codebase, so it may differ, should be within the `get_pair_field` function) to:

```
if (preg_match("/".LD."{$field_name}((?::[^\s}]+)?)(\s.*?)?".RD."(.*?)".LD.'\/'."{$field_name}\\1".RD."/s", $tagdata, $matches, 0, $offset))

```

# Answer
> 0 votes
I had some similar strangeness with conditionals and Grid fields. See Some crazy results from an "OR" conditional with Grid type

---
Tags: 2.7.0, grid
---


# Question
Title: Trouble saving templates especially if there are more than a few lines in it
I have this weird problem where templates are sometimes saved and sometimes not. I would guess it has to do with a memory issue of some kind but I don't know where to look.

I run EE 5.3.2 fresh install on PHP 7.2

I don't get an error from EE but from the server. So maybe it's a server setting. But again, where to look? Please help me out.

This is the server error message I get in my browser:

```
Forbidden

You don't have permission to access /admin.php?/cp/design/template/edit/27 on this server.
www.websitename.nl

```

# Answer
> 1 votes
This sounds like a Mod Security issue. If your web host has strict mod\_sec rules doing some things in EE can trigger them.

I'd suggest making the error happen, making a note of the it happens, then look in your server logs to see if a rule is being triggered - if that's the case you may need to disable one or two specific rules. If you can't access mod\_sec then ask your host to investigate and disable those rules (a good web host will do this for you!).

---
Tags: templates, ee5, memory
---


# Question
Title: low_search Field Grid and a relationship inside a column of the grid
I saw a similar question from 5 years ago, but I stumble upon the same question concerning low\_search and combination with grid field and inside a column with a relationshipship.

Does low\_search allow for a combination search of the two? I presume it would have syntax like this: search:fieldname\_of\_grid:child:columnname\_in\_grid

Does anyone have a lead how to manage a search like this?

The question from 2015: Channel Entries - searching relationship field?

Or do I need to write a custom filter for this?

# Answer
Looks like it was in the documentation all along: https://gotolow.com/addons/low-search/docs/filters#relationships

The correct filter syntax you can use to search for relationship field inside a grid: child:grid\_field\_name:column\_name\_insidegrid
> 0 votes

---
Tags: relationships, search, low-search, grid, fields
---


# Question
Title: Local Php Issue possibly related to Mac Upgrade?
I have some local sites for dev on my Mac that are the latest version of EE2. Not updated for years and clients for various reasons don't want to upgrade to EE5. Fair enough.

Now they want some changes but when I go to access the sites I get a blank page - this is because I've upgraded to MacOS Mojave since last accessing those EE2 sites and it is running PHP Version 7.1.33.

I assume this is the issue. All EE5 sites work fine but I have a feeling that EE2 *should* work with Php7 - maybe is an add-on issue?

Any suggestions for troubleshooting?

# Answer
> 1 votes
Even though your EE2 installs (that are `2.11.9`) should be PHP `7.1` compatible, that doesn't mean that your add-on's are. I know @JCOGS recommended renaming your `third_party` as a way to test, but I don't believe that is the best method for testing a base install with all third party software disabled.

Make sure that you have debug in your `index.php` set to 1. Next, in your `config.php` file, turn extensions off:

https://docs.expressionengine.com/v2/general/system\_configuration\_overrides.html#allow-extensions

```
$config['allow_extensions'] = 'n';

```

Now, I would recommend renaming your `third_party` folder, but I would also recommend **backing up** your `exp_modules` table, and then truncating it. I believe EE2 also had an `exp_accesories` table as well, do the same there. All of these things combined should set your EE install to actually believe their are no modules, extension, plugins, or accessories installed.

Note that if you are still receiving WSOD, you have an issue with error reporting. Regardless of other issues, unless you find something in the Apache/PHP error logs, you should be receiving an error of some sort.

# Answer
> 0 votes
It depends what version of EE2 you are running - only the final few versions of EE2 support php7. The most compatible version (tested for php7.1) is the final version EE2.11.9.

You may also need to update the add-ons to work with php7: what is required will depend on what add-ons and whether they were still being supported when the transition from php5 to php7 took place.

The WSOD is one of the most annoying aspects of the way EE responds to such issues, and there are some fairly well developed work-arounds - for example simply renaming your third-party add-ons folder to something else to prevent EE from trying to load them so you can work out the issues with getting EE itself working with php7, and then add the add-ons back one at a time so you can work out which ones are causing the WSOD.

HTH

---
Tags: ee2, php7
---


# Question
Title: Cannot find styles - Where is the Style Sheet?
I'm able to adjust the Column Width and Height using the "Inspect Tool" in Chrome. I can't find where this is controlled. Not an experiences ExpressionEngine user.

Can someone help? www.isonas.com I would like to expand column 4 to about 500 and reduce the height to about 376 and then reduce the width of column 3 from 160 to about 80... the overall footer to about 375...

# Answer
> 1 votes
The appearance of an EE site is determined solely by the CSS applied to the site - EE itself does not mess with how the site looks.

A quick squint at your site suggests that you are using primarily a css file located at `/css/style.css` to control the look of the site, and I suggest you begin your search for where / how to edit with that file.

It looks like you use a lot of other vendor CSS files too and a number of element level style over-rides, so it might be more complicated to get the look you want simply by editing the main file.

To fix the footer, you'll need to remove one of the element-level style overrides - currently the footer layout is controlled by this tag:

```
<div class="container float" style="min-height: 643px;">

```

Which suggests whatever else you have set in your CSS file, the footer is going to be at least 643px high...

Good luck with your edits.

> PS - If you get stuck with the ExpressionEngine implementation itself you'll make it easier for others here to help you if you include details of what version of EE you are using - there are major differences between EE2, EE3, EE4 and EE5 which affects how you fix some issues.

---
Tags: forms
---


# Question
Title: Is there a way to hide empty fields from showing up in the email notification when using EEHarbor Forms?
I would like to "hide" the empty fields in my admin/user email notifications. Right now it's outputting all of them when I do:

```
{form:fields}
{field:label} : {field:value}
{/form:fields}

```

I've tried using conditionals as well but nothing works.

(The Forms module was previously known as DevDemon Forms.)

# Answer
Just found out the answer. I had to add quotation marks around the {field:value} conditional. Below is an example.

```
{form:fields}
{if "{field:value}" != ''}
{field:label} : {field:value}
{/if}
{/form:fields}

```
> 1 votes

---
Tags: ee2, devdemon-forms, eeharbor
---


# Question
Title: Adding Pagination causes 500 Server Error
I am running EE 5.3.2.

Using the following code I am have issues with page loads that end in 500 Server Error

```
{exp:channel:entries channel="blog" category="184" limit="21" paginate="bottom" }
    <div class="col-lg-4 position-relative">
        <img class="img-fluid" src="{entry_thumbnail}" alt="{title}" />
        <h2 class="text-center double-row">{title}</h2>
        <p class="summary-block">{brief_summary}</p>

        <div class="text-center center-bottom">
            <a class="btn read" href="/new/blog/{url_title}" role="button">View details »</a>
        </div>
    </div><!-- /.col-lg-4 -->

    {paginate}
    <div class="col-12">
        <p class="text-right">Page {current_page} of {total_pages} pages {pagination_links}</p>
    </div>
    {/paginate}
{/exp:channel:entries}

```

If I remove the pagination code everything works fine. Any clues what may be causing this and how to resolve it?

# Answer
> 1 votes
Pagination in EE works by adding a segment to the end of your URI - so my guess is that you have an issue with routing.

Try loading your template with the pagination block removed (i.e. so you get the page) and then add `/P5`to the end of your URI and see what you get. If you get the 500 error, then that would confirm the issue.

What you do next depends a bit on whether the site as a whole is working - if you can navigate between pages OK then it would suggest the issue is pagination itself, if you cannot navigate easily within the site, either the EE config or the .htaccess file might be the issue.

Just to eliminate such from your consideration, also have a look at whether there is any routing over-rides in use (e.g. from the EE Template Routes area, or an add-on such as Detour Pro); if you have such check to make sure that the routes being changed include consideration of the EE pagination slugs.

HTH

---
Tags: error, pagination, ee5
---


title: Session Times out and work is lost

text:
# Question
Title: Session Times out and work is lost
Running EE 5.3.2

Unfortunately I have to address this issue again and I am hoping for some sound advice that will help resolve this problem forever.

We post a weekly blog on Hobblecreek. They are lengthy posts with 12-15 photos. It takes hours to craft the entry and almost every time ExpressionEngine times out and I lose some or all of the work. In the middle of an active session the login screen suddenly pops up without warning and I have to log back in. I save as I go, but this is bothersome because saving requires that you go back in and find your spot in the entry. However today, despite saving multiple times, the entire entry was lost. Completely vanished.

This error comes up as well:

In Security & Privacy settings I have it set as follows:

This has happened so frequently that I would gladly walk away from Expression Engine if there was a better solution out there. I have been building EE sites for 12 years and this is the worst experience I have ever had with EE.

What can I do to prevent ExpressionEngine from timing out like that?

# Answer
Changing CP session type to SessionID only can help.
> 1 votes

# Answer
Rather than fix the timeout, perhaps it would be easier to simply save your work-in-progress as a draft periodically during the creation of the blog post? Then if you are timed out you can at least go back to the most recently saved draft?

To do this you will need to create a new status "draft" - which you can do in the channel settings for the channel you are using. Then in the default screen layout, the Status of the entry can be set by clicking on the "options" tab for an entry.

I think channel:entries defaults to only showing 'open' entries if status is not specified, but to be sure the draft is not published before it is ready you might want to add the parameter `status='open'` to your blog channel:entries tag.

When you are ready to 'publish' your blog post, change the status to Open and save it.

HTH
> 1 votes

---
Tags: control-panel
---


title: Low search status example

text:
# Question
Title: Low search status example
I wondered if there was an example of using statuses as a dropdown? I'm trying to search by a couple of options with not much success. I want to filter by some statuses but never show items in another status.

My dropdown currently looks like this:

```
<select style="width:200px;" name="status[]" >
    <option value="Completed">Completed</option>
    <option value="Shortlisted">Shortlisted</option>
    <option value="Winner">Winner</option>
</select>

```

My results tag looks like this

```
{exp:low_search:results
    channel="applications|bursary_applications"
    status="not closed|In progress"
    query="{segment_3}"
    dynamic="off"
    limit="50"
    paginate="bottom"
    collection="applications|bursary_applications"
    child:bursary_app_competition_rel="{segment_2}"
}

```

(when the page is first loaded without search terms I want to make sure 'In progress' is not shown - or I'd settle for a default of 'Completed'!)

Many thanks!

Note: I also posted this question here: https://getsatisfaction.com/low/topics/low\_search\_status\_example

# Answer
I'll answer here as well as in the GetSat thread for visibility.

Any parameters set in the Results tag will always overwrite the corresponding given parameters from a search query. If you want to default a certain value, you could use simple conditionals to check for an encoded query in the URI and set certain parameters accordingly. For example:

```
{exp:low_search:results
    query="{segment_3}"
    {if segment_3 == ''}status="not closed|In progress"{/if}
}

```

In addition to that, if you want 'All' entries to exclude certain values, just define those in the 'All' option of the drop down. For example:

```
<select name="status">
    <option value="not closed|In progress">All</option>
    <option>Completed</option>
    <option>Shortlisted</option>
    <option>Winner</option>
</select>

```

Note that if you don't add a value-attribute to an option-element, the text inside the option-element will be used as value.

Also note you don't need the multiple value syntax in the name (`status[]`), as you're only selecting a single value.
> 2 votes

# Answer
For anyone who's interested, here's how I've just implemented a Status search option in my Orders search form:

```
{exp:low_search:form query="{segment_3}" result_page="orders/search-results" channel="orders" status="Processing|Awaiting Payment|Complete|Cancelled"}
    <div class="searchbar">
        <input type="text" name="search:title" value="" placeholder="Order No" />
        <select name="status[]">
            <option value="not open|closed">Status</option>
            <option>Processing</option>
            <option>Awaiting Payment</option>
            <option>Complete</option>
            <option>Cancelled</option>
        </select>
        <input type="text" name="search:order_billing_first_name" value="" placeholder="First name" />
        <input type="text" name="search:order_billing_last_name" value="" placeholder="Surname" />
        <input type="text" name="search:order_billing_city" value="" placeholder="Town" />
        <input type="text" name="search:order_billing_zip" value="" placeholder="Postcode" />
        <button type="submit">Search</button>
    </div>
{/exp:low_search:form}

```

And here is how my Results page is output:

```
{exp:low_search:results query="{segment_3}" channel="orders" {if status == ""}status="Processing|Awaiting Payment|Complete|Cancelled"{/if} limit="20"}
    {if no_results}<p>No results matched your query.</p>{/if}
    Order: {title}
    Status: {status}
    Name: {order_billing_first_name} {order_billing_last_name}
    Address: {order_billing_city} {order_billing_zip}
    Total: £{order_total}
    Date: {entry_date format="%l %j%S %F %Y   %g:%i %a"}
{/exp:low_search:results}

```
> 0 votes

---
Tags: low-search
---


# Question
Title: Show child categories without GW Code Categories
I'm trying to just show child categories of a specific parent and have used GW Code Categories in the past.

I would just pass the category ID to GW Code and voila!

Now that GW Code Categories is not supported in the latest version of EE (5.3.2), how can I replicate the same functionality?

# Answer
You have three options depending on what actually you are doing...

1. Use a fork of GWCode updated for EE5 - here
2. Use category construct \- an add-on with similar abilities
3. Use URL-Helper \- only works on segments but does the job in many cases: can map slugs to categories based on name or category ID.

HTH

> PS - To get better answers it helps if you can add information about what version of EE you are using (and sometimes what version of php)... thanks!
> 0 votes

---
Tags: categories, gwcode-categories
---


title: Force Stash to output https

text:
# Question
Title: Force Stash to output https
I've inherited an old EE site. I'm trying to get everything running on https. I can get EE to serve up most images via https but it seems like when stash is used, it doesn't use https. Is there a way to force it?

```
{exp:stash:get_list:nested name="home_slider"}
    <a href="{link}"><img src="{image}" alt="{if '{alt_text}'}{alt_text}{if:else}{headline}{/if}"></a>
{/exp:stash:get_list:nested}

```

# Answer
Looks like I needed to clear the ce cache directory and it's working now.
> 1 votes

# Answer
Stash will simply return whatever value was stored in the token `{link}`, so the solution is to find where that token is created and adjust the code there.

If you are not sure how to do this, post the code segment concerned and someone will suggest how to correct.

HTH

> PS - To get better answers it helps if you can add information about what version of EE you are using (and sometimes what version of php)... thanks!
> 0 votes

---
Tags: stash, ssl
---


title: Creating a upload form in EE

text:
# Question
Title: Creating a upload form in EE
Trying to create a simple form that allows a visitor to submit a GPX file and basic contact info. Is there a simple way to do this without using a plugin?

All I find is this - I'm not sure it's still supported? https://docs.expressionengine.com/latest/development/legacy/libraries/file-uploading.html Thanks in advance. S

# Answer
The Channel Form module lets you add front end submissions, information is stored as regular channel entries https://docs.expressionengine.com/latest/channels/channel-form/overview.html
> 2 votes

---
Tags: add-on, ee
---


# Question
Title: Re-importing live EE2 Playa/Matrix data into local EE3 upgrade using native Grid/Relationship fields
I’m currently updating an EE2 to EE3 which has a lot of playa / matrix custom fields. On my local ee2 dev site I am about to run the Playa/Matrix importer addon to get duplicate field data into the native grid/relationship fields. However my problem is that eventually I will have to get the current live site EE2 data re-imported into the upgraded ee3 site before going live, but I need to somehow get the current live ee2 playa/matrix data into the new ee3 native grid/relationship fields. I am aware of using the DataGrab addon for importing purposes, but not sure how to accomplish this field data transfer (ie. Playa/Matrix field data into new Grid/Relationship fields?

Does anyone have any suggestions or previous experience with this?

Many thanks in advance :-)

# Answer
> 0 votes
ElisLab has a plugin to do this job. https://expressionengine.com/add-ons/playa-matrix-importer

---
Tags: matrix, playa, relationships, grid, ee2-upgrades
---


title: Clearing cache manually

text:
# Question
Title: Clearing cache manually
I'd like to make a web page for content authors to clear cache, without giving their group access to Utilities in the CP. So I'll have to manually clear cache. Is it as easy as clearing what's in system/user/cache? Or would it be better to do this another way?

# Answer
You could allow the authors member group access to System utilities, you can restrict it so they only have access to "Data operations" which has the clear cache facility. Also add a custom menu link directly to that page for quick access.

If you wanted to do it manually delete all the content *inside* /system/use/cache/default\_site
> 2 votes

---
Tags: cache
---


# Question
Title: CE Cache and url_override value - possible to use/get a dynamic URL with Stash?
I have a situation where we need to cache a page unique to a location ID that is set to the member. This is a product listing page where there is an inventory lookup done based on the user's chosen location, so we need the page to cache based on said location vs just the category URL etc...

I would like to use the CE Cache "url\_override" parameter, but I can't seem to get anything but a static value to work there.

Here's what I've tried:

```
 // Stash the member's zip

    {exp:stash:set name="the_location_tag"}
        {exp:cartthrob:customer_info}
            {shipping_zip}
        {/exp:cartthrob:customer_info}
    {/exp:stash:set}

 // Cache the page at URL with appended zip

    {exp:ce_cache:it
        id="page"
        tags="products|products-cat"
        for="5 minutes"
        url_override="shop/cat/{exp:stash:the_location_tag}"
    }

    {/exp:ce_cache:it}

```

But with this I get the page cached at: "*shop/cat/expstashthe\_location\_tag/*"

I've tried wrapping the CE Cache tag in `{exp:stash:parse process="end"}` but that didn't seem to make any difference.

How could I get this to work? Should I be using an embed or some other method?

# Answer
> 1 votes
Aha! Figured this out with an embed.

The parameter:

```
url_override="shop/{embed:this_product_cat_name}/{embed:this_members_location}"

```

The embed tag:

```
{embed="..."
    this_product_cat_name="{segment_2}"
    this_members_location="{exp:stash:the_location_tag}"
}

```

---
Tags: stash, ce-cache
---


# Question
Title: Can File Manager sort or filter by file size?
I'd like to review big files, either by sorting or filtering. Is there any way to do this in EE's File Manager? Using EE 5.3.2.

# Answer
> 1 votes
Short answer is no... but maybe that will improve in EE6 (which I hear has some revisions to how CP works).

Long answer is maybe... via a custom written module that creates an alternative view of the File Manager files.

---
Tags: file-manager
---


# Question
Title: How can I conditionally require a Freeform field?
I'm using EE5 5.3.2 and FreeForm Pro 1.8.3. I have a field where somebody selects a radio button option, then the next field is required or not based on that selection. What is the best way to do this?

# Answer
> 2 votes
There is currently no built-in way to do this with Freeform for ExpressionEngine. However, nothing in Freeform is limiting you from implementing your own custom JS solution here. :)

# Answer
> 0 votes
I guess Javascript and css will be your friend here...

---
Tags: solspace-freeform
---


# Question
Title: Access/Caching Issues with ExpressionEngine
I am primarily a WordPress developer, but we have a few clients whose sites run on ExpressionEngine. One such client has had a myriad of issues with their site that we've struggled to troubleshoot.

Issues seem to arise when publishing content on a page. Sometimes the changes won't save at all. Sometimes the changes will save once, but any subsequent changes won't save. Sometimes the changes won't appear until hours later. Sometimes the client will get logged off upon publishing.

With the exception of the last one, this seems to me like a caching issue, but I'd love the input of devs who are more familiar with EE. When looking at the add-ons, the only ones that appear relevant to this issue are "Minimee" (though it only appears to be caching CSS/JS files, and "CE Image" + an AWS integration, which should only affect images. I also see some settings in the .htaccess file regarding the "CE Cache Static Driver" if that helps.

Site is wochamber(dot)com. Thanks!

# Answer
> 1 votes
You would get a more useful response if you could update your question with details of the version of EE you are using, and the versions of the various add-ons that you think are involved.

Unpicking what is going on is likely more complex than can be addressed in this kind of forum, but there may be some steps you can take that will help you narrow down where the issues are arising.

It is unlikely that the CS / JS minimisation, or the AWS / CE Image stuff will be causing the symptoms you describe, so of the add-ons listed it would certainly be right to start by looking at CE-Cache.

CE-Cache is / was a good caching solution for EE2 / EE3 sites: the developer doesn't seem to support it any more, and while it works sort-of with later versions of EE, it is not able to support / cache pages that use newer features of the system. CE-Cache has two modes of working - it can cache bits of pages quite well (so you can cache part of a page and leave the rest to be built on each call to the template), and it also supports static-caching of whole pages (through the CE-Static Cache). You can mix / match the different kinds of caching within a site (so some pages have none, some have template element caching, and some static cached versions of the whole page). CE-Cache also has quite flexible cache-busting options too - so in theory you can ensure that a change to content triggers a cache bust of the affected pages.

My guess is that either the cache-busting configuration is not set correctly (maybe some other bits of the site design have been changed and the cache-busting rules not updated), or changes on your server are messing things up (to get maximum performance, CE-Cache's static cache pages are accessed directly by your server via .htaccess rules, rather than going through EE processing).

So to check this, find the part of the CE Cache controls that lets you nuke the cache, and when someone does one of the broken updates, try manually clearing the cache after they save their edit and see if the edit appears on the published site. (I'm guessing that this is the issue, rather than the change not actually being saved to the EE database). If it does, then probably you just need to work out what has been broken in your CE-Cache configuration and fix it. If it does not help, then probably it is something else...

Hope that helps. If you can post some environmental information and details of what happens when you start manually clearing the cache, maybe the good bods here can steer you closer to a solution.

# Answer
> 1 votes
Getting logged out of the CP can be caused by a few things:

* ISP's changing the persons IP address dynamically
* Over zealous Mod\_security rules (check server logs when this happens to see if any rules are being triggered)
* mismatch when using www or non www (make sure htaccess forces one or the other and your systems paths/URL's are consistant)
* corrupted cookies

Sometimes it's hard to diagnose, it's worth trying setting CP session type to "Session ID only" so cookies are no longer used, that usaully works for me. See Settings \> Security & Privacy.

---
Tags: expresso, ce-cache, minimee
---


# Question
Title: How would I schedule CE Cache to automatically clear every day at a specified time?
We're using CE Cache and need to schedule it to clear every day at 2am (or other time).

I've poked around and couldn't find anything in the configs to automate this, and am not finding any documentation on it, so assuming it is not built in to CE Cache.

# Answer
CE-Cache for EE2 (i.e. CE-Cache 1.101) and for EE3 (i.e. CE-Cache 2.0.2) each have the ability to clear the cache in response to an 'ACT' call.

The action is registered in the EE Database as 'break\_cache' and appears to require the submission of the CE-Cache "Secret" and the IDs of the channels that you want to break the cache for in a pipe-separated list.

From what I can tell you cannot run the ACT call if you have not specified a secret.

So it seems in theory all you need to do is find out the action number for the 'break\_cache' call in your EE database and then set up a cron job to periodically issue a request to the appropriate URL.

You can get the ACT number dynamically using an `exp:query` call in your template, or by looking up the number in your DB and entering it as a hard-wired number. Then presumably you have a URL that looks a bit like:

```
https://domain.com?ACT=XX&secret=yoursecrethere&ids=id_1|id_2|id_3

```

What actually gets cleared then depends on what rules you have set for clearing those channels in your CP configuration.

Once you have this worked out, then you need to set up a cron job on your server to poll this URL at what ever interval you prefer.

N.B. This appears to be an undocumented feature for CE-Cache (at least I have not found such in documentation from a cursory scan of same) - so this guidance based on a quick scan of the add-on code itself. Accordingly E&OE.

HTH
> 3 votes

# Answer
CEcache has a config setting that lets you control the number of seconds before cached items are renewed. This won't clear all caches at once, rather cached files based on their timestamp. https://docs.causingeffect.com/expressionengine/ce-cache/user-guide/configuration.html

Another approach would get to get the clear cache URL's in the control panel (they usually have an ACT= value in the URL), then use CRON to trigger those URL's at 2am - not tested but that's the general idea.
> 1 votes

---
Tags: ce-cache, cron, automation
---


# Question
Title: What (and when) to expect from EE6 (and from updates of EE5)?
For example: since EE acquired by the Packet Tide, should we expect features of EEHarbor addons in EE core?

# Answer
> 2 votes
Check out these posts from the expressionengine blog

https://expressionengine.com/blog/expressionengine-february-update

https://expressionengine.com/blog/expressionengine-6-update

---
Tags: eeharbor
---


# Question
Title: How do i pull fields from a channel with a category_group tagged, but only the category tag that is checked
I've searched for solutions on how to display the selected category, to no avail.

I need to display entries that has that category field selected within that channel

This code just opens the channel needed thats tagged with that category group. But if i select fields within that channel it gives me all, unchecked and checked category items.

`{exp:channel:entries channel="channel_name" dynamic="no" category_group="category_id"} {/exp:channel:entries}`

# Answer
Using your code example are you trying to output one entry from a specific category *group*?

If so some if your syntax may need adjusting, you don't usually have curly braces as parameter values.

This example will show one entry from your\_channel\_name with category group ID 1:

```
{exp:channel:entries channel="your_channel_name" dynamic="no" limit="1 category_group="1"}
{title}
{/exp:channel:entries}

```
> 0 votes

# Answer
Without seeing your exact setup it's worth trying the category parameter:

In this example it will only show entries that have been assigned to category ID 1 *and* 5

```
{exp:channel:entries channel="your_channel_name" dynamic="no" limit="1 category="1&5"}
{title}
{/exp:channel:entries}

```
> 0 votes

---
Tags: categories
---


# Question
Title: What is the updated version of assign_variable?
In former days **{assign\_variable: my\_var="foo"}** was a very handy tool. I haven't used it for some time and discovered that it was deprecated in EE 4.x but was not able to determine what if anything it has been replaced with. Is there a "modern" equivalent? If so, would you mind sharing?

Thanks.

# Answer
I accidentally tripped over the answer while looking for something else. The feature actually still exists but it is called:

```
{preload_replace:my_category="britain"}

```

You can find out more about it here: https://docs.expressionengine.com/latest/templates/globals/preload-replacement.html#preload-text-replacements
> 0 votes

# Answer
The best way of creating transient values within a template is through EE's built in layout variable system.

Layout variables can be defined as single values or as part of an addressable array, and can contain anything you can generate as tag output within a template.

The only wrinkle is that the variables only get instantiated when EE template processing transfers to a subsequent template (using EE's Template Layout system). So the most minimal way of defining and then using a variable would be something like this:

**First Template in chain**

```
{layout='template_2'}
{layout:set name="my_var" value="foo"}
{layout:set name="my_var_another_option"}foo{/layout:set}

```

**Second Template in chain** ('template\_2')

```
<h1>Here is the content of my_var {layout:my_var}</h1>
<p>And here is the content of my_var_another_option {layout:my_var_another_option}.</p>

```

I'll leave you to read about the layout variable array option in the docs... :)

HTH
> 1 votes

---
Tags: variable, ee5
---


# Question
Title: Cartthrob: Setting product status to sold on purchase
We have a product list that lists single items. At the moment the client has to go in and manually set the item to "sold" using a toggle in the product listing in the EE CMS. I'm looking to automatically set that toggle to "sold" once the payment has been successfully made.

What would be the best direction to take with this?

# Answer
By default Cartthrob can only set a "Status" after a successful order so that would be the easiest approach, use a custom status of "Sold" for successful orders. You can set these in Cartthrob settings \> Orders

If your toggle is a custom field you'd probably have to write a custom extension to modify that field.
> 0 votes

---
Tags: channel-entries, cartthrob, product
---


# Question
Title: Different page direct based on form field upon submitting
I’m looking for a pointer in the right direction to research this because my GoogleFu just isn’t cutting it.

I’m on EE2 (hopefully to be upgraded to 5 soon…), with Freeform, and I have a form that, based on the value of one of the fields, I want to send the user to one of two different pages after they submit the form.

The form is a “do you qualify” form for a service, I want to check a field in the form to determine eligability, if eligable they are sent to one page, if not they are sent to another

I’m very new to EE, and web design in general. But the boss gets what the boss asks for!

# Answer
It sounds like what you need is a conditional to set the value for the `return` parameter for your freeform tag.

Hard to say more without more information on what you are trying to do / what your template looks like and knowledge of the versions of EE and Freeform you have installed. But roughly something like this...

```
{exp:freeform:form
    return="
       {if viable_form}{path='group/template_1'}
       {if:else}{path='group/template_2'}
       {/if}
    "
     ... other parameters ...
}
... form tags ...
{/exp:freeform:form}

```

Replace `viable_form` with some construction that returns true if your form / application is viable.

Replace `group/template_1` with where ever you want viable forms to redirect to, and `group/template_2` with where ever you want the rest to go.

HTH
> 1 votes

# Answer
Another approach would be to evaluate the form result on the return page template and redirect depending on the value. Something like this:

```
{if state == "WI"}
  {redirect="path/to/wi"}
{if:elseif state == "MN"}
   {redirect="path/to/mn"}
{if:elseif state == "IA"}
  {redirect="path/to/ia"}
{if:else}
  Thanks for your submission
{/}

```
> 0 votes

---
Tags: ee2, solspace-freeform, forms, redirects, redirection
---


# Question
Title: Creating a custom word list using system/user/config/captcha.php seems to have no effect
I created a file in system/user/config/captcha.php to overrule the standard captchas. It has the following content.

```
<?php

return [
  'accordion',
  'guitar',
  'bagpipes',
  'banjo',
  'drums',
  'bugle',
  'cello',
  'clarinet',
  'cymbals',
  'drums',
  'flute',
  'horn',
  'harmonica',
  'harp',
  'keyboard',
  'maracas',
  'organ',
  'piano',
  'recorder',
  'saxophone',
  'sitar',
  'tambourine',
  'triangle',
  'trombone',
  'trumpet',
  'tuba',
  'ukulele',
  'violin',
  'xylophone',
  'bassoon',
  'castanets',
  'didgeridoo',
  'bass',
  'gong',
  'harpsichord',
  'lute',
  'mandolin',
  'oboe',
  'piccolo',
  'viola'
];

?>

```

When I load the page that contains my form I can see it still uses the standard dictionary. Anybody knows where it goes wrong here?

Thanks!

# Answer
> 0 votes
It looks like you left out the `<?php` tag on first line of the file.

See the example file here.

Hope that helps!

---
Tags: captcha
---


# Question
Title: Reduce spam from Contact form without CAPTCHA?
I'm using the standard EE Contact Form (exp:email:contact\_form) and getting spammed. Apart from enabling CAPTCHA, are there any good ways of reducing spam from it? Using EE 5.3.2.

# Answer
You need to check out Snaptcha from Put Your Lights On. A remarkable add-on for EE - install it and it just works: no configuration or hoopla. Have used on several installations and it is effective. Highly recommended.
> 2 votes

# Answer
Short of using a Captcha there's no sure fire way to stop spam. https://putyourlightson.com/plugins/snaptcha-ee is a good Captcha because it works behind the scenes, I've used it and it does stop most spam.

There's always the option of forcing visitors to do a preview first before sending, using the preview parameter https://docs.expressionengine.com/latest/add-ons/email.html#preview \- bots tend to miss this so it can stop most spam, albeit at slight inconvenience.
> 1 votes

# Answer
Interesting results: With Snaptcha (set to highest protection) + EE's built-in contact form, I still get spammed. But I never get spam via any of my FreeForm Pro forms. So I'm going to use FreeForm Pro for my contact form, as well.

I thought Spaptcha and FreeForm used similar "honeypot" methods? Maybe not.

Update: Been using FreeForm as my contact form for a few days and haven't gotten any spam. It says it's filtered out 62 now and I believe it.
> 0 votes

---
Tags: spam, email-contact-form
---


# Question
Title: Why doesn't product get added to cart in Carthrob?
A site running EE 3.5.7 and Carthrob 3.2

The site was moved from another domain and now I am not able to add items to the cart.

The item is sent to the product\_detail page using:

```
<a href="{entry_id_path='/new/image'}">

```

On the product page I have the following code:

```
...
{exp:cartthrob:add_to_cart_form
        class='form-horizontal'
        entry_id="{entry_id}"
        no_tax="{no_tax}"
        no_shipping = "{no_shipping}"
        return="{template_group}/view_cart"
    }

            {exp:cartthrob:item_options entry_id="{entry_id}"}
              {if dynamic}
              <div class="control-group">
                    <label class="control-label" for="{option_field}">{option_label}</label>
                    <div class="controls">
                    {input}
                    </div>
                </div>
                {if:else}
                    {if options_exist}
                  <div class="control-group">

                        <label class="control-label" for="{option_field}">{option_label}</label>
                        <div class="controls">
                        {select class="input-medium"}
                            <option {selected} value="{option_value}">
                                {option_name}{if option_price_numeric != 0} +{option_price}{/if}
                            </option>
                        {/select}
                        </div>
                    </div>
                    {/if}
                {/if}
            {/exp:cartthrob:item_options}

        <div class="control-group">
        {if "{inventory}" == "0" }
            <p><strong>This item is out of stock</strong></p>
        {if:else}
            <label for="product_quantity" class="control-label">Quantity</label>
            <div class="controls">
                <input type="text" id="product_quantity" class="input-medium"  placeholder='1' name="quantity" size="8"  />
            </div>
        {/if}
        </div>

        <div class="control-group">
            <div class="form-actions">
                <button type="submit" class="btn btn-primary">Add to Cart</button>
            </div>
        </div>
    {/exp:cartthrob:add_to_cart_form}
...

```

When I click **Add to Cart** it goes to view\_cart but the I get the following message:

> Shopping Cart You have no items in your cart. Continue shopping.

I have reinstalled the default templates but to no avail.

Any help in getting this resolved would be appreciated.

# Answer
It turned out to be a cookie setting issue. I found it \[here\].
> 1 votes

---
Tags: cartthrob
---


# Question
Title: EEHarbor Transcribe - gets all posts of all languages, rather than just the chosen language
Using Transcribe with EE4.

I have the wierdest issue ever and I can't seem to figure it out.

I have installed Transcribe and created two languages - EN and KIN.

I use the following code:

```
{exp:transcribe:entries channel='articles' category="1" sort='asc' orderby='title'}
<a href="{url_title}">
<div class="articleSnippets">
{article_image}
<img class="article_image" src="{path}/{filename}.{extension}" />
{/article_image}
<h2>{title} - {transcribe:language_abbreviation}</h2>
<p>{excert}</p>
</div></a>
{/exp:transcribe:entries}

```

I use that under a template, as an example, my-template. This was an already existing template. So I visit www.domain.com/my-template and unfortunately, it gets all the articles in that channel (articles) and that category (1), and labels them all in that language, even the ones that aren't in the chosen language. For example, with EN selected, it gets all of them, including all the KIN language articles, and vice versa.

Now here is the teaser. If I create a brand new template, lets call it mytemplate, and visit www.domain.com/mytemplate, it works under that new template. So I delete the old template, create it again, still doesn't work (as my-template). I call the template, www.domain.com/bananasandapples, and it works under that template.

It's like every time I use the name of the template that already existed, it doesn't work. I've tried uninstalling transcribe, deleting the templates, installing transcribe, creating them again. No luck.

I've looked at the debugger, and the only thing I can see is this:

On my-template (doesn't work), a SQL query comes up:

```
SELECT `tel`.`language_id`, `tel`.`entry_id`
FROM (`exp_transcribe_entries_languages` tel)
JOIN `exp_channel_titles` t ON `tel`.`entry_id` = `t`.`entry_id`
WHERE `tel`.`language_id` IN (1)
AND `t`.`channel_id` IN (2)
AND `tel`.`entry_id` IN (2)
LIMIT 100000

```

On mytemplate (works)

```
SELECT `tel`.`language_id`, `tel`.`entry_id`
FROM (`exp_transcribe_entries_languages` tel)
JOIN `exp_channel_titles` t ON `tel`.`entry_id` = `t`.`entry_id`
WHERE `tel`.`language_id` IN (1)
AND `t`.`channel_id` IN (2)
LIMIT 100000

```

Another SQL query later, on my-template (doesn't work):

```
SELECT DISTINCT t.entry_id , exp_channels.channel_id , t.sticky , t.title FROM exp_channel_titles AS t
LEFT JOIN exp_channels ON t.channel_id = exp_channels.channel_id INNER JOIN exp_category_posts ON t.entry_id = exp_category_posts.entry_id
INNER JOIN exp_categories ON exp_category_posts.cat_id = exp_categories.cat_id WHERE t.entry_id != '' AND t.site_id IN ('1')  AND t.entry_date < 1599557123  AND (t.expiration_date = 0 OR t.expiration_date > 1599557123) AND t.channel_id IN (2) AND exp_categories.cat_id = '3' AND t.status = 'open' ORDER BY t.sticky desc, t.title asc, t.entry_id asc LIMIT 0, 100

```

On mytemplate (works):

```
SELECT DISTINCT t.entry_id , exp_channels.channel_id , t.sticky , t.title FROM exp_channel_titles AS t
LEFT JOIN exp_channels ON t.channel_id = exp_channels.channel_id INNER JOIN exp_category_posts ON t.entry_id = exp_category_posts.entry_id
INNER JOIN exp_categories ON exp_category_posts.cat_id = exp_categories.cat_id WHERE t.entry_id != '' AND t.site_id IN ('1')  AND t.entry_date < 1599557135  AND (t.expiration_date = 0 OR t.expiration_date > 1599557135) AND t.entry_id  IN ('25','28','30','31','33','34','35','39','40','41','42','43','44','45','46','47','48','49','50','51','52','53','54','55','56','57','58','59','60','61','62','63','64','67','69','70','82','83','84','85','87','88','89','90','91','93','94','95','96','97','98','99','100','101','102','103','104','106','107','161','162','170','171','347','684','686','689','695','699','705','707','727','788','799','846','861','883','884','893','921','952','965','966','967','968','969','971','972','973','974','975','976','977','978','979','981','982','985','992','1046','1121','1124','1129','1132','1134','1135','1147','1148','1166','1242','1358','1374','1375','1419','1425','1446','1454','1512','1525','1554','1581','1612','1629','1704','1711','1712','1789','1802','1803','1809','1847','1931','1954','1968','1991','1992','1993','1994','1995','1996','1997','1998','2000','2005','2006','2007','2009','2072','2074','2347','2410','2411','2413','2414','2785','2791') AND t.channel_id IN (2) AND exp_categories.cat_id = '3' AND t.status = 'open' ORDER BY t.sticky desc, t.title asc, t.entry_id asc LIMIT 0, 100

```

There are no other addons except Espresso, and I've tried it without that, but to no luck.

I'm pretty stumped if I'm honest. Any clues?

# Answer
> 1 votes
Working with the EE team, we fixed this.

Turns out, the

```
AND `tel`.`entry_id` IN (2)

```

was the bit that was breaking it. Delving into the database, there was some very old entries that had the same URL as the template which didn't exist in the list of entries in the CMS. Removing those out of exp\_channel\_titles fixed the issue.

Massive thanks to the EE team for all their help on this.

---
Tags: transcribe
---


# Question
Title: Trouble installing EE 3.5.3, ee/legacy/database/drivers/mysqli/mysqli_connection.php:122
Just installed latest EE 3.5.3. Running on php 5.6. I've performed the ee\_server\_wizard test which passed everything.

Did 2 fresh installs and when I try login at admin.php I'm getting.

> ee/legacy/database/drivers/mysqli/mysqli\_connection.php:122

Any ideas on how to fix? Thanks, Ted

```
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'my-database.exp_comments' doesn't exist:
SELECT COUNT(*) AS `numrows` FROM (`exp_comments` as Comment_comments) LEFT JOIN `exp_channel_titles` AS Entry_channel_titles ON `Entry_channel_titles`.`entry_id` = `Comment_comments`.`entry_id` LEFT JOIN `exp_channel_data` as Entry_channel_data ON `Entry_channel_data`.`entry_id` = `Entry_channel_titles`.`entry_id` WHERE ( `Comment_comments`.`site_id` = '1' AND `Entry_channel_titles`.`status` = 'closed' ) LIMIT 18446744073709551615

ee/legacy/database/drivers/mysqli/mysqli_connection.php:122

```

and a stack trace that includes 13 items.

# Answer
I found this question because I had a similar problem with the `exp_comments` table during an upgrade from 1.x through 3.x to 4/5. For EE 3.5.17, the table looks like this on a fresh install:

```
CREATE TABLE `exp_comments` (
 `comment_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
 `site_id` int(4) DEFAULT '1',
 `entry_id` int(10) unsigned DEFAULT '0',
 `channel_id` int(4) unsigned DEFAULT '1',
 `author_id` int(10) unsigned DEFAULT '0',
 `status` char(1) COLLATE utf8_unicode_ci DEFAULT '0',
 `name` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
 `email` varchar(75) COLLATE utf8_unicode_ci DEFAULT NULL,
 `url` varchar(75) COLLATE utf8_unicode_ci DEFAULT NULL,
 `location` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
 `ip_address` varchar(45) COLLATE utf8_unicode_ci DEFAULT NULL,
 `comment_date` int(10) DEFAULT NULL,
 `edit_date` int(10) DEFAULT NULL,
 `comment` text COLLATE utf8_unicode_ci,
 PRIMARY KEY (`comment_id`),
 KEY `entry_id` (`entry_id`),
 KEY `channel_id` (`channel_id`),
 KEY `author_id` (`author_id`),
 KEY `status` (`status`),
 KEY `site_id` (`site_id`)
) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci

```
> 0 votes

---
Tags: ee3, install
---


# Question
Title: 1054 Unknown column error when upgrading from 3.5.15 to 4.3.6
Getting this error when upgrading from 3.5.15 to 4.3.6.

Any ideas?

```
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'ee_m_MemberGroup_member_groups.can_manage_consents' in 'field list':

```

SELECT ee\_m\_MemberGroup\_member\_groups.group\_id as ee\_m\_MemberGroup\__group\_id, ee\_m\_MemberGroup\_member\_groups.site\_id as ee\_m\_MemberGroup\__site\_id, ee\_m\_MemberGroup\_member\_groups.group\_title as ee\_m\_MemberGroup\__group\_title, ee\_m\_MemberGroup\_member\_groups.group\_description as ee\_m\_MemberGroup\__group\_description, ee\_m\_MemberGroup\_member\_groups.is\_locked as ee\_m\_MemberGroup\__is\_locked, ee\_m\_MemberGroup\_member\_groups.menu\_set\_id as ee\_m\_MemberGroup\__menu\_set\_id, ee\_m\_MemberGroup\_member\_groups.can\_view\_offline\_system as ee\_m\_MemberGroup\__can\_view\_offline\_system, ee\_m\_MemberGroup\_member\_groups.can\_view\_online\_system as ee\_m\_MemberGroup\__can\_view\_online\_system, ee\_m\_MemberGroup\_member\_groups.can\_access\_cp as ee\_m\_MemberGroup\__can\_access\_cp, ee\_m\_MemberGroup\_member\_groups.can\_access\_footer\_report\_bug as ee\_m\_MemberGroup\__can\_access\_footer\_report\_bug, ee\_m\_MemberGroup\_member\_groups.can\_access\_footer\_new\_ticket as ee\_m\_MemberGroup\__can\_access\_footer\_new\_ticket, ee\_m\_MemberGroup\_member\_groups.can\_access\_footer\_user\_guide as ee\_m\_MemberGroup\__can\_access\_footer\_user\_guide, ee\_m\_MemberGroup\_member\_groups.can\_view\_homepage\_news as ee\_m\_MemberGroup\__can\_view\_homepage\_news, ee\_m\_MemberGroup\_member\_groups.can\_access\_files as ee\_m\_MemberGroup\__can\_access\_files, ee\_m\_MemberGroup\_member\_groups.can\_access\_design as ee\_m\_MemberGroup\__can\_access\_design, ee\_m\_MemberGroup\_member\_groups.can\_access\_addons as ee\_m\_MemberGroup\__can\_access\_addons, ee\_m\_MemberGroup\_member\_groups.can\_access\_members as ee\_m\_MemberGroup\__can\_access\_members, ee\_m\_MemberGroup\_member\_groups.can\_access\_sys\_prefs as ee\_m\_MemberGroup\__can\_access\_sys\_prefs, ee\_m\_MemberGroup\_member\_groups.can\_access\_comm as ee\_m\_MemberGroup\__can\_access\_comm, ee\_m\_MemberGroup\_member\_groups.can\_access\_utilities as ee\_m\_MemberGroup\__can\_access\_utilities, ee\_m\_MemberGroup\_member\_groups.can\_access\_data as ee\_m\_MemberGroup\__can\_access\_data, ee\_m\_MemberGroup\_member\_groups.can\_access\_logs as ee\_m\_MemberGroup\__can\_access\_logs, ee\_m\_MemberGroup\_member\_groups.can\_admin\_design as ee\_m\_MemberGroup\__can\_admin\_design, ee\_m\_MemberGroup\_member\_groups.can\_delete\_members as ee\_m\_MemberGroup\__can\_delete\_members, ee\_m\_MemberGroup\_member\_groups.can\_admin\_mbr\_groups as ee\_m\_MemberGroup\__can\_admin\_mbr\_groups, ee\_m\_MemberGroup\_member\_groups.can\_admin\_mbr\_templates as ee\_m\_MemberGroup\__can\_admin\_mbr\_templates, ee\_m\_MemberGroup\_member\_groups.can\_ban\_users as ee\_m\_MemberGroup\__can\_ban\_users, ee\_m\_MemberGroup\_member\_groups.can\_admin\_addons as ee\_m\_MemberGroup\__can\_admin\_addons, ee\_m\_MemberGroup\_member\_groups.can\_edit\_categories as ee\_m\_MemberGroup\__can\_edit\_categories, ee\_m\_MemberGroup\_member\_groups.can\_delete\_categories as ee\_m\_MemberGroup\__can\_delete\_categories, ee\_m\_MemberGroup\_member\_groups.can\_view\_other\_entries as ee\_m\_MemberGroup\__can\_view\_other\_entries, ee\_m\_MemberGroup\_member\_groups.can\_edit\_other\_entries as ee\_m\_MemberGroup\__can\_edit\_other\_entries, ee\_m\_MemberGroup\_member\_groups.can\_assign\_post\_authors as ee\_m\_MemberGroup\__can\_assign\_post\_authors, ee\_m\_MemberGroup\_member\_groups.can\_create\_entries as ee\_m\_MemberGroup\__can\_create\_entries, ee\_m\_MemberGroup\_member\_groups.can\_edit\_self\_entries as ee\_m\_MemberGroup\__can\_edit\_self\_entries, ee\_m\_MemberGroup\_member\_groups.can\_delete\_self\_entries as ee\_m\_MemberGroup\__can\_delete\_self\_entries, ee\_m\_MemberGroup\_member\_groups.can\_delete\_all\_entries as ee\_m\_MemberGroup\__can\_delete\_all\_entries, ee\_m\_MemberGroup\_member\_groups.can\_view\_other\_comments as ee\_m\_MemberGroup\__can\_view\_other\_comments, ee\_m\_MemberGroup\_member\_groups.can\_edit\_own\_comments as ee\_m\_MemberGroup\__can\_edit\_own\_comments, ee\_m\_MemberGroup\_member\_groups.can\_delete\_own\_comments as ee\_m\_MemberGroup\__can\_delete\_own\_comments, ee\_m\_MemberGroup\_member\_groups.can\_edit\_all\_comments as ee\_m\_MemberGroup\__can\_edit\_all\_comments, ee\_m\_MemberGroup\_member\_groups.can\_delete\_all\_comments as ee\_m\_MemberGroup\__can\_delete\_all\_comments, ee\_m\_MemberGroup\_member\_groups.can\_moderate\_comments as ee\_m\_MemberGroup\__can\_moderate\_comments, ee\_m\_MemberGroup\_member\_groups.can\_send\_cached\_email as ee\_m\_MemberGroup\__can\_send\_cached\_email, ee\_m\_MemberGroup\_member\_groups.can\_email\_member\_groups as ee\_m\_MemberGroup\__can\_email\_member\_groups, ee\_m\_MemberGroup\_member\_groups.can\_email\_from\_profile as ee\_m\_MemberGroup\__can\_email\_from\_profile, ee\_m\_MemberGroup\_member\_groups.can\_view\_profiles as ee\_m\_MemberGroup\__can\_view\_profiles, ee\_m\_MemberGroup\_member\_groups.can\_edit\_html\_buttons as ee\_m\_MemberGroup\__can\_edit\_html\_buttons, ee\_m\_MemberGroup\_member\_groups.can\_delete\_self as ee\_m\_MemberGroup\__can\_delete\_self, ee\_m\_MemberGroup\_member\_groups.mbr\_delete\_notify\_emails as ee\_m\_MemberGroup\__mbr\_delete\_notify\_emails, ee\_m\_MemberGroup\_member\_groups.can\_post\_comments as ee\_m\_MemberGroup\__can\_post\_comments, ee\_m\_MemberGroup\_member\_groups.exclude\_from\_moderation as ee\_m\_MemberGroup\__exclude\_from\_moderation, ee\_m\_MemberGroup\_member\_groups.can\_search as ee\_m\_MemberGroup\__can\_search, ee\_m\_MemberGroup\_member\_groups.search\_flood\_control as ee\_m\_MemberGroup\__search\_flood\_control, ee\_m\_MemberGroup\_member\_groups.can\_send\_private\_messages as ee\_m\_MemberGroup\__can\_send\_private\_messages, ee\_m\_MemberGroup\_member\_groups.prv\_msg\_send\_limit as ee\_m\_MemberGroup\__prv\_msg\_send\_limit, ee\_m\_MemberGroup\_member\_groups.prv\_msg\_storage\_limit as ee\_m\_MemberGroup\__prv\_msg\_storage\_limit, ee\_m\_MemberGroup\_member\_groups.can\_attach\_in\_private\_messages as ee\_m\_MemberGroup\__can\_attach\_i....

# Answer
> 1 votes
Is this a rehearsed upgrade or your first time?

EE should be creating that column when running the upgrade script for 4.3.0.

Rehearse the upgrade on a separate instance of your application. Also verify that that column exists, and that it is being created properly by the installer script here:

`/system/ee/installer/updates/ud_4_03_00.php:238`

My guess is that the installer failed on that upgrade step, and you continued on without reverting and figuring out what died on that step.

# Answer
> 0 votes
The 4.0.0 upgrade script looks at the "member" model (which includes member group permissions) to determine what member fields it needs to deal with to upgrade from 3.5.X.

However, the default member group model was modified in 4.3 to include a check for "can\_manage\_consents" but that doesn't exist in the member\_group table yet. So the 4.0.0 installer should have been modified to take that into account. But it wasn't.

If you create the column in the exp\_member\_groups table yourself, it should solve the issue.

`can_manage_consents` char(1) NOT NULL DEFAULT 'n',

# Answer
> 0 votes
Ellislab helped me out with a bug fix. Here's what they supplied me and it worked.

```
<?php

```

/\** * This source file is part of the open source project * ExpressionEngine (https://expressionengine.com) * * @link https://expressionengine.com/ * @copyright Copyright (c) 2003-2018, EllisLab, Inc. (https://ellislab.com) * @license https://expressionengine.com/license Licensed under Apache License, Version 2.0 \*/

namespace EllisLab\ExpressionEngine\Updater\Version\_4\_0\_1;

/\** * Update \*/ class Updater {

```
var $version_suffix = '';

/**
 * Do Update
 *
 * @return TRUE
 */
public function do_update()
{
    $steps = new \ProgressIterator(
        array(
            'removeOrhpanedLayouts',
            'resyncLayouts'
        )
    );

    foreach ($steps as $k => $v)
    {
        $this->$v();
    }

    return TRUE;
}

private function removeOrhpanedLayouts()
{
    // This field addition ported from ud_4_03_00 because otherwise model throws mysql error

    ee()->smartforge->add_column(
        'member_groups',
        array(
            'can_manage_consents' => array(
                'type'       => 'CHAR',
                'constraint' => 1,
                'default'    => 'n',
                'null'       => FALSE,
            )
        )
    );

    $channel_ids = ee('Model')->get('Channel')
        ->fields('channel_id')
        ->all()
        ->getIds();

    if ( ! empty($channel_ids))
    {
        ee('Model')->get('ChannelLayout')
            ->filter('channel_id', 'NOT IN', $channel_ids)
            ->delete();
    }
}

private function resyncLayouts()
{
    // Fix for running this update routine in a >= 4.1 context, preview_url
    // column must be present to access Channel model below
    ee()->smartforge->add_column(
        'channels',
        array(
            'preview_url' => array(
                'type'    => 'VARCHAR(100)',
                'null'    => TRUE,
            )
        )
    );

    ee('Model')->get('ChannelLayout')
        ->with('Channel')
        ->all()
        ->synchronize();
}

```

} // END CLASS

// EOF

# Answer
> 0 votes
It looks like some bad code circumvented the installer. Edit line 68 of `system/ee/EllisLab/ExpressionEngine/Boot/boot.php`. Remove `FALSE &&` from the conditional:

```
if (FALSE && defined('REQ') && in_array(REQ, ['CP', 'CLI']) && is_dir(SYSPATH.'ee/installer/'))

```

to:

```
if (defined('REQ') && in_array(REQ, ['CP', 'CLI']) && is_dir(SYSPATH.'ee/installer/'))

```

Fix courtesy of Micah.

---
Tags: sql, ee4
---


# Question
Title: Freeform File Uploads with Multi-site Manager
I'm running EE 5.3.2 with Freeform Lite 1.8.3. I have the multi-site manager setup with 2 sites, we'll call them Site A & Site B.

Site B has a form that allows for a file upload. When a file is uploaded through the form, the file does get uploaded and the form seems to work correctly but I'm unable to show file information for the upload in the Freeform notifications.

I verified that the files are being uploaded to the correct directory in Site B's file structure and the files show up in the file manager in the correct directory. But when I try to edit the file or download it in the file manager, EE gives me the following error: Error: No file selected.

If I switch over to Site A and go to the file manager, the uploaded file shows up there are well for some reason and I am able to edit and download it there. But the file does not appear in any directory in the file manager and it does not exist on the server in Site A's file structure.

Somewhere the lines are getting crossed and I can't figure out where.

Any help is appreciated.

# Answer
> 0 votes
It turns out this is a known issue between Freeform and MSM, and Solspace does not currently have a solution. Freeform isn't completely compatible with MSM although it works just fine until you need a form with file uploads.

---
Tags: solspace-freeform, file-uploads, multi-site-manager
---


# Question
Title: ExpressionEngine with Publisher and NavEE
Recently, I upgraded EE v2.9 website to EE v5.3.2 which is multi-language website managed with Publisher. I am facing problem after upgrade. None of custom fields like Textarea, RTE etc populating content.

Another problem is that NavEE is being used to managed navigation and I can't find EE5 ported version for add-on Publisher NavEE Support

# Answer
> 1 votes
The issue with fields not populating will be hard to diagnose without you providing more information about how the fields were defined and how you are trying to access them / include in templates.

As for the Publisher / NavEE support - wasn't too hard to find this on the BoldMinded site, which is indicated as working with EE4/5.

If this doesn't work with EE5, I'd get in touch with BoldMinded and see what they suggest.

---
Tags: ee5, navee, publisher, ee4-upgrade
---