title: Channel not working in url

text:
# Question
Title: Channel not working in url
I can not get the fields of a channel to be fused in a form.

I created a **Partial Template** with the following code:

**{sidebar}**

```
<form action="{path='{s_url}/{s_url_search}'}" method="GET" id="">
<div class="form-group">
    <label>Contratto</label>
    <select class="form-control" name="contratto">
        <option value="all">Tutti i contratti</option>
        <option value="Vendita">Vendita</option>
        <option value="Affitto">Affitto</option>
    </select>
</div>
<div class="form-group">
    <label>Comune</label>
    <select class="form-control" name="comune">
        <option value="all">Tutti i comuni</option>
        {exp:channel:entries channel="comuni"}
        <option value="{title}">{title}</option>
        {/exp:channel:entries}
    </select>
</div>
<div class="form-group">
    <label>Tipologia</label>
    <select class="form-control" name="tipologia">
        <option value="all">Tutte le tipologie</option>
        {exp:channel:entries channel="tipologie"}
        <option value="{title}">{title}</option>
        {/exp:channel:entries}
    </select>
</div>
<button type="submit" class="btn btn-sm btn-primary">Cerca</button>

```

This works if the url is of type ***mysite.it/Template\_Group\_name/Template***.

It does not work instead if the url is of type ***mysite.it/Template\_Group\_name/Template/item***

**I give an example.** I have the Blog Channel where I have the articles inside. **example article: Hello Worl** The code written above works if I go to ***mysite.it/blog/all*** Which shows all the articles But it does not work for ***mysite.it/blog/view/hello\_world*** showing the article

**Link info:** https://docs.expressionengine.com/latest/urls/url\_structure.html#entries-and-other-things

The template all and the template view inside are very similar to each other only the channel display changes but for all the form is shown with the generation of the fields from the other channels but it does not work if the url also has the name of an article.

**What is wrong?** I also copy the view channel code.

Picture mysite.it/template =\> mysite.it/immobili the Partial Template works fine. Example

```
{exp:channel:entries channel="comuni"}
    <option value="{title}">{title}</option>
    {/exp:channel:entries}

```

this code works and generate the field's option.

Instead into picture mysite.it/template\_group/template/my\_url\_title =\> mysite.it/immobili/view/villa-alessandro the Partial Template NOT works.

# Answer
Try the condicional Tags.

> the first one: {if segment\_1 =="blog" && segment\_2 =="view" && segment\_3 ==""}

