# Question
Title: Updated to latest Wygwam, Icons are all messed up
I'm using EE 2.8.1 and I just updated Wygwam from 3.3.1 to 3.3.3 by copying over system/expressionengine/third\_party/wygwam and theme/third\_party/wygwam folder contents over, then running "run module updates"

Everything seems to work, but my icons are all messed up. For example, the icon that is clearly for unlinking (the chain with the x on it) is now the icon for linking. And the one for unlinking looks like bullet points. And the one for inserting a "read more" break in the text looks like the text unformatting icon (the T with an x at the bottom).

I didn't know what to do so I restored my OLD themes/third\_party/wygwam folder from a backup, and now everything looks okay. But I kept the changes I had made on the system/ folder. Ideally I wouldn't want to keep it this way, since the themes folder is the old version... but it seems to be working... but maybe there are some undetected problems from doing it this way. Any help or suggestions?

# Answer
Eventually this is an issue of the CKEditor version which comes with Wygwam 3.3.3 Old CKEditor version often are not compatible with some browser-updates. I remember in 11/2014 I had a similar issue with Safari 7; I had to beg and wait until P&T updated the CKEditor in the new 3.3.3-release (you can't just update the CKEditor yourself).

So I would recommend:

* Update to Wygwam 4.0.1 - it comes with CKEditor 4.5.7 (instead of 4.4.6 in your Wygwam3.3.3-version which is from 12/2014). I would expect your problems to disappear.
* You also could try to view your backend with a different browser. There is a slight chance that this fixes the problems.

Oh ... And for sure you did empty your browser-cache, deleted cookies etc.? :-)
> 0 votes

---
Tags: wygwam, update
---


title: anchor tags in my URL not working

text:
# Question
Title: anchor tags in my URL not working
I'm having issues with using anchors in my URLs. For example, I have a url http://myurlhere.com/page#anchor, the site fails to go to the anchor. Has anyone experienced this issue?

Edit: When I'm testing on local, the local URLs + anchor tags work, but when I test on my production servers, UTM tags are being added to the URLs, and the anchors seem to be ignored and not appended. I tried manually editing the URLs to include the UTM tags, but duplicate UTM tags are then appended to the URL.

# Answer
> 0 votes
Assuming that the anchor does actually exist on the page (always double check) and the URL is correct when the page loads, the only two things it could be are a browser problem or JavaScript is resetting your scroll position. After checking on a couple of different browsers start going through your JavaScript plugins and the code you have written yourself to see what the culpret is.

# Answer
> 0 votes
Anchor-links will not work when followed by UTM-tags or other parameters. Most probably you will break your UTM-tags when appending it to an anchor.

You will have no other possibility than to add the anchor-link at the end of the UTM-parameters.

---
Tags: url
---


title: Fetch first image of entry?

text:
# Question
Title: Fetch first image of entry?
I want to fetch the first image of an entry, as I have a list of entries (generated by the Playa-plugin) und want to show an image to each entry.

I am running EE2. Is there any idea or hint?

Thanks!

UPDATE: The images are just inserted in the entry (I use Assets, but this should be of no relevance). So the body-field of an entry could have a structure like this:

```
<p>bla bla bla</p>
<img src="www....">
<p>bla bla bla</p>
<img src="www....">
<p>bla bla bla</p>
<p>bla bla bla</p>
<img src="www....">

```

So I want to use the first image in a list of my postings (every entry of the list showing one image of the post).

# Answer
I've assumed when you refer to "The images are just inserted in the entry" and "So the body-field of an entry", that you are referring to a single text/wysiwyg field in the entry.

You won't be able to without an add-on. You have img tags embedded within a single wysiwyg field and output using a single variable (albeit in your case via Playa). there's no way for EE to know you have html embedded in it, let alone strip out the first occurrence of the img.

The easiest method might be to hide other images using CSS (hide all img tags in content text, show the first img). You could also remove them by manipulating the DOM in JS. Or you could write a plugin that manipulated the html output from the wysiwyg field in the template. I had a quick look on Devot:ee for something that might do it for you...

CE\_String might help, this is a guess and not tested...

```
{exp:ce_str:ing preg_rep='/< *img[^>]*src *= *["\']?([^"\']*)/i'}
    {body-field}
{/exp:ce_str:ing}

```

This link shows the regex command you need in PHP used in the above.

Alternatively, the Find & Replace Plus add-on might help:

```
{exp:replace_plus find="/< *img[^>]*src *= *["\']?([^"\']*)/i" replace="" regex="yes"}
  {body-field}
{/exp:replace_plus}

```

As mentioned, these aren't tried and tested, but should get you on the right track - the latter add-on looks a better fit, and you might need to change the regex to get it working.
> 1 votes

---
Tags: playa, image
---


# Question
Title: show specific feed related to entry; however, a single page template is being used
I have a single page template that is used to show a specific entry (based on url segment). When the unique page content is displayed, I would like to show a specific unique feed also.

I'm thinking i can have a custom field in the entry screen where I enter the unique feed url. Then use either use EE native feed functionality or Andrew Weaver's RSS plugin to display the feed.

However, I'm not sure if is it possible to call the custom field that holds the url?

Any ideas or other ways to solve this problem?

thanks

> {exp:ajw\_feedparser url="??????" cache\_refresh="60" limit="8" }
>
> {title}
>
> {description}
>
> {/exp:ajw\_feedparser}

# Answer
> 1 votes
Sounds reasonable, add a new `text` field to the channel named 'feed URL' make sure the field is set to formatting: none.

Then in you channel loop:

```
{exp:channel:entries url_title="{segment_x}"}

  ... {channel data} ...

  {exp:ajw_feedparser url="{feed_url}" cache_refresh="60" limit="8" }
    {title}
    {description}
  {/exp:ajw_feedparser}

{/exp:channel:entries}

```

---
Tags: rss
---


# Question
Title: Email Template ignores Word Wrapping within matrix fields
In the **order confirmation email template** i have set **Word Wrapping** to "**on**" and **Email Formatting** to "**Plain Text**".

however inside this template with:

```
{exp:channel:entries entry_id="{entry_id}" show_future_entries="yes"}
{matrix_field}
{matrix_field_col_name}.
{/matrix_field}
{/exp:channel:entries}

```

i get:

```
matrix_field_col_content_1.matrix_field_col_content_2.matrix_field_col_content_3.

```

but it should be:

```
matrix_field_col_content_1.
matrix_field_col_content_2.
matrix_field_col_content_3.

```

# Answer
> 0 votes
As you're inside a matrix field it is simply spitting them out in one line so it is working as expected. The word-wrap function is not being triggered because it's one long word.

To have your items output to a new line, simply add `\r\n` immediately after the '.'

---
Tags: expresso-store, devdemon
---


# Question
Title: I would like to know if there is any function for managing menu from back end just like wp_nav_menu() in wordpress
Iam new to expression engine framework,I would like to know if there is any function for managing menu from back end just like wp\_nav\_menu() in wordpress

# Answer
> 0 votes
I don't know the wp thing you are mentioning, however, you could have a look at NavEE https://devot-ee.com/add-ons/navee

---
Tags: pagination
---


title: Use HTML in a category title

text:
# Question
Title: Use HTML in a category title
I need to use a superscript registered symbol ( <sup>®</sup> ) in a category title.

There is no unicode character for a superscripted ® and I can't figure out a way to make the category title allow HTML.

Has anyone got a work around for this?

# Answer
> 0 votes
Have you check CE String? It allows you to manipulate strings (text) with very simple syntax. In the User guide take a look at the Custom Methods.

---
Tags: categories
---


# Question
Title: Matrix - how to "Populate the menu from another channel field"?
EE's native `Select Dropdown` field has the option to "Populate the menu from another channel field". I'm using Matrix and the `P&T Dropdown` field. It doesn't have the option to "Populate the menu from another channel field". I want to populate the list from another channel field. How can I do this?

# Answer
MX Select Plus is a great fieldtype–you can choose either to populate the menu with plain text or write a SQL query. It's pretty slick!
> 2 votes

# Answer
Playa might just be the addon you might be looking for!
> 0 votes

---
Tags: matrix, custom-fields, fieldtype, fields
---


# Question
Title: Wygwam shows only PDF files but no images
I just downloaded the newest Wygwam 4.0.1 and installed it into a working EE 3.1.2 installation. When trying to select an image through Wygwam the file manager only shows PDF files. Anyone any clue why this is happening?

Tia, Tom

# Answer
Ok, a simple re-run of the EE installer did the trick
> -1 votes

---
Tags: wygwam, file-manager
---


# Question
Title: Do EE template partials have a preparse function similar to LowVars?
I'm wondering if there is a way to dynamically set variables within a template partial from the point at which it is included. This works in Low Variables as the preparse function, but is there anything for partials that could include this functionality?

# Answer
> 0 votes
Template Partials are renamed Snippets. They don't support a preparse-like function, although you could try a workaround with Preload Replace vars, as explained in this blog post from 2011.

---
Tags: low-variables, global-variables, template-partials
---


# Question
Title: ExpressionEngine: check if taxonomy is empty
I'm very new to EE but I can't seem to find how to check if the following is returning empty nodes:

```
{exp:taxonomy:nav tree_id="1" display_root="no" ul_css_class="clearfix"  root_node_entry_id="{entry_id}"}
    <a href="{node_url}">{node_title}</a>
{/exp:taxonomy:nav}

```

I'm doing this because I have a toggle button for the menu but I want to hide it if there are no children nodes for the current page.

# Answer
I don't know that addon at all, but have you tried a few simple conditionals? Ex:

```
{exp:taxonomy:nav tree_id="1" display_root="no" ul_css_class="clearfix"  root_node_entry_id="{entry_id}"}

    {if node_title != "" || node_id != ""}

        <a href="{node_url}">{node_title}</a>

    {if:else}

        <!-- empty node! -->

    {/if}

{/exp:taxonomy:nav}

```
> 0 votes

# Answer
While in a channel:entries loop, I see if this entry is in a taxonomy tree by running this:

```
{if "{exp:taxonomy:get_node}{this_node_title}{/exp:taxonomy:get_node}" != ""}

```
> 0 votes

---
Tags: taxonomy
---


# Question
Title: Set action dynamically in Charge subscription form
When using Charge to handle subscriptions is it possible to set the Charge Action (not the HTML form action parameter) dynamically based on which subscription option has been chosen in the form?

For instance, I have 3 different subscriptions available. Depending which subscription is chosen the member is to be put into a different member group. This was to be done using Charge's Actions.

But it appears that you must set the Action as a parameter on {exp:charge:form}.

Is it possible to set the Action dynamically within the form?

