# Question
Title: How to pull relationship data into another relationship field?
I'm building a site using relationships and have run into something that's got me stumped. I suspect it's something simple but can't for the life of me see what it is.

I have the following channels and fields:

**Channel: training\_course\_dates**
**Field:** training\_course (single relationship to training\_course\_overview channel)

**Channel: training\_course\_overview**
**Field:** course\_testimonial (single relationship to testimonials channel)

**Channel: testimonials**
**Field:** testimonials\_quote

What I'm trying to do is to show an entry from the {training\_course\_dates} channel, pulling in the course overview information, including the related testimonial but this is where I'm getting stuck.

Here's the code I'm currently using:

```
{exp:channel:entries
    channel="training_course_dates"
    dynamic="yes"
    url_title="{segment_4}"
    status="open"
    limit="1"
    cache="yes"
    refresh="1440"
}
    <div class="feature_box">
        <p>
            {training_course}
                {training_course:course_testimonial}
                    {training_course:course_testimonial:testimonials_quote}
                {/training_course:course_testimonial}
            {/training_course}
        </p>
    </div>
{/exp:channel:entries}

```

And here's what's getting output:

{training\_course:course\_testimonial}
{training\_course:course\_testimonial:testimonials\_quote}
{/training\_course:course\_testimonial}

Any ideas on where I'm going wrong?

Thanks in advance,

Tom

# Answer
> 0 votes
I've now managed to sort this one using an embed. Not the optimum solution for performance I know, but without being able to get the double layer of relationships to work this solution now does the job.

I used an embed on the main template and pass through the training course URL title to use in the embedded template like so:

```
{embed="/training/testimonial_embed"
     training_course="{training_course}{training_course:url_title}{/training_course}"
}

```

I then use that information on the embedded template to display the required data like so:

```
{exp:channel:entries
    channel="training_course_overview"
    status="open"
    limit="1"
    cache="yes"
    refresh="1440"
    url_title="{embed:training_course}"
}
    <div class="feature_box">
        <p class="testimonial_quote">“{course_testimonial:testimonials_quote}”</p>
        <p class="testimonial_name">{course_testimonial:title}</p>
    </div>
{/exp:channel:entries}

```

Hope that helps anyone with a similar challenge.

Tom

---
Tags: relationships, related-entries
---


# Question
Title: EE3 Image cropping when image is uploaded
So I know EE3 have a built in image manipulation where you can either crop or constrain the image.

I'm using picturefill to swap images for Desktop, Tablet and Mobile. But the images for some reason are not showing up. Get empty src for images. I believe there is a special way to display images for Desktop, Tablet and Mobile in my case.

```
{banner}
        <picture class="bg-image">
            <!--[if IE 9]><video style="display: none;"><![endif]-->
            <source srcset="{banner:home:desktop}" media="(min-width: 1000px)">
            <source srcset="{banner:home:tablet}" media="(min-width: 760px)">
            <!--[if IE 9]></video><![endif]-->
            <img srcset="{banner:home:mobile}" alt="" />
        </picture>
{/banner}

```

Can you spot what am I doing wrong here? Basically images that are uploaded I need to crop them to 3 sizes and then display them.

# Answer
The issue here is that your syntax is incorrect in a few ways.

1. Within a File field tag pair you should *not* prefix variables with the parent tag (`banner:`).
2. You should *not* include the directory name (`home:`) as prefix segment in the variable names.
3. You're using lowercase for your manipulation names in your template, but uppercase in your settings (I'm not *positive* this will throw things off, but you should always be consistent, and make them match).

Your code should be revised to look like this:

```
{banner}
    <picture class="bg-image">
        <!--[if IE 9]><video style="display: none;"><![endif]-->
        <source srcset="{url:Desktop}" media="(min-width: 1000px)">
        <source srcset="{url:Tablet}" media="(min-width: 760px)">
        <!--[if IE 9]></video><![endif]-->
        <img srcset="{url:Mobile}" alt="" />
    </picture>
{/banner}

```

Check the docs on File fields for more info on the variables, and examples.
> 1 votes

---
Tags: ee2, image, ee3, image-path, crop
---


# Question
Title: Channel Loops, Conditional Statements, Grids and Whitespace
I'm running into a bizarre issue with EE that I've never noticed before (using v2.10.1). I'm using a "justified" grid where you set your column container to text-align: justify, give them the right width and they float themselves without having to deal with margins and all that mess.

Works great in my static code until I start using channel:entries loops.

Here's how it should look:

```
<div class="col-wrapper col2">
  <div class="col"></div>
  <div class="col"></div>
</div>

```

However, whenever I put the columns in a channel loop and use some sort of conditional statement, EE is stripping the whitespace and the end of each column so that they all end up on the same line which totally jacks up the spacing/floating that the justified grid does.

```
<div class="col-wrapper col2">
  {exp:channel:entries channel="channel"}
   {if any_conditional}{/if}
     <div class="col"></div>
   {/exp:channel:entries}
</div>

```

Gives me:

```
<div class="col-wrapper col2">
  <div class="col"></div><div class="col"></div>
</div>

```

I've tried adding an ` ` after the last dive inside the channel loop, and that helps, but it adds extra space and makes the grid end up being off enough that it's really frustrating.

What's going on here? Is there a way to make EE stop stripping this linebreak/whitespace out?

Help!

# Answer
> 1 votes
Somewhere around 2.9 / 2.10 a new template lexer/parser was introduced.
The new conditional parser does indeed do a `trim($out)`.

method: closeBuffer() in:
`expressionengine/library/parser/conditional/parser.php`

Although it is not recommended to change EE core,
you can change it to `return ltrim($out);` or `return $out;`
to keep some of your whitespace around.

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


# Question
Title: Does EE3 support preload-replace with conditionals in grid fields?
I keep running into issues using preload-replace with conditionals that are in a grid field.

I have the preload: `{preload_replace:staticchannelslug="gp"}`

And am trying to use it like so:

```
        {page_header_{staticchannelslug}}

            <h1>{if page_header_{staticchannelslug}:alt_title}...{if:else}...{/if}</h1>

        {/page_header_{staticchannelslug}}

```

This throws the error:

> Something has gone wrong and this URL cannot be processed at this time.

**EDIT:**

Error with debug on:

> You have an invalid conditional in your template. Please review your conditionals for an unclosed string, invalid operators, a missing }, or a missing {/if}.
>
> Parser State: Unexpected ‘alt\_title’ (VARIABLE); expected RD in Template “pages/general-page” on line 9.

//end edit

If I don't use the preload and change it to this, I get no errors:

```
        {page_header_gp}

            <h1>{if page_header_gp:alt_title}...{if:else}...{/if}</h1>

        {/page_header_gp}

```

I've used this same kind of method for years in EE2, but just running into issues with it in EE3 :/

This doesn't work either, same error message:

```
        {if '{page_header_{staticchannelslug}'}

            {page_header_{staticchannelslug}}
                            ...
            {/page_header_{staticchannelslug}}

        {/if}

```

Any ideas on what the issue is here or what I may be missing?

Thanks.

# Answer
> 1 votes
This is an instance were you will need to quote your conditional, since it's not a true variable. Starting in version 2.9.0, the conditionals parser learned how to behave, and parses conditionals as soon as they are ready. Since what you have in the first example doesn't look like a valid variable, it doesn't know to wait for a value before evaluating it. In other words, since your variable is actually a string that you are putting together with other variables, you need to use:

```
{if '{page_header_{staticchannelslug}'}

```

That should be working for you, though you indicate it is not, and is working in my tests.

```
{preload_replace:replaced_var="image"}

....

{exp:channel:entries channel="blog"}
    {if "{blog_{replaced_var}:image}"}
        There's an image!
    {if:else}
        No image!
    {/if}
{/exp:channel:entries}

```

If you are still getting the error after following this pattern, reduce your template further to ensure you don't have a similar conditional somewhere else, in an embed, etc.

---
Tags: conditionals, grid, ee3, preload-replace
---


# Question
Title: Why is Channel Images searching for images in the cache folder?
I cloned a site to overhaul it, meaning I copied over all files and databases, but following the instructions in the ExpressionEngine User Guide to upgrade (from 2.5.2 to 2.10.2) I cleared all caches.

I updated Channel Images to version 5.4.19, but when I try to regenerate images I get the following error (username and filename redacted):

```
A PHP Error was encountered

Severity: Warning

Message: copy(/home/<username>/public_html/dev/system/expressionengine/cache/channel_images/<filename>.jpg): failed to open stream: No such file or directory

Filename: local/local.php

Line Number: 111

Fatal error: Uncaught exception 'Exception' with message 'Image file not found: /home/<username>/public_html/dev/system/expressionengine/cache/channel_images/<filename>__small.jpg' in /home/<username>/public_html/dev/system/expressionengine/third_party/channel_images/libraries/PHPThumb/ThumbBase.inc.php:193 Stack trace: #0 /home/<username>/public_html/dev/system/expressionengine/third_party/channel_images/libraries/PHPThumb/ThumbBase.inc.php(172): ThumbBase->triggerError('Image file not ...') #1 /home/<username>/public_html/dev/system/expressionengine/third_party/channel_images/libraries/PHPThumb/ThumbBase.inc.php(110): ThumbBase->fileExistsAndReadable() #2 /home/<username>/public_html/dev/system/expressionengine/third_party/channel_images/libraries/PHPThumb/GdThumb.inc.php(96): ThumbBase->__construct('/home/<username>/...', false) #3 /home/<username>/public_html/dev/system/expressionengine/third_party/channel_images/libraries/PHPThumb/ThumbLib.inc.php(127): GdThumb->__construct('/home/<username>/...', Array, false) #4 /home/<username>/p in /home/<username>/public_html/dev/system/expressionengine/third_party/channel_images/libraries/PHPThumb/ThumbBase.inc.php on line 193

```

Why is it searching in the cache directory for the images? Shouldn't it just be searching for the original files in the `/images/uploads` directory? What are my options to resolve the issue?

# Answer
ChannelImages can use locations local/cloudfiles/s3 to store images. When you regenerate images, it always fetches the image to cache. It then plays the actions and stores the versions back to the storage location.

The error is an issue with location/local/local.php in the method download\_file(). (e.g. if the copy fails, it throws the warning (yet, still returns true))
> 0 votes

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


title: Freeform Pro required checkbox

text:
# Question
Title: Freeform Pro required checkbox
I'm trying to do a terms and service agreement checkbox in my multi-page form. I created a checkbox field, and made it required. For some reason, when I hit the submit button without checking the box, the form submits anyway. Is there something I'm doing wrong? Any help would be appreciated. This is the code:

```
<label for="{freeform:label:terms_conditions}" class="checkbox nomargin">
{freeform:field:terms_conditions attr:class="checked-agree"}
<i></i>I agree to the <a href="#" data-toggle="modal" data-target="#termsModal">Terms of Service</a></label>
<!-- ALERT -->
{if freeform:error:terms_conditions}
<div class="alert alert-mini alert-danger margin-top-6 margin-bottom-20">
<strong>{freeform:error:terms_conditions}</strong>     <i class="fa fa-arrow-up"></i>
</div>
{/if}
<!-- /ALERT -->

```

# Answer
I've come across this problem too.