will display only the entries from blog channel : **mysite.it/blog/view/**

> the second one: {if:elseif segment\_1 =="blog" && segment\_2 == "view" && segment\_3 !="" && segment\_4 ==""}

will display only the hello\_world entry : **mysite.it/blog/view/hello\_world**

As the **view segment** from your site seems not to be a template, is not processed by EpressionEngine I guess.

```
{if segment_2 =="blog" && segment_3 ==""}

    {exp:channel:entries channel='{ch}' limit='1' require_entry='yes'}
            .............. will display only: mysite.it/blog/view/ entries or others data
     {/exp:channel:entries}

{if:elseif segment_2 =="blog" && segment_3 == "view" && segment_4 =="" }

{exp:channel:entries channel='{ch}' limit='1' require_entry='yes'}

        ......... will display: mysite.it/blog/view/hello_world entries

{/exp:channel:entries}

    {/if}

```
> 0 votes

# Answer
> mysite.it/blog/all Which shows all the articles But it does not work for mysite.it/blog/view/hello\_world showing the article
>
> **mysite.it/blog/view/hello\_world** works fine because the **segment\_1: blog** is an **EE template group**. The related entries content will be displayed.
>
> **mysite.it/blog/view/hello\_world** doesn't work because **segment\_2: view** is not a template group, is not processed, so 404 error message.

I'm using conditional tags to solve this URL problem, it's working fine.

**Templates routes** could help you too, less verbose that many conditional tags:

https://docs.expressionengine.com/latest/cp/design/routes.html https://docs.expressionengine.com/latest/urls/template\_routes.html .

**If the segment\_2 (view) and you want to associate it with an entry, is not a EE template groups you could use the conditional tags:**

```
{if segment_1 =="blog" && segment_2 =="view" && segment_3 !=""}

```

**If this condition is false, the second will be called:**

```
 {if:elseif segment_1 == "blog"  && segment_2 !="" && segment_3 =="" }

```

you can use too:

```
 {if:elseif segment_1 == "blog"  && segment_2 =="all" && segment_3 ==""}

```

**The template code:**

```
{if segment_1 =="blog" && segment_2 =="view" && segment_3 !=""}
        {exp:channel:entries channel="your_channel" url_title="{segment_x}"}
                ........
        {/exp:channel:entries}

{if:elseif segment_1 == "blog"  && segment_2 !="" && segment_3 =="" }
        {exp:channel:entries channel="you_channel" url_title="{segment_x}"}
                ........
        {/exp:channel:entries}

{/if}

```

If needed, you can associate the url\_title, with one of the segment (segment\_1, segment\_2...). https://docs.expressionengine.com/latest/channel/channel\_entries.html#url-title
> 0 votes

---
Tags: channel-entries, safecracker, ee5
---


# Question
Title: Transcribe for EE2 - export all variables?
I have an older EE2 site that will be rebuilt and not upgraded. There are almost 150 translations in the Transcribe module. Is there an easy way to export via db query or template code a list of variables and translations somehting like this:

* variable\_1 English French,
* variable\_2 English French,
* variable\_3 English French,
* variable\_4 English French,

This would save a lot of copy/pasting.

Digging into the database I see two tables that I need to combine to output the data correctly. I am completely unfamiliar with mysql so have no idea where to start.

exp\_transcribe\_variables and exp\_transcribe\_translations

Translations has a column `variable_id` which should match the variables column `id` see screenshots from navicat

# Answer
You can export the data from the EE MySQL database if you have access to a MySQL utility such as Sequel Pro or Navicat.

You'll need to enter some SQL to isolate the data you want, something like this:

```
SELECT
    t_variable.id AS entry_id,
    t_variable.name AS entry_name,
    t_translation.content AS entry_content
FROM exp_transcribe_variables t_variable
INNER JOIN exp_transcribe_translations t_translation ON (t_variable.id = t_translation.variable_id)
INNER JOIN exp_transcribe_variables_languages t_language ON (t_variable.id = t_language.variable_id)
WHERE t_language.language_id = '2'

```

This will generate a table with the translations in... hopefully... that you can then export as CSV or whatever works for you :D
> 2 votes

---
Tags: templates, transcribe, export
---


# Question
Title: Call to undefined method EE_Form_validation::error_array()
I've updated EE from 2 to 5. I've a custom module where I need to validate a form. In the new EE 5 the function $this-\>EE-\>form\_validation-\>error\_array() does not exist anymore. I'm using it in the following function:

```
$this->EE->session->set_flashdata(
    'result_message',array(
        'post' => $_POST,
        'errors' => this->EE->form_validation->error_array()
    )
);

```

Does someone has an answer for this?

# Answer
I haven't used that legacy library in quite a while, but after a quick review of the code in EE 4.3.6 (which should be the same as 5.0.x), I think you can return a string of error messages like so for a Control Panel flash message:

```
...
'errors' => ee()->form_validation->error_string()
...

```

That class and function lives in `system/ee/legacy/libraries/Form_validation.php` and should return a carriage-returned string of errors you can use.

Remember that EE2 was running heavily on a version of CodeIgniter 2.x that EllisLab was maintaining, and in later versions of EE they stopped using that framework as a base. That framework is where the validation class originated, but now (in at least EE4 and EE5) they use a legacy library that has no dependencies on CodeIgniter anymore, so you can only use what lives in that legacy library file.

**I think**. Someone correct me if I'm wrong.
> 0 votes

---
Tags: validation
---


title: Channel Form and Permissions

text:
# Question
Title: Channel Form and Permissions
I'm running a site with EE 2.11.9. I have a channel form that allows our members to update the title, description, etc. of the entry However, they can't edit the categories unless they belong to a Membership Group 1.

If a user belongs to Membership Group 1, then everything works fine. However, if they belong to Membership Group 2, then the categories are erased when they hit Submit to save the form.

Here is my code:

```
{if member_group == '1' }
<select name="category[]" id="categories" size="8" multiple="multiple">
    {categories show_group="12"}
        <option value="{category_id}"{selected}>{category_name}</option>
    {/categories}
</select>
{/if}

```

If I remove that part from the Channel form, then everything works fine (except admins can't edit the categories).

Any suggestions on how to save the current categories if you aren't an admin?

# Answer
It's not EE related and maybe wrong. But you can hide (with css) if member\_group\_id != 1
> 2 votes

---
Tags: safecracker
---


title: Temporaily disable conent management

text:
# Question
Title: Temporaily disable conent management
Is anyone aware of a way (add-on or other) of temporaily suspending a member group from publishing content?

For example when perfoming dev tasks my process is normally somethig like this (simlified for brevity):

* Sync live database to local working copy (via SQL dump)
* Perform dev tasks
* Push workgin copy code to live server
* SQL dump of wokring copy database to live server

Oviously, any changes to the DB on the live server during this period would be overridden.

I know I can disable CMS access to a certain member group for a period of time, but this shows a rather bland Forbidden message - which can be quite shokcing to client. It would be nicer to let them login to the control panel and show them a friendly "content freeze" message or similar.

Any thoughts? How do you manage this situation when dealing with a site where the client has publising privilages?

# Answer
I just tell clients not to change anything between the hours I'm working on the site, and any changes made during that period will be lost.
> 0 votes

# Answer
You can use this add-on:

https://devot-ee.com/add-ons/cp-pad-lock

You'll need to update it to work with EE4/5, which is a pretty easy to accomplish. I've done it myself and even created a CP page where you can edit the message users receive when they try to log in.

However, I would never consider freezing content for simple dev work. And I certainly would never make database changes on a local copy and push it to your true source copy (production database). That scares me (and my clients).
> 0 votes

# Answer
You can also revoke the channel posting rights for the member group temporarily
> 0 votes

---
Tags: control-panel, ee5
---


# Question
Title: EE 2 and Transcribe - Get related entry ids
EE 2.9.3 Transcribe 1.6.2

I have an older EE site where I need to output the entry\_id of the associated translated entry.

Something like this:

on the English listing page:

```
English title
English Summary
  - French Entry ID

```

And then on the French page this:

```
French Title
French Summary
  - English Entry ID

```

Is this possible? If so how? Maybe through a database query? Not sure how to do that either. FWIW I can't upgrade to the latest EE or transcribe.

Looking in the database I see a table `exp_transcribe_entries_languages` with a column of `relationship_id` that contains a hash which is duplicated on associated entries. other columns are `id`, `language_id`, and `entry_id`

So two entries that are related to each other include:

```
id    language_id   entry_id  relationship_id
1372      1           1372     5bf41ee76f1ef
1376      2           1376     5bf41ee76f1ef

```

You can see the relationship\_id matches. Is there a database query that I could put in a template so that I can output the entry id of the opposite language. Where langauge\_id of 1 = english and 2 = french

something like this:

```
{exp:channel:entries channel="news" limit="5" disable="member_data|comments"}
    <h2>{title}</h2>

    <p>Current Language Entry ID: {entry_id}</p>
    <p>Other Language Entry ID: db_query_here</p>

  </article>
{/exp:channel:entries}

```

Thank you.

# Answer
looks like you could use this according to the docs:

```
{exp:transcribe:language_links has_entry="yes"}{languages}{rel:entry_id}{/languages}{/exp:transcribe:language_links}

```
> 0 votes

---
Tags: ee2, transcribe
---


# Question
Title: File field tag within relationship tag not working
Recently, I upgraded an EE2 website to EE5.1.2. Before EE upgrade, I imported Playa into Relationships field. Everything working perfectly except file tag within relationship isn't outputting correct file/image path. Code example is as below:

```
{exp:channel:entries channel="CHANNEL_NAME" limit="1" disable="member_data|pagination" status="open" require_entry="yes"}
{relationship_field}
<img src="{relationship_field:thumb_image}" alt="{relationship_field:title}" />
{/relationship_field}
{/exp:channel:entries}

```

It might work nicely but not working :(

# Answer
Have you verified your path settings have not changed during the upgrade?

What does the code output?

Should your `alt="{title}"` actually be `alt="{relationship_field:title}"`
> 0 votes

---
Tags: relationships, ee2-upgrades, files
---


# Question
Title: CP login impossible when cookie_secure set to 'y' despite SSL certifications in place
I've tried just about every fix one can find searching google and these forums for these issues. (FWIW, SSL is being used for the entire site, both on this relevant subdomain and otherwise, working and tests fine.)

```
$config['cookie_secure'] = 'y';
$config['disable_csrf_protection'] = 'n';

```

With the above settings, I get the form has expired error.

```
Error: This form has expired. Please refresh and try again.

```

Changing the latter config to 'y', the login form page just refreshes with a new session ID in the URL but never logs in, whereas...

```
$config['cookie_secure'] = 'n';
$config['disable_csrf_protection'] = 'n';

```

.. enables me to log in just fine. As does:

```
$config['cp_session_type'] = 's';
$config['cookie_secure'] = 'y';
$config['disable_csrf_protection'] = 'y';

```

Turning off csrf protection results in the same form expiration error. Below are the relevant config settings I'm currently using from config.php (working login):

```
$config['cp_session_type'] = 'cs';
$config['cookie_domain'] = '.sub.mydomain.tld'; // is correct
$config['cookie_prefix'] = '';
$config['cookie_path'] = '';
$config['cookie_httponly'] = 'y';
$config['cookie_secure'] = 'n';
$config['disable_csrf_protection'] = 'n';

```

If it's relevant, ExpressionEngine is running on Apache behind an Nginx proxy, and everything else is functioning appropriately, so far as I can tell. I'm at a loss as to what to do at this point. Since the server is only accessible via https, I don't think there's much issue leaving cookie\_secure set to 'n', but if anyone has any idea how to resolve this, I'd appreciate the help.

Thank you very much.

# Answer
Might sound silly, but have you messed with Cache settings at all? Cleared the cache, used a different cache driver, or disabled the cache altogether? I had a similar form issue that was solved by disabling file caching.
> 0 votes

---
Tags: control-panel, login, cookies
---


# Question
Title: Display different content if the base-domain contains ".uk" or ".co"
```
{exp:channel:entries
    channel="homepage_banner"
    orderby="{ban_strt_date}"
    sort="asc"
    status="open"
    limit="5"
    url-title="{site_url}"}

    {if url-title *= ".uk"}
    <div class="test">
        <h1>Display this</h1>
    </div>
    {/if}

```

Looks like I have got the syntax right. But because of this part of code, the entire test site is down and all it displays is just "dd" in entire page body.

# Answer
> 0 votes
`url-title` is not a valid parameter for the Channel Entries tag. You need to use `url_title`.

Also, if you are looking to change content based on the TLD, you might need to write a plugin that spits out the actual domain request, as `{site_url}` will always be constant, regardless of what the HTTP request is. Unless you have cooked up some magic with the MSM already, but it doesn't look like it.

# Answer
> 0 votes
I might tackle this simply with jQuery, adding a class to content based upon URL and then using CSS to display that class.

# Answer
> 0 votes
Well it's look like very strange. If you need to display more than one website based on any domain then you should go for **MSM(Multi Site Manager)**. And if you want to display content on different language then you should use **Publisher** or **Transcribe** plugin.

Your code looks wired and `url-title` is not valid parameter `url_title` is the valid one. You can take reference from EE Docs. Definitely this code slow down your website for sure. You should use EE syntaxes.

---
Tags: channel-entries, conditionals, channel, codeigniter
---


# Question
Title: EE contact form - interact with POST data before sending email
We're running ExpressionEngine 3.5.17 and using the in-built contact form.

We have a requirement whereby if someone completes the "From" email address on the form, and it originates from a certain domain - let's say `example.com` \- the email should not be sent.

The problem with this is I can't see what to modify/extend in EE which would make this possible.

The form is fairly basic in that we are using tags in a template:

```
{exp:email:contact_form recipients="foo@bar.com" form_id="downloadResourceForm" redirect="none" charset="utf-8"}

    <!-- Form fields -->

    <input type="email" class="form-control" id="email" name="email" placeholder="Email address" required>

    <!-- More form fields -->

{/exp:email:contact_form}

```

I understand that in vanilla PHP I could access the "email" field in the POST data with `$_POST['email']`. However I don't know how to interact with this because EE is handling the form submission via it's own scripts.

I'm also aware of not modifying EE core files - so how do you "override" the EE code in a way that makes upgrades safe?

# Answer
In stead of using in built `exp:email:contact_form` modifying core files of EE I am suggesting you to use FormGrab. This plugin is very simple and easy to use. You can create and integrate **Contact form** very easily.

To achieve your requirement **(interact with POST)** this plugin has hook from which you can modify and validate the data by creating simple extension file.

And main thing is, it comes up with no Cost. **It is free.** I think this plugin suits your requirement.
> 0 votes

---
Tags: ee3, php, email-contact-form
---


# Question
Title: Cart throb and expresso store same install
Is it possible to run expresso store and cart throb on the same install for ee 2.9? Both for separate areas of a portal that doesn’t take any payment for orders. It’s used as an internal ordering system.

# Answer
> 0 votes
Yes you can. As you're not using payments you should be fine.

---
Tags: expresso-store, ee2, cartthrob
---


# Question
Title: How to change other entries values when an entry is saved/updated
I have a channel with some fields. One of them is an on/off value (let's say toggle field type). I want to be sure that I have no more than one entry with on (or true) value for that specific field. In other words, when an entry is saved or updated, I should check value of that specific field and if it is turned on, I must turn off that field value of any previous entry which has true value for that field. What I have tried so far was:

1. Trying to create a custom fieldtype by extending toggle field, but in post\_save method I do not have access to current entry DB id to update other entries except the current one. The only thing I have is the saved value of the field.
2. Trying database triggers, so that if the new value of the updated/inserted record is 1 (or true), update any other record which has value type of 1 (from 1/true to 0/false). It was not possible since mysql does not let you run queries on the same table as the one you are writing trigger for.

Thanks in advance

# Answer
> 1 votes
Can you explain further *why* you need to accomplish this? It seems like an odd functionality to implement. Could you just make one entry sticky at a time?

You could create an extension, and I can explain further in another answer if you really want to do this, but honestly I can't see why you wouldn't just use a single special entry status for the "active" or "tagged" entry, and just switch the old entry to just "open" or "closed" when you create a new entry you want tagged with this toggle idea. I also don't like the idea of avoiding a a proper audit trail by bypassing the Channel Entry API altogether and bulk updating DB fields in this manner.

Perhaps if you could explain why you need this functionality, we possibly can provide you with a simpler answer than what it seems you'd like to do.

---
Tags: channel-entries, custom-fields, fieldtype, entries, fields
---


title: Channel:form tags not working

text:
# Question
Title: Channel:form tags not working
I am new to expression engine, I am trying to create a form with the channel:form tags but whatever I put in the tags don't show up on the website. Do I have to activate channel form tags in the settings somewhere?

# Answer
You need to do a few settings from backend to work with Channel form. You can find these settings from **Settings** tab of **Channel Manager**. Please see screenshot below to change Channel form settings. I hope this will work for you.
> 0 votes

---
Tags: safecracker
---


title: Multiple Channel Import Shared Fields

text:
# Question
Title: Multiple Channel Import Shared Fields
Using a basic example. If i want to import - Pages channel & News channel

And they both use SEO Title, SEO Desc fields. When importing the second zip, it errors out and needs the fields renaming. Which defeats the purpose.

Is this just not a currently available feature?

# Answer
Currently - i manually combined the files in the field folder. And then modified the JSON file to do what i wanted.

It works, just cumbersome!
> 0 votes

---
Tags: channel, import
---


title: Can I search using relationship field?

text:
# Question
Title: Can I search using relationship field?
I'm coming from EE 1.6 and currently migrating to EE5. I have noticed issues when using the Simple Search Form and relationship fields.

My tag:

```
{exp:search:simple_form
    channel="books|authors"
    show_future_entries="yes"
    result_page="result"
    where="all"
    search_in="everywhere"
}

```

My channel relationship:

> Parent Channel: Books
>
> Child Channel: Authors

*Include in search setting* is enabled for the relationship field.

Example search text: David.

Search result only shows entries from Authors channel.

I'm expecting the result to also show entries from Books channel which has David as the author. (not to be confused with EE channel author).

Is this is a bug / not supported feature?

# Answer
> 0 votes
The simple search tag as its name suggests provides a simple search service. With the settings in your code snippet it should return details of channel entries in the "Books" and "Authors" channels that contain the word "David".

It looks from your question that what you actually want is to be able to list out the Books that include an author with "David" in their name - even if the Book entry itself does not.

One way to do this is to use each result returned by search that is from the Authors channel to generate a list of the books that Author has a relationship with in the Books channel (i.e. list out the Author entry's Parents). The way to do this is well described in the EE documentation \- and if you do this you might end up with code a bit like this:

```
{exp:search:simple_form
    channel="books|authors"
    show_future_entries="yes"
    result_page="result"
    where="all"
    search_in="everywhere"
}

{if channel_short_name == "authors"} {!-- We've got an Author result --}

<h3><bold>Author: </bold>{title}</h3>
<p>Books:</p>
<ul>
{parents field="relationship_field"} {!-- You should replace this with the name of your relationship field --}
    <li>
{parents:title} - {parents:field1} - {parents:field2}
    </li>
{/parents}
</ul>

{if:else}  {!-- We've got an Book result --}

<h3><bold>Book: </bold>{title}</h3>
<p>Authors:</p>
<ul>
{relationship_field} {!-- You should replace this with the name of your relationship field --}
    <li>
{relationship_field:title} - {relationship_field:field1} - {relationship_field:field2}
    </li>
{/relationship_field}
</ul>

{/if}
{/exp:search:simple_form}

```

Hope this helps.

---
Tags: relationships, simple-search, ee5
---


title: User addon and preload replace

text:
# Question
Title: User addon and preload replace
I'm using preload replace to show a specific entry for a user, but the variable always displays the first option in the list. What am I doing wrong?

```
{exp:user:profile} {categories group_id="5"} {category_body}

{if {category_id} =="10"}{preload_replace:entryId="10"}
{if:elseif {category_id} =="11"}{preload_replace:entryId="9"}
{if:elseif {category_id} =="8"}{preload_replace:entryId="8"}
{if:else}{preload_replace:entryId="7"}{/if}

{/category_body} {/categories} {/exp:user:profile}

```

# Answer
> 1 votes
**None** of your conditionals are affecting the value of your preload-replace.

Preload replace processing happens very early in the template parsing engine. The engine simply applies the first value you give. You can't assign preload replace variables dynamically.

From the docs:

> ExpressionEngine allows you to assign text to be replaced prior to a template being parsed, to save time typing and editing certain bits of text that might get used multiple times. Preload Replacements act as a straight string replacement for use later in the same template.

I personally have always solved my problems without this add-on, but it seems that most people use Stash as an easy way of getting around and setting variables in templates (which is against the point of a template):

https://github.com/croxton/Stash

Read the Stash docs and maybe it'll work for you, but I would recommend rethinking your execution as I would bet you can just avoid what you're trying to do using the native engine.

# Answer
> 0 votes
As above I decided to put the following in a partial template:

```
{exp:user:profile} {categories group_id="5"} {category_body}
    {category_id}
{/category_body} {/categories} {/exp:user:profile}

```

Which allowed me to bring this into the page template:

```
{if { [name-of-partial-template] }=="10"}

  ...entry_id="10"...

{/if}

```

And so on

---
Tags: preload-replace
---


# Question
Title: Paypal button triggers "This form has expired" error
Freeform forms work just fine. Only the PayPal button gives me this error. Any ideas what's wrong?

Some answers to similar issues suggest disabling csrf protection (like so: $config\['disable\_csrf\_protection'\]). But I have no idea where to do/try this.

I'm using the latest EE version (5.1.2)

# Answer
I'm not totally clear on the PayPal aspect here (would probably need to see more of your template code), but if you're just talking about disabling CSRF protection for forms handled by ExpressionEngine, and specifically using `$config['disable_csrf_protection'] = 'y';` then that is something you need to do in your ExpressionEngine config file.

From the docs:

> By default, ExpressionEngine’s system settings are managed in the Control Panel and stored in the database, but these settings can be overridden with one of 3 configuration files: the main configuration file, the site index file, and the CP index file.
>
> The main configuration file, found at system/user/config/config.php, is loaded every time the system is run, meaning that config overrides set in config.php always affect the system’s configuration.

https://docs.expressionengine.com/latest/general/system\_configuration\_overrides.html

https://docs.expressionengine.com/latest/general/system\_configuration\_overrides.html#disable-csrf-protection
> 1 votes

---
Tags: paypal
---


# Question
Title: Problem using grid field to feed the labels in a radio field
I’m hoping I can get some help with a problem I’ve been struggling with for a few days. I’m looking to maintain about 10 radio fields that can each be used many times over for a website that will include quizzes. All of the fields will have option values A, B, C, but the labels will vary depending on the quiz. I have one channel where the values will be saved for the users in a separate radio field, and another channel where the labels are in grid fields.

In my template, I have channel entry tags nested inside channel form tags. The answers are being saved properly, but I’m having trouble getting the labels to display correctly. If I have the code as below, it displays the label for option A 3 times, but the radio field saves correctly, depending on which button I select. If I remove the limit, everything repeats 3 times, but still save correctly if I select the 1st, 2nd, or 3rd option from any of the repeats.

Within the channel entry tags I have the following code, where ‘dp1\_check’ is the field that holds the answers in the channel 'sd101\_interact', and ‘decision\_point\_1:dp\_option’ is column in the grid field with the labels in the channel 'sd101\_decision\_points'. The grid field also contains other columns related to the option selected, such as the feedback response for each option, the order (A/B/C), and the question. The grid has 3 rows, one for each option.

```
{exp:channel:form
  channel="sd101_interact"
  url_title="{logged_in_member_id}interact"
  return="/…."}
    {exp:channel:entries
       channel="sd101_decision_points"
       url_title="sd101fpd"
       dynamic="no"}

{decision_point_1 limit="1"}
    {options:dp1_check}
          <input type="radio" name="dp1_check" value="{option_value}" {checked}>{decision_point_1:dp_option}<br>
     {/options:dp1_check}<br>
 {/decision_point_1}

  {/exp:channel:entries}
{/exp:channel:form

```

Could someone give me an idea of how I can make this work, so it pulls the labels once for each option. I attempted an embed for the label, but it just displayed all 3 options for each radio button.

Thank you.

# Answer
> 0 votes
You can simplify your problems by un-nesting the `channel:entries` tag: it does not use any information from the `channel:form` response to modify the `channel:entries` call, which means nesting the call is not required to get the right output. So do this call elsewhere and store the values, then just retrieve them later as needed (e.g. within the `channel:form` tag pair).

You could do this using stash, but personally I prefer to use layout variables, specifically `{layout:set:append...}`, for this type of thing.

One approach using layout variables would be to store the output of your `sd101_decision_points` channel entries tag using `{layout:set:append...}` on a parent template and then retrieve these values within the channel form tag (which would need to be on a later template in the layout series). To step through the values in the array (to get A, B, C answers) use the `count` variable of the `channel:form` options loop as the `index` value in the tag to retrieve the layout variable - vis

```
{layout:label_array index='{count}'}

```

**How this worked in practice**

Here is a refactoring of the code to use layouts as suggested: it works (and formed the basis of the solution used on the site).

1 - Make a duplicate copy of your template, and name it with the same name as the original but with `_1` appended (or some other memorable related name). In the example below it is renamed as "cats.html".

2 - Replace the content of the original file with this simpler version - which has the sole purpose of capturing the values of the option labels / values from channel `sd101_decision_points` and the status of the response from `sd101_interact`, then sending on template processing to the second copy of your original template (now called 'cats').

```
{layout="sd101/cats"}
{exp:channel:entries
    channel="sd101_decision_points"
    url_title="sd101fpd"
    dynamic="no"}
    {decision_point_1}
        {layout:set:append name='label'}{decision_point_1:dp_option}{/layout:set:append}
        {layout:set:append name='value'}{decision_point_1:order}{/layout:set:append}
    {/decision_point_1}
{/exp:channel:entries}
{exp:channel:entries
    channel="sd101_interact"
    url_title="1interact"
    dynamic="no"}
    {layout:set name='selected' value="{dp1_check}"}
{/exp:channel:entries}

```

3 - Now modify your original template to use these layout variables. The main difference from the original is replacing the EE `options:my_field` construction with a long-hand way of building the form (to make it possible to use the `{index}` variable to retrieve the stored layout variables. Something like:

```
{layout="layouts/.sd101_main"}
{exp:channel:form
    channel="sd101_interact"
    url_title="{logged_in_member_id}interact"
    return="sd101/fpd7494"}
    {layout:value}
        <div>
            <input type="radio" id="dp1_check_{index}" name="dp1_check" value="{value}" {if value == layout:selected} checked {/if}>
            <label for="dp1_check_{index}">{layout:label index="{index}"}</label>
        </div>
    {/layout:value}
    <button type=“submit” class="btn btn-default btn-lg">DECISION SELECTION</button>
{/exp:channel:form}

```

Notice the use of the `index` parameter in the `{layout:value}` loop in the second template fragment - this makes it possible to link the names of the saved `label` and `value` options specified.

There are obviously lots of other games you can play with this sort of approach, but hopefully this gives you an idea of how it might work.

HTH

---
Tags: safecracker, grid, checkbox
---


title: Updates Available not visible in EE CP

text:
# Question
Title: Updates Available not visible in EE CP
I have version 3.0.6 of the Calendar installed on my local EE and on our production environment. On my local EE CP, I see the 'updates available' at the bottom of the Calendar settings with a description of three updates but on our production CP, I do not see 'updates available' at all. Does anyone know why this could be?

Thanks in advance for your help.

# Answer
It could be that your EE cache directory is not writeable, and Calendar isn't able to copy the changelog file over to it (necessary for Calendar Update service to display the contents in Calendar CP.

At any rate, as of writing this, Calendar 3.1.1 is available, and you can download the latest update from your account by visiting your account.
> 0 votes

---
Tags: solspace-freeform, solspace, solspace-calendar
---


# Question
Title: Need help upgrading EE along with PHP on my website
I have a website built in ExpressionEngine but my developer is no longer working with freelance clients. I recently received a notice from my hosting company that my website's PHP is out of date and I have until March 1 to upgrade to PHP 7.2 or start paying an $8 monthly fee. I am looking for a developer who could help me with upgrading both EE and PHP so my site keeps working and I can avoid the monthly fee. Willing to pay of course! Not quite sure how this board works and if you'll be able to email me off of this post - let me know if you need additional information. Thanks!

# Answer
Upgrading EE can be challenging, particularly if you are starting on EE2 or earlier. See my answer to an earlier question on this for more.

There are many people and firms around who can help you - including JCOGS Design! I am not sure what options exist for person-to-person communications via StackExchange, or what the policy is for including contact info in answers is: but you can grab a link to the JCOGS Design website from the stackexchange profile. Get in touch using the contact info there (or email contact (at) jcogs (dot) net and we can discuss your options for getting the upgrade done etc.

If you would like to widen the search, a good place to post your request is the "Jobs" channel in the Expression Engine Slack: many highly experienced EE wranglers hang out there, and I'm sure you will quickly get multiple responses to your request.

HTH
> 0 votes

---
Tags: php
---


# Question
Title: Adaptive Images: CE Image vs. Standard EE Image Manipulations
I made a site which uses CE Image for adaptive images. It uses the instructions at https://www.aaron-gustafson.com/notebook/adaptive-images-in-expressionengine-with-ce-image/ to do this. You can see this in action if you search "srcset" in the first link's source code.

But I'm wondering, wouldn't the standard image manipulations be just as good? I'm talking about the "Constrain or Crop" part of your Upload Directory, where when you upload an image, EE automatically creates derivatives of it.

Or maybe I'm oversimplifying things?

# Answer
> 1 votes
The major difference is the amount of features and optinos ce image gives you. things like limiting filesize, compression etc. Also, CE image doesn't rely on images uploaded through EE. It handles external images, and saves the images locally. But if it's just resizing/cropping the EE mechanism works just fine

---
Tags: ce-image
---


# Question
Title: "invalid form id(s) submitted" error for a FreeForm Pro form
Several users are complaining about this error whenever they try to submit one of our online forms: "invalid form id(s) submitted".

The problem is I can't replicate this error. Also, many people have submitted the same for without any problems.

I found this link http://www.solspace.com/forums/viewthread/13745/#55777 which suggests it's to do with XID hash. If so, how can I set it so it doesn't expire.

Am using EE v2.4.0 FreeForm Pro 4.0.7.

Abdi

# Answer
> 3 votes
The only way to prevent forms which use EE's form hashing security is to disable secure forms altogether. Some modules have a setting to disable it per-form, but it appears that Freeform does not.

Most often this error comes up when people use their "back" button and the page is loaded from the cache, not reloaded from the server.

# Answer
> 1 votes
I would first suggest upgrading the the most recent version, 4.0.10 (as of the time of this writing.)

Some possible things happening:

Are you using .htaccess to remove or add www. to your website? If so, make sure whichever one you are redirecting to is set that way in your config file. Freeform uses EE's built in functions to build the submission URLS which in turn uses the config file's set base url. Thus, if you are redirecting with .htaccess to www, but your config is *not* set to www.site.com/index.php or whatever, every single link built with EE is without www. and is redirecting. This means any POST variables are lost due to the redirect.

Are they loading the page and waiting multiple hours to submit it? Secure forms has a 3 hour timeout.

# Answer
> 0 votes
I had the same problem and the cause was that template caching was turned on. Everything worked fine once it was disabled.

# Answer
> 0 votes
I've had reports of this error, too. The problem ended up being the time it takes to complete the form. Is this a form that would take your user a while to complete?

# Answer
> 0 votes
It's not just the CSRF token (previously called XID hash), which needs to be refreshed, it's also the hidden field called `params_id`. That field links up with the form parameters in `exp_freeform_params`, and only lasts 24 hours. So if you're doing any caching (such as full page or fragment caching with Stash or CE Cache), you'll need to find a way to refresh both those things. Personally I find it convenient to use full page caching and then reload Freeform forms dynamically via Ajax. Naturally, this creates an unfortunate JS dependency for completing the form... but actually that dependency can help to reduce spam, so swings and roundabouts...

Stash has the `stash:nocache` tag pairs which can help in escaping parts of cache fragments, which is sometimes a better solution, but that can get extremely complicated when nested caches and embedded templates are involved.

---
Tags: forms, solspace-freeform, error
---


# Question
Title: Deleting a site and all content associated with it
I'm currently running EE version 2.9.0 in a multiple sites installation. I was wondering what is the best way to delete a site and all the content associated with it.

If I click in one of the sites on the top right corner I can see the option to "edit sites" and from there I can see the option to delete, but my question is:

Will this also delete all channels, entries and channel fields associated with this site from the DB?

After that would be safe to delete all uploaded files on my server?

What I'm trying to achieve here is to make sure that when I delete the site I won't have a lot of "garbage" left on my DB.

Thanks!

# Answer
> 0 votes
Look in this file:

```
system/expressionengine/controllers/cp/sites.php

```

You can find the `delete_site` function, and please do and review it yourself. It essentially drops any database rows where the `site_id` column matches the `site_id` of the site you are deleting. There is really too many removals to go through and list in an answer, but my take away would be that it does properly remove everything.

I would say you should be wary about third-party field types that work across sites, as they may have invalid data after you remove the site. For example, if you use Playa (which is like a relationship field), deleting a site won't remove Playa relationship data that another site might have towards entries on the site being deleted.

---
Tags: ee2, multiple-sites
---


# Question
Title: Issue with saving templates after upgrade
I have upgraded an EE 1.6.8 website all the way to the latest EE 5, but now I have a problem with saving templates. When I try to save a template after editing, the homepage shows up and the template is not saved... it's not a redirect to the homepage, because the url still points to `system/index.php?/cp/design/template/edit/16&S=c81740cc76a21628dcf01628398632f0`

The weird thing is this doesn't happen to any template, some work fine, and there doesn't seem to be any logic in which work and which don't.

Any help is appreciated!

**EDIT:** When the template contains one of the following strings it refuses to save:

* `<!DOCTYPE`
* `<html`
* `text/javascript`
* `<meta`
* `<link href=`
* `<?`

# Answer
> 0 votes
Sounds a bit if there's an authentication issue. Can you try to set your cp session type to cookies only? abd delete your old EE cookies?

---
Tags: templates, upgrade, ee5
---


# Question
Title: Is CE_image compatible with EE version 5?
Updated to version 5 of ExpressionEngine, and CE\_image has seemed to stop working.

# Answer
> 1 votes
CE\_image 3.0.1 works on EE5 installations, but pre-dates the release of EE4/5 by some time, so it is quite possible that it does not work so well with aspects of EE that were changed or introduced in these newer versions.

If you post some more details about what issues you are having, and the versions of EE and CE\_Image you are using, it might be possible for others to give you some guidance about how to get it working.

HTH

# Answer
> 0 votes
I'm using it and seems to work just fine

# Answer
> 0 votes
I think it should work for you because I have used latest version of **CE Image** in couple of websites. And it works like a charm.

---
Tags: ce-image
---


# Question
Title: Issue trying to remove entries on one page not displaying on another
I'm very new to EE so forgive my lack of actual knowledge of the correct terms for channels/entries etc.

We have page entries (the coloured blocks of text)on our charity website which allows you to make a donation to a specific fund - https://www.royalfreecharity.org/give/funds

I want to be able to remove the individual items from this page but when we do it removes the entry from the drop down list on our general funds donation page - https://www.royalfreecharity.org/donate/fund.

is there a way of changing the coding so that if we turn off the entry in one list it will still appear on the drop down donation page.

Here is the current template code

```
{exp:channel:entries
    channel="donate_funds"
    disable="categories|member_data|pagination"
}
<div class="grid6 [...]">
    <div class="grid-donate" style="[...]">
        <a href="{url_title_path='donate/fund'}" class="grid-link">
           <h2 class="grid-heading">{title}</h2>
           <p class="grid-summary">{donate_summary}</p>
                [...]

```

# Answer
One way to accomplish this is through the use of categories. You can set up a new category group (eg Menu and Listing Visibility), assign it to this Channel, then create categories that control where you want an entry to appear.

* show on main listing
* show in menu
* etc

Just assign categories as appropriate for the entry. Then in your templates you can use the `category` parameter on your various `channel:entries` tags to out\[ut the desired entries.

There are other ways of doing this, for sure, but based on what I know about your setup I think this would be a good route. And the Edit entries page in EE has good category filtering, as well as the ability to apply/remove categories en-masse.
> 0 votes

# Answer
I would add a toggle field to your channel called "visible", and then add a search parameter to the channel: entries tag to limit the results to only those entries that have the "visible" field set. So your tag in you code example changes to become:

```
{exp:channel:entries
    channel="donate_funds"
    disable="categories|member_data|pagination"
    search:visible="1"
}

```

If you then use the same channel entries call elsewhere (e.g. when generating your menu) and leave out the search parameter you will get all the entries listed there.

This is similar to the approach suggested by Alex, but perhaps simpler if all you are wanting to do is not show the entries in some places.

HTH
> 0 votes

---
Tags: channel-entries, categories
---


# Question
Title: Site is loading (slowly) and pingdom shows 503 error
I've got my site running onnline at https://bartlett100.com/

(Holding page only unless logged in as super admin)

The site loads, but the initial page load is very slow. it's just the initial doument request, the rest of the assetts load fine after this.

Also, speed tests like Pingdom return a 503 error, even though the site does load.

https://tools.pingdom.com/#5a2676fdcfc00000

Could this be causing the slow loading. Could it be a problem with the .htaccess file which i'm using to remove the index.php from the URL?

This is what I have in there:

```
<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /

    # Removes index.php from ExpressionEngine URLs
    RewriteCond %{THE_REQUEST} ^GET.*index\.php [NC]
    RewriteCond %{REQUEST_URI} !/system/.* [NC]
    RewriteRule (.*?)index\.php/*(.*) /$1$2 [R=301,NE,L]

    # Directs all EE web requests through the site index file
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ /index.php?/$1 [L]

```

Any ideas?

Thanks

# Answer
I had that problem when the site was offline. Can you try with the site online?
> 1 votes

---
Tags: loading-time, speed
---


# Question
Title: Why do I get Solspace Freeform error: the form has expired?
I am running EE 3.5.15 with Solspace Freeform 5.1.2. Any time I attempt to submit a form I get the following error:

> This form has expired. Please refresh and try again.

I have searched extensively for information on this and it always refers to:

```
<input type="hidden" name="csrf_token" value="602778b7a9b1649d742ca1080e8591c1091b97d5">

```

This is in place. Is there anything else that could be causing this? I have cleared the cache.

# Answer
> 0 votes
I had an issue recently that had the same symptoms: EE + Freeform and I was always getting the error message, "This form has expired. Please refresh and try again." I was not using any ExpressionEngine caching. I was, however, using AWS Cloudfront and even though I was excluding the pages with my form from being cached by Cloudfront, I was still getting the error.

The issue turned out to be that Cloudfront was not passing through query strings and cookie data that Freeform Next / Freeform Pro was expecting. As such, even though the CSRF token was valid and included in the POST data, other data was missing. I updated my Cloudfront behaviors to pass through all query string and cookie data which can decrease performance, but since I don't want pages with CSRF tokens cached, anyway, is something I am willing to suffer.

If you are using Cloudfront, here are the steps I used that solved my problem:

1. In your Cloudfront distribution, add a new behavior
2. Set the correct path pattern
3. Set "Allowed HTTP Methods" to "GET, HEAD, OPTIONS, PUT, POST, PATCH, DELETE" (this ensures that POST data can still be sent)
4. Set "Cache Based on Selected Request Headers" to "All" (this prevent the matching resource from being cached)
5. Set "Forward Cookies" to "All"
6. Set "Query String Forwarding and Caching" to "Forward all, cache based on all"
7. Save the behavior and wait for it to be deployed to the edge caches

Your mileage may vary based on your specific setup, but if you've tried everything else, look and see if you might have a similar issue with query string and/or cookie forwarding.

---
Tags: solspace-freeform, solspace
---


title: Simple Registration group_id error

text:
# Question
Title: Simple Registration group_id error
@bjornbjorn Got Simple Registration and trying to use it for a front end member registration form, but getting the following error when trying to register via the form:

```
The form you submitted contained the following errors

group_id: You must select a valid group.
```

I'm using EE 3.5.10 - the member settings should allow member registrations, and it's set to require admin moderation:  The "pending" group does exist.

Please help!

# Answer
This response is probably too late for you, but I've just had the same issue with the built-in EE member registration.

The solution seems to be, under Control Panel \> Members \> Member Groups, to unlock the groups that you are allowing members to join. Click on the member group name and click on the Security Lock switch.
> 1 votes

# Answer
You need to add the group\_id to the form as a select field, with the option value being the id for example...

```
 <select name="group_id" id="">
    <option value="1">Bookings</option>
    <option value="2">Members</option>
    <option value="3">Admin</option>
  </select>

```

Then it will work.
> 1 votes

---
Tags: simple-registration
---


# Question
Title: EE 3.5.17 Infinite redirect (302) loop when logging into CP
I am new to the EE community. I came across a situation today that myself and my co-workers could not figure out. I am running a site locally on docker containers (Ubuntu, PHP 5.4, Apache 2.2.22, MYSQL 5.5.44). The site was on EE 2.6.1 and I followed the guide to upgrade it to EE 3.5.17. The upgrade seemed to go through. I can see the frontend of my site; however, when I try to login to the CP, I get an infinite redirect (302) loop until Apache hits its URI size limit.

The network tab on my browser looks like

http://site.test/asdfjkl.php 302 redirect to http://site.test/asdfjkl.php?/cp/login&return= 302 redirect to http://site.test/asdfjkl.php?/cp/login&return=DHDHDHD 302 redirect to http://site.test/asdfjkl.php?/cp/login&return=DHDHDHDFTFTFTFTF 302 redirect to http://site.test/asdfjkl.php?/cp/login&return=DHDHDHDFTFTFTFTFRURURURU

I removed my .htaccess file completely to see if it was causing the issue and I got the same results when trying to login to the CP.

I tracked down where the redirects were happening in the EE code.

When booting a CP, system/ee/EllisLab/ExpressionEngine/Core/Core.php (line 188) is called. It tries to create a new class:

$controller = new $class;

When that class is initiated, run\_cp() in system/ee/legacy/libraries/Core.php (line 471) is called. It checks to see if a Admin session exists, it does not, so it redirects:

ee()-\>functions-\>redirect(BASE.AMP.'C=login'.$return\_url);

It seems that this function is called over and over again until Apache stops it because the length of the URI.

I really appreciate any advice you might have to give. Thanks!

Note: site.test -\> EE 3.5.17 site running locally on docker container asdfjkl.php -\> fake name for my admin.php file DHDHDHDFTFTFTFTFRURURURU -\> fake string

# Answer
I believe this happened because (1) I did not have addon.setup.php for a custom module or (2) I had uninstalled a module that I actually needed before performing the upgrade from EE2 to EE3. I walked through the upgrade again and it worked the second time around when I had corrected the two issues above. Hope this helps someone else at some point.
> 1 votes

---
Tags: control-panel, ee3, login
---


# Question
Title: New site created without any structure or channels
I'm running an EE 3 install using multiple site manager. When clicking create new site, I can create a new site and name it properly, but it is not importing the channels and field groups from the previous site, nor am I getting any sort of option to import/duplicate/copy them.

I've spent time researching the problem and the nearest I can come is that in EE 2, you were given the option to select which items to duplicate when running MSM, but in EE 3 and beyond, it simply duplicates the site that you currently have selected. Is this untrue or is there some step I'm missing to allow me to duplicate the channels and structure of the other site?

# Answer
> 0 votes
It sounds like your copy of EE3 MSM is working properly - when you create a new MSM site initially it is empty of templates, data and channels.

The value of MSM is that you can share information between MSM sites - so you can access all the channel information in the other sites from tag-calls in your templates, and simply copy the templates from other sites to your new MSM site if you need to duplicate designs etc.

EE 3.3.0 introduced a facility called Channel Sets to export / import channel definitions which you can then reimport to other sites - if you export a channel set from an site, when you import it to another site it creates a copy of the channel along with any custom fields, categories or statuses that the channel definition uses: it is possible that this feature will enable you to do what you need to.

HTH

---
Tags: ee3, channel, multi-site-manager, structure
---


title: Can't get custom 404 page to come up

text:
# Question
Title: Can't get custom 404 page to come up
We have a custom 404 page set up in our EE 4.3.8 to handle non-existing url requests. I can't get it to work though, the home page always comes up instead. I know this may have something to do with how our .htaccess rules are set up but I can't figure out what is breaking this. We have `ErrorDocument 404 /site/404` in our htaccess file pointing to the correct template but the 404 page never gets displayed, we also have the static page caching rules from the stash documentation and I'm wondering if they are redirecting our bad urls to our homepage? Here is some relevant code below, the 404 rewriteRule is commented out but ucommenting it and the lines before it still redirect bad urls to our homepage.

```
## Redirect to Cache File
RewriteRule ^(index.php/*)*(.*)(/*) /ourStaticCacheDirectory/1/$2/index.html [L]

# Prevent direct access to static cache folder
# RewriteCond %{REQUEST_URI} /ourStaticCacheDirectory/
# RewriteCond %{ENV:REDIRECT_STATUS} ^$
# RewriteRule .* /404 [L]

```

Thanks in advance for any help.

# Answer
> 1 votes
There's a setting here: /cp/settings/template turn enable strict urls on and select the proper 404 template just below it

---
Tags: stash
---


title: Querying for a relationship field

text:
# Question
Title: Querying for a relationship field
I am building a web portal to display a list of servers and their designated applications in an HTML table. The channel I am using for the parent is called 'servers'. Inside this channel, I have a field called 'server\_application' with a type Relationship that is pulling the options from another channel called 'system'. The field in that channel I am looking to grab is called 'system\_short\_name' and will be ultimately what I want to show on the webpage. How do I query for this? Are there parent IDs that I need to match in a SELECT statement? Below is a snippet of the HTML I am using to display the data. The table row that reads {server\_application} is where the issue is. It does not know where I am trying to grab that field entry from.

```
{exp:channel:entries channel="servers"}
 <tr>
      <td><a href="{url_title_path='site/server_detail'}">{title}</a></td>
       <td>{server_ip_address}</td>
       <td>{server_application}</td>
       <td>{server_environment}</td>
       <td>{server_deployment_date format="%M %j %Y"}</td>
 </tr>
{/exp:channel:entries}

```

# Answer
> 2 votes
https://docs.expressionengine.com/latest/fieldtypes/relationships.html#accessing-children

To access the child entry to your Servers channel, just loop over the field like so:

```
{exp:channel:entries channel="servers"}

    {server_application}
        Title : {server_application:title} <br/>
        Short Name : {server_application:system_short_name}
    {/server_application}

{/exp:channel:entries}

```

---
Tags: relationships, query, html
---


title: Can't find the admin tab v.1.6.9

text:
# Question
Title: Can't find the admin tab v.1.6.9
I am currently trying to update my website that I have not touched in years. It is still using EE 1.6.9, and while I was following the update instructions, I came across a hiccup. The instructions tell me that I need to clear the cache, which is found under the admin tab, but there is no admin tab. It goes Edit, File Manager, Pages, Modules and then My Account. I originally hired someone who built the website, and then transferred everything to me so I am confused as to why this is happening.

# Answer
First of all, kudos to you for taking on an EE upgrade project yourself. I am going to warn you that it is non-trivial, and I generally recommend you hire a professional EE developer to do the job. You may have a hard time finding advice for upgrading a 9 year old version, but there may be an old-timer around here somewhere with a better answer.

Most likely the reason you can't see the Admin tab is because your user is in a member group that doesn't have access to the Admin tab. I'm not sure if it works that way with EE1.6.9, as I've only worked with EE2 sites and up, and in EE2+ sites, that is an access permission that can be turned off for any non-SuperAdmin member group.

I also see that your Control Panel is not properly loading themes (I removed the image you posted because it was easy to identify your website, and an 8.5+ year old CMS is going to have security vulnerabilities, so you don't want to advertise who you are), meaning there is likely a path configuration issue, or possibly an expired SSL certificate for your site.
> 1 votes

---
Tags: update
---


title: Database Insert is encoding data

text:
# Question
Title: Database Insert is encoding data
So I have a custom plugin that inserts data from a csv. I build up the array of data and then issue the insert command.

Right before the insert I am dumping my array so I can see the values which are not encoded. This is what is displayed.

```
array(6) {
  ["entry_id"]=>
  string(4) "2642"
  ["site_id"]=>
  int(1)
  ["channel_id"]=>
  int(1)
  ["field_ft_5"]=>
  string(4) "none"
  ["field_id_5"]=>
  string(28) "17524.mp4"
  ["field_ft_6"]=>
  string(4) "none"
  ["field_id_6"]=>
  string(3) "30"
}

```

Then the exception shows the sql query that is built out and this is what the query looks like.

```
INSERT INTO `exp_channel_data`
(`entry_id`, `site_id`, `channel_id`, `field_ft_5`, `field_id_5`, `field_ft_6`, `field_id_6`)
VALUES
('2642', 1, 1, 'none', '1\07\05\02\04\0.\0m\0p\04', 'none', '3\00')

 //

```

My code is right there is. Nothing in between my dump and my insert. I have done something similar to this in the past and never saw anything get encoded.

```
var_dump($channel_data);
$this->EE->db->insert('channel_data', $channel_data);

```

Any tips on where to look would be appreciated. I am on EE 3.5.6 with php 7.2.

Thanks

Edit 1 Here is what I am doing to build the array so I am not converting object to array that I am aware of.

```
// exp_channel_data
                        $channel_data = array(
                            'entry_id'      => $entry_id,
                            'site_id'       => $this->_site_id,
                            'channel_id'    => $this->_clip_channel_id
                        );

                        foreach($this->_clip_channel_fields as $clip_channel_field)
                        {

                            if( isset($clip_channel_field['field_name']) )
                            {

                                $field_id = 'field_id_' . $clip_channel_field['field_id'];
                                $field_ft = 'field_ft_' . $clip_channel_field['field_id'];

                                $channel_data[$field_ft] = $clip_channel_field['field_fmt'];
                                $channel_data[$field_id] = ${$clip_channel_field['field_name']};

                            }
                        }

```

# Answer
> 0 votes
I'm not entirely sure why you are inserting raw data into a well-modeled object.

I would highly recommend you use the internal API for inserting new Channel Entries:

https://docs.expressionengine.com/latest/development/legacy/api/api\_channel\_entries.html

That would be the best way to take external data (say, via your plugin), and create a valid new Entry record. It seems like you are possibly creating invalid records by inserting rows this ways. You'll have to expand on exactly what your plugin does here for us to hone our answers.

---
Tags: database, plugin, character-encoding
---


title: Add to cart form error: page reloads

text:
# Question
Title: Add to cart form error: page reloads
when i add to cart page reloads but cart is still empty.

htaccess:

RewriteEngine On RewriteBase /

```
    # Removes index.php from ExpressionEngine URLs
    RewriteCond %{THE_REQUEST} ^GET.*index\.php [NC]
    RewriteCond %{REQUEST_URI} !/system/.* [NC]
    RewriteRule (.*?)index\.php/*(.*) /$1$2 [R=301,NE,L]

    # Directs all EE web requests through the site index file
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ /index.php/$1 [L]

```

# Answer
> 2 votes
Can you maybe post some template code? and explain how you are adding to the cart? is this a normal link, is it AJAX? Do any errors show in the console? What does template debugging show?

---
Tags: expresso-store
---


# Question
Title: Wygwam is inserting words into the field by itself!
One of my channels has a Wygwam field set to use the "Basic" formatting toolbar. Whenever I save an entry, and then go back in to edit that entry, the word "Schedule" appears as the last line in the Wygwam field. I have no idea where this word would come from.

I have other channels using Wygwam, some of them also using the "Basic" toolbar, but this doesn't happen in those channels.

I don't have any advanced settings or style sheets added to this particular Wygwam field, and "Restrict allowed HTML" is set to "Yes".

I've temporarily changed the toolbar to a different one and that seems to have resolved it for now.

Ever seen this?

EDIT:

I just noticed in the Source view of Wygwam, this code is being written into the field:

```
<p><button class="tw-schedule-btn" id="tw_schedule_btn" style="padding: 4px 6px;position: absolute;left: 141px;top: 840px;background-color: #F7F7F7;  background: linear-gradient(#FFF, #F0F0F0);  border: 1px solid #CCC;  color: #5F5F5F;  cursor: pointer;  font-weight: bold;  text-shadow: 0 1px #FFF;  white-space: nowrap;border-radius: 3px;font-size: 11px; display: none; z-index: 8675309"><span>Schedule</span></button></p>

```

I may be able to figure this out myself soon, but anyone recognize that? From some sharing button maybe?

# Answer
> 2 votes
I encountered the exact same issue with the CK text editor in ColdFusion, with the same code automatically inserting itself. In my case it turned out to be a browser extension called Tailwind. This is a scheduling tool used by Hootsuite and other social media automation tools. Disabling the extension fixed the problem. I was using a Mac with Safari as my browser. I don't know if this would behave the same on other systems or browsers, but I hope this helps.

# Answer
> 0 votes
My first guess was that there was something weird with field names or instructions, and maybe accidentally unclosed HTML tags, that was causing this. But if the word "schedule" isn't otherwise associated with the page, I don't see how that could be it.

My second guess would be something browser-based, such as an autocomplete add-on or something similar. Have you tried using a different browser, and/or a different computer?

---
Tags: wygwam
---


# Question
Title: CE Cache - Very strange URLs in cache directory?
So, I tried pointing this out to our SysAdmin, but he says this looks normal and that EE generates these kinds of cache directories.

But I'd like to verify, do these look like normal cache directories created by EE or CE Cache?

Screenshots:

Does this look "normal" for a cache directory, or like a spam attack?

**EDIT/UPDATE:**

These are in the CE Cache directory: system/user/cache/ce\_cache/xxxxxx.

My cache settings:

$config\['cache\_driver'\] = 'dummy'; $config\['cache\_driver\_backup'\] = 'dummy'; $config\['ce\_cache\_static\_enabled'\] = 'no';

Native EE cache is disabled because this site is using the Transcribe module which needs to have native cache disabled and to use CE Cache instead.

Static cache is also disabled.

# Answer
> 0 votes
As your caching-driver is "dummy" CE Cache will not cache anything (see also CE Cache documentation). So the folders you screenshotted are not generated by CE Cache (or have been generated before the driver was set to "dummy").

I don't know about the contents of your site, but folders like "freegift" and "pdffree" don't sound like cached pages. I think CE Cache generates a folder structure that contains template-groups, template-names and page-names (like cache/ce\_cache/74b31e/local/templategroup/singleentry/entryname/entryid/pagesingleentry ).

To check what is going on you could enable CE Cache and set the driver to file with e.g.

```
$config['ce_cache_drivers'] = 'file';
$config['ce_cache_off'] = 'no';

```

Then you delete the ce\_cache-folder manually and load some pages. You immediately will see what kind of files CE Cache creates.

# Answer
> 0 votes
If EE handles a request and that request is passed off by EE to a template that is configured to be cached by CE Cache then CE Cache will attempt to cache the file that it serves.

So the real question isn't "why is CE Cache caching these requests?", the question is "why have you configured to your site so these requests point to templates that are cacheable?".

I'd recommend you try to reproduce these requests yourself and see if you shouldn't rather be pointing them at a 404 page or redirecting them to a index or landing page.

---
Tags: cache, ce-cache, spam, cache-folder
---


# Question
Title: Pre-sale Exp-resso question re: save for later and re-orders
We have a client who would like a e-commerce site where the product would have about a dozen options that the customer would have to work through before getting a final price. Because of the technical nature of the product, they would like customers to be able to save the cart, and come back to it later to edit or complete the purchase. Would this be possible with Exp-resso, and would it require any custom scripting?

Also, if a customer places an order for multiple variations of a product, would they be able to go back and re-order one of the variations, but at that same time make a change to the options for the re-order?

# Answer
> 1 votes
Exp:resso Store has good pre-sales and post-sales support, and this sounds like a good question to ask through such channels.

More information on how to access support through the VMG/Exp:resso Support Page \- I would email them but imagine there might be a slight delay in getting a reply as it is Thanksgiving Weekend in USA currently.

# Answer
> 1 votes
I've done something similar on a Store site.

Using https://eeharbor.com/favorites logged in members can add entries (products) to their favourites list. Then with Store's Product form tag they can load up their list and order everything in one go, or select how many of each item is required.

---
Tags: expresso-store
---


# Question
Title: EE MSM 5.1.3 Field Groups and Fields on All Sites
I recently updated EE to 5.1.3, and am running MSM. Since the update, when I add a new field group or channel field to one site, it publishes across all sites (and recognizes already existing ones). It is recognizing the {short\_name} from the other sites and preventing me from creating the same in any new site. Is there a known way to isolate new groups and fields to each site?

# Answer
**Proceed with caution and at your own risk**

So, I've been actually been experimenting with doing the opposite.

I have a site with a lot of MSM sites, and before (EE2.x, EE3.x), we'd have one field and it's implementation recreated over and over in the different sites so content editors would have a uniform field for this particular component. This was always a pain point, as it is a complex Matrix field and having to recreate it for each site has basically sucked.

Now, since we've upgraded to the latest EE4, new fields are available across sites. So what we'd like to do is take this one version of this field we repeat across sites, and make it cross site available. We have one site where the field is used a lot, and all the other sites use the field in basically one channel and one template, so for all the other MSM sites, reusing the field and copying over data for just a few channel entries per site is not a big deal.

I haven't implemented this solution, as it's just in the testing phase, and a bit of a side project to some other stuff.

What I did was take the field we want to share across sites, and modify it's row in the `exp_channel_fields` table. Each row is part of a field record, and has a `site_id` column. In EE4, when you create a new field, the `site_id` is set to `0`, which shares it across all sites. So I changed our (old field) field we want to re-use across sites to have `0` in that column, and boom, the field became available for all sites. I was able to add it to another site, and it accepted and saved data, and outputted in a template.

Now, it's possible that you may be able to do the opposite; you might be able to take your field and modify it's `channel_id` to match the site you want to contain it to. My first thought is that if you have assigned this field to two different MSM sites, messing with this value will break things. The other thing I can't tell you is if this will actually solve your problem.

Ultimately, this might be a bug in EE now that it shares fields across sites, and it seems you've stumbled on a situation where fields can have the same `short_name` value now, were as previously I don't think you could do that.

I suggest spinning up a local or dev installation of your site, and give it a try. If you do, let us know if it works. You might want to also ask on the EE Slack as you can actually get the ear of a member of EE dev team there.
> 0 votes

---
Tags: multi-site-manager
---


title: WSOD on File Upload

text:
# Question
Title: WSOD on File Upload
Seeing this message when tryig to upload an image.

> Fatal error: Uncaught Error: Call to undefined function EllisLab\ExpressionEngine\Library\Mime\imagecreatefromstring() in /var/www/html/system/ee/EllisLab/ExpressionEngine/Library/Mime/MimeType.php:192 Stack trace: #0 /var/www/html/system/ee/legacy/libraries/Mime\_type.php(121): EllisLab\ExpressionEngine\Library\Mime\MimeType-\>fileIsImage('/tmp/php3SUta2')
>
> # 1 /var/www/html/system/ee/legacy/libraries/Upload.php(553): Mime\_type-\>fileIsImage('/tmp/php3SUta2') #2
>
> /var/www/html/system/ee/legacy/libraries/Upload.php(209): EE\_Upload-\>is\_allowed\_filetype() #3 /var/www/html/system/ee/legacy/libraries/Filemanager.php(1890): EE\_Upload-\>do\_upload('file') #4 /var/www/html/system/ee/legacy/libraries/Filemanager.php(1024): Filemanager-\>\_upload\_file(Array, 'file') #5 /var/www/html/system/ee/EllisLab/ExpressionEngine/Service/File/Upload.php(299): Filemanager-\>upload\_file('7', 'file') #6 /var/www/html/system/ee/EllisLab/ExpressionEngine/Controller/Files/Files.php(138): EllisLab\ExpressionEngine\Service\File\Upload-\>uploadTo('7') #7 \[interna in /var/www/html/system/ee/EllisLab/ExpressionEngine/Library/Mime/MimeType.php on line 192

Uploads work fine on my development and staging areas, but not on production. So might be something to do with the server config?

Not sure, first time i've seen this error...

Other similar queires point to making sure fileinfo in exanbles, and it is.

# Answer
**SOLVED**

Reason was PHP GD was not installed. Fixed by running the following on the server:

```
sudo apt-get install php-gd

```
> 1 votes

---
Tags: file-uploads
---


# Question
Title: Channel Images on EE 3.5 error uploading files - no detailed message given
EE 3.5.15
Channel Images 6.0.4
PHP 7.2.13

I'm experiencing a weird error with Channel Images addon, i am not more able to upload files in channels' existing items or new ones.
The file looks like is completely uploaded (it reachs 100%) and then an error occurrs:

> Server response was not as expected, probably a PHP error. OPEN ERROR

"Open error" doesn't really help because the ajax call already thrown a js error, inspecting it show that the response text is a full web page (the front page).

It looks like something similar to what happened in this post, but the given solutions (php memory and small files) are not helpful.

Trying to create new channel and a new channel\_images field doesn't solve the issue.
The channel\_images field definition shows that **it fails to test location**, loading the front page of the website inside the modal instead of the test results.

Many PHP 7 versions has been tested. The only thing that happened on the server are the PHP recompile occurred on december, and the hosting service stated that nothing changed.

Further details:

* the website is on shared hosting
* the native EE upload mechanism works properly
* double checked path and upload directory under Settings \> URL and Path Settings and field detail
* caching driver is setted to "file"
* website is running PHP 7.2 and I am enough confindent all the needed php extensions are loaded
* the htaccess is the one from the EE manual

Do you have any hints where/what i can investigate?
Could the PHP recompilation be responsible?

# Answer
> 0 votes
It turns out that for my case is a conflict of the two plugins, Channel Images and Publisher. With a specific setting of Publisher (add url prefix setted to yes) the Channel Images fails to upload any files. Some warnings involved the cache (fail to write) and i suspect something is wrong with my EE installation. I'm going with the rebuild of the website on a newest EE release.

The Publisher's support turned out to be immediate and helpful, while I have been waiting for a response from EEharbor for three weeks.

# Answer
> 0 votes
Assuming you have a local copy of your applications code base, and are either running on a Linux/Unix OS or you use a modern IDE like PHP Storm, you can search that add-ons codebase for that error term, `OPEN ERROR`. It'll probably be in a language file for the add-on, which will give you the language key for that error message. In the language file, it'll probably look something like this:

```
"open_error_msg" => "OPEN ERROR"

```

The next step is to search the add-on code base for that key, `open_error_msg`. This should show you everywhere in the add-on code where that error is returned, and you can snoop out what is throwing the message.

If it's thrown from multiple places, you can add tracers to the add-on code. I usually do something like this:

```
file_put_contents ($_SERVER["DOCUMENT_ROOT"] . "/log_file.log", date("c") . " : " . __FILE__ . " : " . __FUNCTION__ . " : " . __LINE__ .  "\n\r", FILE_APPEND);

```

Drop that in where you think the issue is happening, and if log lines are showing up in that file (`{your_web_root}/log_file.log`) when you try to upload files, you've identified the code area returning the error. Work from there. I usually tail my log file when debugging unknown thrown errors on Linux using `tail -f ./log_file.log` live so I can get nuances as to when the issue occurs in the execution cycle.

Sorry, I really meant this more as a comment and not an answer since I don't use Channel-Images, but certainly couldn't shorten it to just a comment. But I have used this method to debug EE and EE add-ons many times.

---
Tags: add-on, error, devdemon, channel-images
---


title: Stop stash embed caching file

text:
# Question
Title: Stop stash embed caching file
I'm using stash embed, everything inside the embed gets cached, is there any way for this not to happen?

It's a major pain when changing what's in the embed template and not seeing the change happen.

```
{!-- Main Template --}
{exp:stash:set name="_foobar_id" match="#^\S+#" default="{snippet}"}
    {snippet}
{/exp:stash:set}

{stash:embed name="_foobar"}

{!-- Inside the stash embed  --}
<div>
   {stash:_foobar_id}
</div>

```

# Answer
> 3 votes
```
{stash:embed name="_foobar" replace="yes"}

```

---
Tags: ee2, stash
---


# Question
Title: Migration from Assets to native File Manager
Is there an easy way to migrate Asset-Fields to the native File Manager without loosing the referenced Image?

# Answer
It depends upon what you call 'easy'. It can be done, but is quite complicated, and AFAIK none has written a utility to do this migration for you (though it probably could be created).

Assets bases its file referencing on the File Upload directories used natively by EE, but actually references the files stored in a quite different way.

For EE native files, the file information in the field looks like this within the SQL database:

```
EE File Field ->    {filedir_x}image_name.jpg

```

Where `{filedir_x}` relates to the upload location used to store the file.

For Assets fields, the SQL database stores just the file name in the field,

```
Assets File Field -> image_name.jpg

```

When you access an Assets field in a template, Assets adds the equivalent of the EE Filedir information by searching for the file name within a SQL table dedicated to providing Asset location information (I'm guessing it is `exp_assets_index_data`).

So, migrating from Assets to EE File Manager fields is certainly possible, and in some ways fairly straightforward. But the work required is not without some heavy lifting. At the very least you would need to (be able to) do the following steps:

1. Move all of your Assets files to the 'top-level' folders within Assets (since EE's File Manager does not recognise / see "subdirectories") - this is easily done by drag-and-drop within Assets, so not too hard.
2. Create new EE File fields in your EE system to match the existing Assets fields (or at least the ones you want to migrate)
3. Copy the file names from the Assets Fields to the equivalent File fields, and prefix them with an appropriately formatted tag to indicate which of the EE File Upload locations the file is stored in. Doing this probably involves editing your SQL database directly. One way to do this is to batch your SQL edits based on which location the images / files are in: a simple approach would be to write a custom EE template to generate the appropriate SQL commands for this. The actual SQL you need will depend on which version of EE you are using (as data for native EE4 fields are stored differently in SQL to fields created in EE3 or EE2).
4. Make sure that equivalent EE File upload locations exist for each top-level Assets folder, and are sync'd (after you've moved the files to the Assets top-level folder). Then test to see if the newly populated native image fields are being recognised within a test template. If so, modify your templates to use the new fields and celebrate... :)

As ever, if you set out to do this type of work make sure you back everything up before you start, and do the work on a development server...

HTH.
> 2 votes

# Answer
I've been working on upgrading an EE2 6-site MSM installation up to EE5 and in the process realised that Assets now requires a separate license for each site. So to save myself $600 I wrote a script that converts all instances of Assets to EE's native File including Assets used in Matrix columns (for various reasons I can't use EE's Matrix to Grid converter due to the column fieldtypes in use).

It's specific to my installation but it could easily be tweaked. I set it up as a function in a custom module I use and call it from a template with the parameter do=assets or do=matrix to perform one conversion or the other.

ee()-\>utilitylib is a custom library I use for many things including database queries and dumping data for debugging so those function calls would need to be switched out for other query functions.

It's not pretty or commented but it works. As always backup, backup, backup!!

Note that the File Directories will all need to be resynced after conversion.

Maybe this will be useful to someone else one day :)

===

```
public function assets2file()
{

        $do = ee()->TMPL->fetch_param('do');

    // SINGLE ASSET FIELDTYPE
        if($do == 'assets')
        {
        $sql = "SELECT field_id, site_id, field_name, field_content_type, field_settings FROM exp_channel_fields
                            WHERE field_type = 'assets'";
            $query_assets = ee()->utilitylib->db_query_result($sql);
            if($query_assets)
            {
                foreach($query_assets as $row)
                {
                    $settings_assets = unserialize(base64_decode($row['field_settings']));
                    $filedir = str_replace('ee:', '', $settings_assets['filedirs'][0]);
                    $field_content_type = (stripos($row['field_name'], 'image') !== FALSE || stripos($row['field_name'], 'logo') !== FALSE) ? 'image' : 'all';
                    $settings_file = array(
                        'field_content_type' => $field_content_type,
                        'allowed_directories' => $filedir,
                        'num_existing' => 50,
                        'field_fmt' => 'none'
                    );
                    //ee()->utilitylib->dumpthis($settings_file);

                    // update channel_fields: fieldtype, field_content_type, field_settings
                    $data = array(
                        'field_type' => 'file',
                        'field_settings' => base64_encode(serialize($settings_file))
                    );
                    //ee()->utilitylib->dumpthis($data);
                    ee()->db->where('site_id', $row['site_id']);
                    ee()->db->where('field_id', $row['field_id']);
                    ee()->db->update('channel_fields', $data);

                    //update channel_data: prefix {filedir_x} if not present
                    $field = 'field_id_'.$row['field_id'];
                    $sql = "SELECT entry_id, $field as colval FROM exp_channel_data WHERE site_id = {$row['site_id']} AND $field <> ''";
                    //ee()->utilitylib->dumpthis($sql);
                    $query2 = ee()->utilitylib->db_query_result($sql);
                    if($query2)
                    {
                        foreach($query2 as $row2)
                        {
                            $update_value = (substr($row2['colval'],0,8) == '{filedir') ? $row2['colval'] : "{filedir_$filedir}".$row2['colval'];
                            ee()->db->where('entry_id', $row2['entry_id']);
                            ee()->db->update('channel_data', array($field => $update_value));
                        }
                    }

                }
            }

        }

    // MATRIX ASSETS COLUMNS
        if($do == 'matrix')
        {

        $sql = "SELECT col_id, site_id, field_id, col_name, col_type, col_settings FROM exp_matrix_cols WHERE col_type = 'assets'";
            $query_matrix = ee()->utilitylib->db_query_result($sql);
            if($query_matrix)
            {
                //ee()->utilitylib->dumpthis($query_matrix);
                foreach($query_matrix as $row)
                {
                    //ee()->utilitylib->dumpthis($row);
                    $settings_assets = unserialize(base64_decode($row['col_settings']));
                    //ee()->utilitylib->dumpthis($settings_assets);
                    $filedir = str_replace('ee:', '', $settings_assets['filedirs'][0]);
                    $field_content_type = (stripos($row['col_name'], 'image') !== FALSE || stripos($row['col_name'], 'logo') !== FALSE) ? 'image' : 'all';
                    $settings_file = array(
                        'content_type' => $field_content_type,
                        'directory' => $filedir,
                        'file_num_existing' => ''
                    );
                    if($field_content_type == 'all') $settings_file['file_show_existing'] = 'y';
                    //ee()->utilitylib->dumpthis($settings_file);

                    // update channel_fields: fieldtype, field_content_type, field_settings
                    $data = array(
                        'col_type' => 'file',
                        'col_settings' => base64_encode(serialize($settings_file))
                    );
                    //ee()->utilitylib->dumpthis($data);
                    ee()->db->where('col_id', $row['col_id']);
                    ee()->db->where('field_id', $row['field_id']);
                    ee()->db->update('matrix_cols', $data);

                    //update channel_data: prefix {filedir_x} if not present
                    $field = 'col_id_'.$row['col_id'];
                    $sql = "SELECT row_id, $field as colval FROM exp_matrix_data WHERE site_id = {$row['site_id']} AND field_id = {$row['field_id']} AND $field <> ''";
                    //ee()->utilitylib->dumpthis($sql);
                    $query2 = ee()->utilitylib->db_query_result($sql);
                    if($query2)
                    {
                        //ee()->utilitylib->dumpthis($query2);
                        foreach($query2 as $row2)
                        {
                            $update_value = (substr($row2['colval'],0,8) == '{filedir') ? $row2['colval'] : "{filedir_$filedir}".$row2['colval'];
                            //ee()->utilitylib->dumpthis($update_value);
                            ee()->db->where('row_id', $row2['row_id']);
                            ee()->db->update('matrix_data', array($field => $update_value));
                        }
                    }

                }
            }
            //die();

        }

}

```
> 2 votes

---
Tags: assets, file-manager
---


# Question
Title: How do I get list content to display across multiple columns?
I am running EE 3.5.7 and Bootstrap 4. I have list content that I would like to display evenly across multiple columns. In EE2 there was a very useful add-on: https://devot-ee.com/add-ons/splitter, however I have not been able to find anything that is compatible with EE 3+. Does anyone have any recommended solutions for this kind of challenge?

# Answer
Maybe you should use css instead of bootsrap... You can use the `column` feature of css. There's many option/parameters..

Look here : https://developer.mozilla.org/en-US/docs/Web/CSS/columns or here https://www.w3schools.com/cssref/css3\_pr\_column-count.asp
> 1 votes

---
Tags: ee3, bootstrap, content
---


# Question
Title: htaccess - Best practice-version for EE5?
My htaccess is very big, because I upgraded, changed, optimized … it from EE1 to EE5. I am not sure what could be trashed. E.g. I have a rule somewhere to remove index.php, probably I don't need this anymore.

What is a best example for a htaccess for a standard-EE-install in EE5? Thanks!

# Answer
> 3 votes
You will need that rule, nothing has changed with the requirement of using `mod_rewrite` to remove the index.php portion of your URL for your site installation. You still need to direct all non-file/directory URLs to that index.php file as well. Please review the docs:

https://docs.expressionengine.com/latest/general/remove-index.php.html#1-create-an-htaccess-file

If you are looking to refactor your `.htaccess` file, I would start with the docs recommend set of rules, and add back any custom rules you have one by one, and eliminate relics from that file.

Without seeing what is actually in your `.htaccess` file, and without knowing your server setup, it's hard to recommend a blanket statement to remove any specific rules. But like I said, if you want to refactor, start with the docs recommended set of rules and add back in what you find you need.

---
Tags: htaccess, ee4, ee5
---


# Question
Title: The fluid field dropdown is overflowing the bottom of the control panel
I have around a dozen fields in a fluid field and as I add them the add fluid field drop down over flows the bottom of the page and I cant see most of them. (see image below).Is this a bug or recognized problem

# Answer
> 0 votes
Based on this recent bug in the expression engine github, it sounds like some UI related improvements are on the way. It would likely be worthwhile to report this issue so the EE team is aware of it.

---
Tags: fields, fluid-field
---


title: Filter out entries with empty Grid

text:
# Question
Title: Filter out entries with empty Grid
What am I doing wrong? What I try to reach is getting all entries that DO contain a grid-row. video is name of grid field, fragment is name of the column.

```
{exp:channel:entries channel="news" dynamic="no" search:video:fragment="not IS_EMTPY"}

    [here-content]

{/exp:channel:entries}

```

Thanks in advance.

# Answer
```
        <?php $i = 1;?>
        {exp:channel:entries channel="nieuws" dynamic="no" limit="100"}
        {video limit="1"}
        <?php if($i < 9):?>
            <article class="video-item col-lg-3 col-md-4 col-sm-6">
                <div>
                    {video:fragment}
                    <a href="{page_uri}">
                        <h3>{title}</h3>
                    </a>
                </div>
            </article>
            <?php if($i == 4):?><div class='clearfix'></div><?php endif;?>

            <?php $i++;?>
        <?php endif; ?>
        {/video}
        {/exp:channel:entries}

```
> 0 votes

# Answer
I believe the grid fields aren't searchable with search= however you can search in the grid tag itself

```
{video search:fragment="not IS_EMPTY"}
    fields
{/video}

```
> 0 votes

# Answer
Well if you want to search into Grid then first you should enable all fields which you want to search, by `Include in search?` parameter from the Grid fieldtype. After that you should add `search:column_name=` with your grid field\_name into your code.

In your case you should try with below code.

```
{video search:column_name="not IS_EMPTY"}
    {!-- your code --}
{/video}

```

I hope this will works for you.
> 0 votes

---
Tags: search, grid, ee4, ee5
---


title: Display entry title inside an images

text:
# Question
Title: Display entry title inside an images
I'm sure this is a basic question (EE is not my bag): I am trying to create a fallback for an image's alt text where if the image does not have a description then to use the title of the entry in its place.

But obviously if I use

```
{image}
  <img src="{url}" alt="{if description}{description}{if:else}{title}{/if}">
{/image}

```

Then it uses the image's title.

How do I make it display the entry title instead?

TIA.

# Answer
Can you give me a little more information about your code here?

`{image}` is a grid field? What fields does the grid have? Perhaps you could rename the `{title}` field in your grid to something that doesn't overwrite the default `{title}` field?
> 0 votes

# Answer
Are you using the file fieldtype..if so with the variable pair tag.. i guess you can't get the entry title!??.. But if you have only 1 image.. you may try something like..

`{image limit="1"}
 <img src="{url}" alt="{if description}{description}"{/image}{if:else}{/image}{title}"{/if}>` It's not elegant.. and i didn't test it.. !
> 0 votes

---
Tags: templates, metadata
---


title: PHP Fileinfo Issue Uploading Images

text:
# Question
Title: PHP Fileinfo Issue Uploading Images
After upgrading to EE 4 & PHP 7, when uploading a new image to the server in an entry, the upload fails and I get the following PHP error:

```
Fatal error: Uncaught Error: Call to undefined function EllisLab\ExpressionEngine\Library\Mime\finfo_open() in /home/ihist/public_html/sketch/ee/EllisLab/ExpressionEngine/Library/Mime/MimeType.php:104 Stack trace:
#0 /home/ihist/public_html/sketch/ee/legacy/libraries/Mime_type.php(93): EllisLab\ExpressionEngine\Library\Mime\MimeType->ofFile('/tmp/phpsJV2ii')
#1 /home/ihist/public_html/sketch/ee/legacy/libraries/Upload.php(167): Mime_type->ofFile('/tmp/phpsJV2ii')
#2 /home/ihist/public_html/sketch/ee/legacy/libraries/Filemanager.php(1889): EE_Upload->do_upload('file')
#3 /home/ihist/public_html/sketch/ee/legacy/libraries/Filemanager.php(1023): Filemanager->_upload_file(Array, 'file')
#4 /home/ihist/public_html/sketch/ee/EllisLab/ExpressionEngine/Service/File/Upload.php(298): Filemanager->upload_file('1', 'file')
#5 /home/ihist/public_html/sketch/ee/EllisLab/ExpressionEngine/Controller/Files/Files.php(137): EllisLab\ExpressionEngine\Service\File\Upload->uploadTo('1')
#6 [internal function]: EllisLab\ExpressionEngine\Control in /home/ihist/public_html/sketch/ee/EllisLab/ExpressionEngine/Library/Mime/MimeType.php on line 104

```

The last line leads me to believe it's an issue with the PHP fileinfo module, which I have enabled in my php.ini file with the following line:

```
extension = fileinfo.so

```

After that, I restarted Apache, but still no dice. This is eerily similar to this post but I haven't had any luck. It's also pretty similar to this post but I can confirm GD is enabled!

It looks like file info is also installed by default with the following line:

```
'--enable-fileinfo=shared'

```

Some more details about my environment:

* EE 4.3.6
* PHP 7.0.33
* Apache 2.4.38 running linux

Notes:

* This error also occurs when syncing the file directory
* This error also occurs when uploading other file types besides .jpg, like .png

# Answer
> 0 votes
I've seen something like this before. turned out that besides having to enable the fileinfo module, i had to activate it too

# Answer
> 0 votes
While I had added it in the php.ini file, for some reason the fileinfo module was not loading. If you don't see the table in the PHP info page, the module isn't loading.

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


title: Visitor module latest version 4.0.2 Bug

text:
# Question
Title: Visitor module latest version 4.0.2 Bug
I have installed visitor module version 4.0.2 that gives me this error.

I tried in EE3, EE4 both but get same error everywhere when install module. Any idea?

# Answer
So, Instead of `<?php echo` it was Typo error `<?phpoecho`. Wonder how can a big agency like EEHarbor can make such mistake and wonder more how can they not answering any emails of support requests. Disappointment here but have to adjust because there is no alternative of Visitors module right now.
> 1 votes

---
Tags: members, zoo-visitor, visitor, eeharbor
---


title: Assigning default images to a channel

text:
# Question
Title: Assigning default images to a channel
As part of redesigning our site, we want to make sure that every entry for a specific channel is displayed with an image. All the content posted does not have good specific images associated with them, so I am looking for a good way to assign a pool of default images to the channel. Then, if an entry does not have a specific image associated with it, it would instead be displayed with a random image from the default set.

Is this doable? I am on EE 5.x.

# Answer
> 1 votes
Yes, off-course it is doable. For this you need to create **Template Variable** for storing the placeholder image. You just need to call this placeholder image when there is no image in file field.

You should try code in below manner.

```
{if file_field_name}
    {!-- Image field name associated with channel --}
{if:else}
    {!-- Placeholder Image (variable_name) --}
{/if}

```

---
Tags: image
---


# Question
Title: How can I share templates files between sites in EE5?
We used to have a template path setting for sites with MSM. Now that setting seems to be gone, how can we share a single set of templates used by two or more sites ?

# Answer
There isn't an EE solution to this problem. When being able to set your template folder path for each MSM site went away, there was growing pains for all. But at the end of the day, if you have a good setup for your application, it is most easily solved at the deployment/devops layer of your setup.

The easiest way to handle this is to setup symlinks. For example, in your deployment process, you can ship all your templates to a single template folder, and then setup your EE MSM sites' template folders to be symlinks to that single template folder. It seems like extra overhead, but it is more of a "set and forget" fix, at least when deploying to Linux like servers. When you add new MSM sites, you will have to add the extra symlinks, but it isn't hours of work or anything.

Also, if you have a more full-service deployment system set up, you can also just write rules to deploy certain template folders to multiple folder destinations on the server you are deploying to. So that is a possible solution as well.

So yeah, a little bit of added complexity to achieve the same result, but not at all a mountain to climb (at least on Linux based servers, can't say the same for deploying to Windows based servers).
> 2 votes

---
Tags: templates, ee4, ee5
---