# Answer
> 0 votes
If I'm not mistaken you can set the on\_success parameter of the exp:charge:form tag based on a url segment. Then, you can create different Actions assigning different Subscriptions based on your needs.

I hope that's helpful.

---
Tags: charge
---


title: Is there a Status="any"?

text:
# Question
Title: Is there a Status="any"?
Within the eateries tag, is there a peramiter that equals status="any" that will pull all entries no matter the status (including 'closed')?

I thought status="not none" worked, but it's not...

# Answer
> 2 votes
Something like `status="not fakestatus"` will work.

# Answer
> 0 votes
If you want to include "closed" entries, you'll need to specifically include that status in your channel\_entries call — from the Docs: "Note that closed status entries will not be included in the results when using “not” regardless of whether it is in the piped list."

Maybe try `status="closed|not closed"` as odd as that may seem. If that doesn't work, you may have to include all of the statuses that you want in the piped list.

# Answer
> 0 votes
status="closed|open"

https://docs.expressionengine.com/latest/channel/channel\_entries.html#status

Hope that helps

---
Tags: channel-entries
---


# Question
Title: Passing Transcribe variables to Freeform placeholder
I'm trying to pass a set a language variables into a respective set of Freeform generated inputs.

The obvious way to do it would be:

```
<div>
    <label for="freeform_first_name">{exp:transcribe:replace name='contact_name'}</label>
    {freeform:field:first_name attr:class="textinput" attr:placeholder="{exp:transcribe:replace name='contact_name'}"}
</div>
<div>
    <label for="freeform_email">{exp:transcribe:replace name='contact_email'}</label>
    {freeform:field:email attr:class="textinput" attr:placeholder="{exp:transcribe:replace name='contact_email'}"}
</div>
<div>
    <label for="freeform_user_message">{exp:transcribe:replace name='contact_message'}</label>
    {freeform:field:user_message attr:class="textarea" attr:placeholder="{exp:transcribe:replace name='contact_message'}"}
</div>

```

This results in the Label displaying the correct language variable as set by Transcribe. However the same language variables don't get parsed in the Freeform's attribute placeholder.

I've tried to `stash:embed` the contact form and pass the variables from the originating template.

```
{stash:embed
    name="snippets:contact-form"
    process="end"
    parse_depth="1"
    stash:cntct_name="{exp:transcribe:replace name='contact_name'}"
    stash:cntct_email="{exp:transcribe:replace name='contact_email'}"
    stash:cntct_msg="{exp:transcribe:replace name='contact_message'}"}

```

And in the embed:

```
<div>
    <label for="freeform_first_name">{stash:cntct_name}</label>
    {freeform:field:first_name attr:class="textinput" attr:placeholder="{stash:cntct_name}"}
</div>
<div>
    <label for="freeform_email">{stash:cntct_email}</label>
    {freeform:field:email attr:class="textinput" attr:placeholder="{stash:cntct_email}"}
</div>
<div>
    <label for="freeform_user_message">{stash:cntct_msg}</label>
    {freeform:field:user_message attr:class="textarea" attr:placeholder="{stash:cntct_msg}"}
</div>

```

And still the FreeForm labels display the correct language variables. But the placeholder attributes are not getting generated, at all. Static text, though, does work.

Any ideas?

# Answer
did you try a parse="inward"?

```
{freeform:field:first_name attr:class="textinput" attr:placeholder="{exp:transcribe:replace name='contact_name' parse="inward"}"}

```
> 0 votes

---
Tags: solspace-freeform, stash, transcribe
---


title: Entries can't be updated - 404

text:
# Question
Title: Entries can't be updated - 404
I'm having a problem with EE; when updating or creating an entry I get redirected to the 404 page. I've researched a lot because this is getting annoying. I've tried checking the .htaccess as a common response to this question. My index.php is present and my .htaccess is this:

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

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

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

```

```
RewriteCond %{HTTP_HOST} ^studio24\.24studiohnserver\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\.studio24\.24studiohnserver\.com$
RewriteRule ^/?$ "http\:\/\/cumminsca\.com\/" [R=301,L]

```

Seems fine; I also tried with changing the `$config['uri_protocol'] = 'AUTO';` in config.php to all the other options, but no luck.

I changed the `Force URL query strings` option, tried yes and no, no luck. My site's root directory is set to full URL, not "/". I'm using version 2.7.0 of Expression Engine, when enabling the debug option my output is this:

```
 Template group and template not found, showing 404 page

```

which is weird. I can't create new entries or make changes, and I haven't done any changes to my site configuration, it just stopped working. My only other guess is the hosting company changed something in their protocols and it's making EE go crazy. Any help with this will be much appreciated.

# Answer
You are getting this error because the requested template is not found in your database. So because of that I don't think it is related to the rewrite rules.

Are you saving your files on your server? Than you can try to synchronize your templates. In your cp menu: design -\> templates -\> synchronize templates.
> 0 votes

# Answer
Ok so this is for anyone who has the same issue as me, and because i had a hard time finding the solution, ill tell you what i found.

So the problem is a security module some web servers install, thats called "ModSecurity". ModSecurity inspects the activty on the domain and depending on your config, if it sees something weird happening to your DB,it doesn't allow it. thats why i could create new entries or update old ones, only delete.

so my solution was, asking tech support to disable modsecurity, and instantly it worked. just ask them to disable the mod\_sec module for your user.

Hope it helps
> 0 votes

---
Tags: database, config, 404
---


title: EE3 MSM - What can it handle?

text:
# Question
Title: EE3 MSM - What can it handle?
I'm looking into potential solutions for an upcoming project which requires a platform that can utilise 1 CMS to mantain many websites.

I don't have any prior experience with MSM so I'm not overly sure what it can handle, so any advice would be greatly appreciated please.

I realise the sites would all need to reside on one server which is fine, however how many sites could it run? This project would potentially have many hundreds of sites under one MSM install?

Also, I'm fairly sure each site can have it's own templates/styles etc but just wanted to double check?

What would happen with regards to upgrading the main install, would it update across the board I assume?

One more question, is it still a case of buying a license for each new site within MSM?

Thanks in advance!

# Answer
> 0 votes
I have only done a MSM install with 30 sites. Currently building one with potentially 50-100 sites. It uses the main EE install for all of the site's codebase. So updating EE, updates all. I have not done this with EE3 yet.

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


title: Ee 3 and Php 7 and mamp

text:
# Question
Title: Ee 3 and Php 7 and mamp
I switched my local install over to php 7 and when I tried to navigate to my ee install it threw a mysqli\_connection.php error, that said this:

```
SQLSTATE[HY000] [2002] No such file or directory

```

It seems MAMP doesn't create the correct file for php 7 to work correctly.

# Answer
Looking it up I found this solution that worked for me:

```
sudo ln -s /Applications/MAMP/tmp/mysql/mysql.sock /tmp/mysql.sock

```

I thought I'd post this in case anyone else runs into this error.
> 2 votes

---
Tags: php, ee3, localhost
---


# Question
Title: difference date format iPad / Macbook when viewing site from same IP
Is there someone that can explain this to me. I call exactly the same page from same IP in 2 different devises but the **formatting of the date** is **different**.

This is the Template code:

```
 <p>{utstal_datum}
        Utställning pågår från {utstal_datum:begin format="%l %d %F %Y"} till {utstal_datum:end format="%l %d %F %Y"},<br>
        <b>vernissage: {utstal_datum:vernissage format="%l %d %F %Y"} {klockslag}, välkommen!</b>
        {/utstal_datum}
    </p>

```

Thanks for looking at this.

Screenshot iPad (Swedish language and region):

screenshot Macbook (Swedish language and region):

To my opinion this is not a duplicate. The locale on the server is correctly set to Swedish. And as you can see from the screenshots, one of the devices shows the right formatting, the other not.

# Answer
Reading the docs, it will utilise the control panel language format or logged in user format. Were you logged in on the Macbook?

Similar question and alternative answer for multi-language: How do I format the date in a foreign language?
> 1 votes

---
Tags: server, date-format
---


# Question
Title: How to make ExpressionEngine site Responsive
Our EE is of v2.5.3 - Build Date: 20120911 and we are trying to make it Responsive. How we can do it?

Thanks. Regards, Roshan

# Answer
EE separates the content of your site from its design - the pages that appear on your user device are generated via templates that mix HTML coding instructions with special tags that cause content to be pulled from the EE database into the HTML templates. This clean separation is one of the things that makes EE a very powerful CMS.

As a result, getting EE to be Responsive is simply a question of building a set of page templates that are themselves Responsive. Any approach that works can be applied through EE - so you can build templates using responsive frameworks such as Foundation or Bootstrap, or roll your own.

Simple responsive designs based on Foundation or Bootstrap etc. work by making local adjustments to the CSS on the page based on the size of the viewport - in the most extreme case hiding content (e.g. by not showing some page elements on smaller devices, or downloading multiple versions and choosing which one to show based on viewport size etc.). But all this happens in the browser - not in the server.

If you want an easy way to get started, google around for a simple free responsive HTML template, load it up in EE and put some EE tags in to populate content and see how it goes. As you get the hang of it you'll work out how to make best use of EE resources to get the responsive features working well.

HTH
> 2 votes

---
Tags: responsive-images
---


# Question
Title: Can I export Channel Images data to Grid?
I set up a site with Channel Images, but now the client wants more information to go with each image than is really possible with Channel Images, so I'm thinking of making it a Grid.

The question: is there any (easy) to export the data from my Channel Images field to Grid? I'm not really a MySQL person, by the way....

# Answer
> 1 votes
Here's one method I use for similar scenarios.

The first step would be to get your Channel Images data into a CSV or XML document. To do that create a template to output the data you need to export into your grid field, then call the template in a browser window. If you choose CSV you can copy the data and save as a .csv file, or my preferred method is to use XML which you can just do save page to save the complete XML file (works in Firefox, other browser may be flaky displaying XML!).

To import your data into the grid field using http://brandnewbox.co.uk/products/details/datagrab is handy!

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


# Question
Title: edit admin template varibles global variables via cms
how do i edit preferences for global variables in the cms, design \> templates \> global variables.

Iv looked at the following and think it might be what i'm looking to do, wondering if the cms cant do this without adding a module?

What i want to edit specifically is allowing variables to be left blank and when they are blank to not display the content "image" associated with the variable. (this i can look at as it will be an if statement) but the settings i cant seem to figure out.

was avoiding the use of a module regarding this issue but i have found one which might be able to give me this option:

http://republiclabs.com/expressionengine/republic-variables

# Answer
http://gotolow.com/addons/low-variables may be your answer, that will all you mention plus a whole lot more.
> 1 votes

---
Tags: control-panel, admin, global-variables
---


title: How to install Cartthrob 3 in EE3?

text:
# Question
Title: How to install Cartthrob 3 in EE3?
I've just purchased cartthrob 3 and weirdly their documentation only covers installing on EE2. Has anyone had any success installing a fresh version of cartthrob 3 onto a new EE3 site? If so, how did you do it please?

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

As @Moonage mentioned in a comment, this is all resolved now. The issue was a missing encryption key in the configuration files. I'm glad we got it figured out!
> 0 votes

---
Tags: cartthrob
---


# Question
Title: Getting 404 error when trying to access Content > Edit in v2.10.3
I'm getting a 404 error when trying to go to *Content \> Edit* via the admin, as well as *Content \> Edit \> My Channel*.

EE v2.10.3

Installed Extensions:

**The error:**

> 404 Page Not Found
> The page you requested was not found.

It may be related to this issue: Editing entry in backend: "The file cannot be found", however I cannot access the *Content \> Edit* area of the admin at all, it's not just one particular entry. This is also a new install with very little content / entries created so far.

I've tried:

* Disabled all extensions (no change)
* Enabled all debugging (nothing more is output on the error page)
* Edited the /expressionengine/libraries/Mime\_type.php as mentioned in the above link (this did not change the error message for me and I didn't not get a file path)
* Re-uploading all EE core files (no change)

I found the file that is outputting the error message at /codeigniter/system/core/Exceptions.php and it says:

> // By default we log this, but allow a dev to skip it

I couldn't find the error logged anywhere though. And developer log just has 3 errors for `add_to_head()` being deprecated (which I've seen in other installs and hasn't caused any issues):

Any ideas what could be causing this issue?

# Answer
> 0 votes
EE Support fixed this for me (yay!). It turns out the **/system/expressionengine/controllers/cp/content\_edit.php** file was blank - though I had uploaded the core files twice... nonetheless, answering this in case anyone else runs into the issue or similar.

---
Tags: ee2, 404, admin
---


title: Zoo Flexible Admin EE3

text:
# Question
Title: Zoo Flexible Admin EE3
I can't seem to find any information on whether the add-on Zoo Flexible Admin is going to be ported to EE3. DevDemon has been less than helpful and has no information about what they are going to do with this add-on. Has anyone been able to find out whether or not Zoo Flexible Admin will be ported to EE3?

# Answer
> 0 votes
Zoo Flexible Admin will be updated. There is a missing hook in EE3 which the EE2 version of Zoo Flexible Admin used which requires some additional work to get it working in EE3.

We are currently busy with Subscriptions and Store for EE3.

---
Tags: devdemon, zoo
---


# Question
Title: Template that detect if an entry has "All Categories" and then if "Any Categories"
I have a series of entries in a channel called "Messages" that need to appear in different ways according to if ALL categories have been assigned, or if less than all have been assigned.

The most obvious (to me) does not seem to be working:

```
{exp:channel:entries channel="message" status="flex" orderby="date"  sort="desc"}
  {exp:channel:categories category_group="2"}
    {if category_id ==  (12 && 13 && 14 && 15)}
      All the categories have been checked for this entry
    {if:else}
      Otherwise
    {/if}
  {/exp:channel:categories}
{/exp:channel:entries}

