# Question
Title: Issues installing addons for local EE3 installation (Error: Unable to load the requested language file)
I've got a local installation of ExpressionEngine 3 and I'm trying to install an add-on to allow me to customise the control panel CSS.

I've tried the following add-ons but after installing and when trying to access the add-on in the control panel I'm presented with the following errors. It's done the same thing for both add-ons making me think it's not an issue with the add-ons:

> **https://devot-ee.com/add-ons/digi-nut-control-panel-css-js gave the following error:** *Error: Unable to load the requested language file: language/english/dn\_control\_panel\_css\_js\_lang.php*
>
> **https://devot-ee.com/add-ons/cp-css gave the following error:** Error: Unable to load the requested language file: language/english/cpcss\_lang.php

Any suggestions will be very welcome,

Thanks in advance,

Tom

# Answer
> 0 votes
I tried installing these module and it works fine at my end.

You can try go to both the paths and rename the files **lang.dn\_control\_panel\_css\_js.php** and **lang.cpcss.php**. There is less chances.

---
Tags: add-on, ee3, addons
---


# Question
Title: Mx Notify control issues with Channel Forms in EEv2.11.2
I want to send notification to my customer when people from site sends a form (made with channel form) so I've setup a "Entry added" notification.

Notification works but data into the exp:channel:entries tag is sent only when entering data from the CP but not from the form.

can someone help on this?

thanks Francesco

# Answer
Resolved this:

1) In the Mx Notify control settings page put {entry\_id} into the custom list field

2) In the template file use **entry\_id="{entry\_id}"**

```
{exp:channel:entries channel="your_channel_name" limit="1" entry_id="{entry_id}"}
title:{title}
{/exp:channel:entries}

```

So now you can fecth the data.
> 0 votes

---
Tags: mx-notify
---


# Question
Title: Fatal error: Call to undefined method Assets_ft::content_id()
I've updated assets from an ancient 1.\* version to latest 3\* and everything looked ok apart when I've tried to edit a page. I'm getting the following error: Fatal error: Call to undefined method Assets\_ft::content\_id() in system/expressionengine/third\_party/assets/ft.assets.php on line 2467

For many reasons I can't update at the time being the EE 2.5.5 which is currently installed.

Anyone with a suggestion?