In order to workaround the html "feature" where unchecked checkboxes are not submitted at all (as opposed to being submitted with a falsey value), Freeform Pro outputs an extra hidden field along with each checkbox field with the value 'n'. This makes sense if you're using a (non-required) checkbox group, but not for a lone checkbox or a group where at least one choice is required.

So the solution is to output the checkbox manually instead of via `{freeform:field:terms_conditions ...}` \- quickest way to do that is inspect the source code and find the checkbox that gets output by that tag and just paste it into your template, avoiding the extra hidden input. It's probably something simple like `<input type="checkbox" id="terms_conditions" name="terms_conditions" value="y">`
> 1 votes

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


title: Where is the Template Route Manager

text:
# Question
Title: Where is the Template Route Manager
I am taking over a project built with EE. I am completely new to EE, I was trying to figure out how the routing works and I came across documentation about the Template Route Manager. When I login to the admin however I do not see the Route Manager anywhere.

Any idea why this may be?

How do I access the routes for pages that exist?

# Answer
Odd - I'd guess that the view files weren't properly replaced when the install went from the previous version to 2.8.1. If you upgrade to the current 2.0 version (2.11.2) that should fix it.

In the meantime, access Template Routes via **admin.php?/cp/design/url\_manager**.
> 0 votes

---
Tags: template-routes
---


title: Very slow installations

text:
# Question
Title: Very slow installations
I've got a client with five installs on one server - all different sites and EE versions. Everything has been fine up to now, but every site has suddenly become very slow including the control panel. I've checked everything I can think of, but is there anyway to definitely tell if hosting is the problem rather than EE?

# Answer
> 0 votes
Unless you had some before/after stats from something like template profiler then your host will likely say it's EE.