```

I have also tried using the `{exp:channel:entries}` tag pair:

```
{exp:channel:entries channel="message" category="12&13&14&15" orderby="date"  sort="desc"}

```

This channel:entries approach works, but I don't know how to make the query say: "List the entries that do not have ALL FOUR categories checked". (In other words, if you simply do a second loop that filters "12||13||14||15" it will also catch the entries that have all four categories checked.

**What is the best way to do this**:

1. Show any entry with categories 12,13,14 and 15 ALL checked.
2. And then further down the page, show any entry that has ANY of, but NOT ALL of the categories 12,13, and 15 checked.

?

# Answer
> 0 votes
This was it. Perhaps it could be tweaked for efficiency:

```
{exp:channel:entries channel="message" status="flex" orderby="date"  sort="desc"}
    {if '{categories show_group="2" show="12|13|14|15" backspace="1"}{category_id}|{/categories}' == "15|14|13|12"}
      All Checked
    {if:else}
     Otherwise
    {/if}
{/exp:channel:entries}

```

# Answer
> 0 votes
This still doesn't seem a great approach, but can't think of a better one, so to get your code working...

It's not recommended to include a channel categories inside a channel entries (or vice versa) due to performance issues, and you don't actually need to, as the information is already included in the channel:entries categories tag.

```
{exp:channel:entries channel="message" status="flex" orderby="date"  sort="desc"}
    {if '{categories show_group="2" show="12|13|14|15" backspace="1"}{category_id}|{/categories}' == '12|13|14|15'}
      All the categories have been checked for this entry
    {if:else}
      Otherwise
    {/if}
{/exp:channel:entries}

```

So in the above, this code:

```
{categories show_group="2" show="12|13|14|15" backspace="1"}{category_id}|{/categories}

```

Is looping through all the categories assigned to the entry - you don't need to specify the group, but I've added it to show syntax. Specifically we've asked it to bring back the 4 specified categories, then for each loop, output the category ID. We add the backspace to remove the trailing pipe and compare the output. We could just output "X", then match to "XXXX" - same result:

```
{if '{categories show="12|13|14|15"}X{/categories}' == 'XXXX'}

```

If you wanted the conditional elsewhere in the template, and not as an else, you can then change the conditional matching:

```
{if '{categories show="12|13|14|15"}X{/categories}' != 'XXXX'}

```

---
Tags: categories, templates, conditionals
---


title: Solspace Importer stops at £ character

text:
# Question
Title: Solspace Importer stops at £ character
I have the Solspace importer module working well using DataType: CSV Importer. However it won't import data into a custom field past a **£** character. For example:

Data to import: `Price Guide £300,000 - £315,000`

After import, field contains: `Price Guide`

I've tried using both **None** and **XHTML** text formatting for the custom field.

Am I missing any settings? or do I need to encode characters before import?

(EE 2.10.1 and Importer 2.2.5)

# Answer
> 0 votes
It is required that the .CSV file match the encoding of your data table. Most likely this is UTF-8.

My workflow with Importer includes the step where I open the .CSV file in a text editor (I use BBEdit) and save the file as UTF-8 and Windows Line endings (CRLF).

# Answer
> 0 votes
guessing here, but it might be something to do with allowed characters.you'll have to search what file/setting to set that, cause i don't remember

---
Tags: solspace, solspace-importer
---


# Question
Title: Tagger 4.0.0 and EE 3.2.1 - Error when trying to create a Tag Group
When you try and create a tag group in DevDemon's Tagger 4.0 addon, it doesn't work. When you click 'Save Group' it throws the following:

```
Fatal error: Call to a member function hasModule() on a non-object in /system/ee/EllisLab/ExpressionEngine/Controller/Addons/Addons.php on line 1106