# Answer
I'd guess that when EEHarbor updated Assets to 3.0, they didn't test old EE2 versions (since it's primarily an EE3 release). They may offer a download of Assets 2.6 if you ask.
> 1 votes

---
Tags: assets, error, fatal
---


# Question
Title: How to display contents of checkboxes field
Hello i'am using ExpressionEngine v3.3.4 for a short time.

I have field group with field 'shop\_item\_product\_sizes'. (attachment) Is it possible to dynamically print only selected checkboxes as select to my template? http://imgur.com/kBMmhH4

expected result (based on attachment)

```
<select>
    <option>Select size</option>
    <option>M</option>
    <option>XL</option>
</select>

```

Thanks in advance.

# Answer
This looks like a standard Checkboxes field, so you just need to follow the docs.

```
{if shop_item_product_sizes}
<select name="sizes">
    <option>Select size</option>
    {shop_item_product_sizes}
    <option value="{item}">{item}</option>
    {/shop_item_product_sizes}
</select>
{/if}

```
> 0 votes

---
Tags: channel-entries, channel-fields
---


# Question
Title: CSS path problem in the EE3 installation script and in the Admin Panel
I installed EE 3.5.4 on a local server (Wamp 3.0.6 - Windows 10), during the installation script execution, the CSS files were not taken into account, then the installation display was summary. The installation worked well.

When I entered in the admin page, the same problem occurred: the CSS files were not taken into account, there was only text. Then I looked at the path of the CSS file and it had admin.php in the path

> href="http://localsite/**admin.php**/themes/ee/cp/css/common.min.css

**The httpd.conf**

```
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule vhost_alias_module modules/mod_vhost_alias.so
# Virtual hosts
Include conf/extra/httpd-vhosts.conf

```

the **httpd-vhosts.conf**

```
<VirtualHost *:80>
    ServerName localsite
    DocumentRoot "d:/drive/sites/www/localsite"
    <Directory  "d:/drive/sites/www/localsite/">
        Options +Indexes +Includes +FollowSymLinks +MultiViews
        AllowOverride All
        Require local
    </Directory>
</VirtualHost>

```

Inside the Windows **hosts file**:

```
127.0.0.1 localhost
::1 localhost

127.0.0.1   localsite
::1 localsite

```

This problem never happened to me before. I managed to solve the problem

In the **config.php** file:

```
system/user/config/config.php

```

**I added:**

```
$config['theme_folder_url'] = 'http://localsite/themes/';

```

And now the CSS path is right (**no more admin.php**):

```
href="http://localsite/themes/ee/cp/css/common.min.css

```

Really I do not understand this problem, is it possible to remove **admin.php** in the CSS path without modifying the **config.php** file?

PS : i tried to install EE2, there was a problem with the images path.

# Answer
> 0 votes
I've found a solution:

In the **httpd.conf** (Windows 10, Wampserver 3.0.6 64 Bit)

**I replaced:**

```
DocumentRoot "${INSTALL_DIR}/www"
<Directory "${INSTALL_DIR}/www/">

```

**to the name of my sites root:**

```
DocumentRoot "D:/drive/sites/www"
<Directory "D:/drive/sites/www/">

```

I removed:

```
$config['theme_folder_url'] = 'http://localsite/themes/';

```

In the **config.php** file:

```
system/user/config/config.php

```

And now, **no more problems with the CSS path**, not need anymore to change this value via config.php. It was a Wamp (3.0.6) , Apache (2.4.23) config setting.

**The Answers from those questions helped me to solve this problem:**

https://webmasters.stackexchange.com/questions/43522/how-to-change-the-www-root-directory-on-wampserver

---
Tags: css, path, install, admin.php
---


title: Big doubts about Stash Bundle

text:
# Question
Title: Big doubts about Stash Bundle
I try to understand better Stash Bundles, so I tried to use Stash code to save a group of variables as a single variable in a defined bundle.

**The variables:**

```
{exp:stash:set_value name="un" bundle="default"}
{exp:stash:set_value name="deux" bundle="default"}
{exp:stash:set_value name="trois" bundle="default"}

```

**The group of the variables inside a defined bundle:**

```
{exp:stash:bundle name="bundle"}
        {exp:stash:get  name="un"}
        {exp:stash:get  name="deux"}
        {exp:stash:get  name="trois"}
{/exp:stash:bundle}

```

**Call the defined bundle**

```
{exp:stash:get name="bundle"}

```

**Results (in the html page):**

```
a:3:{s:2:"un";N;s:4:"deux";N;s:5:"trois";N;}

```

**Why the variables appears like this, and not display:**

```
un
deux
trois

```

What it means **a:3:{s:2:** **;N;** ? I'm totally lost. How to display only **un deux trois**?

Thanks.

**Additional information.**

I tried with:

> http://site/stash/bundles

```
    {exp:stash:bundle name="segments"}
            {exp:stash:get name="{segment_1}"}
            {exp:stash:get name="{segment_2}"}
    {/exp:stash:bundle}

   <h1>{exp:stash:get name="segments"}</h1>

```

Results:

> a:2:{s:5:"stash";N;s:7:"bundles";N;}

So **a** is the number of variables into a bundle, **S:** the number of characters of each variables. What is **N** ? I do not understand this output format, it seems as JSON. What can I do with this output:

**a:2:{s:5:"stash";N;s:7:"bundles";N;}** ?

How to use it, and **only** extract **stash**, **bundles** data, coming from {segment\_x} ?

# Answer
> 1 votes
In my opinion, you are confusing bundles with **lists**. Stash lists will provide the functionality you're looking for (which is basically to group variables into an array). Bundles are merely used as a way of tagging variables and/or lists so they can be cache-busted independently.

Follow the examples in the documentation for `set_list`: https://github.com/croxton/Stash/wiki/%7Bexp%3Astash%3Aset\_list%7D

... and `get_list`: https://github.com/croxton/Stash/wiki/%7Bexp%3Astash%3Aget\_list%7D

---
Tags: stash, get
---


# Question
Title: How to get customer shipping country code to generate shipping rates in Cartthrob for that specific country?
Presently I only ship within the UK and now wish to extend this to Europe. Shipping is by location and weight thresholds, and I have configured the requisite shipping prices. I have entered the country codes into my\_locales and the payment gateway. How do I capture the customer's shipping county at the point of purchase so the shipping calculations will be accurate when they view basket? Using Cartthrob 3.01

# Answer
> 0 votes
The location/weight threshold shipping settings screen gives you a couple of fields to map your shipping country field (a primary and a fallback) so that CT knows which country settings to use. So, during any action that interacts with the cart (add\_to\_cart/checkout etc), the user can specify the country via an input/select element with the field's short name in the `name` attribute.

---
Tags: cartthrob, ee, shipping
---


# Question
Title: Is there a way to automatically attach emails to an entry
I'm exploring whether it's possible to attach an email that's sent to a specific address to a particular entry.

I use a project management system called Workflow Max and for each project on the system you get a unique email address. If you CC your client emails to that address they get stored on the system.

I'm building a client area for a client and would like a way to create a similar feature for their client area. In other words, somehow create a unique email address for each entry in the system. When an email is CC'd to that address it's stored in a particular field (or even as a new entry) in EE.

Anyone know where to start with this?

Any help appreciated,

Tom

# Answer
If you're asking if there's an existing add-on which can do this, there is surely not.

This will have to be all custom. On the EE end, you'll need to use some extension hooks for when entries are created/updated to create the email addresses and store them, then also a module with a CSRF-exempt action which can be called by whatever is processing the emails to update a field or what have you.

The biggest hurdle will be finding a service which can act as your email relay that allows the creation of custom email addresses via an API of some kind. I'm not aware of one myself, but surely it exists.
> 0 votes

---
Tags: ee2, control-panel, email
---


# Question
Title: Redirect adding absolute path when using {redirect="{page_url}"}
I recently upgraded to EE2 2.11.7 and I was using a redirect to automatically redirect user if on search results if there was an exact match.

This was working fine for me previously: `{if total_results == 1}{redirect="{page_url}"}{/if}`

But now getting error, `The URI you submitted is not allowed.`. And the URL is adding the absolute path on top of the domain like this: `http://example.com/http:/example.com/page/url/entry`

I can use some jQuery to fix with a trigger click, but it's kind of clunky. Any way to fix that url to properly redirect?

# Answer
> 2 votes
Try using {page\_uri} instead of {page\_url} The redirect tag is looking for a relative, not absolute value.

---
Tags: redirects
---


# Question
Title: How to build a personal fitness record site
Having used EE in fairly conventional ways, I'm not sure how to build this. Here’s the scenario:

* A user registers and uses the site to create and view ongoing health data, graphs and statistics etc.
* This is sensitive data so, like a running app site or myFitnessPal only the user (or other selected members of the community) get to see their pages.
* The template for each user’s set of pages is the same but the data will be personal to the user.
* A trainer will need access to 15 users.

How can ExpressionEngine enable this?

# Answer
> 2 votes
It's defiantly doable. The tricky part will be allowing other users to 'manage' some people.

I'd probably look at something like Zoo Visitor (EE2) as it saves users 'profile' to channel entries which does come in handy.

A user signs up where it creates a new user (you will likely have to use email address as the unique member identifier).

After signup, redirect to "/update" (or whatever URL) which is a 'channel form' some things will have to be pre-formatted (title, url\_title etc but you'll never use most) here they can enter their "stats". Saving this page will make that member the "author" and once they're the author you can restrict viewing it to that author.

```
{exp:channel:entries author_id="CURRENT_USER"...}

```

This will take care of users being able to only see their stats.

For "trainers" you're going to have to manually assign them to entries by using a relationship field - a custom field that is added to the members channel that links to a specific 'trainer'. then you can have a url like "/trainer/manage" where you can search the members channel for the currently logged in 'trainer' - not trivial but do-able. This would return a list of members assigned to the logged in trainer where the could click on each member like "/trainer/edit/ID\_of\_chosen\_member".

This is all overly broad but so to is the question. You have yet to declare what data will they be managing, how is the data updated, is the data to be historical… if so you will need multiple entries – you will want to use a separate channel specifically for this purpose.

I've done similar before, you do have to compromise on some things and re-arrange others. For 'getting' data you're best to use member ID's and plan, build, re-configure, plan, build. From memory, I used Stash a helluva lot, as it was easier to capture a bunch of data and filter it dependant on the logged in user.

There is no right or wrong just try and try again.

---
Tags: members, groups
---


# Question
Title: Has Channel Image 6.0.3 been made available?
Hi there I just downloaded the latest version and uploaded but the version still says 6.0.2 and the bug persists. Images disappear after setting the cover image.

Many thanks

# Answer
I just change the version in the addon.setup.php to 6.0.3 to trigger it to update and it seems the bug has gone.

Just in case anyone else has the same issue.
> 0 votes

---
Tags: channel, channel-images
---


# Question
Title: Overriding login_authenticate_start: how to fail with specific message?
I have an extension that uses a 3rd party authentication system for EE3. It's working great overriding `login_authenticate_start` but I'm stuck on some logic for when the 3rd party auth fails: how to fail gracefully?

I know in this function I can `exit()` to stop the login, but it's not pretty. If you just `exit()` you get a white page.

How do I reject the login gracefully (i.e. back to the login page) and provide my own text for the explanation text? (much like when you fail a login normally as depicted below)

# Answer
Have you tried this? This is how EE passes messages to a redirect. https://docs.expressionengine.com/latest/development/legacy/libraries/session.html#flash-data-for-redirects
> 0 votes

---
Tags: login, authentication
---


title: CartThrob errors in EE CP under PHP 7.0

text:
# Question
Title: CartThrob errors in EE CP under PHP 7.0
I'm using CartThrob v2.71 (the last available v2.x?) on EE v2.11.7 (the latest available v2.x) under PHP 7.0 (just upgraded) and now getting CP errors:

```
A PHP Error was encountered
Severity: 8192
Message: Non-static method Cartthrob_mcp::module_enabled() should not be called statically
Filename: cartthrob/mcp.cartthrob.php
Line Number: 264 [...and 251...]

```

Any suggested fix for this or am I being a cheapskate by not upgrading both EE and CartThrob to v3...?

# Answer
Following the comment in the file, this seems to be a fix to remove the errors (though I don't use the Subscriptions addon):

*/system/expressionengine/third\_party/cartthrob/mcp.cartthrob.php*

line 240:

```
    /*
    // EE chokes in template publishing with any CT tag on _validate when we're loading ct payments lib
    $EE->load->library('cartthrob_payments');

    if ($EE->cartthrob_payments->module_enabled('subscriptions'))
    {
        self::$nav['subscriptions_settings'] = array('subscriptions_settings' => '');
    }
    */

    $EE->load->library('cartthrob_payments');

    // if (self::module_enabled('subscriptions'))
    if ($EE->cartthrob_payments->module_enabled('subscriptions'))
    {
        self::$nav['subscriptions_settings'] = array('subscriptions_settings' => '');
    }

    $modules = array(
        'Cartthrob_order_manager'   => 'om_sales_dashboard',
        'Ct_admin' => 'order_admin',
        'Cartthrob_item_options' => 'global_item_options',
    );

    foreach ($modules as $key => $module)
    {
        if ($EE->cartthrob_payments->module_enabled($key, NULL))
        // if (self::module_enabled($key, NULL))
        {
            self::$nav['modules'][$key] = array( $key => $modules[$key]);
        }
    }
    return self::$nav;

```
> 0 votes

---
Tags: cartthrob
---


title: Users Unable to edit their profile

text:
# Question
Title: Users Unable to edit their profile
I am using the User module, and when logged in as a member, I am unable to see the user's profile while using the edit profile form. (Front-end)

The form does load, however the information contained on the form is all information from the Super Admin, not the signed in user.

I have tried the parameter `username="logged_in_user"` and that does not work.

Any assistance would be appreciated.

Edit: dynamic="no" still does not work, even with username="{username}" or username="{logged\_in\_username}"; Also, this was tried on an incognito browser, so even if I was logged in, it shouldn't have the option to pull the super admin account info.

EDIT2:

Actually found the solution: Turns out this form cannot be used in a partial, which was the problem.

# Answer
> 0 votes
There could be several things happening here. It seems to think that you are still logged in as the administrator. Log out, clear cache and cookies and try again. After logging in and out several times as different users can cross things up once in a while.

If you are going to hard code things, try setting:

username="{username}" or member\_id="{member\_id}"

and set dynamic="no"

Otherwise it should be getting the info from the currently logged in user. Display that info somewhere else on the page so you can see who it thinks you are.

you can also put those things in the uri username="{segment\_3}" or member\_id="{segment\_3}"

# Answer
> 0 votes
They key for the entire issue was that the form was being included using a partial.

The partial cannot parse the form on-the-fly like a template can.

This caused the issue.

---
Tags: members, ee3, solspace-user, profile-edit
---


# Question
Title: Can I Dynamic grid row count selected by user per entry?
I’m trying to allow the author to over ride the default of 7 grid rows to be displayed on main page of article.

I have a drop down filed (limit\_override) with “default,25,50,75” to start with.

I would like to have something like this, below does not work

> {if limit\_override =="default"}
>
> {grid limit="7"}
>
> {if:else}
>
> {grid limit="{limit\_override}"}
>
> {/if}
>
> stuff...
>
> {/grid}

I have tried stash

Thanks

# Answer
You should be able to work this out using something like:

```
{grid_field_name}
    {if limit_override == "default"}
        {if grid_field_name:count <= 7}
            {grid_field_name:grid_col_name}
        {/if}
    {if:else}
        {if grid_field_name:count <= limit_override}
            {grid_field_name:grid_col_name}
        {/if}
    {/if}
{/grid_field_name}

```

Or with Stash you could set\_list for the grid output and then get\_list with a conditional limit. Or in a separate channel:entries tag get and save the value of limit\_override and use that as the limit parameter in the grid field in the main channel:entries. Haven't tested, and not sure which of those 3 ways is the fastest / most efficient.
> 0 votes

---
Tags: grid
---


# Question
Title: Message: Non-static method Updater_helper::arrayExtend() should not be called statically, assuming $this from incompatible context
Getting an error with **Dev Demon updater**:

> Message: Non-static method **Updater\_helper::arrayExtend()** should not be called statically, assuming $this from incompatible context

REF #TT

# Answer
> 2 votes
This is known error of Upgraded PHP version.

As you know a static method should ideally defined as `static function(){}` where **static** means the method can be called without an instance of the class.

For current scenario, Follow the staps:

1. Open FTP and go to `system > expressionengine > third_party > updater > libraries` folder.
2. Open file named **updater\_helper.php**
3. Search function `function arrayExtend(` and change it from

```
public function arrayExtend($a, $b) {

```

TO

```
public static function arrayExtend($a, $b) {

```

**arrayExtend** is not a single function that is static and defined normally. There is more functions in same file

> getThirdPartyPath()
>
> getThemePath()
>
> getThirdPartyThemePath()
>
> arrayExtend($a, $b)

You need to change all this functions to **static** by adding **public static function fun\_name()**

---
Tags: devdemon, devdemon-updater
---


# Question
Title: Control Panel won't log out, loops when logging back in randomly
I upgraded to EE 2.7.3 a few months back and recently added caching preferences to our .htaccess file for site optimization. Since these changes, I'm currently having two issues:

* Sometimes when I press the 'Log-out' button, it just refreshes the page and keeps me logged in.
* After I'm logged out based on time or when the 'Log-out' button does work, when I try to log back in - I will occasionally have the screen loop on a white screen and it won't go to the control panel.

Clearing my cache solves both issues. I don't have a problem doing this, but we're starting to roll the control panel out to others at work and I would rather it just work.

In my 'Security and Session Preferences', I have the CP Session type set to 'Cookies and session ID'.

My .htaccess code is:

```
<IfModule mod_expires.c>
ExpiresActive On
ExpiresDefault "access plus 24 hours"
ExpiresByType image/jpg "access plus 1 months"
ExpiresByType image/gif "access plus 1 months"
ExpiresByType image/jpeg "access plus 1 months"
ExpiresByType image/png "access plus 1 months"
ExpiresByType text/javascript "access plus 1 months"
ExpiresByType application/javascript "access plus 1 months"
ExpiresByType application/x-shockwave-flash "access plus 1 months"
ExpiresByType text/css "access plus 1 hours"
</IfModule>

<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript
</IfModule>

```

I didn't think this would affect the control panel itself, but I may be wrong.

Do I have to specify I don't want the control panel cached, or does this sound like an issue unrelated to the .htaccess?

# Answer
Are you using a multi config environment? If you are, depending on how it's set up it may be looking for www.

I ran into this problem, (couldn't log in) but adding this to the .htaccess fixed it.

```
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]

```
> 1 votes

# Answer
The issue is with the ExpiresDefault. Because it's a catch-all I believe it's setting bad expire headers on the cookies. I was having the same exact issue and removed only that line and all was well!
> 1 votes

---
Tags: control-panel, htaccess, caching
---


# Question
Title: If Logged In Member ID Working Except for One Member
Good Afternoon, I ran into a strange issue this morning. I have a page setup that contains a special link that I only want five specific members to have access too. I setup a conditional using the 'if logged\_in\_member\_id' method for this link. It's working great except for the member with the ID of 10. My code is below. Any ideas why this would not work for just one of the members?

```
{if logged_in_member_id == "13" OR logged_in_member_id == "4" OR logged_in_member_id == "7" OR logged_in_member_id == "10" OR logged_in_member_id == "13"}<a href="/special-link">link</a>{/if}

```

Thanks in advance for any tips or suggestions that will help me get to the bottom of this and get it resolved!

# Answer
> 0 votes
I resolved this issue by deleting and recreating the member. This process assigned a new member ID and once I updated my code with the new ID the special link begin working for all intended members. This perhaps isn't actually an answer but instead a workaround, nevertheless my problem is resolved! Thanks

---
Tags: members
---


title: Expresso Store custom tax rule

text:
# Question
Title: Expresso Store custom tax rule
I've worked on a few custom plugins/add-ons before but am a bit rusty on extensions. I need to write a custom tax rule for Store and looking for guidance on targeting one of the Store extension hooks, `store_order_taxes`.

I've got a simple extensions set up and installed but for some reason it does not seem to be being called or applied to the cart in the front-end.

Any suggestions?

Cole

# Answer
Sorted thanks. The issue here was a typo (store\_orders\_taxes not store\_order\_taxes).

Pro tip folk - use a different name for your method from the hook you are accessing!
> 2 votes

---
Tags: expresso-store, add-on-development, extension, tax
---


# Question
Title: How to load different stylesheets depending on the template
Right now I have an includes.group, that holds different templates that I load. Such as the nav, head, footer etc.

As of right now the head holds all of my style sheets for every template. But I would like a way to only load certain style sheets depending on the template.

How can I go about doing that?

# Answer
The simplest and and most flexible way is to use Template Layouts.

In your main HTML Layout wrapper (simplified) which we will say is named "\_html-layout" in the "layouts" template group:

```
<html>
<head>
    <link rel="stylesheet" href="/css/global.css">
    {layout:css_extra}
<head>
<body>
    {layout:contents}
</body>
</html>

```

In your templates, identify which layout it will use, and set the `css_extra` layout variable.:

```
{layout="layouts/_html-layout"}

{layout:set name="css_extra"}
    <link rel="stylesheet" href="/css/contact-form.css">
    <link rel="stylesheet" href="/css/form-validation.css">
{/layout:set}

```

`{layout:css_extra}` in the layout will get the extra stylesheets, and everything else that the template outputs will become `{layout:contents}`.
> 3 votes

# Answer
How we do that: in your embed call, create some variables and pass the stylesheet names that you want to load, then pass those into the template.

```
{embed="template_group/template" stylesheet="mystylesheet.css"}

```

and in the template:

```
<head>
<link rel="stylesheet" href="/css/{embed:mystylesheet}">
</head>

```
> 0 votes

---
Tags: templates, channel, template-layouts, stylesheets
---


# Question
Title: Since 3.5.2 unable to add more grid fields
Since 3.5.2 i'm unable to add more grid fields. Did a fresh install of EE 3.5.2 and created a grid custom field. Then i edited the grid field to have more then one column but the new column does not save. No matter which type of custom field i choose to add within the grid field.

# Answer
I had same problem with 3.5.2... It wouldn't save my new grid layout so I ended up having to delete the field group and redo it with updated grid layout and that seemed to work. must be a bug
> 0 votes

---
Tags: grid
---


# Question
Title: Showing Expired Entries Only. Not working
I want to show previous concerts (past concerts) under a special tab. I only want to show past concerts, not current or upcoming concerts that is under a different tab. I tried the following code. Using EE 2.x

```
 {exp:channel:entries channel="concerts" sort="desc" limit="20" show_expired="yes" }

  {if expiration_date < current_time}

  {concert-info}

  {/if}

  {/exp:channel:entries}

```

This does not work it shows both upcoming concerts and past concerts. I double checked and the past concerts have an expired dates and they have expired.

# Answer
> 1 votes
You can use condition like a below:

```
{if expiration_date < current_time AND expiration_date!=""}

```

Alternatively,you can use below query to get the records:

```
SELECT
    t.entry_id,
    t.title,
    t.url_title,
    d.field_id_XX AS your_custom_field
FROM
    exp_channels AS c NATURAL JOIN
    exp_channel_titles AS t NATURAL JOIN
    exp_channel_data AS d
WHERE
    c.channel_id = your_channel_id AND
    t.expiration_date != 0 AND
    t.expiration_date < UNIX_TIMESTAMP()

```

# Answer
> 0 votes
Expanding on my original comment, it turns out you can use shorthand as well as long format.

```
{exp:channel:entries
  channel= "mychannel"
  start_on = "-12 months"
  stop_before= "yesterday"
  show_expired = "yes"
  ...
}

```

This will look back 12 mths until yesterday.

---
Tags: conditionals
---


# Question
Title: Using video links within grid text field
I have a grid called "attachments" with 2 fields. They can enter either a File or they can enter a video url through a simple text field. Any idea what I'm doing wrong?

However, when I try to create an href it gets all messed up for some reason and creates markup such as

```
<a href="a href=" https: www.youtube.com watch?etc">https: www.youtube.com watch?etc</a>"">testURL"

```

I've verified the value without the and it spits out the url like it should, and I checked the field to make sure None was set for text formatting.

Here's my code:

```
{attachments}
  {if attachments:image_file != ""}
       <a href="{attachments:image_file}">testImg</a>
  {if:elseif attachments:video_url != ""}
       <a href="{attachments:video_url}">testURL</a>
  {/if}
{/attachments}

```

# Answer
There's a setting in your channels preferences that you can toggle to automatically convert urls to links.

Find that setting and turn it off.
> 2 votes

---
Tags: ee3, grid, url
---


# Question
Title: How to manually create EE 3 member accounts
I have a situation where I may have to pull from another sites member list (not EE)and bring those over to my EE site for use. It may be an excel sheet they provide or something else I recommend.

Can someone help explain what would need to be done to manually create member accounts with EE 3.5 so I can let them log on with creds they used from other site. I'm assuming I'd have to know what tables it inserts to during registration and create entries in the database for all the related fields provided.

# Answer
I ended up using the plugin **Smart Member Pro** which was perfect for what I needed. Very powerful plugin for importing member accounts and easy tags to display member data as well. Worth the money.

Zeel Smart Member (Free)

Smart Member Pro (Paid)
> 2 votes

# Answer
You can import members via these instructions.

As you will likely not import passwords you would need to set up a pw recovery template as well. This is simply a forgot password function
> 3 votes

---
Tags: members, registration, member-details
---


# Question
Title: How to refresh a "news" embed based on filter button clicked
I've got a "news" embed I'm calling from my homepage. Inside that news listing template it lists 7 articles based on the dates, which could be a mix of 4 different categories. I'm not using EE categories, it's just a radio button field that is compared to set the styling. If I need to switch to EE categories I can.

What's the best way to refresh that whole "news" embed section when they click one of the filter buttons? I need to refresh so it now shows 7 articles with the field type "news\_category" equal to say "announcements".

Should I just link to same page but set a segment and pull content based off that segment (/news/announcements), or can I reload this with AJAX or jQuery somehow?

# Answer
> 2 votes
I've done similar before and ajax is your best bet rather then refresh or link to another page.

Your home page =

```
<h1>Home page<h1>
<!-- Other channel calls -->
{exp:channel:entries channel="your_channel"}
{title}
{/exp:channel:entries}
 <div id="news">
   <select id="switch"> <!-- Use actual category ID values -->
     <option value="01">Option</option>
     <option value="02">Option 2</option>
   </select>
   <div id="news-list">
     {exp:channel:entries
       limit="7"
       channel="your_channel"
       }
      {embed = "/news/list"} -- Embed the base 7 articles
     {exp:channel:entries}
   </div>
 </div>

```

Your embed (news/list) =

```
<article>
  <h1><a href="/news/{url_title}>{title}</a></h1>
</article>

```

Javascript =

```
<!-- Assumes you know what you're doing here -->
$('#switch').on('change', function() {
  url = "/ajax/update_news/"+this.value(); <!-- Should render /ajax/update_news/categories_actual_id -->
  $.ajax({url: url, success: function(result){
      $("#news-list").html(result);
  }});
})

```

/ajax/update\_news.html =

```
{exp:channel:entries
  limit="7"
  channel="your_channel"
  category="{segment_3}" {!-- The categories ID --}
  }
  {embed = "/news/list"} -- Embed the base 7 articles
{exp:channel:entries}

```

Embeds can be an expensive include if you have lots of other stuff going on within the page, you could alternately use snippets instead.

**Update** Your code in comment will never work as your using tags that you've dreamt up. If you don't want to use categories then you'll have to use the search tag

```
{exp:channel:entries search:your_field_name="your_search_term" ...}

```

Have a good read of this page: https://docs.expressionengine.com/v2/add-ons/channel/channel\_entries.html

---
Tags: channel-entries, ee3, sorting, filtering
---


title: images not showing

text:
# Question
Title: images not showing
I can see the images in file manager but none of them are showing up on the site:

http://metlab-tec.net/

If I go the products page and try to add files to the media tab, nothing happens.

I didn't build the site and am not familiar with expression engine but would like to learn it.

Can anybody point me in the right direction - it would be most appreciated.

Thanks

# Answer
> 0 votes
The site is also reporting CORS errors for the fonts from `http://metlab-tec.com` (which as a result appear to not be loading), so there may be issues related to how these two domains interact that are compounding your problems.

Fixing the images thing really depends on how images are being processed within your site's EE setup: but since the URLs for the images are missing rather than 'wrong' it suggests your media configuration is broken somehow: it might be (for example) that your file upload directories are pointing to a location that can no longer be accessed (or is empty).

If you let it be known which version of EE you are using (should appear in footer of Control Panel interface) and how your EE installation is accessing images (e.g. via native media handling or via an add-on such as Assets or Channel Images) there maybe more help that can be provided.

---
Tags: channel-entries
---


title: Storing Single Option Value in Admin

text:
# Question
Title: Storing Single Option Value in Admin
I need to store a single numerical value in the admin for use in my templates. What is the best way to do this. I've reviewed Accessories, Extensions and Modules but can't seem to find something that has the simplicity of setting up the admin area and the ease of using it on the front end template.

# Answer
> 1 votes
Set up a Global Variable with the value you need. Then you can access the value from within a template simply by including the Global Variable name (within curly brackets) within your templates - e.g. `{global_variable_name}`

In EE2, Global Variables are set via the Control Panel - go to Design / Templates / Global Variables to do this. More info here

---
Tags: control-panel, module, extension, options, accessory
---


title: Category Archive Page

text:
# Question
Title: Category Archive Page
EE 2.7.2 Build20131008

I am fairly new to expression engine and having a little bit of trouble getting this to work out the way I need it.

I am trying to create a category archive page. Here is the code I have so far:

```
{exp:channel:category_heading}
<h2>Careers in {category_name}</h2>
{/exp:channel:category_heading}
{exp:channel:categories channel="careers" category="{category_id}" style="linear"}
<ul>
{exp:channel:entries channel="careers" category="{category_id}" orderby="date" sort="desc" disable="member_data" dynamic="no"}
<li>
<a href="{url_title_path='careers'}">{title}: ({career_location})</a>
</li>
{/exp:channel:entries}
</ul>
{/exp:channel:categories}

```

The issue I have is that is doesn't seem to be pulling the "category\_id" in the channel:entries tag. So I currently have 2 posts, both are assigned to 2 categories. So it actually renders a list of 4 posts, instead of just 2.

**More Details**

Here is a full layout of how things are setup:

Careers Channel with 2 category groups - location and department.

\_desktop/careers pulls the careers listing. Currently have a select/dropdown on that page.

```
<form name="catmenu" action="">
<select name="selcat" onchange="location=document.catmenu.selcat.options[document.catmenu.selcat.selectedIndex].value;">
    <option value="">--Select Category--</option>
    {exp:channel:categories channel="careers" category_group="2" style="linear"}
        <option value="{path='careers/listing'}/{category_id}">{category_name}</option>
    {/exp:channel:categories}
</select>
</form>

```

I created the careers/listing template as a "landing page" for when a category is selected. So lets say you select "Jobsville, NY" from the dropdown, it points to the careers/listing template with this URL:

```
domain.com/careers/listing/C37

```

Jobsville category id is "37". I can't figure out how to get it to spit out /careers/listing/category\_name either.

On this listing page is where I have the code from the first part of my question. I currently have 2 posts.

* Post 1 - assigned to location 1 and department 2
* Post 2 - assigned to location 2 and department 2

The listing page is showing 2 copies of each post - not limiting the list to the category that I am currently viewing.

# Answer
On your `listing` template try simply omitting the `category` and `dynamic` parameters, like so:

```
{exp:channel:entries channel="careers" orderby="date" sort="desc" disable="member_data"}

```

If you want to switch from category IDs to category URL titles try this:

```
<option value="{path='careers/listing'}/category/{category_url_title}">{category_name}</option>

```

Documentation
> 0 votes

---
Tags: ee2, categories
---


# Question
Title: Upgrade issues when upgrading to 3x when old plugins not available
0 down vote favorite I'm trying to upgrade from 2.11 to the latest 3.x.

in my user \>addons I only installed 3x compatible adds on; however, I keep getting error msgs for the adds that are not there any more than were 2.x compatible I get an error like:

> error Unable to load the following extension file... If I try to load the old ones back in I eventually get a 500 error

...any ideas?

# Answer
From the documentation:

> Add-ons that you will not be using in v3 must be uninstalled and refactored out of your site *before* upgrading.

It sounds like you've just removed files, and not actually uninstalled the add-ons via the Add-on Manager in the control panel. If so your site still contains references to those old add-ons.

Rollback to your backup that you made just before beginning the upgrade, follow the instructions above, and you should be okay.
> 1 votes

# Answer
If you cannot upgrade your EE2 add-ons to EE3 or there are no equivalents then you're stuck with EE 2.

Which add-ons are incompatible?
> 0 votes

---
Tags: ee3, upgrade
---


# Question
Title: stop google from crawling ajax pages with no <head></head>
I have a static site that pulls in pop up content using ajax. I don't want search engines to index those ajax pages. I know there are ways to block pages with

```
<head>
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
</head>

```

But I don't have that on each of the ajax pages. so wondering what the best approach would be.

# Answer
I would think just putting those pages into a robots.txt file would be effective. Just a plain text file that sits in your website's root directory and includes basic site information (e.g. about location of your sitemap etc.). This can include statements instructing Google's robots to ignore specific files and folders - e.g.

`Disallow: /ajax/` will tell google to ignore any files in the `/ajax` directory.

`Disallow: /ajax/file.html` will tell google to ignore the file `/ajax/file.html`

Using robots.txt means you can set these exclusions without having to put information into the files themselves, and also exclude directories.

HTH
> 1 votes

---
Tags: search, ajax, no-results, google
---


# Question
Title: Conditional with "&" in comaprison string fails
EE 2.9.2, Structure 3.3.17 In running a conditional to compare a page title and it's Structure parent, the conditional returns false if there is "&" or any other punctuation in the string.

```
{if title == "{structure:top:title}}
   do something
{/if}

```

Simple enough? This works great if there is no punctuation or other special characters in either. i. e. if the title is "Administration & Finance" the conditional fails. If it is "Administration and Finance", it returns true. Placing `&` in the title works, but then other Structure tags ( breadcrumbs ) print it out verbose ( I get Administration & Finance ) . Plus I can't expect editors to remember to put code in the title.

Any ideas?

# Answer
> 1 votes
You appear to be missing a `"` in your example - putting this back might fix things. If not, Romans-8 idea of using streeng seems viable. Something like:

```
{if {exp:streeng encode="yes"}title{/exp:streeng} == {exp:streeng encode="yes"}{structure:top:title}{/exp:streeng}}
   do something
{/if}

```

---
Tags: conditionals, structure
---


title: Freeform Form Not Submitting

text:
# Question
Title: Freeform Form Not Submitting
For some reason forms have stopped submitting on a site we manage. I have created a test form with the below code and it also does not submit. I don't see any errors. EE 2.9 and FF 4.1.7. Any ideas what to check?

```
{exp:freeform:form form_id="2" return="contact/thank_you" notify="redacted"}
    <div>
        <label>{freeform:label:name}
          {freeform:field:name}
        </label>
    </div>

    <div>
      <div>
          {freeform:submit}
      </div>
    </div>
{/exp:freeform:form}

```

# Answer
> 0 votes
It all looks good except for this parameter: `notify="redacted"` I'm not sure what that means. Take a look at the parameters for notification override settings https://solspace.com/expressionengine/legacy/freeform-4/form/#admin\_notify You can set most of those in the forms settings as well and won'tneed the parameters.

---
Tags: solspace-freeform
---


# Question
Title: How can I redirect my contact form to a thank you page
Please accept my apologies if i'm not clear, I will try my best.

I have EE v 2.9.2 installed and I am using the built in email contact form.

However, I am trying to get it to re-direct to a thank you page rather than show the ajax message block.

Here is my code:

```
{exp:email:contact_form user_recipients="no" return="http://www.pixelsandcode.co.uk" recipients="pixelsandcode@me.com" charset="utf-8" form_class="form form--full d-showgrid"}

<fieldset class="controls controls--left">
    <label for="name" class="controls__label">What's your name?</label>
    <input type="hidden" name="message[]" value="--Name--" />
    <input class="controls__control" type="text" id="name" name="message[]" size="40" maxlength="35" value="" placeholder="Benjamin Franklin" />
</fieldset>

<input name="submit" type='submit' value='Submit Form' class="btn btn--primary" />

{/exp:email:contact_form}

```

This is actually a stripped back view, I have other fields but even like this I get no redirect.

Is there something really obvious that I am missing here?

# Answer
> 0 votes
for redirect and return page, you should follow the doc https://docs.expressionengine.com/latest/add-ons/email/contact\_form.html

For now, Response comes in ajax success. You can redirect to your custom thank you page in AJAX success function.

---
Tags: ee2, forms
---


# Question
Title: Is there an ExpressionEngine SEO optimization plugin like Yoast?
Is there an ExpressionEngine SEO optimization plugin like Yoast for WordPress? I need to be able to optimize blog posts for search.

# Answer
> 2 votes
Nope. however, you are more free in EE to setup fields to tailor your needs. More than in WP

# Answer
> 1 votes
SEO Lite is a lightweight module which creates SEO tab on publish page where you can add you seo title and descriptions.

You can also give the channel fields to include it in SEO meta for og:title or og:desc or og:image. Visit the doc here

---
Tags: seo
---


# Question
Title: Low search: sorting not working with distance filter
I have some entries to filter with geo location in stores channel. I want to filter all the stores near my zip code between some miles. I implemented it with geo coder and distance filter of low search and it working fine too except the **sort order**.

All the entries are displaying in random order of distance. for an example:

Shop 1 : 7 ml away
Shop 2 : 20 ml away
Shop 3 : 5 ml away

I want to list the entries in asc order of distance so the output sholud be:

Shop 3 : 5 ml away
Shop 1 : 7 ml away
Shop 2 : 20 ml away

Let me know if I do something wrong.

My Form page query is:

```
{exp:low_search:form query="{segment_3}" result_page="/stores/search-results/" form_id="search_stores" collections="stores"}
    <input type="hidden" id="location" name="distance:from" value="">
    <input type="hidden" name="distance:radius" value="200">
    <input type="hidden" name="distance:unit" value="mi">
    <input type="text" name="search:store_country" value=""> {!--Country field of channel entry--}
    <input type="text" type="keywords" name="keywords" value="{low_search_keywords}">

    <input type="submit" name="submit" value="Search">
{/exp:low_search:form}

```

My query string get from form is `/?distance:from={my_lat}|{my_long}&distance:unit=mi&keywords={keywords}&distance:radius=200&search:store_country={country}`

My result query is:

```
{exp:low_search:results query="{segment_3}" distance:to="store_latitude|store_longitude" channel="stores" collections="stores" require_all="category" limit="6" paginate="bottom"}
    <p>{title}: {low_search_distance} ml away</p>
{/exp:low_search:results}

```

**(Asc order of low search geo location is working if I dont use KEYWORDS and use any other variable)**

# Answer
This is intended behaviour. If you search by keywords *and* distance, then the search results will automatically be ordered by relevance score (which is the last filter to be fired). If you want to explicitly order by distance, you can set the `orderby` parameter on the Results tag like so:

```
orderby="low_search_distance"

```

...or add this to your Form:

```
<input type="hidden" name="orderby" value="low_search_distance">

```
> 1 votes

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


title: Solspace: Calendar & Tags

text:
# Question
Title: Solspace: Calendar & Tags
I have both Solspace calendar & tag plugin and I trying to create a page that lists all calendar entries that have a particular tag. I have the calendar event with a tag field but when i try and search for them i get everything.

any pointers would be greatly appreciated

# Answer
> 0 votes
One way you could go about it is to use the `{exp:tag:entries}` tag to get a list of entry\_id's to feed to the `{exp:calendar:events}` tag.

i. e.

```
{exp:calendar:events
event_id="{exp:tag:entries tag="{segment_3}" backspace="1"}{entry_id}|{exp:tag:entries}"
}
{title}
{/exp:calendar:events}

```

or something like that. Versions of EE, Tag, and Calendar?

---
Tags: solspace, tags, calendar
---


# Question
Title: Solspace freeform pro uploads sporadically not working
I am running Solspace FreeForm 4.2.2 and I have a form that submits via Ajax and has a file upload in the form. Sporadically we are seeing that the form gets saved in the database but the file does not saved. So user are trying to upload the file multiple times and it fails everytime. We are seeing 3 to 10 records in the database for the users depending on how determined they are, none of which have a file saved with it. Most of the time it works just fine for other users. We can't find a pattern of file size, file type, OS or browser used. Internally we cannot replicate the issue but see this happen several times a day.

Anyone experience anything like this? Have any ideas what to try to try and track down / replicate the problem?

# Answer
Could be that your ajax routine is finishing before the file upload finishes? Internet speed could be a factor over which you have no control. (most throttle uploads) Are you using freeforms error reporting back to your page? Try an A/B test. Take the form out of running ajax and try the old fashioned way to see if the issue persists. If it does, not your ajax call, something else. If not, maybe something in the javascript.
> 0 votes

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


# Question
Title: Move membership data from 1.x to 3.x database
I have an EE site that's based on the latest 1.x version and that has over 10,000 registered members (I tried a couple times to upgrade to version 2.x but it was a disaster). I now want to rebuild the site from scratch using the latest 3.x version and I want to move my 10k membership from the 1.x database to the 3.x database. Is that possible without creating a bunch of nasty side-effects for the new site?

# Answer
> 1 votes
I would read up on this https://docs.expressionengine.com/latest/cp/utilities/member-import.html Not sure if everyone will have to reset their password or not. ;~}

---
Tags: members, upgrade
---


# Question
Title: Moving Expression engine site from Live Server to Localhost
Please advice me on how to move Expression engine site from Live Server to Localhost

# Answer
> 2 votes
It is pretty straight forward to move an EE site.

The instructions from EllisLabs are pretty comprehensive - EE server migration instructions.

---
Tags: localhost
---


# Question
Title: Wygwam 'site page' link type not parsing when used within Low Variables variable
I am using: **EE 2.7.2**, **Low Variables 2.4.0**, **WYGWAM 3.2.2**

I have a WYGWAM field as a Low Variable, and within it, I am setting up some page links. When I create a link, under "Link Type" I chose "Site Page" and select the page on my site. However, when I output that variable on my homepage, the links are broken, and look like `href="{page_38}"`. For some reason the page url isn't getting parsed. This "Site Page" method works fine for links in my channel entries.

Any idea how to get around this? For now, I just switched to specifying the URL manually, rather than selecting the site page. Thanks!

Gary

# Answer
> 7 votes
For any variable that needs extra processing, like the Wygwam variable type, use the **tag syntax** rather than the variable syntax:

```
{exp:low_variables:single var="my_wygwam_var"}

```

Note that having early parsing on or off is irrelevant for the tag syntax, so you can leave it off.

# Answer
> 1 votes
This has been fixed in Wygwam version 4.0.8!

---
Tags: wygwam, low-variables, pages, wysiwyg, parse
---


# Question
Title: Order Item shows Number after option name
I have a confirmation email which shows the customer which item & option they have selected. For some reason it is also showing numbers "1 0" after the option name (Think these are pulled from the matrix field):

*Option Name 1 0*

How can I remove these numbers?

Here is the code I am using:

```
{exp:cartthrob:submitted_order_info}
{exp:cartthrob:order_items order_id="{entry_id}"}{item_options}{option_name}{/item_options}{/exp:cartthrob:order_items}
{/exp:cartthrob:submitted_order_info}

```

# Answer
> 0 votes
Adding backspace option helped remove the numbers, not sure why they show when the database entry does not have nay numbers. Strange.

```
{item_options backspace="2"}{option_name}{/item_options}

```

---
Tags: cartthrob, matrix
---


title: Custom Field searching

text:
# Question
Title: Custom Field searching
I have some more questions and I hope I don't waste your time .. I use EE3.4.7. and Calendar (EE3 version) .. this questions continues from here Custom field as a parameter

1. Since custom field searching is not possible with calendar:events my problem is this: I would like to give the opportunity to user to search for events in a city in certain dates. Now the city can be either a text field or a category, and at the moment I have a category group with events categories (music, theatre, cinema etc.) Should I create another group with cities?
2. Can the city be a Stash variable or Low variable in a search form? Can it work that way?
3. Also, can Calendar work in combination with Tag? For example can the city be a Tag field?
4. Can I make searches with sql queries on the database tables to solve the above problem?
5. In the end would custom field searching be available as a custom solution and what would be that cost?

# Answer
> 0 votes
I think you could use Stash for this. Setting a list of your calendar event data and then using regex in Stash to filter based on your custom field.

```
{exp:stash:set_list
    name="cal_events"
    parse_tags="yes"
}
    {exp:calendar:events
        channel="events"
        date_range_start="year-month-01"
        date_range_end="year-month-last"
        limit="20" paginate="both"
    }
        {!--set stash variable for field to search--}
        {stash:event_city2}{calendar:event_city2}{/stash:event_city2}

        {!--set other variables--}
        {stash:title}{calendar:title}{/stash:title}
        {stash:event_start_date}{calendar:event_start_date format="%F %j, %Y"}{/stash:event_start_date}
        {!--etc...--}
    {/exp:calendar:events}
{/exp:stash:set_list}

{exp:stash:get_list
    name="cal_events"
    match="#Athens#"
    against="event_city2"
}
    {if count == 1}
        <h5>Field we searched: {event_city2}</h5>
        <h6>Total Results: {total_results}</h6>
    {/if}

    <ul>
        <li>Title: {title}</li>
        <li>Event Start Date: {event_start_date}</li>
        <li>etc...</li>
    </ul>
    <hr>
{/exp:stash:get_list}

```

You'll have to check the docs for Stash on using Match and Against parameters. (You might also flip it from my example, and use match against parameters on the set\_list instead of get\_list, only setting variables you need.)

Couple of things:

* This may decrease performance, but saving the stash variable and re-caching when necessary may help. See Mustash for help with managing Stash variables.
* If you try it and don't get the results you expect, try adding the parameter "output='yes'" to set\_list tag to see what's being set in the first place.
* I haven't tested the above at all. Woohoo!

---
Tags: solspace, stash, solspace-calendar, low-variables, solspace-tag
---


title: Calendar and categories

text:
# Question
Title: Calendar and categories
i'm using exp:calendar:events to show all events that belong to certain dates and categories. Now i have 2 URL segments {segment\_2} and {segment\_3} that show category ids for example {segment\_2} is category 6 and {segment\_3} is category 17

if i have category="{segment\_2}|{segment\_3}" i get entries that belong either to one category or another.

The same happens if i put category="6|17" avoiding segments

What i really want is to get the results for category 6 AND category 17 (entries that belong to both these categories)

is that possible in a straightforward way? if not can it be used in combination with Low Seg2Cat or some other tool?

Thanks

* EE 3.4.7 and Calendar (ver 3)

# Answer
> 1 votes
As *stuartmcd69* says, what you need to do is use the `&` character instead of `|`. However, the current version of Calendar (2.2.3) has a bug where this does NOT work. We're close to releasing a 2.3.0 version that will include a bug fix for this though.

If you need a patch now, just create a support ticket here :)

# Answer
> 2 votes
According to the docs, using the pipe character will return results if entries belong to either category id. To return those that belong to both then use the `&` symbol instead of the `|` character.

Link to the docs read it :)

---
Tags: solspace-calendar, low-seg2cat
---


title: Downgrade expression engine v3 to v2

text:
# Question
Title: Downgrade expression engine v3 to v2
Is it easy to downgrade from version 3.5 to 2.9? I have a client that do not like the interface and don't want to upgrade some plugin's too. And how must I downgrade

Greetings Marc

# Answer
AFAIK there is not a sensible path to downgrade from EE3 to EE2.

Probably better to simply reinstate a backup of your EE2 from before your upgrade to EE3 onto a local server and then patch over whatever changes in content have been made since you did the upgrade, and then put the EE2 version back online.

If you are still at the point where you are trying to work out how to get around add-ons that haven't been migrated to EE3, I suspect the amount of work involved in restoring the backup is not huge.

Good luck!
> 0 votes

---
Tags: ee2, ee3, plugin
---


# Question
Title: PHP 7 Error with ChannelImages: Fatal error: 'continue' not in the 'loop' or 'switch' context in…
I'm getting this error when trying to upload an image with ChannelImages 5.4.19 with EE 2.11.7:

> Fatal error: 'continue' not in the 'loop' or 'switch' context in /home/omart/public\_html/system/expressionengine/third\_party/channel\_images/ajax.channel\_images.php on line 2442

The offending code is below. Line 2442 is the line with continue;.

```
if ($field_type == 'file') {
        $img_path = str_replace($file_dirs_search, $file_dirs_replace, $field_data);

        if (file_exists($img_path) == FALSE) {
            exit($img_path);
            continue;
        }

        $img = array();
        $img['path'] = $img_path;
        $images[] = $img;
    }

```

Any help is appreciated.

Thanks,

ty

# Answer
> 4 votes
Replace the `continue` with `return` statement.

---
Tags: ee2, php, channel-images, ee2-upgrades
---


# Question
Title: Freeform: Is it possible to have custom email recipients
I have a channel called Jobs. When admin posts a new entry, they are presented with a field called `email_recipient` in which they can type an email address of their choice.

Then...on the template which contains the Freeform code. I would like to use the data in the `email_recipient` field to be used in the `admin_notify` parameter on Freeform. However, so far I have had no joy and wondered if this was even possible or will Freeform not allow this

Can anyone help me out with this?

My code is

```
{exp:channel:entries
channel="jobs"
dynamic="on" status="Open"
disable="categories|category_fields|member_data|pagination"}

<h3>Job Application Form</h3>

{exp:freeform:form
form_name="job_application"
return="/contact/thanks"
form:class="form-horizontal contact-form"
form:id="job_application"
recipients="yes"
recipient1="{recipient_email}"}

<!--Form Data-->

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

```

Note that the above example is using `recipients="yes"` and `reciepient1=`. I have tried with `admin_notify` too with no difference

# Answer
Well, Notifying parameter is working fine with Freeform. Issue is of **parsing**.

When we pass a EE loop under other EE loop, It will parse by priorities. In that case naturally Module tag will parse first and channel entries tag will parse after. You just need to tell `{exp:channel:entries}` to parse the loop first so your variable `{recipient_email}` will be available to use in **Freeform**.

Please add `parse="inward"` parameter to your `{exp:channel:entries}` loop and give it a try. :)
> 0 votes

---
Tags: channel-entries, solspace-freeform, forms, email, notification
---


# Question
Title: Any way to make Bloqs modular/reorder-able
So I'm using bloqs (https://eebloqs.com/) for a project. On the backend, it seems to allow the content to be re-ordered:

but in the code on the front end the bloqs are hard coded in place in the template:

```
    {sub_page_blocks}
        {content_and_image_50_50}
            <div class="medium-6 small-12 columns">
                <h2>{section_title}</h2>
                {section_content}
            </div>
        {/content_and_image_50_50}
    {/sub_page_blocks}

    {sub_page_blocks}
        {secondary_page_3_column_with_header}
         <h3>{section_content_second_page}</h3>
        {/secondary_page_3_column_with_header}
    {/sub_page_blocks}

```

Is there a way to code the template to allow the user to reorder the bloqs and have that order be applied to the front end? I've checked the plugin site for help but the documentation does not exist. I'm really shooting in the dark here.

Thanks!

# Answer
Just use a single tagpair for the Bloqs field, it renders them in the order specified on the publish page. You can think of the individual Bloq field pairs as conditionals, e.g. if the next atom is this type, use this code. Example using your tags above (assumes you have the Bloq field, Bloqs, and atoms referred to correctly):

```
{sub_page_blocks}
    {content_and_image_50_50}
        <div class="medium-6 small-12 columns">
            <h2>{section_title}</h2>
            {section_content}
        </div>
    {/content_and_image_50_50}

    {secondary_page_3_column_with_header}
        <h3>{section_content_second_page}</h3>
    {/secondary_page_3_column_with_header}
{/sub_page_blocks}

```
> 1 votes

---
Tags: ee3, plugin, blocks
---


# Question
Title: Grid Conditionals - side by side fields - only display if field filled
Perplexed how or if this can be achieved.

I have a grid field **e\_contact** that consists of three field/columns:

> **Name Phone Email**
>
> {ename} {ephone} {eemail}

My code to display this is:

```
<span><i class="fa fa-fw fa-phone"></i>
  {e_contact}
    <a href="tel:{e_contact:ephone}">{e_contact:ephone}</a> ({e_contact:ename})
  {/e_contact}
</span>

<span><i class="fa fa-fw fa-envelope"></i>
  {e_contact}
    <a href="mailto:{e_contact:eemail}">{e_contact:eemail}</a>
  {/e_contact}
</span>

```

Which would display:

\[icon\] Phone (Name)
\[icon\] Email

If multiple (let's say 3) rows of info is added, I want it to appear like so:

\[icon\] Phone1 (Name1) or Phone2 (Name2) or Phone3 (Name3)
\[icon\] Email1 or Email2 or Email3

So, a couple of things...
If no **Email** is added, then that (2nd) span should not appear on the page at all.
(A *Name* and *Phone* will always get added.)

Also, how do i get the field entries to display next to one another as above, with the word 'or' between each instance.

Similarly, the brackets around the name should obviously only appear if a name is entered in the field. (Multiple 'Phone' numbers may get added (in new rows) but only one 'Name' (in the first row).)

Any help is much appreciated!

# Answer
> 1 votes
That's do-able, something like this should get you going, by using count conditionally you'll only ever get output if something exists:

```
{e_contact}
  {if e_contact:count=="1"}
    <span><i class="fa fa-fw fa-phone"></i>
      <a href="tel:{e_contact:ephone}">{e_contact:ephone}</a>
      ({e_contact:ename})</span>
  {/if}
  {if e_contact:count =="2" AND "{e_contact:ephone}" != ""}
    or <a href="tel:{e_contact:ephone}">{e_contact:ephone}</a> ({e_contact:ename})
  {/if}
  {if e_contact:count=="3" AND "{e_contact:ephone}" != ""}
     or <a href="tel:{e_contact:ephone}">{e_contact:ephone}</a>({e_contact:ename})
  {/if}
{/e_contact}
<!-- This above will spit out on one line
icon / phone1 name1 or phone2 name2 or phone3 name3
-->

{e_contact}
  {if e_contact:count=="1" AND "{e_contact:eemai}" != ""}
    <span><i class="fa fa-fw fa-envelope"></i>
      <a href="mailto:{e_contact:eemail}">{e_contact:eemail}</a>
    </span>
  {/if}
  {if e_contact:count =="2" AND "{e_contact:eemai}" != ""}
    or <a href="mailto:{e_contact:eemail}">{e_contact:eemail}</a>
  {/if}
  {if e_contact:count =="3" AND "{e_contact:eemai}" != ""}
     or<a href="mailto:{e_contact:eemail}">{e_contact:eemail}</a>
  {/if}
{/e_contact}
<!-- This above will spit out on one line
icon / email1 or email2 or email 3
-->

```

I'd probably use stash to capture all the variables and manage the output from there but if your new, this, while a tad verbose it should work the way you want.

**UPDATE**

Given your replies, I've added extra conditionals that checks to make sure the field isn't empty too. If you haven't read the 'conditionals' docs, here's a link

---
Tags: conditionals, grid
---


# Question
Title: How to create a global variable inside config.php
I'm trying to build a simple config bootstrap for use in multi-server environments. I realise there are lots of config bootstraps around, but a lot of the popular ones seem a bit complicated for what I need (and feel comfortable with) at this stage. I'm currently using this for the database.php file.

I want to create a global variable (or another type of variable that can be used in the same way) inside the config.php file, and then be able to output it inside the templates - how would I go about doing this?

I've tried creating this and adding it to the config.php file:

```
$config['my_google_analytics_key'] = 'UA-XXXXXXX-XX';

```

But entering `{my_google_analytics_key}` inside my templates outputs `{my_google_analytics_key}` rather than `UA-XXXXXXX-XX`.

So I'm obviously going about this the wrong way, but I'm not sure what steps I'm missing. Thanks.

# Answer
Take a look at your main index.php file, you should see this line:

```
//  $assign_to_config['global_vars'] = array(); // This array must be associative

```

Once that's uncommented and populated the variables should be available in your templates. For example:

```
$assign_to_config['global_vars'] = array('analytics_key' => 'UA-XXXXXXX-XX');

```

That should be available as `{analytics_key}` in any template.

If you'd prefer to set the variables in config.php you can, but you need to explicitly set the scope of the `$assign_to_config` variable:

```
global $assign_to_config;
$assign_to_config['global_vars'] = array(
    'analytics_key'  => 'UA-XXXXXXX-XX',
    'something_else' => 'ABC',
    'another_one'    => '12345'
);

```
> 7 votes

# Answer
Instead of using an array in `index.php` is possible to create **Template variables** inside the template as well.

**Developer \> Template Manager \> Template Variables \> Create New**

> Global Variables can contain text, HTML, javascript, etc. but cannot contain PHP code or ExpressionEngine tags ...

Refer to the official documentation here
> 0 votes

---
Tags: config, global-variables
---


title: ee3 category group ordering

text:
# Question
Title: ee3 category group ordering
I have a category group in ee3 with 100+ categories that were imported. Is there a way I can get them to be sorted alpha without drag & drop manually in the control panel?

# Answer
> 0 votes
I'm sure this will be added to ee3 at some point, but you can work directly in the database to do this. *(Tested on mysql 5.6.34, ee 3.5.4, backup first!)*

```
-- set the user variable
SET @cat_order_val = 0;

-- reorder the cat_order column based on Category Url Title (alpha ascending)
UPDATE exp_categories
    SET cat_order = (@cat_order_val := @cat_order_val + 1)
    WHERE group_id = 1
    ORDER BY cat_url_title ASC;

```

edit: added group\_id condition, change to match your group id.

---
Tags: ee3, category-group
---


title: Hook when member updates password

text:
# Question
Title: Hook when member updates password
I can't seem to find a hook for when a member updates their password. I am using EE v3.5.4 and just using the built in member templates. I am sure on existing but I can't seem to find it. Anyone know what it is?

# Answer
These what you are after? It appears these are planned for conversion to services down the road. But should still work now.

https://docs.expressionengine.com/latest/development/extension\_hooks/global/member\_model/index.html#member-update-start

https://docs.expressionengine.com/latest/development/extension\_hooks/global/member\_model/index.html#member-update-end
> 1 votes

---
Tags: members, hook, password
---


# Question
Title: 403 Forbidden error (unsafe operation) when updating template with script/meta/link tag 2.11.6
I have a pretty old site which I've just recently upgraded to 2.11.6. Everything works well, except that I can't update templates (in the CP) if they contain \<script\>, \<meta\>, \<link\>, or \<style\> tags. If I try, I get the error

```
403 Forbidden

A potentially unsafe operation has been detected in your request to this site.

```

Has anyone seen anything like this, or have an idea where I might check to solve this?

Edit/Additional information: While looking into Derek's suggestion about mod\_security, I remembered that I had set this site to use PHP7 as a test, and sure enough, when I set it back to 5.6, I can update templates fine. So it's something to do with PHP7, but not sure what yet.

# Answer
That has all of the earmarks of a mod\_security filter preventing the request from even hitting ExpressionEngine. In your server logs (ask your host if you don't have access), you can probably confirm. We recommend that the control panel be whitelisted from mod\_security, since admins will regularly submit content that includes HTML, JS, and other keywords that are commonly filtered for front-end security.

See this Stack Overflow topic for options on disabling via .htaccess, though it would be best for the host to set this exclusion for your ExpressionEngine `admin.php` file.
> 2 votes

# Answer
I apologize, this issue was unrelated to EE. WordPress was running on the same server, and in WordPress, a security plugin called WordFence was blocking the template saves when they contained suspect tags. I don't know why this only happened in PHP7, but disabling the security plugin fixed the issue.
> 0 votes

---
Tags: ee2
---


# Question
Title: Conditional. Prioritize one field over another if both exist
Cannot seem to work this out!

I have two fields, one is an image {e\_image} and the other is plain text {e\_map}. Both of these display a div in the exact same spot.

What I want, is if an image is uploaded to the {e\_image} field, AND text is added to the {e\_map} field, then ONLY the image will appear (it is prioritised over the map {e\_map) field). Both cannot appear on the page.

So something like below:

```
{if e_image}
 <div>{e_image}</div>
{if:elseif e_map}
 <div>{e_map}</div>
{/if}

```

And obviously if both fields are left empty, nothing appears.

Any help is much appreciated.

# Answer
> 0 votes
Try

```
{if e_image}
 <div>{e_image}</div>
{if:elseif e_map && ! e_image}
 <div>{e_map}</div>
{/if}

```

---
Tags: conditionals
---


title: EE 2.11.8 update broke CartThrob 2.71

text:
# Question
Title: EE 2.11.8 update broke CartThrob 2.71
After I updated ExpressionEngine from 2.11.7 to 2.11.8, CartThrob 2.71's order items stopped recording numeric information such as the order item's price, subtotal, quantity, etc. However, the order totals are still being captured.

I did not make any other changes when updating EE, and when I rolled back EE to 2.11.7, CartThrob resumed working as it should.

Has anyone else experienced this issue? Is there a fix?

(PHP 5.5)

# Answer
> 1 votes
EE 2.11.9 fixes the problem introduced in EE 2.11.8, and now CartThrob 2.71 is back to working as it was before.

https://expressionengine.com/blog/expressionengine-3.5.6-and-2.11.9-released

---
Tags: cartthrob
---


# Question
Title: How to email contents of a Channel Form submission with EE3x
I set up a channel form with all custom fields... Is there an option to send an email to a recipient with all those values upon submission? This seems like it would be such a common feature people would use but I'm not seeing it.

# Answer
> 1 votes
There is no direct method. But you can initialize a email function by this hook in your extention file https://docs.expressionengine.com/latest/development/extension\_hooks/module/channel\_form/index.html#channel-form-submit-entry-end

---
Tags: safecracker, ee3
---


title: A search form for a specific url

text:
# Question
Title: A search form for a specific url
i'm using Solspace Calendar to show events around an area on dates the user selects. I have made the results page with a combination of Calendar + Stash and it is working really fine.

I get the results like http://domain.com/index.php/results/Athens/2/2017/01/07/2017/02/28 where Athens is a custom text field for cities, 2 is category\_id for activities (cinema, dance, etc) and the rest is start\_date and end date that the user selects to check if there any events.

Now, the problem is that i need to make a form with 3 elements -a category dropdown menu, a city dropdown menu and a datepicker for daterange. All that is good and normal.

So i need to make the form to point to the specific above url, passing the 3 elements to the url segments. Actually what i want is to make the search form to create a link in the above form.

Is that possible? I tried some variations either with {exp:search:simple\_form} or plain html form, nothing works.

Shall i make the submit button as a link? And how i will pass the values from the dropdown menus to this link?

Seems like a riddle to me.

Any idea will be welcome.

Thanks for your time

# Answer
> 0 votes
Finally i went with js and it worked

form action="" onSubmit="urlGen(this);" method="get" target="\_parent"

then i populated the fields with ee values giving an id to every select dropdown and then i run the js

function urlGen(f){ var i1 = 'http://domain.com/index.php/results/'; var i2 = f.city.value +'/'; var i3 = f.category.value +'/'; var i4 = '2017/01/07/2017/02/28/' f.action = i1 + i2 + i3 + i4; return true; }

---
Tags: stash, search, solspace-calendar, simple-search, html
---


# Question
Title: Show different content based on url segement
Sorry if my title is a little confusing. Here is my dilemma...

I have a product category page with different products. I'm trying to figure out a way to say {if segment\_3} show the product specific information. Right now I'm having no luck. I'm new to EE, so I'm sure some of you vets this will be easy. Here is my code so far.

```
<section>
<div class="container">
    <div class="row">
    {exp:channel:entries channel="products" category="1" limit="15"}
        <div class="col-md-4">
            <div class="product-wrapper">
                <div class="product-card">
                    <a href="{segment_2}/{url_title}" class="product-img-wrapper"><img src="{card_img}" alt=""></a>
                    <h4>{title}</h4>
                    {short_description}
                    <div class="btn-container">
                        <a href="{segment_2}/{url_title}" class="btn btn-lg btn-primary">View Product</a>
                    </div>
                </div>
            </div>
        </div>
    {/exp:channel:entries}
    </div> <!-- End Row -->
</div> <!-- End Container -->
</section>

{if segment_3}
{embed="products/product-detail"}
{/if}

```

# Answer
> 1 votes
Your syntax is accurate; **products/product-detail** should be embedded if **segment\_3** has a value. Perhaps you need to pass data into the embedded template?

Something like:

```
{embed="products/product-detail" product_id="{segment_3}"}

```

Then in **products/product-detail** you would reference the passed data like this:

```
{exp:channel:entries channel="products" entry_id="{embed:product_id}"}

```

That might be what you are looking for, but without seeing the contents of **products/product-detail** there is no way to be sure.

Hope that helps.

---
Tags: channel-entries, relationships, conditionals
---


# Question
Title: CartThrob and multiple currencies on separate domains
I have two nearly duplicate sites accessed from two domains – .com.au and .co.nz – run from a single non-MSM installation of EE where different custom fields are used to display info and prices specific to each site.

Given that both sites are using the same templates and entries, what's the best way for taking orders in the currency specific to the domain they're ordered from?

Do I need to use separate gateways for each domain or is there a single gateway that can handle both?

Or is there a tag or parameter that can be used to in either add\_to\_cart\_form or checkout\_form that can specify which currency to use?

# Answer
> 0 votes
Looks like the answer is:

```
<input type='hidden' name='currency_code' id='currency_code' value='XXX'>

```

---
Tags: cartthrob
---


# Question
Title: Search for YouTube videos not working in DevDemon's Channel Videos
I cannot search for youtube video anymore. I get the following error

```
{
 "error": {
  "errors": [
   {
    "domain": "usageLimits",
    "reason": "accessNotConfigured",
    "message": "Project 896194494972 has been scheduled for deletion and cannot be used for API calls. Visit ___ttps://console.developers.google.com/iam-admin/projects?pendingDeletion=true to undelete the project.",
    "extendedHelp": "___ttps://console.developers.google.com/iam-admin/projects?pendingDeletion=true"
   }
  ],
  "code": 403,
  "message": "Project 896194494972 has been scheduled for deletion and cannot be used for API calls. Visit https://console.developers.google.com/iam-admin/projects?pendingDeletion=true to undelete the project."
 }
}

```

how can I fix it?

thank you monica

# Answer
(I'm with Vector; we're the new owners of DevDemon.)

This error was related to the transfer of DevDemon assets from the old owners over to us. We're now (2017-02-15) released Channel Videos v3.2.1 with a new API key which fixes the issue: http://www.devdemon.com/expressionengine-addons/channel-videos
> 4 votes

# Answer
If you don't feel like waiting on DevDemon to make a patch you can create your own youtube API key and replace the key that is in pbf.min.js with your own key. That fixed it for me.
> 3 votes

# Answer
I updated CV to the latest (3.2.1) on EE 2.11.7. I am getting the following console errors:

```
GET https://www.googleapis.com/youtube/v3/search?q=bible&maxResults=10&type=video&part=snippet&key=AIzaSyCaVU3uYehPlaQQqgIo66N9FCZhRN1kbNg 403 ()
```

Replacing the API code to our own still seems to call the AIzaSyCaVU3uYehPlaQQqgIo66N9FCZhRN1kbNg API key. What could be happening?
> 0 votes

---
Tags: devdemon, channel-videos
---


# Question
Title: Email notification for Channel Form entries only, not CP entries
I'm on EE3, with a channel where admins post via CP, while guests/member post via Channel Form. Entries posted via the form will be marked with "To Review" status.

Is it possible to set up email notifications for only entries submitted via Channel Form?

# Answer
There is no direct method. But you can initialize an email function by this hook in your extension file.

https://docs.expressionengine.com/latest/development/extension\_hooks/module/channel\_form/index.html#channel-form-submit-entry-end
> 1 votes

---
Tags: safecracker, ee3
---


# Question
Title: How can I format entry_date when using AJW export?
I'm exporting freeform entries with AJW export, and have no idea how to format the entry\_date field when exported as .csv

AJW export documentation doesn't appear to exist, besides a sample EE tag you can use. Has anyone else formatted entry\_date when exporting entries as a .csv?

Here is my code (changed filename):

```
{exp:ajw_export
    sql="SELECT entry_date, form_field_1, form_field_2, form_field_3, form_field_4 FROM exp_freeform_form_entries_1"
    format="csv"
    delimiter=","
    filename="filename.csv"
}

```

# Answer
> 2 votes
try DATE\_FORMAT(from\_unixtime(entry\_date), '%Y-%m-%d') AS post\_date

# Answer
> 0 votes
Wow! This little gem just saved my bloody head. All my date comparisons were failing due to the UNIXTIME. I was trying to use DATE\_FORMAT() and it just kept giving me errors, but this solved that. THANK YOU!! Like 3+ years later.

---
Tags: solspace-freeform, export, entry-date, date-format
---


title: Trying to get category name from url

text:
# Question
Title: Trying to get category name from url
i have a url domain.com/index.php/washington/4 where 4 is category\_id. I have only one category group and i try to use Low Seg2cat.

I need to get {segment\_2} to display the title of category name (and nothing else) like

Title: {segment\_2\_category\_name}

Is that possible? Itried but no success.

Any ideas please?

# Answer
> 1 votes
As Mufi correctly commented, Low Seg2Cat uses category **URL titles**, not category IDs.

---
Tags: low-seg2cat
---


# Question
Title: Conditional on select dropdown field type not working
I have a select dropdown field with 2 values "yes" and "no". I want to display an entry when the "yes" is selected. Ive done this many times before but now I can't get it to go. It shows just one entry.

If I remove **limit="4"** it works??? If set **limit="8"** it works???

my code looks like this

```
{exp:channel:entries channel="news" status="open" limit="4" disable="categories|category_fields|member_data|trackbacks" dynamic="no" show_future_entries="yes" show_expired="yes"}
    {if dropdown == "yes"}
        {title}
    {/if}
{/exp:channel:entries}

```

Any ideas?

# Answer
> 1 votes
Do you know, it will increase the speed if you don't put an if condition there and use EE `search:CUSTOM_FIELD` parameter in `exp:channel:entries` loop.

Use this:

```
{exp:channel:entries channel="news" status="open" limit="4" disable="categories|category_fields|member_data|trackbacks" dynamic="no" show_future_entries="yes" show_expired="yes" search:dropdown="yes"}
{title}
{/exp:channel:entries}

```

Also FYI, `limit` parameter will work with `search:CUSTOM_FIELD` and will not work with your `if` condition.

---
Tags: conditionals, drop-down
---


# Question
Title: conditional statement with radio button value
I'm not sure if this is an EE bug or if I'm doing something wrong. I'm looping through my "tournaments" channel entries and for each entry I'm looping through a "teams" channel that has a relationship to the tournaments channel. Looping is fine with {parents}.

I'm trying to test a radio button field value and create a dropdown based off that.

I can spit out the value and it works fine and spits out the correct value if I just use {parents:team\_confirmed:value}. However my {if} doesn't seem to work properly.

Here's my code in a nutshell:

```
{parents field="tournaments_attending"}

       other stuff

       <select name="confirmed">
           {if parents:team_confirmed:value == 1}
               <option value="Yes" selected>Yes</option>
               <option value="No">No</option>
           {if:else}
               <option value="No" selected>No</option>
               <option value="Yes">Yes</option>
           {/if}
       </select>

{/parents}

```

# Answer
> 0 votes
I figured out why for anyone curious. It wanted curly brackets inside the {if}.

```
{if {parents:team_confirmed:value} == 1}

```

---
Tags: conditionals, ee3
---


title: Nested checkbox/radio in channel form

text:
# Question
Title: Nested checkbox/radio in channel form
Is it possible to nest manually constructed checkbox/radio.. Check my code..

```
 {options:source_de_revenu}
                {if option_value == 'autre'}
                <div class="small-12 large-6 column">
                    <input type="checkbox" class="check-more" name="source_de_revenu[]" value="{option_value}" {checked}>
                    <label style="margin-right:4px">{option_name} :</label>
                    <label for="sr_autre_nom" class="more-infos inline-input" style="{if sr_autre_nom == '' }display: none{/if}">Spécifier :
                        <input type="text" class="inline-input" name="sr_autre_nom" id="sr_autre_nom" value="{sr_autre_nom}">
                    </label>
                </div>
                {if:elseif option_value == 'ae'}
                <div class="small-12 large-6 column">
                    <input type="checkbox" name="source_de_revenu[]" value="{option_value} " {checked} class="check-more checkbox-group">
                    <label>{option_name} </label>
                    <div class="more-infos">
                        <blockquote> {options:sr_ae_contrainte}
                            <input value="{option_value}//// HERE OPTION VALUE IS NOT THE "nested value /////" type="radio" class="radio-group" name="sr_ae_contrainte" {checked}>
                            <label>{option_name}//// HERE OPTION NAME IS NOT THE "nested name /////</label>
                            <br>
                            {/options:sr_ae_contrainte} </blockquote>
                    </div>
                </div>
                {if:else}
                <div class="small-12 large-6 column">
                    <input type="checkbox" name="source_de_revenu[]" value="{option_value}" {checked}>
                    <label> {option_name}</label>
                </div>
                {/if}
                {/options:source_de_revenu}

```

# Answer
> 0 votes
I solved it by enabling PHP (Outpout parsing) and adding the manually constructed radio OUTSIDE the other tag like so

```
<?php $s_ae = '{options:sr_ae_contrainte}<input value="{option_value}" type="radio" class="radio-group" name="sr_ae_contrainte" value="{option_value}" {checked} ><label>{option_name}</label><br> {/options:sr_ae_contrainte}';
                ?>

            {options:source_de_revenu}
            {if option_value == 'autre'}
            // SOME CODE
            {if:elseif option_value == 'ae'}
            <div class="small-12 large-6 column">
                <input type="checkbox" name="source_de_revenu[]" value="{option_value}" {checked} class="check-more checkbox-group">
                <label>{option_name}</label>
                <div class="more-infos">
                    <blockquote> <?php echo $s_ae; ?> </blockquote>
                </div>
            </div>

            {if:else}
            <div class="small-12 large-6 column">
                <input type="checkbox" name="source_de_revenu[]" value="{option_value}" {checked}>
                <label> {option_name}</label>
            </div>
            {/if}
            {/options:source_de_revenu}

```

---
Tags: safecracker, checkbox
---


title: Language files and translation in EE 3

text:
# Question
Title: Language files and translation in EE 3
i'm trying to change the names of the months from english to greek language in EE3... is there any file that i can modify somewhere in the installation?

Thanks in advance

# Answer
> 0 votes
You can modify the languages used by EE using language packs. However there does not (yet) appear to be a Greek language pack. The language packs are open-source and so you maybe can contribute a suitable pack for Greek to the shared activity - it is located on the Ellis Labs' Github pages. There are also tools you can use to help with the translation of core elements of the EE system - more details here.

HTH

---
Tags: language
---


# Question
Title: Uploading new file changes all uploaded files to new file for entire entry
My site (3.4.0) has 2 separate channels with this issue, the only channels with multiple File fields right now. When creating a new entry in either channel, the last file I upload in any File field replaces all other File fields.

So after I've added the image file in the image field in the 1st channel, I upload an audio file from a different file upload folder in an "audio" File field. When I do this, it replaces the file for the image field also with the audio file, so both fields now have the audio file (regardless if the image field could accept the filetype). If I do it in reverse order, both fields will have the image file.

Another channel has a Grid field, in which one can choose multiple different files and file types for up to 8 grid entries. The same thing occurs: after I've uploaded/chosen 1 file, the second file I upload replaces both so I have duplicates. This continues such that the last file I choose will replace all the others for up to 8 duplicates. Editing / replacing any file while still creating a New Entry will have the same result, all files will be changed at once.

The only work-around I have at the moment is, after saving the New Entry, if I edit that entry I can change any file without it changing all the others. But this isn't user-friendly, I don't want to tell all users they have to save their entry and then edit it to make multiple files work. Please help if you know what's going on.

# Answer
> 0 votes
This is related to a File Picker bug which was fixed in 3.4.2. Update your install and it should resolve.

---
Tags: grid, fieldtype, bug
---


# Question
Title: How to remove -EE warning about a deprecated function from the NCE LDAP plugin
The system has detected an add-on that is using outdated code that may stop working or cause issues with the system. **What does this means and how can I solve the issue?**

> Deprecated function hash() called in C:\xampp\htdocs\intranet3\system\expressionengine\third\_party\nce\_ldap\ext.nce\_ldap.php on line 265. Deprecated since 2.0. Use Security\_helper::do\_hash instead.

# Answer
> 2 votes
Replace the hash() function line with following code:

```
$this->EE->load->helper('security');
$encrypted_password = do_hash(stripslashes($user_info['password']));

```

---
Tags: add-on, add-on-development
---


# Question
Title: Freeform Pro - using VM Chosen as a field for searching a member?
I want to create a form on frontend that has a Chosen fieldtype that lets you search all the members on your site and filters it as you type. Is this possible with freeform pro?

I'm using template (custom markup and just putting fields where i need them), so I'm not using Composer.

As an alternative solution I'm thinking of creating a hidden text field, and in my markup just have a typical VM Chosen fieldtype that searches members as you type... and then use jQuery to take that name and put it as the user for Freeform's text field. Not sure if that would work but want to see if there's any other way first. I have over 2,000 members that someone needs to choose from in this form so Chosen is best option I think.

# Answer
I think you're on the right path, gather a list of user/names then call that list inside a custom freeform:form would be the way to go. A module that deals with member data could likely be beneficial but for now, we'll just use the `query tag` and **Stashes** `set:list` to capture the list and store it for a week:

```
{exp:stash:set_list
  name="members"
  save="yes"
  replace="no"
  refresh="10080" {!-- 1 week --}
  scope="site"
  trim="yes"}
    //The raw query
    {exp:query sql="SELECT * FROM exp_members GROUP BY group_id"}tags
      {stash:name}{screen_name}{/stash:name}
      {stash:id}{member_id}{/stash:id}
    {/exp:query}
{/exp:stash:set_list}

```

Then further down the template, put your form inside `stash:parse` tags to make sure it runs after stash has already captured the contents previous.

```
{exp:stash:parse}
  {exp:freeform:form}
  // Fields for form
  <select name="members" id="members">
  {exp:stash:get_list name="members" scope="site"}
    <option value="{id}>{name}</option>
  {/exp:stash:get_list}
  </select>
  {exp:freeform:form}
{/exp:stash:parse}

```

Then use the raw **jQuery Chosen** script and set up as described in their docs.

This is all pretty crude but we're gathering a list of users and 'stashing' the results for a long period. Once the list is stashed we can call it anywhere on the site but also on the page and have that list spit out inside a select that you can wire up to Chosen (jQuery).
> 1 votes

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


# Question
Title: Magpie feed plugin for EE1 failing on https
The Magpie plugin for EE1 doesn't seem to like https addresses, it was working fine but now the site where the feed is located have switched to https for everything and now Magpie is not getting new data. I tried changing the url in the template code but it fails completely, leading me to believe that it can't handle the secure address. Any options appreciated, I have 4 sites still on EE1 that can't afford to be updated to EE2.

# Answer
I had the same problem.

The solution is simple, you must update the "Snoopy" class (HTTP client) in the pi.magpie.php file.

The last release of Snoopy can be found here: https://sourceforge.net/projects/snoopy/

You just have to make a copy-paste-replace and change the name of the class: M\_Snoopy() instad of Snoopy.

Regards from France
> 1 votes

# Answer
For a quick work-around, you could write a quick PHP script that fetches the external URL over HTTPS and spits it back out over HTTP. You could save this as "https-workaround.php", and prepend the new HTTPS urls in your template with "http://yourdomain.example.com/some-folders/https-workaround.php?feed=" and you should be all set. If it throws an error, it could very well be the same PHP issue that's preventing the add-on from working, and, correcting it may fix it without the need for using this new script.

```
<?php
if(!isset($_GET['feed'])){
    echo "Error: no feed URL was provided. Please include the url of the feed you'd like to decode, e.g. " . $_SERVER['PHP_SELF'] . "?feed=http://www.example.com/feed.xml" ;
    die();
}else{

    // Need this for XML or some services return data in a JSON format instead
    $context = stream_context_create(array(
        'http' => array(
            'method' => 'GET',
            'header' => "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"
        )
    ));

    // Grab the URL specified by ?feed= and fetch it with our HTML/XML only headers
    $fileContents = file_get_contents($_GET['feed'], false, $context);

    // Output the feed
    echo $fileContents;
}

```
> 0 votes

---
Tags: rss, magpie
---


# Question
Title: Freeform Pro Select field issues with Channel Population
I'm having an issue with Freeform Pro's select field. Currently it is filling in from a channel using the title of the channels, however it grabs all channel entries, irregardless of the channel entries' status.

I need to be able to get only "Open" entries.

Is there a way to do this?

# Answer
> 1 votes
I'm having the same issue. Renders this otherwise awesome feature useless.

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


title: Slow control panel js and css loads

text:
# Question
Title: Slow control panel js and css loads
I have the most baffling problem. I have a live server where working in the EE backend is very slow due to a javascript and a css request called via http://domain.com/admin.php?S=0&D=cp&C=javascript&M=load&file=ext\_scripts and http://domain.com/admin.php?S=0&D=cp&C=css&M=cp\_global\_ext respectively. Each takes 10 seconds to load.

The baffling part is that it only happens on one server (the production server). I have the exact sites mirrored on a staging server as well as my laptop and neither exhibit the behavior.

What could cause this? I am at wits end on this one and any help would be a godsend.

Thanks!

# Answer
Because this isn't happening in your local development environment, I would guess it's not EE related but instead is caused by something on the server or is DNS related.

But here are some things to try/check:

* Log out of EE, clear all cookies and cache, then log back in
* Disable extensions temporarily by adding this to your config.php file `$conf['allow_extensions'] = "n";`
* Disable “New version Auto-check” in your Control Panel under Admin \> General Configuration
* Uninstall the "ExpressionEngine Info" accessory under Addons \> Accessories
* PHP error logs
> 3 votes

# Answer
I have just spent many hours trying to resolve the very same issue, however, I was relunctant to upgrade PHP.

On my production server, JavaScript was taking 5 seconds to load slowing down the responsiveness of every page within the control panel. However, the issue did not occur on my local (MAMP) server.

I went through a process of disabling all the Accessories, checking PHP version etc. but nothing worked.

I finally got a clue from this post on EE’s forum which mentioned disabling Generate HTTP Headers.

This worked for me.

In fact, having read the documentation it is clear that this can cause problems, 'Sending explicit headers is generally considered to be a good practice, although in some cases it can cause some problems'.

I hope this helps anyone else who may come across this issue and stumble on this post.
> 3 votes

# Answer
Riddle solved but I don't know why.

I went ahead and upgraded php to 5.4.11 from php 5.3.9 and the behavior is gone.

Mea culpa, it was not the hosting. I don't know why things were bad under php 5.3.9 but they were for whatever reason.
> 1 votes

# Answer
If you have devot:ee monitor accessory installed; uninstall it. It's deprecated, and will cause isses with slow CP loading time (1 minute loading CP Home).
> 0 votes

# Answer
I had the very same problem attempting to load the ext\_scripts entry as well. It would work on developer's machines but not on the actual test / production servers. In our situation it turned out to be because the actual servers were in a DMZ zone where the firewalls did not permit outbound HTTP / HTTPS traffic and one EE plugin (Publisher) was attempting a phone home HTTPS request to check to see if updates were available. Worked around this by putting a /etc/hosts entry in place for the requested domain (boldminded.com) and pointing it to 127.0.0.1.
> 0 votes

---
Tags: control-panel, javascript, css
---