Given nothing has changed (sites haven't all been updated or become insanely popular over night) I'd wager your host has either altered something at their end or, if on shared hosting, other sites are consuming more of the available processes.

You need to have a chat with your host. Grab some stats from all sites via template profiler - dB requests, memory et al so you have some base numbers to discuss.

---
Tags: performance, hosting, loading-time
---


title: NSM Better meta EE upgrade problems

text:
# Question
Title: NSM Better meta EE upgrade problems
I recently upgraded to EE2.11.1 and everything went well apart from nsm better meta , i upgraded to the latest version of better meta 1.1.9 but i got lots of php errors so i had to remove the better meta tags to get my site back up and running.

Now I am left with a site that has around 10,000 pages with no meta tags.I have tried to contact ee-garage for support several times but have not received any replies , they seem to have given up on their plugins.I have attached some screen shots and any help is appreciated.

# Answer
Turns out the some of Better Meta values went missing during the upgrade and the php errors are the result of those fields being blank.So fired up phpmyadmin went into exp\_nsm\_addon\_settings , and from there into nsm\_better\_meta settings.

I then edited that row and manually added back in the values that were missing. This sorted out the php errors and allowed me to turn back on Better Meta across the site
> 1 votes

# Answer
Sorry we haven't responded to your prior support request attempts. We'll try and get this sorted for you soon.

I can think of two reasons that may cause this error to appear but I'll need to take a closer look.

Can you please send me a support ticket via http://ee-garage.com/nsm-better-meta/support as I'll probably need to get more information about the site?

Best regards,
Iain Saxon
EE-Garage / Newism
> 2 votes

---
Tags: upgrade, tags, seo, meta
---


# Question
Title: index.php removed from all urls but homepage
I have following code in my .htaccess

RewriteEngine On

```
    # Removes index.php from ExpressionEngine URLs
    RewriteCond $1 !\.(gif|jpe?g|png)$ [NC]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ /index.php?/$1 [PT]

```

That redirect works on all pages apart homepage is there any way to remove index.php from homepage?

# Answer
> 1 votes
## EE 2.x

Go in to your general settings in your Control Panel.

```
(Site Name) -> CP Home -> Administration -> General Configuration

```

Remove `index.php` from the `URL to the root directory of your site` setting.

Docs: https://docs.expressionengine.com/v2/cp/admin/general\_configuration.html

---

## EE 3.x

If it's EE 3.x, I believe you edit the `Website index page` setting that lives on `URL and Path Settings` page and remove `index.php` from that.

Docs: https://docs.expressionengine.com/latest/cp/settings/urls.html

---
Tags: index.php
---


title: EE2 + PHP 7 + Low Variables = Possible?

text:
# Question
Title: EE2 + PHP 7 + Low Variables = Possible?
Wondering if anyone has had success running EE2 and Low Variables on PHP 7? I saw that Low made LV3 compatible with PHP 7. (http://gotolow.com/addons/low-variables/changelog). But it seems LV2 is still stuck on PHP 5.

What has to happen to make it all work?

# Answer
> 0 votes
What has to happen is probably that I have to make the EE2 version PHP7 compatible. That's not planned as of yet, but given enough demand, that can change.

---
Tags: low-variables, low
---


# Question
Title: Help with replacing image placeholders in matrix rows -- using Stash?
I have some legacy code that was using **mx\_jumper** successfully. On updating to EE 2.11.2 the code no longer works.

The context is a Matrix field with rows including:

* A text field called `{item_desc}`
* An Assets field called `{item_img}`, containing 0, one or more images

Each Matrix row instance of `{item_desc}` may include **placeholder text** referring to an image in `{item_img}`. For example, in a placeholder such as `{img_3_1}`, 3 is the **row count** and 1 is the **image count** within the Assets field.

My legacy snippet, running within each Matrix row, has code including this…

```
{item_img}
    {exp:mx_jumper:put name="img_{row_count}_{count}"}
    <figure{if item_img_align} class="{item_img_align}"{/if}>
      <img src="{url}" alt="{alt_text}">
      {if caption}<figcaption{if keywords} class="{keywords}"{/if}>{caption}</figcaption>{/if}
    </figure>
    {/exp:mx_jumper:put}
{/item_img}

{exp:mx_jumper:out_global}
    {item_desc}
{/exp:mx_jumper:out_global}

```

But on EE 2.11.2 this no longer works.

I can't figure a way to use quotes or wrapping `{}` within the mx\_jumper name parameter to get it to play ball.

But I'm sure there's a better way to do this using **Stash**.

I've had a look at Mark Croxton's Replacing matrix image slugs into another field but I can't figure how to adapt it for my above context.

I'm aware of inefficiencies within my old approach, but at this point I just need to get it working again without having to change content.

Any help much appreciated.

*My above code has been updated to correct errors made when originally posted.*

# Answer
> 0 votes
Robin Sowell of EllisLab pointed me to the solution, via a ticket, which was to move `exp:mx_jumper:out_global` out of the snippet into the embed that was calling it.

Converting the above approach to Stash can wait for another day.

---
Tags: matrix, stash, mx-jumper, shortcode
---


title: Strange URL parameter added on login

text:
# Question
Title: Strange URL parameter added on login
I'm seeing an issue where I login on the frontend and the URL becomes `S=c3992270d168f3ec9ab1df5bc06afce3/test` where `test` is the segment I'm passing from the return parameter.

I can't fathom where the first part is coming from though.

Logic in the template is pretty simple

```
{if logged_in}
hello steven
<a href="{path='logout'}">Log Out</a>
{if:else}
{exp:member:login_form return="/{segment_1}/{segment_2}"}
  <p>
    <label>Username</label><br>
    <input type="text" name="username" value="" maxlength="32" size="25">
  </p>
  <p>
    <label>Password</label><br>
    <input type="password" name="password" value="" maxlength="32" size="25">
  </p>
  <p><input type="submit" name="submit" value="Submit"></p>
  <p><a href="{path='member/forgot_password'}">Forgot your password?</a></p>
{/exp:member:login_form}
{/if}

```

Session related? Structure bug (seen that before) or something else?

# Answer
Setting `$config['website_session_type'] = 'c';` has sorted the logic.
> 0 votes

---
Tags: url, login, sessions
---


# Question
Title: Date conditional for over test if over 2 years
Haven't used EE in a while and having a brain freeze on best way to do a date conditional.

I have a date custom field for a DOB. I want to conditional show items if the person/child is over 2 years old.

I'm thinking something along the line of:

```
{if ("{current_time format='%U'}" - "{child_dob format='%U'}") > '63113904'  }
    Do this
{if:else}
    Do that
{/if}

```

Where this would test against the Unix timestamp? Or am I way off?

# Answer
You're on the right track, but no bracing and formatting is needed; date variables will output timestamps without formatting, and comparisons can be made properly between integer types. So you can use a simpler:

```
{if (current_time - child_dob) >= 63072000}
    Do this
{if:else}
    Do That
{/if}

```
> 1 votes

---
Tags: conditionals, date, time
---


title: Cometchat Cloud in Expressionengine

text:
# Question
Title: Cometchat Cloud in Expressionengine
Does anybody have any idea about installing Cometchat Cloud in Expression engine as they are not showing it in their documentation packages?

# Answer
I've used CometChat Cloud with ExpressionEngine and it works fine. You can signup at https://cloud.cometchat.com and then inform their team. They did the integration for me quite quickly.
> 0 votes

---
Tags: ee
---


# Question
Title: Comparing custom member field with current date
I have a member field \[cb1\_expire\] that I am using to store the expiration date in the user profile. The format that will be put into the field will always be "mm/dd/yyyy". (field type is text) I want to compare this field with the current date to see if the current date is past the expiration date so that I can perform a specific action and inform the user that is access is expired. So far I have not been able to render the custom field in a format that I can test with the current date.

Is this possible and if so how can I accomplish this?

Any help greatly appreciated.

Anthony Jaxon, Los Angeles, CA USA

# Answer
Hmm, If you cant convert your field to a date field, you're going to have build a plugin using php strtotime function or use something like this from Rye
> 0 votes

# Answer
I finally got it working by comparing the dates in a "yyyymmdd" format. The issue seems to be that custom member fields can only be set to text format and so I was never able to convert it to UNIX format. So I am entering the dates in the custom member field (cb1\_expire) as 20151201. Then I format the current\_time to the same format and then compare them.

{if '{current\_time format='%Y%m%d'}' \> cb1\_expire}

If the formatted current\_time is greater than cb1\_expire, I know the expiration date has passed.

Hope this helps someone....
> 0 votes

---
Tags: custom-fields
---


title: Assets errors with MySQL 5.7.X

text:
# Question
Title: Assets errors with MySQL 5.7.X
I've started having issues with old EE sites on my development machine now that I'm running newer versions of PHP and MySQL. I've been able to sort most of these out except for the following MySQL errors from the Assets module.

This error displays when trying to view an Assets field in the admin:

```
 A Database Error Occurred
 Error Number: 3065

 Expression #1 of ORDER BY clause is not in SELECT list, references column 'mysite.ae.sort_order' which is not in SELECT list; this is incompatible with DISTINCT

 SELECT DISTINCT a.source_type, a.folder_id, a.file_name, a.file_id, af.source_id, af.filedir_id FROM exp_assets_files AS a INNER JOIN exp_assets_selections AS ae ON ae.file_id = a.file_id INNER JOIN exp_assets_folders AS af ON af.folder_id = a.folder_id WHERE ae.col_id = '1' AND ae.row_id = '115' AND ae.entry_id = '36' AND ae.field_id = '2' ORDER BY ae.sort_order

 Filename: third_party/assets/ft.assets.php

 Line Number: 682

```

This error displays on the frontend when using the asset fieldtype pair tags.

```
Error Number: 3065

Expression #1 of ORDER BY clause is not in SELECT list, references column 'mysite.ae.sort_order' which is not in SELECT list; this is incompatible with DISTINCT

SELECT DISTINCT a.* FROM exp_assets_files AS a INNER JOIN exp_assets_folders AS af ON af.folder_id = a.folder_id INNER JOIN exp_assets_selections AS ae ON ae.file_id = a.file_id WHERE ae.entry_id = "28" AND ae.field_id = "2" AND ae.col_id = "1" AND ae.row_id = "107" AND ae.is_draft = 0 ORDER BY ae.sort_order

Filename: third_party/assets/ft.assets.php

Line Number: 1538

```

I'm using:

* EE 2.11.2
* Assets 2.6
* MySQL 5.7.9
* PHP 5.5.30

It looks like EE had some compatibility issues with MySQL 5.7 and I wonder if this is related. https://support.ellislab.com/bugs/detail/21444/a-database-error-occurred-this-is-incompatible-with-distinct-mysql-5.7.10

Any help would be really appreciated.

# Answer
> 9 votes
The problem is that many developers don't know how to write compliant SQL statements - they're software developers who find themselves also filling the role of database developers. This problem crops up in many addons and was recently fixed in EE core code.

For Assets v2.6 Change line 615 of ft.assets.php

FROM:

```
$sql = "SELECT DISTINCT a.source_type, a.folder_id, a.file_name, a.file_id, af.source_id, af.filedir_id

```

TO:

```
$sql = "SELECT DISTINCT  a.source_type, a.folder_id, a.file_name, a.file_id, af.source_id, af.filedir_id, ae.sort_order

```

And line 1505

FROM:

```
$sql = 'SELECT DISTINCT a.* FROM exp_assets_files AS a

```

TO:

```
$sql = 'SELECT DISTINCT a.*, ae.sort_order FROM exp_assets_files AS a

```

---
Tags: assets, pixelandtonic, mysql
---


# Question
Title: ExpressionEngine versions and MYSQL support
Does anyone have a link to the MYSQL version supported by different versions of ExpressionEngine? I need to upgrade the MYSQL version on a server containing several EE sites. Thanks, Clive

# Answer
> 2 votes
You can dig through the various documentation flavours. From this I can see :

* EE 2.10 = MySQL 5.0.3 or newer
* EE 2.9 = MySQL 5.0.3 or newer
* EE 2.8 = MySQL 5.0.3 or newer

How far back do you need to go?? Using the Wayback Machine I can see older version requirments :

* EE 2.7 = MySQL 5.0.3+ (Feb 22 2014)
* EE 2.6 = MySQL 5.0.3+ (Apr 25 2013)
* EE 2.5 = MySQL 4.1+ (Nov 29 2012) \<== this is where the current documentation site started.

You need to go back any further?? Ok then! Wayback @ expressionengine.com

* EE 2.4 = MySQL 4.1+ (Jan 26 2012)
* EE 2.3 = MySQL 4.1+ (Oct 24 2011)

More?? You want *MOREEEE*? (Oliver Twist reference) EE2.2Wayback

* EE 2.2 = MySQL 4.1+ (~Jun 24 2011)
* EE 2.1 = MySQL 4.1+ (~Oct 15 2010)
* EE 2.0 = Beta, if your running sites on this, well....

# Answer
> 0 votes
And if you're upgrading to MySQL 5.7.5+ you'll need EE 2.11.0+

---
Tags: mysql
---


# Question
Title: Promo code not working on mobile device for Expresso Store
I've set up a basic promo code for all users to be able to use once. The promo code works fine on a desktop browser. When I try the promo code on a mobile browser, I can't access the 2nd page of my checkout process. After I've entered the promo code and selected continue, the same page reloads. I don't get any errors or anything. If I remove the promo code and select continue, the 2nd page loads fine.

I'm using EE 2.8.1 and Expresso Store 2.5.1

# Answer
I had the 'Limit per customer' option set to 1. This will allow users to only use the coupon code once IF they have an account with your site and are signed in when they use the coupon. Otherwise, it only allows the coupon to be used once and that was causing my issue. I removed the limit per customer option and everything works.
> 1 votes

---
Tags: expresso-store, add-on
---


# Question
Title: How to use javascript "label" in channel entry loop?
I have code that looks like

```
 <label class="city"></label>

```

that uses javascript to indicate the selected city. So when "Anchorage" for example is selected from a dropdown at the top of the page

```
 <label class="city"></label>

```

displays "Anchorage". I need to use this selected city in a channel entry loop. I've tried doing this using Stash, as in the code below, but it is not working. Is there any way to save the city in a form that can be used by Expressionengine?

```
{exp:stash:set_list name="city2" parse_tags="yes" trim="yes"}
{stash:city3}<label class="city"></label>{/stash:city3}
{/exp:stash:set_list}

{exp:stash:get_list name="city2" parse_tags="yes" trim="yes"}
{exp:stash:parse unprefix="nested"}
{exp:channel:entries channel="place" search:city="{city3}" dynamic="no"}
{title}
<br />
{if nested:no_results}
No results
{/if}
{/exp:channel:entries}
{/exp:stash:parse}
{/exp:stash:get_list}

```

# Answer
Channel entries tags run before the page is sent to the browser, so in order to pull this off you'll need to fetch the extra channel data from a dedicated template via AJAX.

When your JS updates the city in the DOM, simply send off an AJAX request to a new template and use URL segments to filter the output. When the response comes back you'll then need to inject it back into the DOM.
> 0 votes

---
Tags: stash, javascript
---


title: Nested nested relationships with Stash

text:
# Question
Title: Nested nested relationships with Stash
I'm trying to display a nested nested list of relationship entries using stash. The following standard EE template code correctly displays all of the data.

```
{!-- Category page --}
{exp:channel:entries channel="category_page" entry_id="16609" dynamic="no"}

    {!-- Category page title --}
    {title}

    {!-- Get parent Landing page content --}
    {parents field="cf_landing_categories"}

        {!-- Parent Landing page Feature 1 Places title --}
        {parents:cf_landing_feature1_title}

        {!-- Parent Landing page Feature 1 Places --}
        {parents:cf_landing_feature1_places}
            {parents:cf_landing_feature1_places:title}
        {/parents:cf_landing_feature1_places}

    {/parents}

{/exp:channel:entries}

```

However, if I then try to put this into Stash nested code as follows, only the {feature\_list1\_title} displays;

{!-- SET LIST --}

```
{exp:stash:set_list name="category-{segment_2}" parse_tags="yes" parse_conditionals="yes" parse_depth="3" save="yes" refresh="60" scope="site" replace="yes"}

    {exp:channel:entries
        channel="category_page"
        disable="{global:channel_disable_basic}"
        status="open"
        limit="1"
        require_entry="yes"
    }

        {stash:category_entry_id}{entry_id}{/stash:category_entry_id}

        {exp:stash:set_list:nested name="landing-{segment_1}-feature-list1" parse_tags="yes" parse_depth="2"}

            {parents field="cf_landing_categories"}

                {!--Landing page places title--}
                {stash:feature_list1_title}{parents:cf_landing_feature1_title}{/stash:feature_list1_title}

                {!--Landing page places--}
                {exp:stash:set_list:places name="landing-{segment_1}-feature-list1-places" parse_tags="yes" parse_depth="2"}

                    {parents:cf_landing_feature1_places}

                        {stash:feature1_place_title}{parents:cf_landing_feature1_places:title}{/stash:feature1_place_title}

                    {/parents:cf_landing_feature1_places}

                {/exp:stash:set_list:places}

            {/parents}

        {/exp:stash:set_list:nested}

    {/exp:channel:entries}

{/exp:stash:set_list}

```

{!-- GET LIST --}

```
{exp:stash:get_list name="category-{segment_2}"}

    {exp:stash:get_list:nested name="landing-{segment_1}-feature-list1" context="{category_entry_id}" save="yes" scope="site"}

        {feature_list1_title}

            {exp:stash:get_list:places context="{category_entry_id}" name="landing-{segment_1}-feature-list1-places" orderby="random" limit="3"}

                {feature1_place_title}

            {/exp:stash:get_list:places}

    {/exp:stash:get_list:nested}

{/exp:stash:get_list}

```

# Answer
> 0 votes
Your `get_lists` are using `context` but your `set_lists` are not, so they won't match up (context is really just a prefix for the `name`).

---
Tags: stash, relationships, nested-list
---


# Question
Title: Where do I install DevDemon's Channel Images in EE 3.3?
I'm trying to install Channel Images on my EE 3.3 site. The install says:

Installing

Within the /system/expressionengine/third\_party/ directory, copy the channel\_images folder into your sites ./system/expressionengine/third\_party/ directory.

Within the /themes/third\_party/ directory, copy the channel\_images folder into your sites./themes/third\_party/ directory.

Go to the Modules area in the ExpressionEngine control panel, find Channel Images in the list, and click Install.

But my back end is not organized that way. In fact, I can find no folders for "third\_party." I tried to intuit where the add-on was supposed to be installed, and indeed after doing it I could activate the addon within my site's addon manager.

However, after activating it, I cannot create any new fields. I get the following error:

Error: Unable to load the requested language file: language/english/channel\_images\_lang.php

What can I do?

# Answer
EE 3's folder structure is organized slightly differently than EE 2. You'll need to copy the "system/expressionengine/third\_party" files to "system/user/addons/" and your "/themes/third\_party/" to "themes/user/".
> 1 votes

---
Tags: error, devdemon, channel-images, ee3, php-errors
---


# Question
Title: WAMP: Properly configuring image paths on local server
I'm using ExpressionEngine to build a site, and have a development version running locally via WAMP. Within the root "www" folder, I have an "ee" subdirectory that acts as the root of the development site. There is an "images" folder directly within "ee" that contains all images for the site. On the live server, the image paths require "/images/...", however on my dev server, if I use the same path it will map to "localhost/images/..." not "localhost/ee/images..." and therefore result in broken links.

I'm wondering if there's an adjustment I can make to the .htaccess file to get the links mapping properly on my local server? At this point, in order to get images to show, I need to use "images/..." which will, in turn, not work on the live server.

Thanks for any assistance here.

# Answer
It's more a Wamp problem that an EE one,

But open this file, inside your wamp install:

wamp/bin/apache/conf/extra/httpd-vhosts.conf

edit it and add (have to put path of your local site here: wamp/bin/apache/conf/extra/httpd-vhosts.conf :

```
<Directory "D:/local_site_directory/www/site_name">
   # maybe there is some comments here ...
  Options Indexes FollowSymLinks MultiViews
    AllowOverride all
    Require all granted
</Directory>

<VirtualHost *:80>
    DocumentRoot "D:/local_site_directory/www/site_name"
    ServerName mysitename
</VirtualHost>

```

You have to remove the # in one line in wamp/bin/apache/conf/httpd-vhosts.conf:

```
# Virtual hosts
Include conf/extra/httpd-vhosts.conf

```

Restart wamp, and if you entered the right path, it would work. This setting is working with the last wamp version ,perhaps not will work in more older ones.
> 1 votes

# Answer
You could also update the config.php file where the image paths are set, see ee docs regarding this migration process.

https://docs.expressionengine.com/latest/operations/moving.html
> 1 votes

# Answer
Agree with Lloyd\_07.

In addition, if you have got the time, you could setup environments https://github.com/focuslabllc/ee-master-config/tree/EE3

But if you dont want that, just a `if else` in config.php

for ex.

```
if ($_SERVER['HTTP_HOST'] == "example.com") {
$config['cp_url'] = 'https://example.com/admin.php';
    $config['theme_folder_url'] = 'https://example.com/themes/';
    $config['theme_folder_path'] = '/home/examplecom/public_html';
    $config['site_url'] = 'https://example.com/';
}

```

You can make it more complex as you like. This works well for localhost settings and one environment.
> 1 votes

---
Tags: image-path, localhost
---


# Question
Title: Is there a way to disallow comments by default in EE3?
Now that EE3 has done away with the idea of comments being a separate module that could be installed or uninstalled, the only way to 'turn off comments' that I can see is to go into each channel's settings and flip the *‘Allow comments?’* switch from Yes to No. Is there any way to make the default setting for allowing comments in newly-created channels to be 'No'?

# Answer
The default setting is actually defined a the database level, so you can only change this on a per-instalation basis by altering the database table.

```
ALTER TABLE exp_channels MODIFY deft_comments CHAR(1) NOT NULL DEFAULT 'n'

```
> 0 votes

---
Tags: ee3, comments, default
---


# Question
Title: Email Configuration - can't get it to work with any of the options
I can't get email to work for my site. I'd appreciate any help at all on it. I don't care which of the three methods work just so long as it works.

This is a brand new site with one email box. I don't plan on checking the email at that box or using it in any other way than to send emails to an admin so she can check when new entries are added.

When I try using php email or sendmail, the control panel says that the email has been sent but I never receive it (not in my junk folder either). Same with the email test php file in the utilities folder - it says there are no php errors and that the email was sent.

When I try to use SMTP, I get lots of errors (below). Here are my settings for that:

> $config\['mail\_protocol'\] = 'smtp';
>
> $config\['smtp\_server'\] = 'ssl://mail.\[mydomain\].com:587';
>
> $config\['smtp\_username'\] = 'postmaster@\[mydomain\].com';
>
> $config\['smtp\_password'\] = '\[password\]';
>
> $config\['smtp\_crypto'\] = 'tls';
>
> $config\['email\_newline'\] = "\r\n";
>
> $config\['email\_crlf'\] = "\r\n";

(my hosting provider told me to use port 587 and tsl.)

And here are the errors:

> A PHP Error was encountered Severity: Warning Message: fsockopen(): SSL operation failed with code 1. OpnSSL Error messages: error:140770FC:SSL routines:func(119):reason(252) Filename: libraries/Email.php Line Number: 1675
>
> A PHP Error was encountered Severity: Warning Message: fsockopen(): Failed to enable crypto Filename: libraries/Email.php Line Number: 1675
>
> A PHP Error was encountered Severity: Warning Message: fsockopen(): unable to connect to ssl:/mail.\[mydomain\].com:587:25 (Unknown error) Filename: libraries/Email.php Line Number: 1675
>
> A PHP Error was encountered Severity: Warning Message: fwrite() expects parameter 1 to be resource, boolean given Filename: libraries/Email.php Line Number: 1818
>
> A PHP Error was encountered Severity: Warning Message: fgets() expects parameter 1 to be resource, boolean given Filename: libraries/Email.php Line Number: 1841
>
> A PHP Error was encountered Severity: Warning Message: fwrite() expects parameter 1 to be resource, boolean given Filename: libraries/Email.php Line Number: 1818
>
> A PHP Error was encountered Severity: Warning Message: fgets() expects parameter 1 to be resource, boolean given Filename: libraries/Email.php Line Number: 1841
>
> A PHP Error was encountered Severity: Warning Message: fwrite() expects parameter 1 to be resource, boolean given Filename: libraries/Email.php Line Number: 1818
>
> A PHP Error was encountered Severity: Warning Message: fgets() expects parameter 1 to be resource, boolean given Filename: libraries/Email.php Line Number: 1841
>
> A PHP Error was encountered Severity: Warning Message: fwrite() expects parameter 1 to be resource, boolean given Filename: libraries/Email.php Line Number: 1818
>
> A PHP Error was encountered Severity: Warning Message: fgets() expects parameter 1 to be resource, boolean given Filename: libraries/Email.php Line Number: 1841
>
> A PHP Error was encountered Severity: Warning Message: fwrite() expects parameter 1 to be resource, boolean given Filename: libraries/Email.php Line Number: 1818
>
> A PHP Error was encountered Severity: Warning Message: fwrite() expects parameter 1 to be resource, boolean given Filename: libraries/Email.php Line Number: 1818
>
> A PHP Error was encountered Severity: Warning Message: fgets() expects parameter 1 to be resource, boolean given Filename: libraries/Email.php Line Number: 1841
>
> An Error Was Encountered Unable to send email at this time.
>
> The following SMTP error was encountered: 0
>
> Unable to send data: AUTH LOGIN
>
> Failed to send AUTH LOGIN command. Error:
>
> Unable to send data: MAIL FROM:
>
> from:
>
> The following SMTP error was encountered:
>
> Unable to send data: RCPT TO:
>
> to:
>
> The following SMTP error was encountered:
>
> Unable to send data: DATA
>
> data:
>
> The following SMTP error was encountered:
>
> Unable to send data: User-Agent: ExpressionEngine 2.5.5 Date: Fri, 8 Mar 2013 10:45:46 -0500 From: Return-Path: To: me@myemail.com Subject: test3 Reply-To: "postmaster@\[mydomain\].com" X-Sender: postmaster@\[mydomain\].com X-Mailer: ExpressionEngine 2.5.5 X-Priority: 3 (Normal) Message-ID: \<513a07aa3bc58@\[mydomain\].com\> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit test
>
> Unable to send data: .
>
> The following SMTP error was encountered:
>
> Unable to send email using PHP SMTP. Your server might not be configured to send mail using this method.

# Answer
This turned out to be a problem with local delivery set on the server. We started the hosting account with our main domain name and so it was not allowing me to send email to that domain. Once the host turned that off, it fixed everything and I could use phpmail.
> 1 votes

# Answer
I think it's the port number in your smtp\_server. I believe that parameter is only looking for `ssl://your.host.name`. You should add the port number separately:

```
$config['email_smtp_port'] = 587;

```
> 2 votes

# Answer
try to change `$config['smtp_server'] = 'ssl://mail.[mydomain].com:587';` ...to... `$config['smtp_server'] = 'tls://mail.[mydomain].com:587';`
> -1 votes

---
Tags: email, smtp
---


# Question
Title: Understanding Channel Field Groups/Channel Fields/Status Groups
What is the difference between channel field groups and channel fields? Is there a difference?

Secondly, how would you explain what a status group to someone who is a novice? I would like to teach this content to someone eventually.

I have successfully used them all on a practice site here.

I am just trying to put my experience into clear words.

# Answer
Channel field groups are used to group together related custom fields. Channel fields are the actual custom fields (textarea, file uploads, text input, etc.) that a user will fill in. Think of the channel field group as just a collection of fields. You can apply the same channel field group to multiple channels.

Status groups help you realize the state of an entry. For an e-commerce site think a product may go through stages such as Pending, Quoted, and Purchased. In ExpressionEngine you'd create a status group named Order Status, and add these three statuses. That way when someone is fulfilling an order they'd change the status so that everyone else is aware of the status of that order. Typically your entries will either be Open (meaning the entry is viewable to the outside world) or Closed (not viewable, but not deleted).

I hope this helps!
> 3 votes

---
Tags: ee3, channel-fields, field-group
---


# Question
Title: Solution for cloud hosting images on EE3?
I'm have been using P&T Assets to easily integrate with Amazon S3. Is there any option out there for cloud hosting and EE3? Can I still use Assets?

# Answer
> 1 votes
there is a brandnew add-on called treasury wich supports assets storage on S3. https://buzzingpixel.com/software/treasury

It is also compatible with Ansel (https://buzzingpixel.com/software/ansel-ee) which makes image handling working like a charme!

# Answer
> 0 votes
Assets, although in development, is not out for EE3 yet. As far as I know, CE Image and Channel Images are the only other add-ons currently available for EE3 which integrate with S3 and other cloud storage platforms.

---
Tags: assets, image, ee3, hosting
---


# Question
Title: How to crop images with the Blocks module?
I was wondering if there's a module/add-on around which lets me crop/resize images with the Blocks module?

# Answer
> 0 votes
you may try https://buzzingpixel.com/software/ansel-ee it works with blocks and has really cool functions.

---
Tags: module, crop, blocks
---


# Question
Title: Display a message on visitors first visit
I am wanting to display a message when a visitor lands on the site for the first time.

I don't necessarily want to use browser cookies, but would if thats the only solution.

Ideally, would I be better off storing an IP of a visitor in the db?

Something to this effect:

```
{if first_visit}Welcome Message{/if}

```

# Answer
> 7 votes
There is Show Once. It does use cookies, but other than that it is probably just what you are looking for.

From the add-on page:

> Show Once is the module for ExpressionEngine 2 that allows showing certain content to a user only once (during their first visit). The content that you want to show needs to be wrapped in {exp:show\_once:check} tag pair.

```
{exp:show_once:check code="twitter"}
  Do not forget to follow us on Twitter!
{/exp:show_once:check}

```

# Answer
> 3 votes
Another solution would be to use First-timer. It allows you to redirect a user to a certain page when they login for the first time.

# Answer
> 0 votes
To add my two cents: I had exactly the same issue as the OP, but am working on EE 3, where Show Once and First-timer are not ready.

I got around this by using:

```
{exp:member:custom_profile_data}
  {if last_visit == "0"}Message{/if}
{/exp:member:custom_profile_data}

```

It works so far! Hope this is of help to someone.

---
Tags: sessions, cookies
---


title: EE Solspace Freeform

text:
# Question
Title: EE Solspace Freeform
Inherited a page. Not a EE person but learning....coming from Wordpress. The Sign up to mailing list page using Freeform free version 4.0.12 looks lovely. First Name, Last name email, message.... then the Sign UP button. Selecting the button does nothing. The user does not show up in the form mediation section and no notice is sent to admin. Also, though it shows some code for a Captcha, that doesn't show up.

Yes, I can email from CP/Tools.

Something is missing.....I did spend much time reviewing other folks questions to see if I could spot the mistake....but, no success. The form is called Exclusive Sign Up or exclusive-signup

```
{exp:freeform:form
        form_name="exclusive-signup"
        form:id="exclusive-signup-form"
        return="{segment_1}/thank_you"
        notify="me@thedomain.com"
    }
    <fieldset>
        <ul class="form-list">
            <li>
                <label>First Name</label>
                <div class="input-box">
                    <input class="input-text" type="text" maxlength="150" id="freeform_first_name" value="" name="first_name">
                </div>
            </li>
            <li>
                <label>Last Name</label>
                <div class="input-box">
                    <input class="input-text" type="text" maxlength="150" id="freeform_last_name" value="" name="last_name">
                </div>
            </li>
            <li>
                <label>Email</label>
                <div class="input-box">
                    <input class="input-text" type="text" maxlength="150" id="freeform_email" value="" name="email">
                </div>
            </li>
            <li>
                <label>Message</label>
                <div class="input-box">
                    <textarea class="textarea" id="freeform_user_message" rows="6" cols="50" name="user_message"></textarea>
                </div>
            </li>
            {if freeform:captcha}
            <li>
                <p>Please enter the word you see in the image below:</p>
                <div class="input-box">
                    <p>{freeform:captcha}</p>
                    <input type="text" name="captcha" style="width:140px;" />
                </div>
            <li>
            {/if}
            <li class="buttons-set">
            <button class="button" type="button"><span><span>Sign Up</span></span></button>
            </li>
        </ul>
    </fieldset>
    {/exp:freeform:form}
</div>
{/exp:stash:set}{/exp:channel:entries}

```

# Answer
Hmm, can you paste the actual code instead of the bulleted points? You may want to try something manual like `<input type="submit" value="Sign Up">` if you aren't doing the all fields approach.

You'll also want to change notify="me@thedomain.com" to admin\_notify="me@thedomain.com" (https://solspace.com/legacy\_docs/freeform-4/form/#admin\_notify) and add notify\_admin="yes". Alternatively you could just do it all from inside of the admin.

The CAPTCHA not showing could be number of things. If you're not see'ing it while logged in as an admin go to Admin \> Security and Privacy \> Captcha Preferences and check toggle your settings for logged in member requirements.

Lastly, you may want to update that version of Freeform as it's several years old and numerous bug fixes have been made. I'm also including the legacy docs link because there are some good examples of working forms at the bottom of the page. I hope some of this helps!

Freeform 4x docs - https://solspace.com/legacy\_docs/freeform-4/form/

Edit: If you can, you may want to remove the stash tag pair until the issue is resolved just in case.
> 1 votes

---
Tags: solspace-freeform
---


title: Low Search - Only One Channel - How

text:
# Question
Title: Low Search - Only One Channel - How
I've got a search form using Low Search where I want to restrict results to only one specific channel. I've created a collection called "galleries" and a shortcut called "galleries" and this code below:

```
{exp:low_search:form
    result_page="/search/results"
    required="keywords"
    form_class="form-inline"
    shortcut="galleries"
    }
  <div class="form-group">
    <label for="keywords" class="sr-only">Search our Colorado Trips</label>
    <input type="text" class="form-control" id="keywords" name="keywords" placeholder="Search our Galleries">
  </div>
  <button type="submit" class="btn btn-default">Go</button>
{/exp:low_search:form}

```

But no matter what I do the results page shows results for all channels not just the Galleries channel

# Answer
> 1 votes
Low provided a solution to me on the EE slack channel.

All I needed to do was add a hidden field with the collection name or id as the value.

```
<input type="hidden" name="collection" value="4">

```

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


# Question
Title: Simple Registration displays error on registration
Whenever a sign up occurs, this is displayed:

```
SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '45' for key 'PRIMARY':

```

INSERT INTO `exp_member_data` (`member_id`) VALUES ('45')

The membership is created, but the email isn't sent.

# Answer
> 1 votes
Upon deeper research we found this documented bug to be the cause of our problem: https://support.ellislab.com/bugs/detail/21861/registering-a-member-via-member\_registerregister\_member-will-throw-a-mysql-

Updating to EE 3.3.3 resolved the issue for us.

---
Tags: members, registration
---


# Question
Title: AJAX channel entries - filter by category
I want to load entries belonging to different categories using AJAX. Currently everything works without AJAX, reloading the page on category selection. There's a parent template, then an embed that holds the entries. Category is detirmined by segment\_2 (category id obtained via Low Seg2Cat).

**Parent Template:**

```
<div class="container">
  <div class="row">
    <div class="col-md-10 col-md-offset-1">
      <a href="{site_url}casestudies" class="load-case-studies{if "{segment_2}"==""} active{/if}" title="All">all</a>
      <a href="{site_url}casestudies/branding" class="load-case-studies{if "{segment_2}"=="branding"} active{/if}" title="">category 1</a>
      <a href="{site_url}casestudies/web" class="load-case-studies{if "{segment_2}"=="web"} active{/if}" title="">category 2</a>
    </div>
  </div>
  <div class="row">
    <div class="col-sm-12">
      <h2>case studies</h2>
      <ul id="case-studies-container" class="list-case-studies">
      {embed="embeds/list-case-studies" category="{segment_2_category_id}"}
      </ul>
    </div>
  </div>
</div>

```

**Embedded Template:**

```
{exp:channel:entries channel="case_studies" category="{embed:category}" dynamic="no" disable="category_fields|member_data|pagination" limit="9"}
<li>
  ...
</li>
{/exp:channel:entries}

```

I added the following script to the footer:

```
$(document).on('click', '.load-case-studies', function(event) {
  var url = $(this).attr('href');
  $('#case-studies-container').load(url);
  event.preventDefault();
});

```

But this loads the whole page into my container, not just the filtered entries. How can I achieve the result I'm looking for?

# Answer
Found the answer - I used a variation on a pagination solution:

**HTML**

```
<div class="row">
  <div id="entry-container" class="col-sm-12 ajax-wrapper" data-behaviour="moreEntries">
    <ul class="list-case-studies">
      <li>...</li>
    </ul>
  </div>
</div>

```

**JQuery**

```
    $(document).ready(function()
{
    $('.sub-nav').delegate('.load-case-studies', 'click', function(e)
    {
        // Don't follow the link
        e.preventDefault();

        $('.sub-nav a').removeClass('active');
        $(this).addClass('active');

        // Fetch the entries
        $.get($(this).attr('href'), function(data)
        {
            // Only grab the part of the page we want
            content = $(data).find('.ajax-wrapper').hide();

            // Add it to the DOM
            $(content).replaceAll('#entry-container');

            // Fade-in our new content
            $(content).fadeIn('fast');
        });
    });
});

```
> 0 votes

---
Tags: channel-entries, ajax
---


# Question
Title: Server Error 500 when renaming system folder in EE3
On EE2 we rename the system folder, and then update index.php and our renamed admin.php. We attempted to do so in EE3, following the instructions here (which is the same as EE2) https://docs.expressionengine.com/latest/installation/best\_practices.html.

But once we do this we get an Server Error 500. There are no errors in the log for this.

The instructions do state they may be other areas in the CP to change it, but we cant access the CP. There is no record of "system" in the database.

**index.php**

```
$system_path = './system3WmKw98f';

```

**admin.php**

```
$system_path = './system3WmKw98f';

```

**Folder name**

```
public_html/system3WmKw98f

```

Does anyone know what the issue is?

If I set the folder to system, at least i get the following error "Your system folder path does not appear to be set correctly. Please open the following file and correct this: index.php"

Also, there is no .htaccess with my EE install, dont know if its relevant.

# Answer
> 0 votes
I suggest to put the system folder above webroot, so its absolutely not accessible for the public. renaming then, is not needed anymore. our EE setup looks like:

* public html
    + index.php
* system

in index.php we set system directory like:

`$system_path = __DIR__ . '/../system';``

maybe that helps.

---
Tags: ee3, system
---


title: Stash parse categories and category_id

text:
# Question
Title: Stash parse categories and category_id
I'm trying to use the following conditionals in exp:stash:parse to set some values based on the category\_id. However, I just can't get it to work and it always just gold for channel\_colour or 20 for channel\_category\_group:

```
{exp:stash:set_list name="landing-{segment_1}" parse_tags="yes" parse_conditionals="yes" parse_depth="3" save="yes" refresh="60" scope="site" replace="yes"}
    {exp:channel:entries
        channel="landing_page"
        disable="{global:channel_disable_basic}"
        status="open"
        limit="1"
    }
        {exp:stash:parse process="inline" parse_depth="2"}
        {categories limit="1" show_group="5"}
            {if category_id == "60"}
                {exp:stash:set_value name="channel_short_name" value="things-to-do"}
                {exp:stash:set_value name="channel_url" value="things-to-do"}
                {exp:stash:set_value name="channel_category_group" value="2"}
                {exp:stash:set_value name="channel_colour" value="blue"}
            {if:elseif category_id == "62"}
                {exp:stash:set_value name="channel_short_name" value="food-drink"}
                {exp:stash:set_value name="channel_url" value="food-drink"}
                {exp:stash:set_value name="channel_category_group" value="3"}
                {exp:stash:set_value name="channel_colour" value="red"}
            {if:elseif category_id == "61"}
                {exp:stash:set_value name="channel_short_name" value="stay"}
                {exp:stash:set_value name="channel_url" value="stay"}
                {exp:stash:set_value name="channel_category_group" value="4"}
                {exp:stash:set_value name="channel_colour" value="yellow"}
            {if:elseif category_id == "63"}
                {exp:stash:set_value name="channel_short_name" value="study"}
                {exp:stash:set_value name="channel_url" value="study"}
                {exp:stash:set_value name="channel_category_group" value="20"}
                {exp:stash:set_value name="channel_colour" value="green"}
            {if:else}
                {exp:stash:set_value name="channel_colour" value="gold"}
            {/if}
        {/categories}
        {/exp:stash:parse}
    {/exp:channel:entries}
{/exp:stash:set_list}

```

Wondered if someone can help figure out what's going on?

Thanks,

# Answer
> 0 votes
\[Updated in light of your comment...\]

The problem is that you're using pre EE2.9, where the conditional parsing was improved to avoid the advanced conditionals trap (full story here if you're not aware of it: http://derekallard.com/index.php/blog/post/simple-vs-complex-conditionals-in-expressionengine-templates)

Basically in "advanced" conditionals, all of the tags get processed first before the irrelevant sections are removed from the output.

If you can't upgrade EE you could try Croxton's `IfElse` plugin, or `Switchee`. However, upgrading would be best, as dealing with these kind of things in pre 2.9 is an exercise in frustration.

---
Tags: categories, stash, conditionals, parse
---


title: File upload error for editors

text:
# Question
Title: File upload error for editors
I recently ran into this issue on two installs. Both latest EE3. I create a member group called Editors who manage site content. Assign all File upload rights to them, yet they can't upload files. The error is "File could not be written to disk". Sometimes they can upload one file, and then no more after that. Is there a limit on size relative to time period?

# Answer
Hmm, in the admin try clicking on the Gear icon (General Settings) and going to Security & Privacy. From there scroll down to the bottom and find "Apply XSS filtering?". Try setting that to no. Also you may want to find out what files are causing the problem and find out if they're larger than the max upload size set by your php.ini.
> 0 votes

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


# Question
Title: Grey Screen on CT Settings > Payments after upgrade to 2.5
I've upgraded to EE2.7.3 and CT 2.5 now when I go to Cartthrob \> Settings \> Payments I'm getting a grey screen and all navigation is disabled (have to click back button to get out). Is anyone else experiencing this or know of a fix. Display Output Profiler and Template Debug not outputting anything either.

# Answer
Reinstall seemed to fix problem with greyscreen. First try must have corrupted/dropped some files.
> 1 votes

# Answer
I had a similar issue with *CartThrob 2.7.1* on *EE 2.11.2* \- the **Modules : Payments** setting page wasn't loading past the EE header and displaying a **memory error** at the foot of the source HTML.

The solution involved removing **all** gateway php files in */system/expressionengine/third\_party/cartthrob/payment\_gateways/* **except** *Cartthrob\_payment\_gateway.php* and the gateway(s) you require - e.g. *Cartthrob\_paypal\_express.php*
> 0 votes

---
Tags: cartthrob
---


# Question
Title: Exp-resso Store Shipping Address Not showing
When the user puts in the 'shipping details' (checkout2) because it's different than the billing address the address does NOT SHOW on the next page (Confirm Order page: checkout3) as part of the checkout process. It says 'Same as 'Billing Details' when it should show the shipping address, because its different that the billing address. It also does NOT SHOW on the order page.

However, the shipping information is being captured in the form. If the Shipping Address is different that the Billing Address it will show up on the Confirmation email, the system sends out to the buyer, and it's available in the admin back end via the order report.

I am not using a shipping module, its all flat shipping. I have the lastest version of Exp-resso Store, and I am using EE 2.11.2

# Answer
I ran into this. What does the conditional on your payment page look like? Was this after an upgrade?

```
{if shipping_same_as_billing == 1}
   Same as Billing Details
{if:else}
   Shipping address
{/if}

```

We had to change the original {if shipping\_same\_as\_billing} conditional to have the '== 1' to fix the problem.
> 0 votes

---
Tags: expresso-store
---


# Question
Title: ExpressionEngine - Structure styling error
I randomly get this error as displayed n picture when using the structure module. Not sure what causes it or how to fix

EE version: v2.10.1 - Build Date: 20150501 Structure version: v3.3.17

# Answer
You may want to try to run debug mode, I've seen it fix this kind of issue before. http://buildwithstructure.com/documentation/debug\_mode\_for\_page\_data/

The debug button appears next to the Structure settings in the main tree view.

If that doesn't work you may need to uninstall/reinstall Structure.
> 0 votes

---
Tags: structure
---


# Question
Title: Change tab name in custom layout possible?
I'm trying to change the tab name in a custom entry publish layout, but it doesn't seem possible. Anyone know how to do this?

# Answer
> 1 votes
You can't change tab labels at present - you'll need to create a new tab instead and move your fields to it from the old tab.

---
Tags: ee3, publish-layout
---


title: EE not work with certain browsers?

text:
# Question
Title: EE not work with certain browsers?
This might sound like a novice question, but I am not finding any recent information on the internet in regard to this. Are there any browsers that don't work well with an expression engine CMS? Just wondering. Thanks

# Answer
> 0 votes
As per the docs:

> ExpressionEngine’s Control Panel is tested extensively with the final-release versions of the web browsers listed here. Please note that these are the minimum browser requirements necessary to use the Control Panel. They will not apply to your site’s front-end pages.
>
> * Internet Explorer 8 and above
> * Firefox 13
> * Safari 5.1
> * Chrome 19
> * Opera 11.64

---
Tags: ee3, browser
---


# Question
Title: Stashing Entry Ids not working with get tag
I've got a stash set like this:

```
{!-- retrieved at line 173--}
{exp:stash:set name="st_featured_ids" type="snippet" parse_tags="yes"}
    {director_featured_spots backspace="1"}{director_featured_spots:entry_id}|{/director_featured_spots}
{/exp:stash:set}

```

And in a test section of the template outputs entry ids as expected using this:

```
stashed: {exp:stash:get name='st_featured_ids'  type='snippet'}

```

However when I'm trying to filter a relationship tag to only show specific entries it doesn't work. If I manually add in the entry\_ids it's fine. I jsut cant' get them with stash.

```
{parents field="spot_director" limit="5" entry_id="{exp:stash:get name='st_featured_ids'  type='snippet'}"};

or

{parents field="spot_director" limit="5" entry_id="{st_featured_ids}"}

```

Not sure what I'm doing wrong.

# Answer
> 0 votes
Did you also try `{exp:stash:st_featured_ids}`? I have run into this issue before but will need to review my code to see how I dealt with it (it's been a while since I encountered it).

---
Tags: templates, stash
---


# Question
Title: Need to prove site-ownership to google.com/webmaster, where to upload their file?
In preparation for changing domain names, I first have to prove ownership to the google Webmaster gods. To do this, they ask that you upload a specially crafted .html page to your server, then visit it in your browser. So, the html file is named something like google\[randomHashedTag\].html. So I upload it in to the public\_html folder on the webserver, and go to www.ourdomain.com/google\[randomHashedTag\].html as requested... and it fails out completely. Possible approaches (which I have NOT tried... I figured asking experts was better than mucking up my web server!)

1. Edit the html file in something like Sublime Text, and copy and paste the contents into a new page WITHIN EE.
2. Try to upload the file into other random, but less "obvious" seeming places like the Public\_HTML folder...
3. Ask you folks.

Very clearly, I went option three. I *assume* I'm missing something really simple. Google offers other ways to approach this problem (different ways of proving ownership), but now I really want to figure out if you can even upload a pre-built html file and have it somehow interact with the EE site. Thanks!

Oh yeah... due to forces beyond my control, we're still running EE 1.7.1. :-/

Note, a similar (nay, identical?) problem was posted and marked Off Topic, with the suggestion to just ftp the page to the webserver. I've done that, and it doesn't load, so please provide more of an answer before you turn me to n00bhood, where I clearly belong. :D

# Answer
Normally just uploading the supplied .html file to /public\_html works for me. Check that you saved the file correctly and it is in the right location, eg /public\_html/xxxxx.html

Otherwise you can try the google site verification meta tag, you just need to add that in whatever template(s) the \< head \> tag of your site appears in.

See https://support.google.com/webmasters/answer/35179?hl=en for further info.
> 0 votes

---
Tags: google-webmaster-tools
---


# Question
Title: Top ten most used attributes for category/channel tags?
I'm a novice at EE development. Can anyone suggest the top ten (or any number) of the most used attributes for most channel:entries/category tags? Scrolling through the docs seems overwhelming at times.

I spent several hours wrestling with a channel tag to show related articles within an entry level page layout only to find a simple `related_categories_mode="yes"` was enough to do exactly what I wanted. Any help is appreciated, forgive me if this is not how this works or if this is the wrong place to ask.

# Answer
> 0 votes
Not in order of importance (because we all know channel= is #1)

**Channel Entries**

1. cache=, refresh= Enables tag caching. Refresh is the number of minutes between cache refreshes.
2. category= Categories are specified by ID number (the ID number of each category is displayed in the Control Panel).
3. category\_group= Category Groups are specified by ID number (the ID number of each category group is displayed in the Control Panel).
4. channel= From which channel to show the entries (will show all channels if no channel is specified).
5. dynamic= Use this tag if you need to display content independent of URL title but still from the same channel.
6. disable= Allows you to turn off aspects of the tag that you might not be using in order to improve performance.
7. entry\_id= You can hard code the channel tag to show a specific channel entry.
8. limit= Limits the number of entries on any given page.
9. paginate= For use with entry pagination and determines where the pagination code will appear for your channel entries.
10. url\_title= This parameter limits the query by an entry’s url\_title.

--Some examples--

A simple subpage:

{exp:channel:entries channel="subpage" limit="1" disable="member\_data|pagination" cache="yes" refresh="10"}

A blog listing page w/ categories using the Low Seg2Cat plugin for category:

{exp:channel:entries channel="blog" disable="member\_data" limit="6" dynamic="no" category="{segment\_3\_category\_id}" cache="yes" refresh="60"}

Header/Footer Resources: You want dynamic set to no since the URL isn't determining what content to show:

{exp:channel:entries channel="header\_footer" disable="member\_data|pagination" cache="yes" refresh="10" dynamic="no"}

**Channel Categories**

1. backspace= Backspacing removes characters (including spaces and line breaks) from the last iteration of the loop.
2. channel= From which channel to show the entries (will show all channels if no channel is specified).
3. show= You can specify which categories will be included in the list.
4. show\_empty= This parameter determines whether or not categories that contain no entries for the specific channel are displayed.
5. show\_expired= Determines whether expired entries are included.
6. show\_future\_entries= Determines whether entries dated in the "future" to are included.
7. style= There are two list "styles" for your categories: "nested" and "linear".

--Some examples--

Simple category listing: You can use backspace here if you've got something like ", " separating each one:

{exp:channel:categories style="linear" category\_group="1" backspace="2"}

{exp:channel:categories style="linear" show="1|13|14|15|25"}

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


title: Tricky Stash table styling task

text:
# Question
Title: Tricky Stash table styling task
I have a matrix field which outputs a series of prices for a tour. An image probably illustrates most easily what I'm doing and need to do.

Where the ticket title is repeated in subsequent rows, it needs to be hidden and also a `rowspan` applied so the number of rows with the same ticket title would need to be counted.

Same with the type in the 2nd column. And they also need to be grouped by background-color.

```
{exp:stash:set_list
  context="@URI"
  name="prices"
  parse_tags="yes"
  parse_depth="1"
  trim="yes"
  save="yes"
  refresh="1440"
  replace="no"
  scope="site"
}
  {tour-tickets}

    {stash:type}{tour-ticket-accomm-type}{/stash:type}
    {stash:min}{tour-ticket-accomm-min-pax}{/stash:min}
    {stash:max}{tour-ticket-accomm-capacity}{/stash:max}
    {stash:title}{tour-ticket-title}{/stash:title}
    {stash:price}{tour-ticket-price}{/stash:price}
    {stash:special}{tour-ticket-price-special}{/stash:special}
    {stash:peak}{tour-ticket-price-peak}{/stash:peak}
    {stash:special-peak}{tour-ticket-price-special-peak}{/stash:special-peak}
    {stash:details}{tour-ticket-details}{/stash:details}

  {/tour-tickets}
{/exp:stash:set_list}

<table>
  <thead>
    <tr>
      <th scope="col">Ticket</th>
      <th scope="col">Type</th>
      <th scope="col">Details</th>
      <th scope="col">Price</th>
    </tr>
  </thead>
  <tbody>
    {exp:stash:get_list
      name="prices"
      context="@URI"
      orderby="title|price|special|details|type"
      prefix="price"
    }
      <tr>
        <td>{price:title}</td>
        <td>{price:type} <br>(Min booking: {price:min}, Sleeps: {price:max})</td>
        <td>{price:details}</td>
        <td>{price:peak}</td>
      </tr>
    {/exp:stash:get_list}

  </tbody>
</table>

```

This is what I have so far as shown in the first table. Anyone have any ideas about how to achieve the presentation in the 2nd table?

# Answer
> 1 votes
This will get you part of the way. It should be possible to group the type column as well, using the same principle, but you'd need an index column in the set list that combined the ticket value and the type value to match against (see https://github.com/croxton/Stash/wiki/Filtering%20lists%20with%20match%20against)

```
<table border="1">
  <thead>
    <tr>
      <th scope="col">Ticket</th>
      <th scope="col">Type</th>
      <th scope="col">Details</th>
      <th scope="col">Price</th>
    </tr>
  </thead>
  <tbody>
    {exp:stash:get_list
      name="prices"
      orderby="title|price|special|details|type"
      prefix="price"
      unique="title"
    }
      <tr>
        <td rowspan="{exp:stash:list_count name='prices' match='#^\Q{price:title}\E$#' against='title'}">{price:title}</td>

        {exp:stash:get_list:nested
          name="prices"
          orderby="title|price|special|details|type"
          prefix="nested"
          match="#^\Q{price:title}\E$#"
          against="title"
        }
            <td>{nested:type} <br>(Min booking: {nested:min}, Sleeps: {nested:max})  {exp:stash:list_count name="prices" match="#^\Q{price:title}\E$#" against="title"
        }</td>
            <td>{nested:details}</td>
            <td>{nested:price}</td>
        </tr>

        {/exp:stash:get_list:nested}

    {/exp:stash:get_list}

  </tbody>
</table>

```

---
Tags: stash
---


# Question
Title: Error in entries per page counting plugin
I'm working on a quick plugin to output where you are in a paginated list of entries but am having problems doing mathematical calculations on plugin parameters when one of them is using `{super_search_total_results}`.

This is what I have so far:

```
$output        = '';
$per_page      = ee()->TMPL->fetch_param('page_num'); // e.g. 9
$total_entries = ee()->TMPL->fetch_param('total_results'); // e.g. 50
$output        = $per_page + $total_entries;

return $this->return_data = $output;

```

And in the template I have:

```
{exp:td_tours_advanced_count
    page_num='6'
    url_segment="{last_segment}"
    total_results='{super_search_total_results}'
}

```

So with the above, if my total results are 14 then the expected result of `$output` should be 20 but instead I get 6. If I set `$output` to just equal `$total_entries` then the result is 14.

It's only when I try to use `$total_entries` in a mathematical operation that it always seems to evaluate to 0, i.e. if I do `*` or `/` I get 0.

But if I change the plugin parameter in the template to

```
{exp:td_tours_advanced_count
    page_num='6'
    url_segment="{last_segment}"
    total_results='14'
}

```

then the `$output` is as expected and all other mathematical operations work correctly. I've tried adding `parse='inward'` to the plugin but to no avail.

So why is that `{super_search_total_results}` parses OK as a string but when trying to use it as an integer, it always returns 0 (I've tried converting it to an integer/float but the output is still 0).

# Answer
As soon as I update the question I find the answer. For some reason `{super_search_total_results}` as the plugin parameter doesn't work but `{exp:super_search:results limit="1"}{super_search_total_results}{/exp:super_search:results}` does.

It would still be interesting to know why the first only works when trying to output the string directly and not when using it in mathematical operations, but the latter does.
> 0 votes

---
Tags: solspace, add-on-development, supersearch
---


# Question
Title: Finding evidence of spam emails in database table exp_email_tracker
I started getting some spam messages that appear to be sent by my install of Expression Engine.

The only evidence I am seeing is some database entries in the table exp\_email\_tracker

There are not spam user accounts.

I'm confused about both how this could happen and where to start to fix it. Has anyone run into a similar issue?

Currently running EE 2.9.0. With the Snaptcha add on

# Answer
> 0 votes
Ultimately I found no evidence of a hacked EE install. Upgrading to the latest EE 2 in my case (2.11.3) seemed to fix the issue. I'll be sure to update if I find anything else.

---
Tags: email, spam
---


title: Can download image, but can't view it

text:
# Question
Title: Can download image, but can't view it
We can download an image off our EE site, but the image doesn't display on the site itself. Any idea what could cause this?

We're using EE 2.6.1.

# Answer
> 0 votes
We actually solved the issue yesterday. There was a internal redirect loop in our htaccess file that was taking valid URIs and returning 500s. Removed the loop, and images are now displaying as per usual.

---
Tags: assets, image-path
---


title: Low Events not showing correct category

text:
# Question
Title: Low Events not showing correct category
I’m using Low Events and on the events index page I have a list of events, using the exp:low\_events:entries tag.

On my event page, I’m using the normal channel:entries. Both work as should.

However on my event page which displays the event info I have the following categories code:

```
{exp:channel:entries
    channel="events"
    date="{segment_2}"
    url_title="{segment_3}"
    show_expired="yes"
    status="open"
    show_passed="yes"
    show_future_entries="yes"
    limit="1"
}

```

This code works as should and shows the category assigned to the entry. However on the index page that uses the exp:low\_events:entries tag, the event or events with the assigned category is not shown. Instead all events are listed.

I am missing some code in the categories code?

**edit**

```
{exp:low_events:entries
    channel="events"
    date="{segment_2}"
    category="{segment_3}"
    show_passed="yes"
    show_upcoming="yes"
    orderby="date"
    sort="asc"
    limit="5"
}

```

# Answer
Looking at the two opening tags, here's my 2 cents.

In the `{exp:channel:entries}` tag, the `date` and `show_passed` parameters do nothing; they're used by the Low Events tag. Also, the tag will act dynamically.

In the `{exp:low_events:entries}` tag, you're using `category="{segment_3}"`, which will only work if `{segment_3}` **is a numeric category ID**. A category URL title *will not work*, as the category parameter only accepts IDs.
> 0 votes

---
Tags: low-events
---


# Question
Title: Error with SEO Lite Fatal error: Call to undefined method Cp::set_variable() in
Runnng EE version 2.11 and SEO Lite 1.3.5 Fatal error: Call to undefined method Cp::set\_variable() in /xxxxx/expressionengine/third\_party/seo\_lite/mcp.seo\_lite.php on line 97

This occurs when accessing the default module page to input the default data for SEO Lite. Line 97 is the one in the middle $vars\['\_form\_base'\] = $this-\>form\_base; $this-\>EE-\>cp-\>set\_variable('cp\_page\_title', lang($lang\_key)); $this-\>EE-\>cp-\>set\_breadcrumb($this-\>base, lang('seo\_lite\_module\_name'));

# Answer
Try changing the line

```
$this->EE->cp->set_variable('cp_page_title', lang($lang_key));

```

to

```
$this->EE->view->cp_page_title = lang($lang_key);

```
> 1 votes

# Answer
You should upgrade to the latest version of SEO Lite here: https://github.com/bjornbjorn/SEO-Lite
> 0 votes

---
Tags: seo-lite
---


title: Cartthrob - Discount per product

text:
# Question
Title: Cartthrob - Discount per product
I try to setup a simple discount with a existing plugin (Amount off) per product.

I want to apply the discount only to one product.

I setup a All store discount with the channel "Store - discount" this is working. But this is not what I want since it not all product that are in discount.

I add a custom field Discount in my "products" channel field groups I put the type "Cartthrob Discount settings". The configuration for the discount in the product entry are there I can choose the discount type. But nothing happen in my cart. Did I miss something? Did is supposed to work?

Thank in advance

AK

# Answer
> 0 votes
(I'm with Vector; we own CartThrob)

You say you want to apply "the discount to only to one product." But you also say it might be applying to all products. Is it possible you chose the discount type "Amount off" instead of "Amount off product", which lets you specify just certain products?

"CartThrob discount settings" should be its own field in a "Store - Discounts" channel (that's how CartThrob sets it up for you). It shouldn't be attached to the product. In there, you make store-wide discount settings, however you can use the "product" discount type for it to only apply to certain products.

Let me know if you have any other questions!

---
Tags: cartthrob, discounts
---


title: Global variables parse time

text:
# Question
Title: Global variables parse time
I am currently trying to debug some of the page load times on a website we host, and am running into something I find odd. Global Variables parsing seems to be taking up half the page load time...

```
(0.977187/31.55MB) - - End Template Processing -
(0.977237/31.55MB) - Parse Global Variables
(1.541043/36.24MB) - Template Parsing Finished
(1.547675/36.55MB) - Calling Extension Class/Method: Eedt_memory_history_ext/ee_debug_toolbar_init_settings
(1.548767/36.62MB) - Calling Extension Class/Method: Eedt_perf_alerts_ext/ee_debug_toolbar_init_settings

```

Am I correct in thinking this?

How can I reduce this time?

I feel like it shouldn't be taking half a second to parse a few variables.

### Details

Expression Engine version: 2.10.1
PHP Version: 5.3.3

As for plugins, we don't have that many, on this page specifically, I am running a homebrewed plugin that takes in a single parameter and then queries the database and builds a response. This was made to bypass the standard channel entries queries in EE, because with a ton of entries, it started taking a very long time.

Other addons we have (but are not running in this page) SEOLite, trunchhtml, searchfields

# Answer
I'd start with upgrading the version of PHP to something like 5.6 (or at least 5.4) if you can. You should see some significant gains in loading. EllisLab put out a pretty good article here explaining this in detail. Other than that, if your site is loading slowly overall and it hasn't before you may want to check with your host.
> 0 votes

---
Tags: global-variables, loading-time
---


# Question
Title: When trying to update indexes a get a JS error and it never finished
I go into the Assets add-on, then to "Update Indexes," select my image group and hit the "Update Indexes" button and get an immediate JS error:

```
Uncaught SyntaxError: Unexpected token < assets.min.js?2.1.4:10

```

Is this a known issue? Any suggestions how to fix?

The error is here:

# Answer
as suggested here : Assets2 borked after removing index.php (official Ellislab method)

you should add this line to your config.php file

```
$config['assets_site_url'] = '/index.php';

```
> 1 votes

# Answer
what is the response you're getting? Probably not a valid JSON response and has some PHP errors preceding it, which would cause this.
> 1 votes

# Answer
I understand that this thread is a few years old but this one caught me out when trying to use Assets on my local machine recently when doing a new site.

Assets will not work if you have debug turned on - `$debug = 1` in your index.php file and you have php errors (unrelated)

Having debug turned on results in the same 'Unexpected Token' JavaScript error that the OP had.

When checking the Network tab in Chrome Dev Tools, the request made when clicking the Update Indexes button resulted in the php errors being returned in the response
> 0 votes

---
Tags: assets, pixelandtonic, javascript
---


title: EE 3.3.4 Search Module Not Installed

text:
# Question
Title: EE 3.3.4 Search Module Not Installed
I continue to get a search path error when using Simple Search. Yes, I have a search/results template, and I have tried hard coding the search/results path into Simple Search.

I've checked the Add-On Manager and I do not see that the Search Module is installed. I can't tell from the documentation whether this module is something that would be displayed in the Add-On Manager, although I would imagine it would be.

Basically two problems:

1. Search path error when using Simple Search
2. No evidence the Search module is properly installed

These things suggest the module is not properly installed. Can someone yield some insight?

# Answer
> 0 votes
Hoping I understand the problem correctly. Can you try something similar to...

```
{exp:search:simple_form channel="subpage" search_in="everywhere"  results="10" result_page="sandbox/search-results" no_result_page="sandbox/no-results"}
     <input type="search" name="keywords" placeholder="Enter search words">
     <button class="submit search">Search</button>
{/exp:search:simple_form}

```

Where "sandbox" is the group and "search-results" is the template. Make sure everything is spelled correctly as I've seen this be a problem before. Also double check the template manager to make sure EE is properly adding your groups/templates.

---
Tags: ee3
---


# Question
Title: Loop a new section (outside loop) after every 2 entries
This is a strange one I've never come across over 5 years developing with EE. There may be a simple solution but I'm not seeing it!

Essentially, I need to create a dynamic loop that outputs a different colour background after each 2 entries. To help you understand, I have a full screen width background, inside there is a container with 2 entries. After these two, there is a new full width background with another 2 entries, then after those two, it reverts back to the original colour and so on...

This is my code:

```
<section class='section section-desktop'>

        <div class="l-wrap">

          <div class="l-grid">
            {exp:channel:entries channel="partners" orderby="date" sort="asc"}{if partner_group == "Construction & Property"}<div class="l-grid__item-half">

            {if partner_logo != ""}<img class="partner-logo partner-logo--large" src="{partner_logo}" alt="{title} logo">{if:else}
            <div class="icon-construction-property content-icon" data-grunticon-embed></div>{/if}
              <p><strong>Company Name:</strong> {title}</p>
              <p><strong>Established:</strong> {partner_established}</p>
              <p><strong>Key business activities:</strong></p>
              {partner_key_business_activities}
              {partner_additional_info}
              {if partner_website_link != ""}<p><a class="btn" href="{partner_website_link}">Visit website</a></p>{/if}
            </div><!--
            -->{/if}{/exp:channel:entries}
          </div>

        </div>

      </section>

```

All I need to do is add a class of "section--light-grey" to the main section class. Because this is outside the loop, I can't use {switch} or conditional counting.

Any idea how to do this without creating multiple loops with offset parameters? Or can I offset dynamically?

Here is a diagram of what I'm trying to achieve:

---

Entry 1 – Entry 2 (white background section)

---

Entry 3 – Entry 4 (light grey background section)

---

Entry 5 – Entry 6 (white background section)

---

Entry 7 – Entry 8 (light grey background section)

---

etc...

# Answer
> 1 votes
If I follow your question correctly, the output you want is for each pair of entries to be in their own sections, with the sections alternating between white and light grey backgrounds.

I'm not sure about this, because your sample code appears to list all the entries within a single pair of `<section>` tags.

If your output does split pairs of entries into separate `<section>` tags, then these need to be within the main loop not outside it.

If the `<section>` tags are within the loop, then it is easy to generate the output you need with simple EE conditionals. You probably can also lose one `{if}` nesting by using the `search:field="value"` parameter in your channel entries tag.

Here is a simple version of this... (not tested).

Hopefully it will give you something to edit / kick against.

```
{exp:channel:entries channel="partners" orderby="date" sort="asc" search:partner_group="Construction & Property"}
{if count % 2 == 1} {!-- Trigger a Section every two entries --}
<section class='section section-desktop {if count % 4 == 1}section--light-grey{/if}'> {!-- Trigger a grey-section every four entries --}
        <div class="l-wrap">
          <div class="l-grid">
{/if}
                <div class="l-grid__item-half">
                    {if partner_logo != ""}
                        <img class="partner-logo partner-logo--large" src="{partner_logo}" alt="{title} logo">
                    {if:else}
                        <div class="icon-construction-property content-icon" data-grunticon-embed></div>
                    {/if}
                    <p><strong>Company Name:</strong> {title}</p>
                    <p><strong>Established:</strong> {partner_established}</p>
                    <p><strong>Key business activities:</strong></p>
                    {partner_key_business_activities}
                    {partner_additional_info}
                    {if partner_website_link != ""}<p><a class="btn" href="{partner_website_link}">Visit website</a></p>{/if}
                </div>
{if count % 2 == 1} {!-- close the section every two entries --}
          </div>
        </div>
</section>
{/if}
{/exp:channel:entries}

```

---
Tags: channel-entries, channel, entries, loop, switch
---


# Question
Title: Suggestion for fields to use for this type of content
I'm using EE 2.11.2, and am having trouble coming up with a good, user-friendly way to set up my fields to represent some dynamic content on a site I'm building. Can you offer a suggestion of a fieldtype to use, or some other scheme for making this content easily manageable?

So I have a channel called "Events", and two different events can have quite different 'Pricing' information. For example, here's an example of complex pricing scheme for an event:

And here an example of a much simpler pricing scheme:

What native or Add-On fieldtype(s) could I use to make this easily manageable content for an admin?

I have considered using a Grid field, with a 'heading' column, a 'left value' column, 'right value' column, and an 'info' column, such that if the admin filled out the 'Heading' column only, a heading would display, and the template would ignore the other three columns. If they fill out left and right value, it will display the line with the dotted lines betwixt the values, and if they filled out the info field, it would output that italicized grey text and ignore the other columns... But this scheme requires the admin to learn too much to use...

Any better ideas? Is there a field or combination of fields that can accomplish this easily? Thanks!

# Answer
> 1 votes
You could use Content Elements? Create a new field type called "Event Pricing" selecting Content Elements as the field type, then when editing the field remove all the default ones, then add your own custom ones from the bottom, where you can type in the label and select the content type:

* "Pricing Header" (Header content type set to h3 for example)
* "Price" (Table Field - with 3 columns - see grab)
* "Note" (Rich Text field)

Then on the Publish Entry page the admin can choose from any of these 3 elements over and over again as required.

---
Tags: wygwam, grid, fieldtype, channel-fields, content-elements
---


title: Display archive date on landing page

text:
# Question
Title: Display archive date on landing page
I'm trying to display the category archive date on the landing page after the archive date is clicked in sidebar.

Here's my sidebar with category and archive links:

```
<div class="sidebar">
    <h2>Categories</h4>
    {exp:channel:categories channel="blog"}
        <a href="{path='blog/index'}">{category_name}</a><br />
    {/exp:channel:categories}
</div>

<div class="sidebar">
    <h2>Archives</h4>
    <ul>
    {exp:channel:month_links channel="blog" limit="50"}
        <li><a href="{path='blog/index'}">{month}, {year}</a></li>
    {/exp:channel:month_links}
    </ul>
</div>

```

I'm using the `{exp:channel:category_heading}` on the `blog/index` landing page and that displays category heading just fine, but can't figure out how to do the same for the archive date.

**UPDATED ANSWER:**

I used DT Plugin and pulled in segment variables and seems to work fine.

{exp:dt set="{segment\_3}/00/{segment\_2}" format="%F, %Y" ee\_format="true" month="1"}

# Answer
> 2 votes
For EE3 you could try this plugin - https://devot-ee.com/add-ons/dt-plugin \- I've not tested it but the docs suggest you should be able to get a nice date output from it.

You could always just grab the segment values in your page heading, eg

```
<h1>Archive for {segment_3}/{segment_2}</h1>

```

# Answer
> 0 votes
Assuming your month archive URL's are in format blog/\[year\]/\[month\] you could. use Low's Nice date plugin to grab the segment values and output a date in whatever format you need. http://gotolow.com/addons/low-nice-date

---
Tags: category-archive
---


title: Hooks in VISITOR 3.0.1

text:
# Question
Title: Hooks in VISITOR 3.0.1
Do anyone know if Devdemon's VISITOR 3.0.1 is having hook similar to zoo\_visitor\_update\_end? I couldn't see any documentation and didn't get any response yet. Please let me know. Thanks

# Answer
> 0 votes
If you want backend hooks its :
"visitor\_cp\_update\_start"
"visitor\_cp\_update\_end"

Frontend hooks are:
visitor\_update\_start
visitor\_update\_end

---
Tags: devdemon, zoo-visitor
---


title: Best SEO Plugin Recommendation

text:
# Question
Title: Best SEO Plugin Recommendation
I need an SEO plugin that is similar to SEO lite, https://devot-ee.com/add-ons/seolite. Basically something that is simple, with global settings, and entry overrides. I like this plugin, but its main issue is that it cannot deal with images. The fact that EE cannot have multiple field groups per channel also basically makes it so you always have to use a plugin for this feature. I mostly just maintain EE websites and don't do new development with EE. Some suggestions from people who still develop heavily with EE would be great. This site is EE 2.9.

# Answer
> 0 votes
Have you checked out SEO Lite's extra tags functionality?

http://wedoaddons.com/seo-lite/extra-tags

You would still need to create the fields for images etc. in the different channel field groups, but at least you've only got one header code (the SEO Lite template)

---
Tags: ee2, plugin, seo, seo-lite
---


# Question
Title: Relationship field in grid field not outputting data using EE3
I have a relationship field in a grid field which is not outputting any data. But, it should.

```
{service_types}

    <div class="column">

        <a href="{service_types:url:url_title}">
            <img src="{service_types:src}" alt="{service_types:alt_text}">
        </a>

    </div>

{/service_types}

```

`{service_types}` is the grid field and `{service_types:url:url_title}` is the relationship field. This works in EE2, but not EE3 seemingly?

I have checked that the target entries are open and not have silly expired or far future dates etc etc.

# Answer
Right, looks like it has to be in a tag pair.

{service\_types}

```
<div class="column">

    <a href="{service_types:url}{service_types:url:url_title}{/service_types:url}">
        <img src="{service_types:src}" alt="{service_types:alt_text}">
    </a>

</div>

{/service_types}

```
> 0 votes

---
Tags: relationships, grid, ee3
---


# Question
Title: EE3 Control Panel entry form page layout - 2 columns gone?
I've just set up my first EE3 site after having produced many sites using EE2. Aside from the learning curve of a new control panel, a feature clients used to love was the ability to 'design' their entry forms (i.e. layout, ordering, columns). I've found the ability to 'order' fields, but it seems you can no longer 'shorten' the fields to enable the page to have 2 columns?

ie. I used to have a half / half split column with 'title' on the left and then 'url title' beside it on the right. Likewise for setting 3 images I'd have 3 smaller columns for them rather than 3 single full-width 'rows'.

Am I missing something or is that no longer possible?

Christiaan

# Answer
I've been using the "Digi Nut Control Panel CSS & JS" plugin to adjust the css to something more like EE2.

For example, I have a very wide screen, and adding this css made the template editing window stretch wider than the default and made the left column on the Edit windows take up less room than the right column. The layout functionality of EE3 is still not near as flexible as EE2, but this helped me.

```
@media screen and (min-width: 1024px) {
.col-group { max-width:90%; }
.w-8 { width:30% }
.w-8.last { width:70% }
}

```
> 1 votes

# Answer
As EE3 is all about bootstrap responsive concept, Its not possible till now. may be they add this feature in upcoming version of EE3.
> 0 votes

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


title: Pages URI not saving in EE3

text:
# Question
Title: Pages URI not saving in EE3
I just installed my first EE3 site (EE 3.4.1), and the Pages URI entries are not saving. The page entry itself saves, but not the URI. Has anyone else experienced this or have a way to fix it?

# Answer
> 0 votes
OK, I uninstalled and reinstalled the Pages module, and that fixed it.

---
Tags: ee3, pages
---


title: Hangs on file upload

text:
# Question
Title: Hangs on file upload
I'm running a brand-new install of EE 3.3.4 and DevDemon's Updater 4.0. When I try to upload an add-on ZIP file through Updater, it allows me to select a file but then just hangs at the 'uploading, please wait...' message.

No error message is presented, but I did check for Javascript errors and found that the following pops up when submitting a file for upload:

```
ReferenceError: Spinner is not defined
xhr2Upload()
    addon_mcp.js:114
dialogClosed()
    addon_mcp.js:54
Z.event.dispatch()
    jquery.js:3
Z.event.add/m.handle()
    jquery.js:3

```

Any ideas on where to go from here?

# Answer
> 0 votes
I don't know how it happened (or why it took me so long to think of it), but apparently at least one of the theme files didn't get uploaded correctly. I re-uploaded the whole themes directory and all is well now.

---
Tags: devdemon-updater
---