```

Looking at that file we have:

```
private function getModule($name)
    {
        try
        {
            $info = ee('Addon')->get($name);
        }
        catch (\Exception $e)
        {
            show_404();
        }
        if ( ! $info->hasModule())
        {
            return array();
        }

```

Any thoughts? Is Tagger not EE 3.1.x compatible? Anyone know or have any thoughts?

# Answer
This has been fixed in the latest version of Tagger. The issue was due incorrect URL generation if CP Session ID and Cookies where used.
> 1 votes

---
Tags: devdemon, ee3, devdemon-tagger, tagger, compatibility
---


title: strange error with CE image

text:
# Question
Title: strange error with CE image
I have two channels that use one custumfield group. One channel is for placing a entry without sign-up en the another with sign-up.

"melding\_vrij" and "melding\_login"

{exp:channel:entries channel="melding\_vrij" limit="12" disable="member\_data|pagination" dynamic="off" cache="yes" refresh="600"} {if afbeeldingen !=""} {exp:ce\_img:pair src="{afbeeldingen}" max="80" quality="30"} {/exp:ce\_img:pair} {/if} {tekst} {/exp:channel:entries}

If I use "melding\_login" it display all entry's but if I use channel "melding\_vrij" it gives a blank page. If I remove the CE img tag it works fine. It always worked fine but suddenly it's not working anymore and I can not understand why

# Answer
> 0 votes
Presumably then the issue is with the field `afbeeldingen` \- are you sure it has a value defined in both channels?

---
Tags: export
---


# Question
Title: Only show entries with no pending approval
I'm using publisher, and was wondering if it's possible to filter entries by approval status. We only want to show published entries with no pending approvals.

I'm getting a lot of incomplete entries.

# Answer
> 1 votes
If you look at the documentation you'll see an {has\_pending\_approval} variable. http://boldminded.com/add-ons/publisher/template-tags

# Answer
> 0 votes
Yes you can pass status in channel entries like:

```
{exp:channel entries status="pending" ....}
........
{/exp:channel:entries}

```

If you haven't pending status in you channels assigned statuses, You can simply create a status/ status group under admin section from EE back end and assign it to your channel.

Hope this will help you :)

---
Tags: publisher
---


# Question
Title: How to add links to module control panel in Expression Engine 3.2.1
I've created a basic module with its own control panel page. The page works, but I can't seem to hit upon how to make that page more visible in the backend.

How can I add a link on the main control panel sidebar?

Failing that, how can I link to my control panel page from the AddOn Manager listing?

# Answer
> 0 votes
I worked out how to link settings from the AddOn manager - I simply needed to add `'settings_exist' => TRUE` to my `addon.setup.php` array.

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


# Question
Title: Expresso Store ‘State’ Dropdown showing NO States
I must have done somethings but I am not sure what I did. No States show up in the dropdown. This is checkout2.html. Its just an empty select Form. I set the default in the admin to County: United States and State:California.

As I cycle through the checkout process, I get to /store/checkout2 and the form is there but State has no states in the dropdown. Also the default Country is Afghanistan. (odd because it set to United States.

It was working before but not, it stopped. Its on a testing server right now because I am rebuilding it. I reinstall ’store’ and made sure I am using 2.5.1.

I am baffled. Here is the link for the 'example store' I set up. It exhibits the same behavior no Sates in the dropdown.

Thanks ....

# Answer
You will need to empty your cart between template and Store admin changes for it to be seen on the front-end of the site, this has to do with Store caching. I added a product to the cart and went to the checkout page and I am seeing the US and California as items in the dropdown.
> 2 votes

---
Tags: expresso-store
---


# Question
Title: Global variable tags {username}, {member_id}, {screen_name} not working
I've got a weird one going on here. EE 2.8 site.

I wanted to create a conditional based on whether it was ME on the site. I wanted to see some info that was not to be rendered to the normal user. So, I tried to create a conditional like:

{if member\_id == '1'} show this {/if}

It didn't work on the post of interest (and my member ID is "1"), so I tried the same with username and screen\_name. Still didn't work.

So, I started printing out the {username}, {member\_id} and {screen\_name} and discovered that they match the author of the post (my wife), not me as the logged in user.

Yet, elsewhere on the site the {screen\_name} variable works because I show the name of the currently logged on user.

Does anyone have any idea why these global variables would take on the value of the author (and all three reflect the author whether it is me or my wife), instead of the logged in user?

# Answer
That's normal behaviour but can be a little confusing the first time you encounter it. You need to use {logged\_in\_username}, {logged\_in\_member\_id}, and {logged\_in\_screen\_name}.

> In order to be able to use some member variables inside tags that already parse their own member information, such as the channel entries tag, it is necessary to use an alternative syntax. All of the member variables may be used with the addition of the prefix “logged\_in\_”.

Alternate syntax for member variables: https://docs.expressionengine.com/latest/templates/globals/single\_variables.html#global-alt-syntax
> 1 votes

---
Tags: global-variables
---


title: How to Get More Entries on a Page?

text:
# Question
Title: How to Get More Entries on a Page?
If you look at this page on my website http://www.cambridgeusa.org/insider only 20 of my entries appear but I have many more. Is there a way to get all entries to appear?

# Answer
set a high limit number to check, expression engine default channel limit is 100.

```
{exp:channel:entries channel="channel_name" limit="100"}

```
> 2 votes

# Answer
did you set a limit in your channel:entries tag?
> 0 votes

---
Tags: channel-entries
---


title: Can’t log in, page just refreshes

text:
# Question
Title: Can’t log in, page just refreshes
The problem I'm having is that I can't log in to the control panel. When I enter my login details, the page just refreshes. No error message, just a page reload. It does this repeatedly, so can't get in at all at the moment. This happened after upgrading from 2.5.5 to 2.6.1, but also happens on a fresh install of 2.6.1, so I don't think it's down to my particular installation.

I have been getting this error intermittently on EE 2.5.5. Today I upgraded to 2.6.1, which meant I couldn’t login 100% of the time, so I’ve rolled back to 2.5.5 for the time being until this is fixed

EE Version: 2.6.1 Browsers tried: Chrome, Firefox, Safari, all most recent versions Development Environment: localhost apache 2.2

Any ideas? I've tried changing the session & cache variables, clearing the cache, running in incognito mode... No idea what's going on.

Thanks

Update - Top of my config file looks like this:

```
$config['app_version'] = "261";
$config['install_lock'] = "";
$config['license_number'] = '';
$config['debug'] = "0";
$config['cp_url'] = 'http://local.sitename.com/admin.php';
$config['doc_url'] = "http://ellislab.com/expressionengine/user-guide/";
$config['is_system_on'] = "y";
$config['allow_extensions'] = 'y';
$config['site_label'] = '****';
$config['cookie_prefix'] = 'sitename';
$config['cookie_domain'] = '';
$config['cookie_path'] = '';

```

I am using an NSM config bootstrap file though, let me know if any of those settings could be breaking it too...

# Answer
You may be experiencing the problem from this bug. https://support.ellislab.com/bugs/detail/19334

Give the suggested fix a try and let us know if that helps you.
> 0 votes

# Answer
Try deleting all your domain and session cookies. This happens to me from time to time when I have logged in to numerous different EE sites in the same browser.
> 1 votes

# Answer
Crossed cookie wires are usually the cause of this problem. The best fix for this is to clear your cookies, then set a custom cookie prefix in `config.php`:

```
$config['cookie_prefix'] = 'sitename';

```

This also has the added advantage of improving security on your site, because a visitor won't be able to tell that you're using ExpressionEngine based on your cookies.

If you're using Focus Lab Master Config, it's a good idea for your cookies to be different for each environment, or you'll get crossed wires again. So for that you'd use:

```
$env_config['cookie_prefix'] = 'sitename_' . ENV;

```

Where `ENV` is the variable Master Config uses to identify which environment you're currently in.
> 1 votes

# Answer
I was getting this problem on a local development machine and realised that I needed to update the value of `cp_url`:

```
$config['cp_url'] = "http://MY-LOCAL-MACHINE/system/index.php";

```

EE appears to use this URL to determine the cookie domain, and so cookies were being set to the wrong domain.
> 1 votes

# Answer
Just had a similar problem on an old (EE 2.3.1) site. In my case it happened after a database crash. I had to manually clear out exp\_online\_users and exp\_security\_hashes.

The symptoms for me were that trying to log into the control panel just did the page refresh thing with no error. When I tried to log in through the front end I got a SQL message saying something about trying to add a duplicate entry to exp\_online\_users. So I cleared out that table manually. Then trying to log into the control panel would surface an error talking about duplicate exp\_security\_hashes. Once I cleared that out, everything worked.

This is probably only applicable in a similar case as the one we found ourselves in. The database server hard crashed, I guess. Took the ISP several hours to get it up again so I assume it was a major problem on their end.
> 1 votes

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


title: Sorting "About Us" Page

text:
# Question
Title: Sorting "About Us" Page
I'm using "v2.9.2 - Build Date: 20141004" of EE and currently have an "About Us" page where I have a photo of company staff.

Currently the only way to put this into a desired order is to change the "Date Uploaded" to an arbitrary value that corresponds with the desired order as they are sorted by that.

This seems a bit bonkers and I was hoping I could just enter a custom ordering field and sort on that?

# Answer
The easiest way is to use Low Reorder, which provides a nice interface to reordering entries, but if you want a basic implementation, have a custom field (for example `order`) with a number in it, then have parameters in your channel:entries tag for `orderby="order" sort="asc"`.
> 0 votes

# Answer
Yes, you can order by channel field. Alternatively you could hardcode the channel tag to show specific entries, like so:

```
{exp:channel:entries ... entry_id="13|42|147" ...}

```
> 0 votes

# Answer
In addition to the answers already provided. You could also create the content for ABOUT US as a single entry and add a Grid field for employees (with grid field options for bio, photo, contact details, etc), and then your client can drag and drop the employees (Grid rows) to change display order.

This might not be the best solution for all cases (for example, if you need to separate employee info to other parts of the site), but it does allows the client to see/edit all employee info within the one entry and doesn't require editing multiple entries, or visiting another area of the CP to effect ordering.
> 0 votes

---
Tags: sort, publish-layout
---


title: File upload in grid renames file field

text:
# Question
Title: File upload in grid renames file field
EE 2.10.1
Uploading a pdf with file field in Grid renames the file field but not the file when using non-standard characters, resulting in this error when trying to edit the entry:

> An Error Was Encountered File /www/…/test%2B.jpg does not exist.

ex. uploading test+.pdf gets renamed to test%2B.pdf in grid but is still called test+.pdf on the server

Am i missing a setting somewhere?

# Answer
> 1 votes
There was a fix for the filenames with special characters issue in EE2.10.3. Doing an upgrade should fix it.

---
Tags: ee2, file-uploads, grid
---


title: Apple Pay Checkout Integration?

text:
# Question
Title: Apple Pay Checkout Integration?
I would like to use Apple Pay in my checkout through Stripe. Is this possible and if so, is there any documentation to make this happen?

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

My understanding is that right now Apple Pay is only used for within-app purchases, not on mobile websites. So typically this would be unrelated to the website's CartThrob installation. Or is the app just a wrapper for the site?

---
Tags: cartthrob
---


# Question
Title: Inconsistent results using EE Simple Search with Solspace Calendar
I am using EE's Simple Search here to search the Solspace default channel Calendar:Events.

Here is the code

```
<div class="calendar-search">
    <h3>Search Events</h3>
    {exp:search:simple_form
        channel="calendar_events"
        search_in="everywhere"
        where="any"
        show_future_entries="yes"
        show_expired="yes"
        results="10"
        result_page="calendar/search-results"
        no_result_page="search/no-results"
        }
    <input type="text" name="keywords" id="keywords" value="" size="18" maxlength="100"> <input type="submit" value="Submit" class="search-btn">
{/exp:search:simple_form}
</div>

```

For most search items this works fine and delivers predictable results. However, there are a couple of things that don't work and I haven't been able to find solutions to the following:

1. No results for items I know are in the entries. For example, there is an event with the title of **Lego Club**, but if I do a search for **Lego**, I get a blank results page.
2. The No Results page is not being used for items that are not in the channel. For example, if I do a search for **Nikon**, instead of going to the designated no\_result\_page it goes to a default EE page that displays the following error:

> The action you have requested is invalid.

I am not sure why these errors are occurring or how to fix them, but would appreciate any insights.

# Answer
Sounds like your #2 is related to EE's "Secure Mode" with form submissions. You can read more about it here: https://ellislab.com/blog/entry/putting-the-secure-in-secure-mode-forms

Try adding this line of code immediately above your "keywords" input field.

```
<input type="hidden" name="XID" value="{XID_HASH}">

```

This may also fix your #1 issue but I can't say for sure. I'd imagine that without the {XID\_HASH} code in place, none of your searches would work but since lots are working I'm a little perplexed. Give this a try.
> 0 votes

---
Tags: search, simple-search
---


# Question
Title: Are coupon codes in CartThrob additive or last one in gets used?
Our store is running coupon promotion where the coupon is good until the end of the year. Let’s say the code is ENDOFYEAR (-25%). We’re also running a one day promo next week Monday with code SUPERMONDAY (-40%). What will happen if a user submits both codes? We want to ensure that only the code with the greatest discount is applied and that codes are not added together resulting in a 65% discount.

# Answer
> 3 votes
In Cartthrob you can only apply one coupon code to your cart at a time.

You'd need to provide a way for your user to remove the code and apply a different one instead.

# Answer
> 5 votes
Discounts are cumulative, where by default Coupons are not.

HOWEVER, You can also change a hidden configuration variable to allow multiple coupon code usage.

in cartthrob/config/config.php

Change: 'global\_coupon\_limit' =\> '1',

To whatever number you want.

# Answer
> 0 votes
Further to Chris' answer, I've just found that changing the value in the config file is completely ignored. Using CT 2.7.

More to the point, when you call to override the limit in the add\_coupon\_code method, the check either replaces the coupon\_codes array, or adds a new coupon code indefinitely, ignoring the limit.

The workaround I've settled on is to override the config, and then change the conditional.

In file `cartthrob/cartthrob/core/Cartthrob_cart.php` at line 385:

```
public function add_coupon_code($coupon_code)
{
    if ($coupon_code && $this->core->validate_coupon_code($coupon_code))
    {
        // Override coupon limit as settings in config are ignored.
        $this->core->store->override_config(array('global_coupon_limit' => '2'));

        //in the case of a coupon limit of 1, we'll overwrite the coupon code
        // else we'll only add the code if we've not reached the limit
        if ($this->core->store->config('global_coupon_limit') == 1 && count($this->coupon_codes()) >= 1)
        {
            $this->coupon_codes = array($coupon_code);
        }
        elseif(count($this->coupon_codes()) < $this->core->store->config('global_coupon_limit'))
        {
            if ( ! in_array($coupon_code, $this->coupon_codes))
            {
                $this->coupon_codes[] = $coupon_code;
            }
        }
    }

    return $this;
}

```

One issue with this is that there's no feedback for the user that they've added too many coupon codes. Works for my purposes, but worth bearing in mind.

---
Tags: cartthrob, coupon-code
---


title: Delete records that were not updated

text:
# Question
Title: Delete records that were not updated
Is there any opportunity with Importer to remove records that didn't get updated in the last X time frame?

I understand the scope of the product is to just pump in records, but I'm having a real issue where my imported records have a "shelf life" and if I could simply tell it to remove any records from the channel that hasn't been updated in X time frame, it would make my life a lot easier (read: get the client off my back :P ).

# Answer
I had similar needs some time ago and importer may have changed but it wasn't possible.

What I ended up doing was adding an expiry time to the data imported like today + 24 hours then mapping that to the expiry field. The cron runs every day and if an entry isn't included it will simply expire meaning it won't be available.

Has worked flawlessly for a couple of years now.

**UPDATE:** The site imports data daily. The data is supplied via customers database. We use Importer from solspace to call on that data and if it finds a record that existed we use the new expiry date within the data.

So lets say we have 2 entries in EE like

```
-- Entry01, Some field, some other field, Expiry date (today+24 hours)
-- Entry02, Some field, some other field, Expiry date (today+24 hours)

```

When Importer runs the next day (the data has been updated at their end) the only entry that still exists is 'Entry01' - So within EE 'Entry01' will be updated inc. new expiry date but 'Entry02' wasn't updated in the import so it will naturally expire.

This is all based on a daily import, it could easily be weekly, monthly or whatever – the key is setting the expiry date when you import the data.

CRON is a server side behaviour that runs a particular command at any given interval. Importer gives you the code for the CRON to use, you then set the timing in the CRON and off it goes.
> 4 votes

# Answer
If you can't include an expiration date with your imported data, you can use the Auto Expire plugin - https://devot-ee.com/add-ons/auto-expire

I have it set up so that all entries in my channel expire after 1439 minutes (23h59m). The cron runs every 24h and re-populates the entries.
> 0 votes

# Answer
I have a similar issue with a daily import where older entries need to be removed. Unfortunately the Auto Expire plugin doesn't seem to add expiration to entries imported (at least for me).

Our setup is to have the Importer setting 'Duplicate Entry Action' set to 'delete old, insert new' and then make use of the `start_on` parameter:

```
{exp:channel:entries ... start_on = "-24 hours"}

```

Not the most elegant solution as it does leave entries undeleted in the CP and you do start to get ID numbers in the high numbers.

However, to delete old entries, I'm currently experimenting with Purge Data plugin as mentioned here: https://expressionengine.stackexchange.com/a/25233/2782

(EE 2.10.1 and Solspace Importer 2.2.5)
> 0 votes

---
Tags: solspace-importer
---


title: CE Cache and Detect Mobile

text:
# Question
Title: CE Cache and Detect Mobile
I am trying to use CE cache with detect mobile so I can separate the desktop version of my site from the mobile version. I tried appending {exp:detect\_mobile:type} to the CE cache id but the tag does not get processed.

Has anyone been able to get the two to play nice with each other or have any idea on how to I could solve this?

# Answer
I seemed to solve this by adding parse="inward" to the ce\_cache:it tag. so my tag ended up looking like this

```
{exp:ce_cache:it id="home_{exp:detect_mobile:type}" seconds="21600" parse="inward"}

```

Hope this helps someone :)

T.
> 0 votes

---
Tags: ce-cache, mobile
---


title: Require a path variable

text:
# Question
Title: Require a path variable
Good morning!

Does anyone know if there's a way to require a path variable in a page?

I have a page in EE (3.3.0) such as this:

www.bakers.com/site/cookies/oatmeal/

Where "oatmeal" is a title of an entry. So when I link to it, I do this:

{title}

Works great. But if someone just navigates to www.bakers.com/site/cookies/ it will just list all of the cookies in a big long list. I'd like to present either a 404 or a custom page.

Thoughts?

Not sure if this is a job for hidden templates...

# Answer
> 0 votes
sorry for the previous post.

You just need to add require\_entry="yes" in you channel:entries tag -

```
  {exp:channel:entries channel="cookies" require_entry="yes" }
     {title}
  {/exp:channel:entries}

```

This parameter tells the channel tag that it should expect the URL to contain a valid entry ID or a valid URL title. If an ID is not found in the URL, the tag will not display any data.

---
Tags: path
---


title: Freeform IP Address

text:
# Question
Title: Freeform IP Address
Is there a notification variable for the form submitter's IP address in Freeform?

I can't seem to find it in the documentation, but since the IP address is displayed in the Freeform entries view I assume it must exist.

Thanks for any help.

# Answer
> 1 votes
Do you mean for the Notifications template in the CP?

The Freeform docs mention the `{freeform:ip_address}` variable. But to get this working in a notification template use `{ip_address}`.

Just tested this and it seems to work (Freeform 4.2.3).

---
Tags: solspace-freeform
---


title: multi-page form with form:action

text:
# Question
Title: multi-page form with form:action
Is it possible to have a multi-page form with a custom form:action? something like:

```
{exp:freeform:form
    form_name="get_started"
    form:id="get-started"
    form:class="form-horizontal"
    form:action="http:some-custom-url"
    multipage="yes"
    multipage_page="{segment_2}"
}

```

If someone has a working example i would appreciate if he posted it here.

Thanks!

# Answer
First, Freeform operates of an Action ID i. e. ?ACT=27 (that's an arbitrary number, yours may be different).

Second, Why do you need a custom form action?

If you need the form to finish on a new page, use the "return" parameter.

If you need to do some additional processing of the form data or some other action, Freeform has several extension hooks, enabling you to write an extension to do additional things.
> 0 votes

---
Tags: solspace-freeform
---


title: Low Variable Matrix Search No Results

text:
# Question
Title: Low Variable Matrix Search No Results
I'm having a bear of a time with what I thought would be a simple conditional. I've got a Low Variables Matrix field with several dates and custom messages. Basically the client wants to use these dates to remove their phone number on holidays and have a custom message like "Closed today - Merry Christmas!."

Here's what I'm using for testing:

```
{exp:low_variables:pair var='lv_holiday_message' search:date='04/08/16'}
{if '{total_rows}' == '1'}
 {holiday_message}
    {if:else}
    TEST
    {/if}
{/exp:low_variables:pair}

```

The first conditional always works - if one of the date columns matches the search date then my custom message gets shown. But I can't for the life of me figure out what conditional shows something when a date DOESN'T match. I've tried if:else's , total rows == 0 or empty, checking for data on just the date column itself, if no\_results and it never return a my TEST text.

Am I missing something simple or is this just not possible?

# Answer
> 0 votes
Can you elaborate more? If the date matches it shows {holiday\_message}. Its correct. But if the date doesn't match does it shows holiday\_message ?? I mean to say whatever be the date does it shows the holiday\_message. It means it always goes in first if. If that is the case you can try below -

```
{exp:low_variables:pair var='lv_holiday_message' search:date='04/08/16'}
   {if total_rows == '1'}
       {holiday_message}
   {if:else}
       TEST
   {/if}
{/exp:low_variables:pair}

```

If this doesn't work you can try using -

```
{if total_rows == 1}

```

Hope this helps you.

# Answer
> 0 votes
Turns out there was a small bug in Matrix causing the {if no\_results} tag to stop parsing. Pixel and Tonic got me an updated version (2.6.2) and that allowed me to use the tag correctly.

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


# Question
Title: Password Protect a Directory with .htaccess in root directory
I've created a directory in site root and used .htaccess/passwd files to build authentication. When navigating to that secure directory on front end I'm getting the EE 404 page template. Any ideas how to accomplish?

Here's my .htaccess file:

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

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

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

```

# Answer
Are you sure you set everything up correctly? Do you use the default EE rewrites? Because the default rules check first to see if a requested URI is an actual file or folder first, and if it is, those rules *prevent Apache from routing the request through index.php*, and EE entirely. Then the file/folder is served by Apache directly. Please provide your EE .ht access rules, the folder you want protected's .htaccess, and your folder path.

Again, make sure you're using the default htaccess rules provided by EllisLabs. Would link out to it but on mobile right now. Google "EE htaccess" or "EE remove index.php" to find it quickly.
> 0 votes

---
Tags: htaccess, password, authentication
---


# Question
Title: How to fix "This form has expired. Please refresh and try again."
I have a contact form that, if used after a certain time, will throw a "This form has expired. Please refresh and try again." error.

I have added the following to my contact form, thinking it would solve the problem:

```
<input type="hidden" name="XID" value="{XID_HASH}">

```

It didn't.

Another solution I have come across is to set `$config['disable_csrf_protection'] = "y";` (per: http://ageekandhisblog.com/expressionengine-how-to-fix-this-form-has-expired-please-refresh-and-try-again/). However, I'm concerned there might be security issues associated with this solution.

Suggestions?

# Answer
> 3 votes
I've looked through the source code for you but I'm drawing a blank. I thought there was an arbitrery timeout value in the token however in 2.9.2 this seems to have been depreciated (or I imagined it)!

I'm also going to assume the error is not a missing XID/CSRF\_token as this has been covered above and no answer is forth-coming.

***First Question*** : How are you creating your form? If you could provide your code that would be great. Is it a Freeform, a Channel Entries form or your own custom one??

Anyway, to help you debug, when you create your form, if you use EE tags or the php `ee()->functions->form_declaration()` a CSRF token should be generated (it's actually generated super early in the request but for simple example), this will be added to the hidden fields of your form that `form_declaration`/tags print out to the template. In the back what happens is that this token is added to the `exp_security_hashes` table so it can be referenced. Assuming you're using Cookie based (as opposed to Session ID based).

***Debug point 1*** : When you create/display your form is the correct entry being added to the DB table?

***Question 2*** : Are you using standard Cookie based sessions? You can see this in the CP under `Admin > Security and Privacy > Security and Sessions > Website Session Type`.

So, now we've debugged the token *setting*, lets look at the submission. One clue from your OP is

> I have a \[..\] form that, **if used after a certain time**, will throw a \[...\] error.

This is what made me skim through to see if there is an expiry. There is not (from my scan, I'm not infallable!). The first thing I note is that if you are using **cookie based** authentication there is a hard coded expiry on the token! In file `expressionengine/libraries/csrf/Cookie.php` line 42 you'll see this :

```
public function get_expiration()
{
    return 60 * 60 * 2; // 2 hours
}

```

That's a 2 hour expiry on a cookie based session right there, this could cause invalid CSRF's.

***Debug Point 2*** : If you are using Session ID based security on the front end then are you ensuring that the `S` parameter is passed along with the form submission, either as a cookie or in the URL string? If you submit a form without an `S` parameter it can't match the users session and can't check the token.

So finally, now we assume your using **session ID based** authentication. we can see from the file `expressionengine/libraries/csrf/Database.php` line 35 :

```
public function get_expiration()
{
    return 0; // never - times out with session
}

```

This means the token is valid as long as the users session is valid. So we now have to check the session settings... Now, the session handling was changed in 2.8.0, however we can get some clues from the file `system/expressionengine/libraries/Session.php` (This file is well worth reading just becuase it explains the session types at the top in comments!!), on lines 73 and 74:

```
public $user_session_len    = 7200;  // User sessions expire in two hours
public $cpan_session_len    = 3600;  // Admin sessions expire in one hour

```

That's a 2 hour timeout on users using the front end in Sesion ID mode. It's also worth checking your cookie domain in both cases, and if you're posting from http to https or vice versa.

***Question 3***: How long in terms of inactivity does the form take to expire? 2 hours??

***Debug Point 3***: Try altering the cookie/session timeout values on your local site, see if it holds the form 'open' for longer/shorter. If you find that this is what is causing your timeouts, there's a load of modules (or you can core hackz it yourself) out there for you to better control the session.

---

I do hope the above helps you out a bit. Of course if this (and none of the other answers) does not solve it for you then all this typings been for nothing! (hehe) but please do come back to us (via comments, or edit your OP) with your further findings.

If one of the answers did help you solve it please do mark the answer, alternatively if you get to the bottom of it please "Answer your own Question" so we can all bask in the glorious solution!

# Answer
> 5 votes
if you have v 2.10 - try to replace

```
<input type="hidden" name="XID" value="{XID_HASH}">

```

with

```
<input type="hidden" name="csrf_token" value="{CSRF_TOKEN}">

```

The XID constant is deprecated starting from 2.8.0

# Answer
> 1 votes
There's also another possibility that I ran into with the "This form has expired. Please refresh and try again." error.

Using Stash, I recently turned on caching on my pages that include forms. The issue here is that the the CSRF token from a previous user is cached in this scenario. This created the error on every page including a submitted form. It was a "duh" moment for me, but I thought it would be worth relating in case anyone else runs into this issue.

You want to make sure you wrap your forms in stash:nocache - https://github.com/croxton/Stash/wiki/%7Bexp:stash:cache%7D:

```
{exp:stash:cache bundle="my_cache_bundle"}

{!-- this will be cached --}
{exp:channel:entries channel="my_channel"}
    {title}
{/exp:channel:entries}

{!-- this will be escaped --}
{stash:nocache}
    My Form
{/stash:nocache}

{/exp:stash:cache}

```

# Answer
> 0 votes
Usually this error occurs when you are posting anything without adding csrf\_token or xid.

for the newer versions of expresionengine xid became csrf\_token.

show you need to put a hidden field inside your form tags as follows.

```
<input type="hidden" name="csrf_token" value="{CSRF_TOKEN}" />

```

If you are using xid and your expressionengine is newer than 2.7.0 replace as above.

# Answer
> 0 votes
Are you blocking cookies? If so, allow cookies and try to submit your form again.

# Answer
> 0 votes
I was having this issue on ExpressionEngine 2.10 and up. I found my redirect wasn't working in the .htaccess file. Once I fixed the redirect from www.site.com to site.com all was well.

---
Tags: security, email-contact-form
---


title: Adding a trailing slash to URLs in EE 3

text:
# Question
Title: Adding a trailing slash to URLs in EE 3
I wonder if there is a way to add trailing slashes to the standard URLs generated by ExpressionEngine?

I'm not looking for some .htaccess rewrites but for a way to have slash appended in the first place.

Background is, that I'm migrating a site from EE1 (which had the default trailing slash, in case you remember) and there are thousands of entries with ten thousands of facebook-likes, google-plusses and whatnot that are to be preserved. So the URLs cannot change.

# Answer
Depends on what template code you are using to craft the URLs. (I'm not sure about doing it at a DB level)

For example you could use:

```
{exp:channel:entries ... }
  ...
  <a href="{site_url}channel/{url_title}/" >Link</a>
{/exp:channel:entries}

```

Or if `{url_title_path}` doesn't add a `/`, add one yourself:

```
{exp:channel:entries ... }
  ...
  <a href="{url_title_path='channel'}/">Link</a>
{/exp:channel:entries}

```
> 1 votes

---
Tags: url, ee3
---


# Question
Title: Expresso Store, Authorize.net, Firefox security warning
My client's online store uses the Authorize.net SIM payment gateway (off-site payment gateway), so when placing a credit card order, a customer is redirected to an external secure page hosted by https://secure.authorize.net/etc... When a customer checkout using Firefox, after they submit their credit card details on the external secure page, they get a popup window saying "Security Warning -- The information you have entered on this page will be sent over an insecure connection and could be read by a third party. Are you sure you want to send this information?". I'm not sure how long this has been happening, but customers have only been complaining about it recently.

I'm at a loss for what to do to fix this. Is it an Expresso Store issue? An Authorize.net issue? An SSL issue?

Any help would be greatly appreciated.

Versions:

* EE v2.9.2
* Store v2.5.1

# Answer
> 0 votes
A user on Twitter suggested that I am receiving this message because the return URL is not secure (not https://).

---
Tags: expresso-store, authorize.net
---


# Question
Title: EE 3.3.0: Mail not being sent for channel entry notification
Question regarding email. When I get new entries in a channel, I'm not getting notified, even though I have notifications turned on:

Author notify: no Entry notification: Yes. Only one email listed.

I've verified my SMTP settings by sending a test message (Utilities -\> Communicate).

I don't see any errors in the Logs --\> Email (says "No Email logs found.").

Any thoughts on how to diagnose?

# Answer
This was determined to be a bug in 3.2.1 / 3.3.0:

https://support.ellislab.com/bugs/detail/21819/ee-3.3.0-not-sending-channel-entry-notifications
> 0 votes

---
Tags: channel, email, notification, smtp
---


# Question
Title: Entries tag showing pages not in the current Structure path
Has anyone else experienced pages showing up that shouldn't be when using the Structure module?

For example, let's say I have a channel called Pages and a page structure like so in the Structure module:

```
+ Parent Page         (structure url: parent, template: parent/index)
|- Sub Page           (structure url: child1, template: parent/child)
|- Sub Page           (structure url: child2, template: parent/child)
|- Sub Page           (structure url: child3, template: parent/child)
+ Parent Sibling Page (structure url: sibling, template: sibling/index)

```

Currently the channel entries tag looks like this:

```
{exp:channel:entries channel="pages"
  disable="categories|category_fields|member_data|pagination|trackbacks"
  cache="yes" refresh="180" require_entry="yes" limit="1"}

```

Nothing unusual there. So no surprises when we see the correct page showing when navigating to `mysite.com/parent/child1`.

However, if we changed the URL in the address bar to go to `mysite.com/parent/sibling` I **do not** expect to see the parent's sibling page... it's not in the same path at all!

After some investigation, it appears that the channel entries tag is simply falling back on its default functionality, but that is far from desired in this scenario, especially as we have strict URLs on.

Any clues on how I can solve this?

(running EE 2.5.5 and Structure 3.3.8)

# Answer
On mobile so I must be brief... Try this in your Channel Entries tag:

```
{exp:channel:entries
    ...other params...
    dynamic="no"
    entry_id="{structure:page:entry_id}"}

```

That way you force the entry id to get the right page.
> 0 votes

---
Tags: structure, url
---


title: MSM Path Trouble in EE3

text:
# Question
Title: MSM Path Trouble in EE3
In EE2 there was the "Server path to site's templates" for each site in MSM. So it was possible to have two separated folder structures similar to:

```
domain-A.tld (with whole ee system)
/system
/themes
/css
/js
/templates

domain-B.tld (without any system)
/css
/js
/templates

```

So it was easy to run two different frontends.

Now in ee3 there is no possibility to set a custom basepath for the templates of different MSM-Sites. So all template files for both domains would now be stored in the directory of domain-A (when looking at the example above)

I'm working with the Editor 'Sublime Text' on a local machine and want to work on two complete different folder structures. How to do it with ee3?

# Answer
In EE2 this was achieved by setting the `tmpl_file_basepath` system configuration override either in config.php or in the CP (Global Template Preferences) e.g.

```
$config['tmpl_file_basepath'] = '/home/usr/domain.com/system/expressionengine/templates/'

```

The EE2 docs for System Configuration Overrides has this override in its list. Tellingly, the equivalent page for EE3 *does not* contain this same override, suggesting that it has been deliberately removed. Sorry to say, but barring a 'feature request' to EllisLab, there's no easy way in EE to achieve this.

EE2 docs (link) | EE3 docs (link)

If you have access to the command line for your server, then using symlinks might be a way to get the result you want without hacking EE. Create a symlink (`ln -s`) from the templates directory in the core, initial site, to wherever you need in your secondary domain.
> 0 votes

---
Tags: templates, multi-site-manager, ee3
---


title: Template layout question

text:
# Question
Title: Template layout question
Good afternoon!

I’ve just “discovered” and started playing with layouts. So far, I love them!

But I have one question: Some of my pages, include custom stylesheets:

\[code\] \[/code\]

I can’t quite seem to figure out how to get this into the layout. If I try and use a normal variable in the main layout tag, the quotes (single / double) appear to mosh up the output.

I’ve also had zero success with the dynamic layout variables either:

\[code\] {layout:set name="color" value="red"} \[/code\]

Thoughts on how others include custom header info in their layouts….

# Answer
I do this by passing blocks of template content via `layout variables`. Thus you can put template specific content elements into a layout, but don't need to worry about doing any logic switching within the layout itself.

Here is an example:

First - here is the code within the layout to insert whatever is in a template design content block called `page_specific_js_and_views`:

```
{if layout:page_specific_js_and_views}{layout:page_specific_js_and_views}{/if}

```

The logic tests to see if a layout variable has been set, and if it has been, simply includes it within the layout.

Now, here is the code that appears within one of the templates that uses this layout - it inserts some specific javascript to load into the layout just for this template:

```
{layout:set name="page_specific_js_and_views"}
        <!-- Specific Page Vendor and Views -->
        <script src="/themes/site_themes/vendor/revolution/js/jquery.themepunch.tools.min.js" async></script>
        <script src="/themes/site_themes/vendor/revolution/js/jquery.themepunch.revolution.min.js"></script>
        <script src="/themes/site_themes/js/home-revolution-slider-init.min.js"</script>
{/layout:set}

```

When this page is rendered onscreen it gets the slider code added. When other templates use this layout they don't.

If you use nested layouts (a really good idea) you can extend this idea by simply 'passing' the template specific content down the layout chain using simple formats like this:

```
{layout:set name="page_specific_js_and_views"}
{layout:page_specific_js_and_views}
{/layout:set}

```

This structure simply looks to see if a layout variable of particular type has been set by a template, and if it has, passes it on to the next layout in the chain by setting a new layout variable with the same name.

Hope this makes sense... if not do clarify your question.
> 1 votes

---
Tags: template-layouts, layouts, layout-variables
---


title: How to update Modules?

text:
# Question
Title: How to update Modules?
I'm new to EE, and I'm not a web programmer, although I can understand some very basic things, and I used to use Wordpress which is very different. So my question may sounds trivial.

**How can I update Modules in EE?**

Do I need to only upload the new folder, or do I need to do something else? I couldn't find any tutorial about this. I have a website with EE 2.5.3 and I would like to update the Transcribe module to take advantage of only one option in the new version.

# Answer
**Important edit: a database backup before you do any module updating might prevent data loss and is always a good idea!**

It is a pretty straight forward process. For Transcribe simply follow the official installation instructions and overwrite the currently installed module files. Find the instructions here:

https://eeharbor.com/transcribe/documentation/installation

A more general overview which might apply to most EE 2 or 3 modules: EE 2 and 3 add-ons usually come in a zip file, and the zip file contains a mixture of files and folders. All Add-ons contain a folder with the add-on itself in it - usually at the bottom of a folder stack that replicates the normal folder structure for an EE 2 or 3 installation - so for example an add-on with the name "XXX" might be at the bottom of a folder path like this (EE3 uses a slightly different directory structure):

`system/expressionengine/third_party/XXX`

To install this add-on, simply copy the folder XXX to the equivalent `expressionengine/third_party` directory on your EE server.

Some EE2 add-ons also have custom Control Panel code - so you get a customised control for the add-on within EE. For that, you also need to install another folder which is at the bottom of a different folder path (EE3 might have a different path):

`themes/third_party/XXX`

To install this, again simply copy the XXX folder to the equivalent folder on your EE installation.

Now is your last chance to do a database backup. When the replacing/overwriting of files and folders is done, go to the Add-Ons/Modules page in EE 2 or 3 and click on the button "Module Updates" (top right) - and then if necessary 'install' the add-on (by clicking on the 'install' button on the row the add-on is listed on).

HTH
> 2 votes

---
Tags: module, update
---


# Question
Title: Freeform Pro Dynamic Admin Notifications
Is it possible to use a form field as a variable address to send admin notifications to different addresses?

The scenario is that the notification needs to be sent to a different address dependent on some element in the form.

# Answer
It's possible with FreeForm Pro to create variable 'recipients' on the fly inside the template tag:

```
{exp:freeform:form ... recipients="yes" recipients_limit="1"
  recipient1="recipient1-key|recipient1@email.com"
  recipient2="recipient2-key|recipient1@email.com"
  recipient_template="admin_contact"}

```

Then you could do something like:

```
<label>
  <input type="radio" name="recipient_email" value="{freeform:recipient_value1}">
  Recipient One
</label>

<label>
  <input type="radio" name="recipient_email" value="{freeform:recipient_value2}">
  Recipient Two
</label>

```

This hides the address from the client but makes the form extremely flexible. Simply disable the Admin Notifier in the form settings, and you're sorted. The `recipient_template=""` parameter defines the email template used to send the email.

With some smarts, you can even create a dynamic template to send different details to the different recipients! Brilliant :)
> 0 votes

# Answer
You'll definatly need to develop an extension which hooks freeform. Sounds complicated but its real easy, I've done it many times with freeform (you'll be suprised what clieents ask for) and you'll only be writing the smallest of extensions really..

Creating extensions is documented here ; https://ellislab.com/expressionengine/user-guide/development/extensions.html, and the freeform hook itself is documented here ; http://www.solspace.com/docs/freeform/extension\_hooks/#freeform\_module\_admin\_notification.

You'll be looking to hook on `freeform_module_admin_notification` so as not to interfere with user destined emails.

Essentually when your done, you'll have an extension that fires a function whenever an admin notification is going to be sent, you'll get a `$vars` array with all the message details and such in it, and a `$fields` variable with the postedd fields in it.

I'de recommend setting up your email choices as a bone fide freeform field (for example `notify_choice`), you don't have to include it in the email messsage template but this will ensure the users choice is available via the `$fields` variable. Then much like the example on the freeform docs :

```
public function freeform_module_user_notification($fields, $e_id, $vars, $f_id, $obj)
{

    //have other extensions already manipulated?
    if (ee()->extensions->last_call !== FALSE) {
        $vars = ee()->extensions->last_call;
    }

    //these are the admin emails and the corrisponding form values
    $adminEmails = array(
        0 => 'admin1@site.com',
        1 => 'admin2@site.com',
        2 => 'admin3@site.com'
    );

    //what recipients did the user choose?
    $choices = $fields['notify_choice'];

    //here we process the choices perhaps like this AS EXAMPLE
    $recipientEmails = array();
    foreach ( $choice in $choices ) {
        if ( in_array ( $choice, array_keys( $adminEmails ) ) {
            $recipientEmails[] = $adminEmails[$choice];
        }
    }

    //reset the recipients for the admin email
    $vars['recipients'] = $recipientEmails;

    //required
    return $vars;
}

```
> 1 votes

---
Tags: solspace-freeform, forms, variable
---


title: Freeform field description in template?

text:
# Question
Title: Freeform field description in template?
I see in the "New Field" dialog that the field description "can be inserted into your forms" but I don't see any documentation on how to do it.

I tried guessing with "{composer:field\_description}" inside the {composer:fields} pair, but no luck.

I should clarify that the reason I want to use field descriptions this way is to enable content editors to add some descriptive text about a field below the label. And they need to be able to do everything using the Composer interface.

I am open to alternative solutions that meet this requirement.

Thanks to anyone who can help.

# Answer
> 0 votes
Try this approach:

```
{freeform:description:{composer:field_name}}

```

# Answer
> 0 votes
This worked for me:

```
{freeform:description:MY-FIELD-NAME}

```

---
Tags: solspace-freeform
---


# Question
Title: Cannot pull an image in from one site’s entry into another sites template?
I have a template in Site B pulling in data from a channel entries tag pulling in entries from Site A which works fine.

I now need to display the image from the entry in Site A in the Site B template along with the current text.

The image is coming from a relationship field and so my tag is like this:

```
{exp:channel:entries
    site="sitea"
    channel="my_channel"
    disable="categories|category_fields|member_data|pagination|trackbacks"
    dynamic="no"
    show_future_entries="yes"
    status="not Closed"
    limit="1"
    search:event_field="y"
    }
       {cf_prod_photo limit="1"}
          <img src="{cf_photos_file}" alt="blah"/>
       {/cf_prod_photo}

{/exp:channel:entries}

```

I should add that this code comes from Site A and pulls an image in perfectly on that site.

# Answer
Seems to be undocumented, but I think a relationship field tag pair accepts a `site` parameter:

```
{exp:channel:entries
    site="sitea"
    channel="my_channel"
    disable="categories|category_fields|member_data|pagination|trackbacks"
    dynamic="no"
    show_future_entries="yes"
    status="not Closed"
    limit="1"
    search:event_field="y"
 }
       {cf_prod_photo limit="1" site="sitea"}
          <img src="{cf_prod_photo:cf_photos_file}" alt="blah"/>
       {/cf_prod_photo}

{/exp:channel:entries}

```
> 1 votes

# Answer
If the image is in a relationship field would you need to do?

```
 {cf_prod_photo limit="1"}
      <img src="{cf_prod_photo:cf_photos_file}" alt="blah"/>
 {/cf_prod_photo}

```
> 0 votes

# Answer
As Jim suggested does kit give any output at all?

Suggest you try stripping back the entries tag to the bare minimum and see if you can get the entry title to work, eg

```
{exp:channel:entries
    site="sitea"
    channel="my_channel"
    dynamic="no"
    show_future_entries="yes"
    status="not Closed"
    limit="1"
    }
       {title}

{/exp:channel:entries}

```

Then add bits back in to see where it breaks.
> 0 votes

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


title: File Manager, unable to edit file

text:
# Question
Title: File Manager, unable to edit file
I'm using EE 2.8.1, I can't edit a file in file manager. If I go to: Content \> Files \> File Manager. Select and file and under the Actions column, select edit, I get a page saying I'm not authorised to perform. This happens when I'm logged in as a super admin, and when the client logs in with under their member group as well.

# Answer
> 0 votes
are your file upload preferences properly setup, folder permissions writtable?

---
Tags: file-uploads, file-manager, files
---


# Question
Title: How to make overlay popup work dynamically with entries?
I am using a pretty simple css overlay code to bring up a popup. It works fine by itself. But when I use it within Expressionengine tags to bring up the content of entries dynamically it shows the first entry only every time, instead of the content of the entry you click on.

How can I get the overlay to appear with the correct content each time you click on a title?

I am using the following code:

```
{exp:channel:entries channel="topic-content" category="5" limit="10"}
<a href="#openModal">
{title}
</a>
<div id="openModal" class="modalDialog">
<div>
        <a href="#close" title="Close" class="close">X</a>
        <i>{overview}</i>
</div>
</div>
<br />
{/exp:channel:entries}

```

The overlay popup comes up fine but only shows the results (the 'overview' field) from the first entry, no matter which entry ('title') you click on.

Below is the code for the overlay itself:

```
<style>
.modalDialog {
overflow-y: scroll;
position: fixed;
font-family: Arial, Helvetica, sans-serif;
top: -90px;
right: 0;
bottom: 0;
left: 0;
background: rgba(0,0,0,0.5);
z-index: 99999;
opacity:0;
-webkit-transition: opacity 400ms ease-in;
-moz-transition: opacity 400ms ease-in;
transition: opacity 400ms ease-in;
pointer-events: none;
}

.modalDialog:target {
opacity:1;
pointer-events: auto;
}

.modalDialog > div {
width: 600px;
height: auto;
position: relative;
margin: 10% auto;
padding: 5px 20px 13px 20px;
border-radius: 10px;
background: #f4fbec;
color: black;
}
</style>

```

# Answer
Your browser doesn't run past the first instance of replicated element id's. Every anchor you have on that page:

```
<a href="#openModal">
    {title}
</a>

```

targets the same id, and your browser only knows to point the anchor at the first instance. You need to create unique id's for each targeting anchor and each modal element. Add a dynamic and unique variable to your loop to make each outputted instance unique; can't go wrong with your `entry_id`!

```
{exp:channel:entries
    channel="topic-content"
    category="5"
    limit="10"}

    <a href="#openModal-{entry_id}">
        {title}
    </a>
    <div id="openModal-{entry_id}" class="modalDialog">
        <div>
            <a href="#close" title="Close" class="close">X</a>
            <i>{overview}</i>
        </div>
    </div>
    <br />

{/exp:channel:entries}

```

I don't know how the `close` anchor targets the modal, but it doesn't seem to need to know the id of the modal itself, so that should be fine on its own.
> 1 votes

---
Tags: channel-entries
---


# Question
Title: 404 pages not working for Blog channel - but do for everything else
I have just taken on an Expression Engine site (my first time with EE) and I am experiencing a strange issue.

We have a custom 404 error page which is working across the site except for on the blog. Essentially if I enter a bad url such as example.com/xyz I get the 404 page, however if I enter example.com/blog/xyz I just get a blank page.

I have checked for HTML content on this blank page - however it is completely void of anything!

I can't seem to find any settings that could override the blogs 404 settings in this way.

I have tried :

```
{if no_results} {redirect="404"} {/if}

```

Which I have seen on a few answers here, but this does not work either.

Thanks for your help in advance!

# Answer
> 1 votes
Have you tried using the `require_entry = "yes"` parameter in the channel entries tag?

More info: https://docs.expressionengine.com/latest/channel/channel\_entries.html#require-entry

---
Tags: 404
---


# Question
Title: CartThrob Product - Simple FT not rendering
I recently upgraded CartThrob 2.61 to v 2.71 on my development server.

After updating modules, everything seems to work fine except for when I try to render a **CartThrob Price - Simple** fieldtype in my templates.

Using the following test example on a development page, the page loads continuously before timing out. So I have no use of the template debugger or the profiler to help me out. There are no PHP errors or Apache errors for me to trace either.

```
{exp:channel:entries channel="products" limit="10"}
    {exp:cartthrob:add_to_cart_form entry_id="{entry_id}"
    }
        Title: {title} <br/>
        Price: £{product_price} <br/>
    {/exp:cartthrob:add_to_cart_form}
{/exp:channel:entries}

```

Has anybody come across anything similar? Can anyone give me any tips on how to begin to debug this?

# Answer
I had recently installed the **CartThrob Subscriptions** module alongside the new 2.71 **CartThrob Pro** upgrade.

After doing some laborious debugging work, uninstalling and reinstalling the CartThrob module, I discovered that the EE channel assigned to serve as the Products Channels for the CartThrob Pro module (*Store - Channel*) had been **reassigned** to a new channel created by the installation of **CartThrob Subscriptions** (*Store - Subscriptions*).

Because of this, all my field mappings had been lost. Therefore no values were being assigned to any of the **CartThrob Price - Simple** fieldtypes for my products.

Rather than be informed of this with a notification or even a PHP logged error, I was given nothing. Poor form CartThrob and Vector Media Group.

You just wasted 4 hrs of my time.
> 0 votes

---
Tags: ee2, cartthrob, fieldtype
---


# Question
Title: Import events list and events detail from multiple feeds and combine them
I've got an external XML feed which contains a list with events and some basic info. Let's say: feeds/events Every event has an unique ID and with that ID I can get the details of every event. Something like: feeds/events/\[UNIQUE\_ID\]

Is it possible to import and combine the details to every event and store it in a channel? I've used Datagrab before but I don't see how to combine something like this. I was thinking about a custom script to combine the two and output this so Datagrab could import it. But maybe there is an easier way to accomplish this.

Thanks in advance.

# Answer
I believe you can set one column as a KEY in Datagrab, when an import is performed and the KEY field matches then record is updated rather than created.

So in your case if you have two sources, you run the first one -- it creates the channel entries, then you run the second import it updates the entries which have the matching KEY (your UNIQUE\_ID).
> 0 votes

---
Tags: import, feed
---


# Question
Title: Channel form does not set Structure URL title
When I submit an entry through my Channel Form, the regular old URL Title is being populated correctly, but there is no entry for Structure URL Title. Aren't these two things supposed to synchronize automatically when a new entry is created? How do I fix it?

Everything works fine when I add an entry from the control panel. The problem occurs when the Channel Form is used.

I'm using:

* EE 2.9.2
* Structure v3.3.18

---

**Update to add channel form code:**

```
{layout="layouts/.my-layout" title="" section="{segment_1}"}

{!-- Insert form here --}
{exp:channel:form
channel="mychannel"
return="/{freebie_1}/{freebie_2}/{freebie_3}/{freebie_4}/thank-you"
logged_out_member_id="2"
error_validation="inline"
secure_action="yes"
}

<label for="post_first_name" class="required">First Name
    <input type="text" name="post_first_name" id="post_first_name" required />
</label>
{if error:post_first_name}<small class="error">{error:post_first_name}</small>{/if}

<label for="post_last_name" class="required">Last Name
    <input type="text" name="post_last_name" id="post_last_name" required />
</label>
{if error:post_last_name}<small class="error">{error:post_last_name}</small>{/if}

<label for="post_email" class="required">Email Address
    <input type="email" name="post_email" id="post_email" required />
</label>
{if error:post_email}<small class="error">{error:post_email}</small>{/if}

<label for="title" class="required">Post Title
    <input type="text" name="title" id="title" value="{title}" size="50" maxlength="100" onkeyup="liveUrlTitle();" required />
</label>
{if error:title}<small class="error">{error:title}</small>{/if}

<label for="categories" class="required">Category</label>
<select name="category[]" id="categories">
  <option value="">**Select**</option>
  {categories}
    <option value="{category_id}"{selected}>{category_name}</option>
  {/categories}
</select>

<label for="post_body" class="required">{label:post_body}
    {field:post_body}
</label>
{if error:post_body}<small class="error">{error:post_body}</small>{/if}

<input type="submit" value="Submit" class="button small radius" />

{/exp:channel:form}

```

# Answer
> 0 votes
You'll want to add the following hidden input fields to your form.

```
<input type="hidden" name="structure_template_id" value="XXXX" />
<input type="hidden" name="structure_parent_id" value="XXXX" />
<input type="text" name="structure_uri" /> <!-- required -->

```

See documentation.

---
Tags: safecracker, structure
---


# Question
Title: Customize look of map with Google Maps for ExpressionEngine
Is there a way to customize map colors using Google Maps for ExpressionEngine?

I know it can be done with Google Maps but since the plugin is generating the map code, I'm not sure how to add the code that controls map colors.

Thanks for any help.

# Answer
> 0 votes
```
{exp:gmap:init id="map" class="gmap" styles="/assets/js/gmap-styles.js" style="width:100%;height:400px"}

```

Download sample gmap-style.js, edit it, and link to it using the `styles` parameter.

See documentation.

---
Tags: google-maps-for-ee
---


title: Really slow field creation or deletion

text:
# Question
Title: Really slow field creation or deletion
I have an issue with creating and deleting field types ,its takes a really long time to do both and sometimes the site times out and when I get back in the field is only half created.I can then save the field again and it will take around 3 minutes to process through the database. At the end of the day i can create a field but it is taking too long and I want to know whats going on with the database that is causing that delay .I am running EE 2.9.2 and have no other issues with EE as everything else runs fast. Thanks in advance for any help or advice

# Answer
Ok I decided to update to the latest version 2.11.1 and i was looking through the change logs and I saw this on the 2.10 change log

*Added -Optimized queries used in new channel field creation.*

So I went ahead with the upgrade and it has greatly improved the field creation time
> 0 votes

---
Tags: fieldtype, fields
---


title: Unable to upload files

text:
# Question
Title: Unable to upload files
I need to get images added to a team page, however there is no error message showing, when viewing images that are in the library, they are showing as checkered boxes (checkered wallpaper). Not exactly where to go to resolve this issue.

now I see this error
"There was an error uploading your file: Your upload directory isn’t writable"
I am logged in as superadmin
drwxr-xr-x 7 exp\_eng pg8693376 4096 Jan 6 2015 assets

# Answer
> 0 votes
Have you checked the file permissions for the folder the images are in? They should be set to 777 as per the installation instructions... (EE2 / EE3)

# Answer
> 0 votes
Another quick and simple first thing to check: make sure the file upload path to that upload folder is set correctly.

https://docs.expressionengine.com/latest/cp/files/uploads/form.html#upload-path

---
Tags: templates, assets, control-panel
---


title: SEO lite - remove company name

text:
# Question
Title: SEO lite - remove company name
Hello, Hope somebody can help? I only have very little experience with EE. I want to remove the company name - marked with yellow (see picture). Can anybody tell me how to - and where to do it. I am using Seo Lite?? Many thanks.

# Answer
It depends on how it was set up by the developer, but possibly all you will need to do is update the SEO Lite Template.

Go to *Add-ons \> Modules \> Seo Lite* and check what's in the template field. I'm guessing the `{site_name}` variable is what you'll want to remove (or possibly the actual text "zumoQR - DK"), but hard to know without seeing your setup.

Documentation: http://wedoaddons.com/seo-lite/configuration

Edit your original question to add more detail if you are still stuck after checking your SEO Lite settings.
> 2 votes

---
Tags: add-on
---


# Question
Title: Channel Images - Call to undefined method stdClass
We did a migration of an EE website from a server to DigitalOcean.

After we managed to change every route and everything, it seems that we can't upload images into channel images anymore.

it gives the following error:

Severity: Warning

Message: Creating default object from empty value

Filename: channel\_images/ajax.channel\_images.php

Line Number: 369

Fatal error: Call to undefined method stdClass::run() in /var/www/html/system/expressionengine/third\_party/channel\_images/ajax.channel\_images.php on line 371

EE 2.9.0 Latest Channel Images The difference between the servers is that the current one has Latest PHP library.

# Answer
I ran into the same error. It was caused by having Imagick upload actions set for some Channel Images fields but not having ImageMagick itself installed on the new server. Once I installed ImageMagick, images uploaded without a problem.
> 1 votes

---
Tags: devdemon, channel-images, php-errors, server-migration
---