title: Use Query to change status of an entry

text:
# Question
Title: Use Query to change status of an entry
THE SHORT: I am looking for the sql query I need to run in order to change the status of an entry. Any help would be appreciated.

THE LONG: I have two sperate channels and they are NOT linked via a relationship field, however if the status of an entry in Channel A is closed and a field in Channel A matches a field in Channel B I need to update the status of the entry in Channel B. I plan on running this via a cron to automatically update these entries and I dont want to require my users manually change the entries.

Thanks.

# Answer
Your question asks for a query to change the status of an entry. This is the code you'd use to change the status for a specific entry\_id:

```
 UPDATE exp_channel_titles t
 SET t.status = 'pending'
 WHERE t.status = 'open'
 AND t.entry_id = "1"

```

I suspect you need something more complicated though. If that's the case, you'll need to update your questions with more specific detail.
> 2 votes

---
Tags: query
---


title: Comments Module - edit comments

text:
# Question
Title: Comments Module - edit comments
Using the native Comments Module, I have a comments form and entries on a page with a single blog entry.

I am attempting to add an edit button to allow users to edit their comments on the front-end.

The edit link works fine for a Super Admin. According to the EE documentation, I should be able to edit as a regular member as long as that member is logged in, the author of the comment, and the editing time limit must not have expired.

I have all 3 of those conditions met, yet nothing within the {if editable} renders.

any insight would be appreciated.

update: My setup

```
{!-- jQuery is included in <head> --}
{exp:comment:edit_comment_script}
<ul id="posted-comments">
    {exp:comment:entries sort="asc" limit="20"}
        <li class="comment" id="comment_{comment_id}">
            <span class="comment_body">{comment}</span>
            {if editable}
                <a href="#" class="edit_link">Edit</a>
                <div class="editCommentBox" style="display:none;">
                    <textarea cols="70" rows="8">{comment_stripped}</textarea><br />
                    <input type="submit" name="cancel" value="Cancel" class="cancel_edit">
                    <input type="submit" name="save" value="Save" class="submit_edit">
                </div>
            {/if}
            <p class="info">
                <span class="name">By {name}</span>
                <span class="date">on {comment_date format="%m/%d/%Y"}</span>
            </p>
        </li>
    {/exp:comment:entries}
</ul>

```

# Answer
Some things to check:

* Is the {exp:comment:edit\_comment\_script} tag in your header or in your template? The docs don't say specifically but I'd guess it needs to be in your header.
* Check to see what the variable {editable} actually prints out if anything
* Check to see what the variable {can\_moderate\_comment} actually prints out if anything
* Under Comment Administration Privileges for the member group preferences, make sure "Can edit comments in their own channel entries" is turned on. For the heck of it, turn on all options in that section.
* Make sure the member you are logged is as when attempting to edit is the same member who posted the comment
> 1 votes

---
Tags: ee2, members, comments
---


# Question
Title: Assets 2.0 (P&T) not saving field setting for mutiple selection
I downloaded Assets 2.0 and ran into an issue where the selection for the field "Allow multiple selections?" is not saved. Thus I can't restrict the user to select only one file.

**UPDATE:** I'm using Expressionengine v2.5.3

Regards Flo

# Answer
> 2 votes
This is a known Bug (I've reported it yesterday) and P&T wrote me it will be fixed «ASAP»

See Bug-Report and Reply from P&T

---
Tags: add-on, assets, fieldtype
---


# Question
Title: Updating modules + Updater + Version control + Beanstalk
When updating modules locally we typically use DevDemon Updater to shorten the install process. Many modules run SQL queries when updating which is not version controlled.

My question is rather than ignoring the third\_party folder in Git and installing the modules twice, what would be the cleanest & quickest way to do module updates and SQL queries with version control? Is there an action to trigger module SQL updates automatically?

# Answer
> 2 votes
We use Navicat to sync changes from local into test and then into production after doing an update.

Recently though I've seen http://dbv.vizuina.com/ and when I get the time want to see how we can incorporate that into our current process.

# Answer
> 2 votes
**Heres my thought process:**

As you're using Beanstalk (so do we), you could use post hooks to trigger the SQL to run (we don't do that!). It would require a terminal script I guess.

You'd have to isolate the SQL that each module needs to run in the update method of the upd.xxx.php file. Seems like it would be easier to do this manually with each module upgrade.

Then again, if the third\_party is under VC, all the new files will be on the live site post deployment. Doesn't EE check the update class by just visiting the 'Modules' screen?

---
Tags: git, updating, devdemon-updater
---


# Question
Title: How to check if an Asset field is empty within a Matrix row
How can you check if there is an image within an Asset field within a Matrix field.

I have tried

```
{matrixField search:asset="not IS_EMPTY"}

```

and

```
{matrixField}
{if asset != ''}

```

But it still does it anyway. I have updated to the latest Matrix but still have issues.

# Answer
> 1 votes
Would not the simple method work ?:

```
{matrixfield}
    {if assetfield}
        {assetfield}
    {/if}
    {anothermatrixcolumn}
    {/anothermatrixcolumn}
{/matrixfield}

```

---
Tags: matrix, assets
---


# Question
Title: Low Search - {exp:low_search:results} shows all entries as default
Is there a way for the {exp:low\_search:results} tag to display everything as a default when there is no query segment?

# Answer
Yes. Having a `query=""` parameter in the Results tag will trigger no results if the parameter is empty or invalid. **Omitting** the parameter altogether will allow the Results tag to show all entries.

So, this will return no results if `{segment_2}` is empty:

```
{exp:low_search:results
    query="{segment_2}"
    ...
}

```

And this will show all results if `{segment_2}` is empty:

```
{exp:low_search:results
    {if segment_2}query="{segment_2}"{/if}
    ...
}

```
> 3 votes

---
Tags: low-search
---


# Question
Title: Control Panel : put content edit entries from one channel in a link
Think this might be an easy question but never found the solution.

I want my clients to have a quick link per channel for what they otherwise have to find via *Content \> Edit \> Channels*. If i save the url it redirects to the *Content \> Edit* without the filter

it would be much more user friendly for clients to have a link with "blogposts", "contacts", "events" on the right sidebar.

# Answer
You can do that, but the links are tied specifically to the user. So, you can login, as the user and build their list of quick links. You can force this by browsing to the users profile in the CP as a Super Admin and it will give you a menu pick to login as that user. You don't need to know their password.

You can also do the same with the buttons in the top menu. Browse to the entry listings for the channel you want, then select the "Add" link and it will add it to the header. Again, these are user specific, so you would need to be logged in as the user.

I'm not sure, but I don't think you can makes those global without some code re-working.
> 3 votes

# Answer
Three choices:
> 1 votes

---
Tags: control-panel
---


title: If no results for {categories}

text:
# Question
Title: If no results for {categories}
Is there a way to display a fallback snippet if a {categories show\_group='xy'}-Tag is empty / a entry does not have a category?

The example…

```
<p>Category: {categories show_group='xy' backspace='2'}<a href='#'>{category_name}</a>, {/categories}</p>

```

… shows …

```
Category:

```

… if there is no linked category for this entry in this category-group. Is there a way to do something like:

```
Category: No categories assigned

```

… or hide «Category: » in the first place with a conditional or something simpler than this kind-of-complicated stuff:

```
{categories show_group='xy' limit='1'}<p>Category: {/categories}{categories show_group='xy' backspace='2'}<a href='#'>{category_name}</a>, {/categories}</p>{categories show_group='xy' limit='1'}</p>{/categories}

```

# Answer
> 7 votes
I have used this, which isn't the most elegant solution, but does work:

```
{if "{categories show_group='xy'}y{/categories}" != ""}
    Category: {categories show_group='xy'} ... {/categories}
{if:else}
    No categories here
{/if}

```

You could also try the BW Category Count add-on.

# Answer
> 0 votes
I'd look at the count parameter as a conditional: http://ellislab.com/expressionengine/user-guide/modules/channel/categories.html#count

```
{categories show_group='xy' backspace='2'}
{if count == "1"}Category:{/if} // If there are any cat's then show the title
<a href='#'>{category_name}</a>,
{/categories}

```

It's late here and the code may not be perfect but you should get the gist :)

# Answer
> 0 votes
Was having the same problem. I wrote a small (free) plugin that will enable you to do just that. Entry id is mandatory and has optional category groups. Available here.

---
Tags: categories, no-results
---


title: Titles in structure not showing

text:
# Question
Title: Titles in structure not showing
I'm relatively new to ExpressionEngine so please bear with me on this.

I'm trying to add title attributes to the links in my Structure navigation, like this:

`<a href="[link]" title="[something]">[page name]</a>`

But I'm not having much luck. Here is my `{exp:structure:nav}` tag:

```
{exp:structure:nav start_from="/" max_depth="1" include_ul="no" add_unique_ids="entry_id" current_class="font-bold"}

```

I tried adding in my own custom title parameter but that didn't seem to work either.

This could be a quick fix but I can't see it myself. Any help would be appreciated.

---

**UPDATE:** Since I couldn't see a way to add titles through the tag, I went in and edited line 717 in sql.structure.php:

```
$html .= '<li'. $classes . $ids . '><a href="' . $tree[$i]['uri'] . '" title="' . $title_output .'">' . $title_output .'</a>';

```

I'm testing it now but it seems to work.

If anyone has a better alternative please feel free to add.

# Answer
> 3 votes
As far as I know, the Structure nav tag does not output any title attribute for links.

There is a free third party add-on Structure Entries http://devot-ee.com/add-ons/structure-entries which you could try using to generate your navigation links instead. You specify your own markup for each link, so you could specify the title attribute etc.

Alternatively, you could use javascript to add a title parameter set to the link text into your Structure nav output.

# Answer
> 1 votes
If I understand correctly by what 'title' you're trying to output then you'll need to include `show_overview="yes"`.

> Overview (Parent) Link show\_overview="yes", defaults to no Shows a link at the top of your navigation that links to the current top level page. Use with rename\_overview to change the title.

Is that what you were looking for?

---
Tags: add-on, structure
---


# Question
Title: Possible to remove p tags from a table cell in Wygwam
I have a problem that occasionally a `<p>` tag is being added to a table cell, usually when someone pastes something into it.

Is there a way to remove that `<p>` and just have the cell be an empty `<td>` or `<th>`, ideally without editing the source?

Is there an option that could be added through the advanced settings?

# Answer
If the reason is appearance, you can remove any margin/padding formatting with css, like:
`table p {padding:0; margin:0}`
Or you can add specific classes to the styling menu of wygwam for tables, for a more fine grained control over styling tables.
> 3 votes

# Answer
what about using one of the HTML stripper add-ons?

You can find quite a few here on Devot:ee.
> 0 votes

# Answer
I doubt you can do it easily. A custom extension to parse the text on submission might do it, but the issue is CKEditor forces \<p\> tags around pretty much every inline element. You're better off just leaving it and changing the styles like GDMac suggested.
> 0 votes

---
Tags: wygwam
---


title: Detect any pagination in a conditional

text:
# Question
Title: Detect any pagination in a conditional
I've got a site where it shows different content dependent on the url segments (categories eugh!) but as there can be up to 4 url segments, any of which could have pagination, i want to be able to say not if segment is a pagination segment.

Obviously i could do {if (segment\_4 != '') && segment\_4 != 'P25' && segment\_4 != 'P50'} but pagination could be any value in theory. So, is there a way of saying "where segment\_4 is not a pagination segment"?

Thanks!

# Answer
> 5 votes
Use Switchee. It supports regular expressions, and example on devot:ee page shows how to use that to check for pagination.

# Answer
> 5 votes
I use Switchee to detect pagination except in cases where I just can’t work Switchee into the template, in which case I use MD Detect Page Type.

Switchee example:

```
{exp:switchee variable = "{segment_4}" parse="inward"}
    {case value="''"}
        Not Paginated
    {/case}
    {case value="#^P(\d+)$#"}
        This is Paginated
    {/case}
{/exp:switchee}

```

MD Detect Page Type example:

```
{exp:md_detect_page_type url_segment="{segment_4}"}
    {if pagination_page == TRUE}
        Paginated
    {/if}
{/exp:md_detect_page_type}

```

# Answer
> 4 votes
The simplest way is to use Rob's Mo Variables which comes with some very useful global variables for use in your templates including "{if paginated}". This also makes it very easy to see what the code is doing when you re-visit it at a later date.

Failing that I'd fall back to Switchee. -----

# Answer
> 2 votes
Switchee will work in some cases, but I've also been using the very versatile Mo'variables successfully. Among other things, it has a handy {if\_paginated} conditional that checks whether pagination appears in your segments. Pleanty of other goodies as well in terms of working with segments.

EDIT: code example (not at my desk so cannot test)

```
{if segment_4 != ""}
    {if not_paginated}
        stuff to do
    {/if}
{/if}

```

When working with categories, I have also found GWcode Categories to be invaluable. Makes your life a hell of a lot easier.

---
Tags: categories, pagination, segments
---


title: Member Import XML join_date Format

text:
# Question
Title: Member Import XML join_date Format
I'm exporting member data as xml from one site to another using Export It.

When I import the xml via the EE Member Import Utility the 'Join Date' for each imported member is '0'.

The join\_date format in the exported xml is:

```
<join_date>Jun 09, 2011, 07:46:04AM</join_date>

```
1. Is this incorrect?
2. Does it matter that the Join Date is 0?

# Answer
The `join_date` in ExpressionEngine is generally formatted as a UNIX timestamp and looks something like

```
field     type length value
join_date  INT  10    1118111578

```

It looks like your date is being converted to a human readable format on export, but you need to keep it as a UNIX Timestamp, for it to get stored properly.

I can't say, how much trouble maybe caused by the lack of a join\_date or a join\_date of 0. Anything that uses the `join_date` to calculate or display would be boinked, but in our installs, the join\_date isn't used that much. Just to look-up when we added someone, if the were giving control panel access. So someone else would need to chime in on that component.

I believe Export It was designed to make your export Excel compatible, which is different from exporting data and re-importing it back into EE.
> 0 votes

---
Tags: import, xml
---


title: no notifications being sent

text:
# Question
Title: no notifications being sent
My new member notifications are not being sent even though I have my email and notifications set to YES in the member prefs.

I CAN send emails through tools \> communicate so I know email works.

I am using USER from solspace. I also tried MX Notify Control but that doesn't work either.

My new members have no activations required but I still want to be notified. What am I missing.

EE ver 2.5.5 User 3.4.0

# Answer
so the notifications all came through, about 2 hours after they were submitted!!!

I was using the built in EE notifications of new members (not profile update)
> 2 votes

---
Tags: members
---


# Question
Title: Assets and Safecracker — selections not saving?
I have a very simple Safecracker form, consisting of nothing but an Assets field. (I built it so I could quickly run through all my entries and re-assign images that have all recently been updated.)

Here's the code in question:

```
{exp:channel:entries channel="articles" limit="1" disable="categories|category_fields|member_data"}
{exp:safecracker channel="articles" return="/utilities/illos/" include_jquery="yes" json="no" safecracker_head="yes" class="editForm" entry_id="{entry_id}"}
{field:article_illustration}
<br><input type="submit" name="submit" value="Submit">
</tr>
{/exp:safecracker}
{/exp:channel:entries}

```

The Assets widget is working as expected (I can trigger the file chooser, select images, and the thumbnail shows up in the field). The problem is that then saving images does not save the new selection.

Watching events through the inspector, it looks like even though my selection is being visually added to the field, the hidden field never gets populated with the required value.

(Details: ExpressionEngine v2.5.5; Assets v1.2.2)

Updated with more info:

I've run through a few scenarios.

* If the entry already has an image, and I save without changes, the image stays.
* If I remove the image and save, the image is removed.
* I added a title field, and it updates appropriately.

# Answer
It turns out that when I logged in and created the same form - it worked. When Tim put it into his own template, it worked.

So in this case the answer is: gremlins. His code should have worked. Possibly an invisible character, or we both missed seeing a curly quote somewhere.

But this appears to be working now!

-Lisa
> 1 votes

---
Tags: add-on, safecracker, assets
---


# Question
Title: Stash variable is being set but I can't retrieve it
I'm trying to create a stash variable of a pipe delimited entry\_id list using the following:

```
{exp:channel:entries channel="related_entries" limit="1" disable="categories|member_data|pagination|trackbacks" entry_id="2249"}
{exp:stash:set name="featured_ids" parse_tags="yes"}
    {entry_relationships backspace="1" parse="inward"}{entry_id}|{/entry_relationships}
{/exp:stash:set}

```

{/exp:channel:entries}

I've enabled template debugging and can see that the variable is being set by stash:

```
Stash: SET featured_ids to value 6147|8116|6270|3031|3019|463|6380

```

..but when I try and retrieve the variable using

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

```

I get

```
Stash: RETRIEVED featured_ids with value

```

and looking at the order of the output, guess what? It is LATER in the parse order than setting the variable in the first place, which explains why it doesn't output anything.

Does anyone know how I can get around this?

EDIT: I've added process="end" to my get tag and now in the template debugging I'm seeing the following:

```
Stash: RETRIEVED featured_ids with value 6147|8116|6270|3031|3019|463|6380

```

but when I look at the output on the actual page, I'm seeing:

```
{b0faccac1d7de314625221c0189105071802790178}

```

Anyone any ideas?

Cheers

Jim

# Answer
> 2 votes
**EDIT 1: Not that, see Mark's reply below for an in depth explanation**

Might be an EE caching issue. If using the same tag more than once, try to add 'random' at the end of your get tag to stop EE from caching it.

```
{exp:stash:get name="featured_ids" random}

```

**EDIT 2: tried to reproduce**

Well, I tried on a sandbox install and the following code works

```
{exp:stash:set name="featured_ids" parse_tags="yes" trim="yes"}
    {exp:channel:entries disable="categories|category_fields|member_data|pagination|trackbacks" channel="news" status="open" dynamic="no" orderby="date" sort="desc" limit="500" backspace="1"}
        {entry_id}|
    {/exp:channel:entries}
{/exp:stash:set}

{exp:stash:get name="featured_ids"}

```

So, I would try to move the set tags outside of the channel entries tags like so:

```
{exp:stash:set name="featured_ids" parse_tags="yes" trim="yes"}
    {exp:channel:entries channel="related_entries" limit="1" disable="categories|member_data|pagination|trackbacks" entry_id="2249"}
        {entry_relationships backspace="1"}{entry_id}|{/entry_relationships}
    {/exp:channel:entries}
{/exp:stash:set}

{exp:stash:get name="featured_ids"}

```

Any better ?

# Answer
> 3 votes
The original problem arises from the way that module tags are parsed by EE, from the outwards in. The outer layer of tags is parsed, then the next layer underneath, and so on: much like peeling an onion. In your case the `{exp:channel:entries}` tag and the `{exp:stash:get}` tag are on the outer layer, while the `{exp:stash:set}` is on the inner layer.

You tried to solve this, correctly, using process="end" parameter when you get the variable - but you saw a random string output. In this case it's NOT the famous M00.. string used as a cache placeholder by ExpressionEngine. Instead that string is a placeholder generated by Stash used to mark a position in the template for a variable; it gets replaced at the end of template processing by an extension triggered by the template\_post\_parse hook.

Of course, **if you don't have the Stash extension installed** then the placeholder never gets replaced and you see that string. So you simply need to install the extension :)

# Answer
> 1 votes
Stash items like this are extemely sensitive to space/ing, try truncating your stash to one line and add trim="yes"

```
{exp:stash:set name="featured_ids" parse_tags="yes" trim="yes"}{entry_relationships backspace="1" parse="inward"}{entry_id}|{/entry_relationships}{/exp:stash:set}

```

---
Tags: stash
---


# Question
Title: How to get cropping functionality on front-end image upload?
Need to have users upload images on front-end via Safecracker but they need to be a specific width and height - otherwise could just limit the width - so really is going to need some cropping functionality.

Anyone done this? Add-ons? Is it possible?

# Answer
Have you looked at CE\_img (http://devot-ee.com/add-ons/ce-image) ? It doesn't allow the uploader to crop the image but you can apply some parameters to crop and specify whether you crop from the centre, edge etc. It also lets you resize and apply effects to the images as well as caching them. On the whole it's very useful.
> 7 votes

# Answer
I have done this previously using Safecracker Dev Demon's Channel Images, http://www.devdemon.com/channel\_images/

As a bonus the GUI Channel Images uses is very nice and allows multiple uploads and upload progress.

Just my 2 cents.
> 2 votes

---
Tags: image, crop
---


# Question
Title: Can't Find Problem Template for Allowed Memory Size Exhausted Error
My site's server logs show a repeating memory limit error:

> \[17-Jan-2013 17:26:01 UTC\] PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 523800 bytes) in /path/to/my/system/expressionengine/libraries/Template.php on line 894

As you can see, the server's memory limit is already set to 128 MB, so whatever template is causing this appears to be *massive*. Trouble is, I can't locate the problem template. Every page on my site is running well below 128 MB. Also, I haven't seen this PHP error anywhere on the front-end during development, and I assume it would appear if I tried to load the problem template.

Has anyone had this issue before? Is there a quirk or bug I'm not aware of that I should look for?

EE 2.5.5

**EDIT**
Line 894 in this file is:

```
$this->process_tags(); // Run the class/method handler

```

# Answer
The way I'd track this backwards is to look at access logs and match the line to the \[17-Jan-2013 17:26:01 UTC\] date/time. That should give you the URL accessed so you'll know which template is causing the problem.

---

**EDIT:**

You might also try refreshing the log file as you navigate the site. Load a page, then refresh the log... if the error is triggered and is showing in the logs, you know you've hit the problem template.

You can also install the **EE Debug Toolbar** so you can see page memory usage as you navigate the site.
> 1 votes

# Answer
I agree with @Anna\_MediaGirl cross check you error logs with your access logs to see if you can identify the offending template.

You should note that some templates, let's say if you have a template using 'tags', can behave perfectly normal for regular use, but if a crawling bot hits them, may produce memory errors. This is because the bot keeps adding more and more tags, which a user probably wouldn't do. So the template may go from

```
http://mydomain.org/tags/tag/memory

```

to

```
http://mydomain.org/tags/tag/memory,php,error,user,etc.

```

We had to put in .htaccess blocks to this from happening, since the bots also didn't follow our robot.txt rules and not index the /tags/ area in the first place.
> 3 votes

---
Tags: templates, php-errors, memory-limit
---


# Question
Title: Expresso Store: pass value from one page to another one
Just to be clear about my configuration:

I have 2 templates:

1) Start (user makes selection) 2) Destination (I need to display the user's choice)

Start (user makes selection) Template: {site\_url}my\_test\_channel/Start

```
{exp:channel:entries channel="my_test_channel"}
    {exp:store:product entry_id="{entry_id}"  input:my_input_name1="My_input_name1"  input:my_input_name2="My_input_name2"}

                  <select id="my_input_name1" name="my_input_name1">
                        <option value="option1" selected="selected"> option1 </option>
                        <option value="option2"> option2 </option>
                  </select>

                  <select id="my_input_name2" name="my_input_name2">
                        <option value="option1" selected="selected"> option1 </option>
                        <option value="option2"> option2 </option>
                  </select>

        <a href="{site_url}my_test_channel/Destination">SEND-INFO-TO-DESTINATION</a>

    {/exp:store:product}
{/exp:channel:entries}

```

Then in the Destination template:

```
{exp:channel:entries channel="my_test_channel"}
    {exp:store:product entry_id="{entry_id}"  input:my_input_name1="My_input_name1"  input:my_input_name2="My_input_name2"}

    User chioice1:  {product_details:my_input_name1}

    User chioice2:  {product_details:my_input_name2}

    {/exp:store:product}
{/exp:channel:entries}

```

Nothing happens.

How can I save the values selected on the first page, ad then display them on the second page?

# Answer
> 1 votes
```
{exp:channel:entries channel="your-channel"}
    {exp:store:checkout entry_id="{entry_id}"}
        {items}
            {modifiers}
                {modifier_name}: {modifier_value}
            {/modifiers}
        {/items}
    {/exp:store:checkout}
{/exp:channel:entries}

```

This will give you the results you are looking for on the subsequent page.

---
Tags: expresso-store
---


# Question
Title: Forum users report being logged out even after checking 'keep logged in'
We are currently running EE 2.5.2 and using the Discussion Forum Module (3.1.8). We have several users who report that they are logged out even when they have checked the 'keep logged in' option. We've triple checked our cookie settings and verified the cookie domain is correct and that the 'keep logged in' option has a cookie with an expiration date set to a year from the log in date. Our user sessions are currently at the default 2 hours, so we are NOT using the 'user\_session\_ttl' hidden variable. We also have the User Session Type set to 'Cookies Only' in the 'Security and Session Preferences', so I assume any of the session stuff shouldn't matter. All of our cookies to set to the full domain 'www.macobserver.com' and I have not yet tried setting the cookie domain setting in EE as it doesn't seem like we should have to.

My questions are: 1) Are there know issues with cookie logins and the Discussion Forum Module?

2) Should I set the Cookie domain setting anyway even though it's seems like it should be required?

# Answer
There has been known issues with the ExpressionEngine "Remember Me" functionality since August of 2011. It currently is not fixed.

Here is the bug report:
https://support.ellislab.com/bugs/detail/16355
> 2 votes

# Answer
This could potentially be the issue:

http://ellislab.com/forums/viewthread/224902
> 0 votes

---
Tags: login, forum, sessions, cookies
---


# Question
Title: Safecracker Channel selection from radio selection
Is it possible to choose which channel a safecracker form should post to if you leave the safecracker's channel to ="" and then having a radio selection of the channel\_id's??

is this even possible?

# Answer
> 3 votes
You can do this with jQuery. The channels will all need to use the same field group.

When you add the **channel parameter** `channel=""` to your `exp:safecracker` tag, the tag renders that in the template as a hidden field with that channel's id number as the value. For example:

```
  <input type="hidden" name="channel_id" value="7" />

```

You can change this value as needed with JS. I created a **jsFiddle with working code** that will get you started.

---
Tags: safecracker, forms
---


# Question
Title: TextArea field set to Auto br / isn't adding break point tag
I have a field with formatting set to Auto br /. If I add a line of content, hit Enter, and add another line it appears it would work. But on the front end the break isn't there. If I edit that entry again it still appears as two lines in the field. But It appears on one line on the front end. Any ideas? possible bug? Thanks for any info!

# Answer
> 1 votes
Look at your template. It's possible a plugin tag is wrapped around your field tag and removing all html tags from the copy or specifically removing `<br />` tags

---
Tags: fields, formatting
---


title: E-mail users on status change

text:
# Question
Title: E-mail users on status change
I am looking for a way to e-mail entry authors on a status change of their entry when changed using safecracker. Any ideas?

I ran across MX Notify Control but that will not allow me to specify the entry author as the recipient to be notified.

Thanks

# Answer
My add-on Postmaster is already available and by far the most comprehensive email solution for ExpressionEngine. It has a series of robust API's developers can extend to do really custom stuff. But it also includes UI's and plethora of options to send emails at just about any time without writing any code. v1.3 is in beta and brings a whole new Notifications API in the mix for cron notifications, among other things. I have over a year of development in this add-on and it's only going to continue to improve.

Postmaster even supports a huge variety of services like Mandrill, MailChimp, CampaignMonitor, SendGrid, MailGun, and more. I am adding new services all the time as people need them.

https://objectivehtml.com/articles/read/postmaster-v1.2
> 3 votes

# Answer
You could use something like POSTMASTER to create a trigger that would fire with any kind of change to the status or category of any channel. Using it even allows nice html emails if it strikes your fancy to keep things branded.
> 2 votes

---
Tags: add-on, email, status
---


# Question
Title: Update from Assets 1.2.2 to 2.0, Files are not showing
I have updated Assets from version 1.2.2 to 2.0 following the steps on the P&T website.

After going to 'Add-Ons -\> Modules', selecting 'Run Module Updates' and confirming 'Update' on the Assets warning page, I received various PHP errors (which I stupidly did not copy). I was able to re-load that page and view the updated UI for Assets.

I no longer see any of the files and images that were present in Assets 1.2.2 in the File Manager. Images on the front end are also now missing. Viewing the database, it looks like everything ing the `exp_assets_files` table is gone.

I have also run 'Updated Indexes' for both of my directories handled via Assets and cleared my browser cache.

I am attempting the update locally via a MAMP install running PHP 5.3.14 and **do** have a db backup.

Any ideas?

# Answer
To follow up, Brad from P&T was able to send me a build that updated successfully. Thanks to him and P&T for doing this so quickly!
> 0 votes

# Answer
This is because your Upload Filedirs have relative paths in Server Path field - this was somehow forgotten in the whole process. This will be fixed in the upcoming release, but, in the meantime, you can just set it to an absolute path and that should work for you.
> 1 votes

# Answer
I am currently running EE 2.5.4 and I just upgraded to Assets 2. The upgrade went smoothly and is operational.

I can view my files in both thumbnails modes (small and big) but I have an error showing up when I try to view files in a list.

```
    load->view('listview/files'); ?>

```

**Screenshot:** https://i.stack.imgur.com/tAzHz.png
> 0 votes

---
Tags: assets
---


title: How to prune data in v2.x?

text:
# Question
Title: How to prune data in v2.x?
EE v1.x had nice tools to prune data. EE 2.x seems to have removed these features.

What I want to do is delete Pending user accounts (never activated their account). I can go through and manually delete them 50 at a time. Not fun. Even less fun when the site gets hit by a spambot.

Are there any add ons that do this? Proven methods that get right into the database?

# Answer
> 5 votes
A query:

```
DELETE FROM exp_members WHERE last_visit = 0

```

# Answer
> 5 votes
Member data is stored in (at least) 3 tables: `exp_members`, `exp_member_data` and `exp_member_homepage`.

You can use SQL to delete the members from these tables.

The safest way to delete them is to the the member model's `delete_member` method. This will make sure any relevant extensions are also run, clean up all the database tables (eg, if the member had posted an entry or comment) and update any stats.

```
$this->EE->load->model('member_model');
$this->EE->member_model->delete_member( $member_id_array );

```

I've built a very quick plugin to delete pending members here: https://bitbucket.org/ajweaver/ajw\_delete\_members

(I have tested it, but please **take a database backup** before trying it!)

# Answer
> 2 votes
It's a little misleading but, there is a 'Delete Selected' option in the drop-down menu on the Activate Pending page.

# Answer
> 1 votes
BrandNewBox has a tool to purge data, http://brandnewbox.co.uk/products/details/purgedata I've never used it to prune members, but have used it to remove records from entries. You could give that a try.

---
Tags: database, members, delete
---


# Question
Title: May custom fields be used for CartThrob email notification To and From fields?
I've tried this a couple of different ways with no success. I can hardcode the "to" line for the customer email notification and it works fine. But if i try to use a variable - like the customer's user-entered email address - no notification is received. In CartTrhib's order settings, I have the "Customer Email" field mapped to my custom field in my orders channel. It's being captured and shows correctly within the email notification itself. But I don't seem to be able to use it in the "to" field for the email notification's settings. Are custom fields - even a mapped one like customer email - not available to use?

# Answer
I seem to have discovered the answer with my trial and error. What's not clear in the docs is that the variable {customer\_email} is in fact a global variable that gets its content from the mapping of the Customer Email field, no matter what the custom field is called in your orders channel.
> 1 votes

# Answer
Just wanted to provide some additional information on another way to solve this problem (for those who aren't familiar).

Postmaster v1.2 provides CartThrob integration support out of the box, and the next version (1.3) will bring things like Abandoned Cart Notifications for which CartThrob now charges $500.

Postmaster is definitely a premium solution and at face value can seem like more than one might need. But the template tags and options for CT are much more complete than what they even provide. I designed Postmaster to make scenarios just like this a breeze to fix. It takes just a few minutes to advanced templating with CT setup with any email service you desire.

https://objectivehtml.com/articles/read/postmaster-v1.2
> 0 votes

---
Tags: cartthrob, email, notification
---


title: Assets 1.2.2 to 2.0.1 upgrade fails

text:
# Question
Title: Assets 1.2.2 to 2.0.1 upgrade fails
Here's the output on the first try:

```
A PHP Error was encountered
Severity: Notice
Message: Undefined index: 4:Adult Discipleship
Filename: assets/upd.assets.php
Line Number: 712

A PHP Error was encountered
Severity: Notice
Message: Undefined index: 4:Adult Discipleship
Filename: assets/upd.assets.php

Line Number: 712
A PHP Error was encountered
Severity: Notice
Message: Undefined index: 1:rotating
Filename: assets/upd.assets.php

```

...ad infinitum.

When I refresh the page I get:

```
A Database Error Occurred
Error Number: 1146
Table 'ee_local.exp_assets' doesn't exist
ALTER TABLE exp_assets MODIFY COLUMN file_path VARCHAR(255) NOT NULL
Filename: /Users/chris/Sites/third_party/assets/upd.assets.php
Line Number: 390

```

# Answer
The undefined index errors should be fixed in an upcoming 2.0.2 release. I think that'll remove the error that follows what you're seeing.

-Lisa
> 3 votes

---
Tags: assets
---


# Question
Title: EE1 to EE2 update - cannot delete a nGen file field
Upgraded this EE1 site to EE2 (not without issues but managed to get most of them fixed followed this Upgrading an EE1 site to EE2 with nGen File field as a guide but forgot 1 field). I'm stuck with 1 issue regarding 1 ngen file field that I forgot to convert to a text field.

This ngen file field sits inside a matrix field in just 1 entry in 1 channel.

I'm simply trying to delete this channel and its channel field group and recreate it without the ngen file field but I keep getting an error when I try to **access** the field:

```
    An Error Was Encountered
Unable to load requested field type file: ft.ngen_file_field.php.
Confirm the fieldtype file is located in the expressionengine/third_party/ directory

```

When I try to **delete** the field the error is:

```
A Database Error Occurred Error Number: 1091

Can't DROP 'col_id_15'; check that column/key exists

ALTER TABLE exp_matrix_data DROP col_id_15

Filename: third_party/matrix/ft.matrix.php

Line Number: 1544

```

Any suggestions on how to tackle this?

# Answer
> 1 votes
That SQL code

```
UPDATE exp_channel_data
SET field_id_XX = CONCAT('{filedir_YY}', field_id_XX)
WHERE field_id_XX != ''
AND field_id_XX NOT LIKE '{filedir_%'

```

should work but there may be instances also where you need to manually go into the exp\_ff\_fieldtypes table and change the nGen instance to 'file' and the same thing for exp\_channel\_fields

# Answer
> 2 votes
I had exactly the same issue you had except I hadn't converted any of my fields first, I just totally spaced them. It is a little hard to be sure what you have and haven't tried, especially browsing from my phone, but I believe the SQL query here did the trick for me. Pasting it here for your convenience:

```
UPDATE exp_channel_data
SET field_id_XX = CONCAT('{filedir_YY}', field_id_XX)
WHERE field_id_XX != ''
AND field_id_XX NOT LIKE '{filedir_%'

```

**Make sure you backup your database before you do anything like this!**

---
Tags: matrix, update
---


# Question
Title: Expresso Store: how do you set a payment method to be selected by default?
I am using expresso store. I have 2 payment methods, offline payment and paypal. Currently it shows offline payment by default. How do I get paypal to be the default payment method?

```
<select id="payment_method" name="payment_method">
    {payment_method_options}
</select>

```

# Answer
> 6 votes
Elaborating on what was mentioned in the comments of your lincolnpixel's answer, and to provide an "official" response to why it works this way:

The correct way to specify a default is to hard code it in your template. There are a couple ways to do this. You can either specify it in your checkout tag:

```
{exp:store:checkout payment_method="paypal_express"}

```

Under the hood, this simply adds a hidden field to your template, so it's exactly the same as doing this:

```
<input type="hidden" name="payment_method" value="paypal_express" />

```

You can also template the input field however you like, such as a radio or select menu:

```
<select name="payment_method">
    <option value="paypal_express" selected>Paypal</option>
    <option value="manual">Manual</option>
</select>

```

The `{payment_method_options}` variable is really only a helper, and is by no means required.

The reason we implemented it this way is simple: when we designed Store, we took a step back and thought about how ecommerce should work *in an ExpressionEngine context*. Most ecommerce systems let you set up things like default payment methods (and drag and drop reordering of payment methods) because you are using off-the-shelf templates, which cater to users who don't like to get their hands dirty with HTML.

However, since with EE you are already coding the HTML from scratch, it seemed like a waste of time having to tell yourself what the default payment method is in the back end, then provide a bunch of template tags which let you display the default payment method you just configured. To ExpressionEngine developers it feels much more natural just to specify how things should work in the template (just as you do with a contact form, where you specify the destination email address in the template, and most other plugins have examples like this too).

Most sites only have a single payment method, so hard coding it in the template (alongside the fields required for that payment method, when you take credit cards directly on your site) makes the most sense for that scenario. When multiple payment methods are available, it's often nice to use radio buttons and display a logo next to each one, which would require extra template code anyway, so `{payment_method_options}` isn't very useful there.

**TL;DR:** In most cases you will should hard code your `payment_method` select/radio/hidden field directly in your template. The `{payment_method_options}` variable is only a helper, and is certainly not intended to be the only way to display payment methods to your customers.

# Answer
> 1 votes
You can manually code it since the payment methods are limited to 2

```
<select name="payment_method">
<option value="paypal_express">Paypal</option>
<option value="manual">Manual</option>
</select>

```

You can do that by simply making sure that in Store - Payment Methods settings, Paypal is the first in order.

---
Tags: expresso-store
---


# Question
Title: 404 error on all templates but homepage after removing index.php
I am trying to remove the index.php from my URL, and have gone through the necessary steps, and used the code below in my .htaccess file. When I navigate to the homepage, it works, but clicking on any links, or typing their url in manually results in a 404. Just for poops and giggles, I added the index.php into the url of one of the sub-pages, and it started working fine. I've also tried adding the / before index.php in the code below to no avail, and I've tried with and without the ? after index.php. Any help you can provide would be amazing. Also, my site is in a subdirectory, ie, example.com/site-directory/index.php.

```
<IfModule mod_rewrite.c>
RewriteEngine On

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

```

# Answer
> 6 votes
Because EE (and CI) run all page requests from a single `index.php` they must pull in the dynamic data from the URL. In general it does this via the server environment variable `PATH_INFO`. The problem, though, is that not all servers have this environment variable set. That's why EE and CI allow you to change how the URI is read.

In some cases the environment doesn't have `PATH_INFO` as an option. In those cases the system tries to "auto" select the right value but it doesn't always work.

Try changing the value of `$config['uri_protocol']` in your `system/expressionengine/config/config.php` file. The possible values are listed in the file. Loop through those and save each time, refreshing the website when you're done. See if any of those different options fix the problem.

```
/*
|--------------------------------------------------------------------------
| URI PROTOCOL
|--------------------------------------------------------------------------
|
| This item determines which server global should be used to retrieve the
| URI string.  The default setting of "AUTO" works for most servers.
| If your links do not seem to work, try one of the other delicious flavors:
|
| 'AUTO'            Default - auto detects
| 'PATH_INFO'       Uses the PATH_INFO
| 'QUERY_STRING'    Uses the QUERY_STRING
| 'REQUEST_URI'     Uses the REQUEST_URI
| 'ORIG_PATH_INFO'  Uses the ORIG_PATH_INFO
|
*/
$config['uri_protocol'] = 'AUTO';

```

# Answer
> 0 votes
try adding the path like so:

```
RewriteRule ^(.*)$ /site_directory/index.php?/$1 [L]

```

EDIT:

Sometimes Apache can be set up different from server to server.

i. e. on DreamHost this would work

```
RewriteRule ^(.*)$ /site_directory/index.php?/$1 [L]

```

Where as on my Ubuntu VM or EngineHosting this works

```
RewriteRule ^(.*)$ /ci/index.php/$1 [L]

```

Try removing the "?" after index.php

# Answer
> 0 votes
If you find yourself in a situation where you cannot get mod\_rewrite turned on, I have seen this used in .htaccess files (credits to Elliot Haughin):

```
<IfModule !mod_rewrite.c>
    ErrorDocument 404 /index.php
</IfModule>

```

---
Tags: htaccess, 404
---


title: Using Safecracker with Playa

text:
# Question
Title: Using Safecracker with Playa
I'm using Safecracker to edit entries for the Channel Books. Suppose I have another Channel Publications.

I am using a Playa field to create relationships.

My understanding is that you can only use Playa to create relationships between existing entries. Is there a way to create a Publication entry and at the same create a relationship to the Book entry we are editing / creating?

# Answer
> 1 votes
Playa can only be used to create relationships between entries that actually exist in the EE database.

---
Tags: channel-entries, safecracker, playa
---


# Question
Title: Low Search - Question about search mode behaviour
I have a low search form

```
{exp:low_search:form collection="test" secure="no" search_mode="any" result_page="results/page"}
    <input type="text" name="keyword" />
    <select name="search:my_field" id="my_field">
        <option></option>
        <option value="foo">foo</option>
        <option value="foo bar">foo bar</option>
    </select>
    <button type="submit">Search</button>
{/exp:low_search:form}

```

I have two entries in the test channel. One of them has the my\_field value "foo" and the other one has "foo bar".

When I choose "foo", I get both entries. When I choose "foo bar", I get one entry(the one whose my\_field value is "foo bar").

It seems to me that this is caused by the param search\_mode="any".

Is there any way to make my\_field use exact text search while still retaining full text search for the rest of the form?

# Answer
You're getting keyword searches and the `search:my_field` parameter mixed up. The `search_mode` parameter **only** applies to **keywords**. The keywords are used to search the index using full text (if applicable).

The `search:my_field` input fields you're using is identical to setting the channel:entries parameter and will filter results as described in the EE docs. This is native filtering and therefore *doesn't* use full text. You *can* use the exact matching syntax in your `<select>` by prefixing the values with a `=`.

```
<select name="search:my_field" id="my_field">
    <option></option>
    <option value="=foo">foo</option>
    <option value="=foo bar">foo bar</option>
</select>

```
> 1 votes

---
Tags: low-search
---


# Question
Title: Can we count an if result and change the resulting text?
I'd like to be able to use an if statement to determine what to show based on the amount of results from the if statement in a reverse related entry.

For example:

If an actor has two stage names, list the two stage names using the EE loop. But if the stage name fields in the entries match the actors name , show the 'No other stage names' text and not list the actors name again as I'm using it elsewhere on the page. I am trying the code below, but not working...

```
    {reverse_related_entries channel="play"}
                            {if stage_name != actor_name OR if stage_name !="" }
                            {stage_name}
                            {if count <1}
                            No other stage names
                            {/if}
                            {/if}
                        {/reverse_related_entries}

```

Any ideas??

Thx!

# Answer
> 2 votes
Have you tried using the {if no\_reverse\_related\_entries} conditional mentioned in the user guide? You also seem to have a typo in your conditionals.

Can you try this and see if it works

```
{reverse_related_entries channel="play"}
    {if stage_name != actor_name OR stage_name != ""}
        {stage_name}
    {/if}

    {if no_reverse_related_entries}
        No other stage names
    {/if}
{/reverse_related_entries}

```

---
Tags: advanced-conditionals, reverse-related-entries
---


# Question
Title: Assets used in Matrix as Low Variable doesn't get updated
Can someone else who updated to latest Assets 201 try this on your install? I have a Matrix as Low Variable and inside I have a column with Assets, that Assets doesn't get updated on submiting. Assets alone in LowVariable works fine.

EE 253, latest Matrix/LowVars/Assets

Thank you

# Answer
there was a bug in how Assets was fetching data in this specific instance. Next release will fix this. (Credit goes to Low, by the way)
> 0 votes

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


# Question
Title: Importing Cartthrob Orders Data with DataGrab
I'm using Export It to export CartThrob orders channel data, and import in to another site using DataGrab.

When importing the orders channel with DataGrab one of Custom Fields is "Order Items" (which is a CartThrob Order Items field type). However, the corresponding custom fields options in the "Value" column are individually listed like this:

* order\_items/product\_title - eg, Waiting Here For You
* order\_items/product\_quantity - eg, 1
* order\_items/product\_price - eg, 0.00
* order\_items/product\_price\_plus\_tax - eg, 0
* order\_items/product\_weight - eg, 0
* order\_items/product\_shipping - eg, 0
* order\_items/product\_no\_tax - eg, 1
* order\_items/product\_no\_shipping - eg, 1
* order\_items/product\_extra - eg,

I need to assign all these values to the single Order Items field.

Any ideas?

# Answer
> 2 votes
DataGrab does not currently support importing into the CartThrob Order Items field type.

Third party field type support often needs to be added individually to DataGrab (as you've noticed in this case you need to add several values into a single field, so it needs its own interface to configure the import).

I try to support the most common field types and those where there is enough demand. It should not be too hard to add simple support for this, though. Can you contact me on support@brandnewbox.co.uk and I'll see what I can do?

# Answer
> 0 votes
Are you moving data from CartThrob 1 to CartThrob 2 installation? If so, I'd suggest you using CartThrob Updater (should be available for download in your cartthrob.com account, if it's not - contact the developers)

---
Tags: cartthrob, import, export, datagrab
---


title: image manipulation with assets 2

text:
# Question
Title: image manipulation with assets 2
is it true that assets 2 does not support image manipulations anymore? I just had a hard time debugging a site after updating to assets 2. I'm on EE 2.5.5 and assets 2.0.2

it was one of my favorite things in assets 1.x... and I cannot find it in the docs anymore!

at least the following is not working anymore:

```
{my_matrix_field}
    {matrix_cell_assets_fieldtype:url:image_manipulation}
{/my_matrix_field}

```

this still works:

```
{my_matrix_field}
    {matrix_cell_assets_fieldtype:url}
{/my_matrix_field}

```

I am on matrix 2.4.2 and I cannot update to the latest version because of some other bug.

cheers stefan

# Answer
> 4 votes
After debugging the matrix update from 2.4.2 to 2.5.2 it all began to work again. so image manipulations are still supported with assets 2.0.2, it's just not in the docs yet.

btw: this thread helped a lot: https://getsatisfaction.com/pixelandtonic/topics/matrix\_2\_5\_upgrade\_error

---
Tags: assets
---


# Question
Title: Setting up a comments section in expression engine
I am working on my blog/tutorial site and I have it set up so the main page displays my content and the user can click on an individual entry and go to a page that displays just that entry through my "video\_tutorial" template. I have the comment module installed and have been adding in some comment tags and such, however nothing is showing up. So I am not sure if I am using the wrong tags or what, so I thought I would start over and get some feedback first.

I am not sure if this is something I just need to enable somewhere in expression engine or if I need to use another language. I just need the user to be able to enter a name and a comment. I have seen some examples of adding facebook logins, I don't need to go that direction, if Expression Engine has a commenting system built in that would work for me assuming I can still style it.

http://ellislab.com/expressionengine/user-guide/modules/comment/index.html#id11 I have used this as a basis and I used the code it has in the "comment submission form" area thinking that would assist me but to no success. I swapped out the channel with what I needed too. Any help is greatly appreciated. Thank you!

Here is my code for my "video\_tutorial" template which is set up to show a single entry and I want the comment section to go underneath there for users to discuss the content of the video or learn among themselves as well.

Revised Code in my video\_tutorial/comment template group/template

```
{exp:comment:form channel="video_tutorial" url_title="video_tutorial/comment" preview="channel/preview"}

    {if logged_out}
            <label for="name">Name:</label> <input type="text" name="name" value="{name}" size="50" /><br />
            <label for="email">Email:</label> <input type="text" name="email" value="{email}" size="50" /><br />
            <label for="location">Location:</label> <input type="text" name="location" value="{location}" size="50" /><br />
            <label for="url">URL:</label> <input type="text" name="url" value="{url}" size="50" /><br />
    {/if}

    <label for="comment">Comment:</label><br />
    <textarea name="comment" cols="70" rows="10">{comment}</textarea>
    <label><input type="checkbox" name="save_info" value="yes" {save_info} /> Remember my personal information</label><br />
    <label><input type="checkbox" name="notify_me" value="yes" {notify_me} /> Notify me of follow-up comments?</label><br />

    {if captcha}
            <label for="captcha">Please enter the word you see in the image below:</label><br />
            <p>{captcha}<br />
            <input type="text" name="captcha" value="{captcha_word}" maxlength="20" /></p>
    {/if}

    <input type="submit" name="submit" value="Submit" />
    <input type="submit" name="preview" value="Preview" />

{/exp:comment:form}

```

Here is my code for my video\_tutorial template group.

```
    <!DOCTYPE html>

<html>
<head>
<title>Reanimated Fallout | Animation & Motion Graphics Tutorials, Training & More</title>

<!-- stylesheet -->
<link rel="stylesheet" type="text/css" media="all" href="{stylesheet=fallout_stylesheet/fallout_css}" />
</head>

<header>
        <div id="buttonbar">
        <div class="wrapper">
        <div id="navigation">
            <div id="logo">
            <a href= "http://reanimatedfallout.com/index.php?/reanimatedfallout"><img src="images/reanimated_fallout_logo.png"></a>
            </div>
        </div>
        </div>
        </div>
<!-- navigation buttons -->

            <div class="wrapper">
            <ul id="buttons">

                <li>
                <a href= "http://reanimatedfallout.com/index.php?/after_effects"><img src="images/navigation/after_effects_btn.png"></a>
                </li>

                <li>
                <a href= "http://reanimatedfallout.com/index.php?/cinema_4d"><img src="images/navigation/cinema_4d_btn.png"></a>
                </li>

                <li>
                <a href= "http://reanimatedfallout.com/index.php?/photoshop"><img src="images/navigation/photoshop_btn.png"></a>
                </li>

                <li>
                <a href= "http://reanimatedfallout.com/index.php?/premiere"><img src="images/navigation/premiere_btn.png"></a>
                </li>

                <li>
                <a href= "http://reanimatedfallout.com/index.php?/reviews"><img src="images/navigation/reviews_btn.png"></a>
                </li>

                <li>
                <a href= "http://reanimatedfallout.com/index.php?/apple"><img src="images/navigation/apple_btn.png"></a>
                </li>

                <li>
                <a href= "http://reanimatedfallout.com/index.php?/about"><img src="images/navigation/about_btn.png"></a>
                </li>
            </div>
            </ul>

</header>

<body>

{exp:channel:entries channel="video_tutorials" limit="1" sort="entry_date" order="desc"}

{if count==1}
    <div class="wrapper">
    <div class="video_large">
        <h1><a href="{title_permalink="video_tutorial}">{video_tutorial_title}</a></h1>
        <div class="large_reposition">
        <iframe src="http://player.vimeo.com/video/{video_tutorial_link}?title=0&byline=0&portrait=0" width="900" height="506" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>
        <h3>{video_tutorial_summary}</h3>
        </div>
    </div>
    </div>
{/if}
{/exp:channel:entries}

<!-- comments -->

{exp:comment:entries url_title="video_tutorial/comment" sort="asc" limit="100"}
        {comment}
        <p>By {name} on {comment_date format="%Y %m %d"}</p>
{/exp:comment:entries}

<!-- search field -->

<div class="wrapper">
<div class="sidebar">
    <div class="search">
        {exp:search:simple_form form_class="searchbox" channel="video_tutorials"}
            <p>
                 <input type="text" name="keywords" placeholder="Search" id="keywords" value="" size="24" maxlength="100">
             </p>
        {/exp:search:simple_form}
    </div>

    <div class="contact">
        <p> <label for="keywords">Connect & Contact</label> </p>
        <ul id="contact_btns">

            <li>
            <a href= "https://www.facebook.com/pages/Reanimated-Fallout/242045199141877"><img src="images/social_icons/facebook.png"></a>
            </li>

            <li>
            <a href= "https://twitter.com/chrisreanimated"><img src="images/social_icons/twitter.png"></a>
            </li>

            <li>
            <a href= "https://vimeo.com/user10748580"><img src="images/social_icons/vimeo.png"></a>
            </li>

            <li>
            <a href= "http://www.linkedin.com/profile/view?id=46629295&trk=tab_pro"><img src="images/social_icons/linkedin.png"></a>
            </li>

            <li>
            <a href="mailto:chris@reanimatedfallout.com""><img src="images/social_icons/email.png"></a>
            </li>
    </div>

    <div class="donate">
        <p> <label for="keywords">Support</label> </p>

            <ul id="donate_btn">
            <li>
            <a href= "https://twitter.com/chrisreanimated"><img src="images/donate_btn.png"></a>
            </li>
    </div>

    <div class="cosmicrage">
            <a href= "http://cosmicragemotioncomic.wordpress.com"><img src="images/cosmic_rage_web_banner_240_2.png"></a>

    </div>

</div>
</div>

</body>

    <footer>
        <div class="wrapper">
            <div class="footer">
                <p class="footerinfo"> © All content designed and developed by Reanimated Fallout.  </p>
        </div>
        </div>
    </footer>

</html>

```

# Answer
> 4 votes
Your example code shows you doing two things:

1. Listing any existing comments on the entry (`{exp:comment:entries}`)
2. Displaying a list of Channel Entries (`{exp:channel:entries}`)

Nowhere are you displaying the comment form (even though you linked to the documentation on it).

However, the comment form is generally meant to be used on a "single entry" template, where the third segment of the URL is an `entry_id` or `url_title` of an entry. This is how the `comment:entries` and `comment:form` tags know which entry they are display from/submitting to. The code you posted indicates to me that you don't fully grasp how EE's URLs and templates work yet ... I'd suggest reading up on it in the docs.

If you want to display either of these tags on a page which does *not* contain `entry_id` or `url_title` information in the URL, you'll need to provide an `entry_id` to each tag via their `entry_id` tag parameter - generally by embedding those chunks of code and passing it via an embed variable.

**UPDATE:**

These two (simplified - no header or footer HTML) templates should get you started in understanding how it works.

First is your **video\_tutorial/index** template. This provides a listing of your tutorials, each with a link to its "permalink".

```
{exp:channel:entries channel="video_tutorials" limit="5" paginate="bottom"}
<div class="wrapper">
    <div class="video_large">
        <h1><a href="{title_permalink="video_tutorial/entry"}">{video_tutorial_title}</a></h1>
        <div class="large_reposition">
        <iframe src="http://player.vimeo.com/video/{video_tutorial_link}?title=0&byline=0&portrait=0" width="900" height="506" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>
        <h3>{video_tutorial_summary}</h3>
        </div>
    </div>
</div>
{paginate}
    <p>Page {current_page} of {total_pages} pages {pagination_links}</p>
{/paginate}
{/exp:channel:entries}

```

The next is your **video\_tutorial/entry** template. This is where you'll display all of your entry's data, plus any comments on the entry, and the comment form. Note that the fact that this template is called **entry** is irrelevant - you can call it anything you want, so long as you change that value in the `{title_permalink}` path in your **index** template.

```
{!-- Display your entry, as this is the "permalink" page for this entry --}

{exp:channel:entries channel="video_tutorials" limit="1" require_entry="yes"}
{if no_results}{redirect="404"}{/if}
<div class="wrapper">
        <div class="video_large">
            <h1>{video_tutorial_title}</h1>
            <div class="large_reposition">
            <iframe src="http://player.vimeo.com/video/{video_tutorial_link}?title=0&byline=0&portrait=0" width="900" height="506" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>
            <h3>{video_tutorial_summary}</h3>
            </div>
        </div>
    </div>
{/exp:channel:entries}

{!-- Display any existing comments. Note that the reason this works here is that the third segment of the URL this template will be displayed at is the `url_title` for this entry, hence the Comment module knows which comments to look for. --}

<h4>Comments</h4>

{exp:comment:entries channel="video_tutorials" sort="asc" limit="100"}
    {comment}
    <p>By {name} on {comment_date format="%Y %m %d"}</p>
{/exp:comment:entries}

{!-- Display the comment form - same story as above with the `url_title` in the URL. Note that for eah of these tags, you *can* pass either a `url_ttle` or `entry_id` as a parameter if you want to display them in a *non* single-entry template. --}

<h4>Add Your Comment</h4>

{exp:comment:form channel="video_tutorials" preview="video_tutorial/preview"}

    {if logged_out}
            <label for="name">Name:</label> <input type="text" name="name" value="{name}" size="50" /><br />
            <label for="email">Email:</label> <input type="text" name="email" value="{email}" size="50" /><br />
            <label for="location">Location:</label> <input type="text" name="location" value="{location}" size="50" /><br />
            <label for="url">URL:</label> <input type="text" name="url" value="{url}" size="50" /><br />
    {/if}
    <label for="comment">Comment:</label><br />
    <textarea name="comment" cols="70" rows="10">{comment}</textarea>
    <label><input type="checkbox" name="save_info" value="yes" {save_info} /> Remember my personal information</label><br />
    <label><input type="checkbox" name="notify_me" value="yes" {notify_me} /> Notify me of follow-up comments?</label><br />
    {if captcha}
            <label for="captcha">Please enter the word you see in the image below:</label><br />
            <p>{captcha}<br />
            <input type="text" name="captcha" value="{captcha_word}" maxlength="20" /></p>
    {/if}
    <input type="submit" name="submit" value="Submit" />
    <input type="submit" name="preview" value="Preview" />

{/exp:comment:form}

```

# Answer
> 2 votes
In the control panel check out Admin-\>channel preferences -\> channel -\> your channel, edit preferences, and them have a look at the "Comment Posting Preferences" section.

You will also want to make sure comments are turned on in the individual entries. The default for new entries is set earlier in the same control panel page.

---
Tags: ee2, forms, module, comment-form, comments
---


# Question
Title: Allowing non-Super Admin users to reset a user's password in the CP without knowing the old one
In EE2, you have to be a Super Admin to change a user's password without knowing their old password in the CP. This is very annoying when you setup up 'Client Admin' member groups as they expect to be able to do such a task for unlocked member groups.

In EE1, there was an add-on called NSM Member Password Security that allowed you to specify member groups that could reset the password without knowing the old one (something that should be part of the standard member permissions in EE, IMO).

But I can't see any such add-ons for EE2. Does anyone have a workaround for this (without giving them Super Admin access)? Or how do you deal with 'Client Admin' member groups that have permission to add/delete member accounts, but can't reset someone's password for them without knowing the old one? Use the forgot password form instead?

# Answer
> Use the forgot password form instead?

Exactly. Without building custom code to do this (which is quite doable), this is the way to go - and I suggest using FreeMember and its Forgot Password form on the front-end, so users can use it directly. That way your Client Admins don't have to be bothered.
> 6 votes

---
Tags: members, password
---


# Question
Title: Adding menu items to Main Menu for all users
If I add an item to the Main Menu in the control panel how can I make this layout visible to all users?

# Answer
> 4 votes
I am at the point where I will no longer design an EE site without Zoo Flexible Admin. I can make the control panel much more client friendly and self explanatory with Zoo Flexible Admin. And it’s great even just for me as an admin. I’m not sure how I got along without it before!

It lets you build a completely custom menu set in the Control Panel. And you have have different menu sets for different levels of users. It's really great.

# Answer
> 2 votes
This addon may help you. http://devot-ee.com/add-ons/cp-default-tabs

In the past I have done this by manually updating a column in the members database table.

---
Tags: control-panel
---


title: Assets 2, no files displayed

text:
# Question
Title: Assets 2, no files displayed
New to P&T Assets, just got it today, v2. Using a flat out blank template and the two examples from the site docs. Scanned two directories of images that work in the normal file manager. It appears the assets:files tag displays nothing. assets:folders Folders display. EE2.5.5.

```
{exp:assets:folders folder="top" recursive="yes"}
    <h3>{folder_name}</h3>
    <ul>
        {exp:assets:files folder="{folder_id}"}
            <li><a href="{url}" target="_blank">{if title != ""}{title}{if:else}{filename}{/if}</a></li>
        {/exp:assets:files}
    </ul>
{/exp:assets:folders}

```

Shows:

### Image

### Screenshots

Should it show the list of files?

# Answer
Have you indexed your upload directories according to the **Assets docs**?

> ***Assets won’t actually show any files until you’ve indexed your upload directories. You can do that from Add-Ons → Modules → Update Indexes.*** The initial indexing might take some time, depending on how many files you have. However future indexes should go much quicker, since Assets will only have to index what’s changed.
>
> You can also re-index an individual folder by clicking the “Refresh” button at the top-right of Assets’ file manager, or from its fieldtype’s file selection modal.
> 2 votes

# Answer
Changing `folder="{folder_id}"` to `folder_id="{folder_id}"` got things working correctly.
> 0 votes

---
Tags: add-on, assets
---


# Question
Title: CartThrob customer email notification not sending unless logged in to CP
This one is confusing me and I'm wondering if any CartThrob experts out there have experienced this and have a solution.

My custom email notification and admin email notifications, both triggered by the "successful transaction" event, are identical to one another, except that the "to" line for the admin email is a static email address, while the "to" line for the custom email uses the {customer\_email} global variable.

If I am logged into the CP and visit my order form in another tab to run a test transaction, the transaction is completed correctly and both the admin and custom emails are received (and admin email to the static email address and the customer email to the dynamic user-entered email address).

However, if I log out of the CP and visit the form, submitting a test transaction, only the admin email notification is received. Is there some reason that I'm missing that would cause this? A setting somewhere in CartThrob that I have missed? I have "User Must Be Logged In?" set to "no" and I do have a member ID for an "anonymous" user set for the "Logged Out Member ID" setting.

# Answer
> 1 votes
Are you sure you have the {customer\_email} field displaying, and there is data in it when it's processed? Turn on CT Debugging and just before you submit to get the email, check this field is complete.

---
Tags: cartthrob, email, notification
---


# Question
Title: Assets 2.0: Why do public templates stall while Assets is working in the admin panel?
I just updated a large EE 2.5.2 install to Assets 2.0 and updated indexes. Everything went smoothly, and I've noticed a strange new behavior: **thumbnail generation (any size) in the admin panel will temporarily block the website from loading Assets images.**

To reproduce:

1. Choose a large (100+ item) Assets folder to browse in the admin panel. Any view/thumbnail size will have the same effect.
2. While the thumbnails are loading, navigate to a page on the public website that uses Assets tags in its template.

The result: the page in #2 will stall until all thumbnails in #1 have finished loading. Immediately after finishing, the public page will load.

This is on a MediaTemple DV4 server with 2048MB RAM and plenty of resources, and several httpd instances. Could the mysql process be the bottleneck? What else might cause this to happen?

**Edit:** This appears to be limited to the same session. I originally tried this with Chrome 24 (Mac), running both #1 and #2 in different tabs. When I instead tried #2 in Firefox, there was no blocking and everything loaded as expected. Now I'm not sure if I've got a problem worth solving or a minor annoyance to live with.

# Answer
this is because on the first request to a folder, Assets will create thumbnails appropriate for your screen (retina or not).

For 100+ files, that's 100+ requests that aren't instant and browsers limit simultaneous requests to the same server, so it's browser hitting the limit because of the initial processing required.

After this, though, the images will be created and stored and you shouldn't experience it for the same folder again. Even more - if you use the same browser, these images will be cached and won't make any requests at all.

Hope this clears things up for you!
> 6 votes

# Answer
This answer is for posterity. My issue ended up being a combination of the browser request limit Andris mentioned and `Pragma: no-cache` headers that were being passed by ExpressionEngine 2.5.2. I confirmed that they were coming from ExpressionEngine in two environments, though commenting out all relevant `header()` references failed to solve the problem.

I fixed this for now by adding `Header unset Pragma` to my .htaccess directive. This clearly fixes my missed cache issue, and I'm fairly sure that it doesn't have negative consequences anywhere else.
> 2 votes

---
Tags: add-on, assets, performance
---


# Question
Title: Displaying categories in multiple columns
I'm using a safecracker form to edit a channel entry. I needed checkboxes to display which categories were assigned to the entry. I've achieved this using the code below

```
    {exp:safecracker channel="projects"  entry_id="{segment_3}"   return="/projects/detail/{segment_3}"}
                       {categories group_id="4"}

 <p> <label for="{category_name}">{category_name}</label>
  <input type="checkbox" name="category[]" id="{category_name}" value="{category_id}"{checked}></p>

       {/categories}
{/exp:safecracker}

```

Here comes my problem. I need them to display in multiple columns, not just one long list - originally I was using exp:channel tags with show="" to display some of the categories and then repeating it in another div with the rest of the categories.

```
<div>
{exp:channel:categories channel="projects" category_group="4" show="14|15|16|17|18"}
</div>

<div>
{exp:channel:categories channel="projects" category_group="4" show="19|20|21|22|23|24"}
</div>

```

However the page only remembers the checked categories if I use {categories} instead of {exp:categories}. The documentation says I can still use {categories show="14|15|etc"} but it doesn't work.

Anybody have any ideas of what I'm doing wrong? Thanks!

# Answer
> 4 votes
That's not a very efficient way of doing things as you're doubling your DB queries unnecessarily by calling `{exp:channel:categories}` twice. It also forces you to update your template markup whenever you add new categories in the future.

Generally speaking the simplest means of achieving a two column layout would be via CSS:

```
.my_categories p {
    float: left;
    width: 50%;
}

```

If you want to apply different styling to the left and right columns you can use EE's `{switch}` tag:

```
<div class="my_categories">
    {categories group_id="4"}
    <p class="{switch='odd|even'}">
        <label for="{category_name}">{category_name}</label>
        <input type="checkbox" name="category[]" id="{category_name}" value="{category_id}"{checked}>
    </p>
    {/categories}
</div>

```

# Answer
> 3 votes
I think Dom's got the better answer since it relies on built-in functionality, but I'd also like to recommend Column-bo, a great (and free!) plugin that makes light work of splitting entries into columns.

---
Tags: categories
---


# Question
Title: url rewrite / removing index.php on IIS 7
Does anyone have experience doing this on a windows server, running IIS7?

I've got access to the IIS manager, and the URL Rewrite module, but how to setup the rewrite rules, and how should the patterns look?

Ive tried this example, but the auto-generated examples of public url's are no good

http://www.iis.net/learn/extensions/url-rewrite-module/user-friendly-url-rule-template

When inputting:

www.domain.com/index.php/url-title

i only get this option for public url:

www.domain.com/index

No good :)

So i need to make a blank rule, but have no clue how to create the pattern.

# Answer
Try

```
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
 <system.webServer>
 <rewrite>
    <rules>
      <rule name="Rewriter" stopProcessing="true">
        <match url="^(.*)$" ignoreCase="false" />
        <conditions>
          <add input="{R:1}" pattern="^(index\\.php|images|css|js|favicon\\.ico)" ignoreCase="false" negate="true" />
          <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
          <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
        </conditions>
        <action type="Rewrite" url="./index.php/{R:1}" appendQueryString="true" />
      </rule>
    </rules>
  </rewrite>
 </system.webServer>
</configuration>

```

if you were using an older IIS version with the ISAPI rewrite module then you could do

```
 RewriteEngine on
    RewriteCond $1 !^(css|js|swf|images|system|tools|themes|index\.php) [NC]
    RewriteRule ^(.*)$ /index.php/$1 [L]

```

where the RewriteCond piped lines are equal to the folders that you don't want to be rewritten.

Certainly this worked on an older IIS version (I now try to avoid IIS where possible).
> 4 votes

---
Tags: url, htaccess, server
---


title: MSM & FIle Upload Config Hook

text:
# Question
Title: MSM & FIle Upload Config Hook
When running MSM add-on, how can I manage the file upload folders etc, via a config.php file?

Ideally I would want to use a hook to do it, but it doesn't seem to work.

Normally I would do this:

> ```
>   $config['upload_preferences'] = array(
>         1 => array(
>             'name'        => 'Images',
>             'server_path' => $uploads_path . "/images/",
>             'url'         => $uploads_url . "/images/"
>         ),
>         2 => array(
>             'name'        => 'Files',
>             'server_path' => $uploads_path . "/files/",
>             'url'         => $uploads_url . "/files/"
>         ),
>         3 => array(
>             'name'        => 'Icons',
>             'server_path' => $uploads_path . "/icons/",
>             'url'         => $uploads_url . "/icons/"
>         )
>     );
>
> ```

# Answer
Actually, every upload location you create is going to have a different ID, be it one site or in multiple sites using MSM. You can thus safely keep everything in config.php becuse every upload location you define (even if you share physical folders) is going to have a different ID anyway.

Basically:

* Step 1: create all your upload location in the CP for all sites
* Step 2: take the upload location id and configure all upload location in your central config.php file for all sites. Since they all have specific ids, no conflict problem whatsoever
> 6 votes

# Answer
If you want to override MSM settings then you should move this code into the index.php file of the sites respectively.

```
$assign_to_config['upload_preferences'] = array(
        1 => array(
            'name'        => 'Images',
            'server_path' => $uploads_path . "/images/",
            'url'         => $uploads_url . "/images/"
        ),
        2 => array(
            'name'        => 'Files',
            'server_path' => $uploads_path . "/files/",
            'url'         => $uploads_url . "/files/"
        ),
        3 => array(
            'name'        => 'Icons',
            'server_path' => $uploads_path . "/icons/",
            'url'         => $uploads_url . "/icons/"
        )
    );

```

Be mindful though, I've experienced a known bug where some values are set in the config of MSM sites but aren't reflected in the CP.
> 2 votes

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


title: Double (twice) login to admin

text:
# Question
Title: Double (twice) login to admin
Does anyone know why when I login to any of my EE sites at admin.php I have to login twice? The first time it just reloads the page and I have to login a second time to access the backend?

# Answer
I've had that happen, generally when a session string is automatically added to the admin url, so when it looks like:

```
http://mydomain.org/admin.php?S=6a260ba9fe18b9b11fa552ce03bd203ac665ae

```

Generally, if it's without the session data, the login happens fine, the first time; but with it seems to break then re-trigger the session info by forcing the second login. I don't know why it happens, but that's my situation.

I counteracted by making sure my bookmark and history brings up the clean reference first:

```
http://mydomain.org/admin.php

```

Then its the first time, all the time, for me. It could work for you. First step, is go to your browser history and delete all the history files that have session ids attached to them. Just leave a bookmark and a history item of the clean domain control panel access.

```
http://mydomain.org/admin.php

```

This prioritizes that url when you start typing. Hopefully, that will work for you as well.
> 6 votes

---
Tags: admin
---


# Question
Title: Assets2: exp_assets_folders table gives error on migration
just upgraded to Assets 2 and must say the visuals are stunning.

When migrating from my local machine to my online development enviroment i got the following SQL error when uploading the database.

```
SQL-query: INSERT INTO  `exp_assets_folders` (  `folder_id` ,  `source_type` ,  >`folder_name` ,  `full_path` ,  `parent_id` ,  `source_id` ,  `filedir_id` ) VALUES ( "2",  "ee",  "Bestanden",  "",  "",  "",  "2" );
MySQL retourneerde:
#1062 - Duplicate entry 'ee-0-' for key 'unq_source_type__source_id__full_path'

```

this error is caused by the following rules in the import file

```
INSERT INTO `exp_assets_folders` (`folder_id`, `source_type`, `folder_name`, `full_path`, `parent_id`, `source_id`, `filedir_id`) VALUES ("1", "ee", "Afbeeldingen", "", "", "", "1") ;
INSERT INTO `exp_assets_folders` (`folder_id`, `source_type`, `folder_name`, `full_path`, `parent_id`, `source_id`, `filedir_id`) VALUES ("2", "ee", "Bestanden", "", "", "", "2") ;

```

I think the problems caused by the fact that i'm using the config-bootstrap method to control all path and url information for my installations.

Do you have a way to solve this issue? And is it still possible to control the path information via de config-bootstrap?

# Answer
> 4 votes
Pixel and Tonic updated Assets to account for $config overrides. Update to 2.0.2 and you should be set!

http://pixelandtonic.com/assets/releasenotes

# Answer
> 1 votes
This error seems to relate to the use of the master-config methode of setting up ExpressionEngine. I've reverted back to Assets 1 for the time being while this error is being solved bij Pixel and Tonic.

---
Tags: database, assets, migration
---


# Question
Title: Linking to an entry's position in a paginated list
For one of my channels there is no template for displaying a single entry. Entries are only ever displayed in a list on a landing page, which is continued on the paginated sub-pages, like:

```
http://website.com/landing/P6

```

This channel is searchable. When an entry appears in the search results, I want to create a link to its position in the paginated list.

So if the entry is found on the landing page (the first page of the list), the link will look something like:

`<a href="{path='landing'}">{title}</a>`

And if the entry is further back in the pagination:

```
<a href="{path='landing/P12'}">{title}</a>

```

From within the search results, what is the least expensive way to determine where the entry falls within the pagination? All of my ideas would likely require a lot of unwanted additional queries.

# Answer
> 3 votes
This seems exceedingly difficult to do because, it requires not only knowing how many entries from the top the channel entry in question is, it also needs to know how many entries per page the template is set to display. If you are willing to hard code in the number of entries per page (which is not a great idea because you then break your search results the moment you change the entries template and forget to update the search results page. I guess you could do this with a plugin which you may have to use in an embedded template, and it seems to me like it would be pretty inefficient. The basic idea would be that for each search result returned you take that entry id and go do the most stripped down possible version of the query that will be done in the actual entry listing template. you are just trying to get the `{count}` variable back, and turn that into `$page = $count$ % $the_number_of_entries_per_page`. You would then need to transform that into a link to `landing/P$page*$the_number_of_entries_per_page`

The really inefficient thing about this is that you are performing that query for every search result, a better solution would be to create a single entry page that you can use just for the case when you've done a search and are returning a specific entry, even if you don't use that page in your normal sites' navigation.

# Answer
> 1 votes
I'd make a new template for this. You'll need it if you have an RSS feed as well. It can be a single-entry page that's only used for search results/RSS or a monthly archive page where you can construct a link like

```
{path='section/archive'}/{entry_date format="%Y/%m"}/#section-{entry_id}

```

If there is ever a time when someone wants to link directly to a post from outside of the CMS, the paginated solution is going to fail.

---
Tags: search, pagination
---


# Question
Title: Sending emails to member group when an entry is updated
Does anyone know of a (free) add-on that will send a custom email message to a member/member group when an entry is updated?

Or does anyone know of a way to do this with the standard EE setup?

UPDATE. As suggested, MX Notify Control does what I'm asking. However it appears to let you notify a group when the status of any entry in a channel changes.

After further thought I have realised I need to be able to notify particular members when a particular entry is updated (i.e. any field has changed rather than just the status - although I could work it with just the status if necessary)

I'm thinking RSS could be an option here however my user base is not going to be familiar with RSS so email would be the ideal solution.

# Answer
> 6 votes
I'm pretty sure you can do it with MX Notify Control and it's free:

http://devot-ee.com/add-ons/mx-notify-control

I've never tried it before so, consider it an option vs a recommendation if that makes sense :)

And just for the sake of being thorough there is also Postmaster though, it of course isn't free:

http://devot-ee.com/add-ons/postmaster

---
Tags: add-on, email, entry, notification
---


title: Assets 2.0.2 Fatal error

text:
# Question
Title: Assets 2.0.2 Fatal error
I just updated Assets 2.0.2 from 1.x and on one of the pages of our site, we're receiving the following fatal error:

Fatal error: Uncaught exception 'Exception' with message 'unknown\_source' in ...expressionengine/third\_party/assets/libraries/assets\_lib.php:1188

I'm not sure, but I think it has something to do with upload preferences. I should note that in the code at line 1188, the $settings variable being inspected is not empty, though when tested the Exception is still being thrown.

Has anyone experienced this, and if so, is there a fix? Or is there some configuration setting that I'm missing?

Thanks for any help you can provide!

# Answer
> 2 votes
This error will be fixed in the upcoming Assets 2.0.3 release.

---
Tags: add-on, assets
---


# Question
Title: {exp:assets:files} limit parameter not limiting the returned files
I'm trying to randomise a background image from one of my Assets folders but the limit parameter doesn't seem to be working correctly on the `{exp:assets:files}` tag.

Code:

```
{exp:assets:files folder_id="16" limit="1" sort="random"}{url}{/exp:assets:files}

```

The above code gets the correct folder but all 3 images are begin output instead of just one. The docs suggest that you can add the limit parameter to this tag and further searching on the get satisfaction showed that the `sort="random"` parameter was also supported.

I have tried the same code but changing the limit to something higher than 1 and still no success. Also tried the tag pair with out the `sort="random"` parameter.

I'm using Assets 2.0.1 and EECMS 2.5.3

What can I do to get these randomised?

Thanks Dan.

# Answer
Currently sort="random" is limited to the fieldtype tags. We’ll add support for sort="random" to {exp:assets:files} and {exp:assets:folders} in Assets 2.1.
> 2 votes

---
Tags: assets
---


title: Low Search: how to sort?

text:
# Question
Title: Low Search: how to sort?
Is there a way to sort Low Search results? Say I wanted to sort by {title} in ascending order. Or sort by and {age} field in descending order. Etc.

# Answer
Anna is right. You can just use the `orderby=""` and `sort=""` parameters in the Results tag.

To let the end user choose, you can use all `{exp:channel:entries}` parameters as input fields in the Form tag, so that includes the `orderby` and `sort` parameters.

For example:

```
Sort by <select name="orderby">
    <option value="">Relevance</option>
    <option value="title">Title</option>
    <option value="date">Entry Date</option>
    <option value="custom_field">Custom Field</option>
    ...
</select>

in <select name="sort">
   <option value="asc">Ascending</option>
   <option value="desc">Descending</option>
</select> order.

```
> 2 votes

# Answer
With Low Search you can sort by relevance which is the default setting or you can sort by using any parameter the native **channel:entries tag** can use.

You'll probably want to use the **orderby=""** parameter:

```
orderby="title"
orderby="name_of_field"

```
> 1 votes

---
Tags: low-search
---


# Question
Title: Matrix: JS error in the control panel (rowInfo[index] is undefined)
Weird error in the control panel. I'm using the Matrix field in one channel and as a field in Low Variables.

When i start filling out a new entry things work like a charm. But when i try to open en existing entry i get the following JS error as soon as i open the tab containing the matrix field.

> Tijdstempel: 18-01-13 16:27:00
> Fout: TypeError: rowInfo\[index\] is undefined
> Bronbestand: http://www.urlhere.nl/themes/third\_party/matrix/scripts/matrix.js?2.5.2
> Regel: 90

This error 'freezes' the entire matrix field. Basic textfield are still editable but the assets field are frozen. Also removing existing lines becomes impossible but adding new ones is possible. New lines are numbered from 1 as if the others lines don't exists.

Any ideas?

Using ExpressionEngine 2.5.5 and Matrix 2.5.2

With kind regard, Bas van Ginkel

# Answer
> 2 votes
Sometimes the sollution to a problem is a simple one. After uploading the matrix files in the themes directory the problem disappeared.

> TAKE HOME MESSAGE
> When in doubt reupload the themes file to try and solve the problem.

;)

---
Tags: control-panel, matrix, javascript
---


title: 'Search:' parameter exclusion problems

text:
# Question
Title: 'Search:' parameter exclusion problems
I am trying to exclude entries that either have no value or a value of "0" in a field, but am running into problems with the 'search:' parameter.

```
search:product_inventory="not IS_EMPTY"

```

works and excludes all entries that have no value in that field.

As I also want to exclude fields with the value of zero, I changed it to:

```
search:product_inventory="not IS_EMPTY|0"

```

This threw this error:

```
Error Number: 1054

Unknown column 'wd.field_id_8NOT' in 'where clause'

SELECT DISTINCT(t.entry_id) FROM exp_channel_titles AS t LEFT JOIN exp_channels ON t.channel_id = exp_channels.channel_id LEFT JOIN exp_channel_data AS wd ON wd.entry_id = t.entry_id LEFT JOIN exp_members AS m ON m.member_id = t.author_id INNER JOIN exp_category_posts ON t.entry_id = exp_category_posts.entry_id INNER JOIN exp_categories ON exp_category_posts.cat_id = exp_categories.cat_id WHERE t.entry_id !='' AND t.site_id IN ('1') AND t.entry_date < 1358591770 AND (t.expiration_date = 0 OR t.expiration_date > 1358591770) AND t.channel_id = '2' AND exp_categories.cat_id = '68' AND t.status = 'open' AND ( (wd.site_id=1 AND wd.field_id_8!="") AND (wd.site_id=1 AND wd.field_id_8NOT LIKE "%0%") )

Filename: modules/channel/mod.channel.php

Line Number: 2660

```

Using:

```
search:product_inventory="not 0|IS_EMPTY"

```

throws the same error.

I then tried:

```
search:product_inventory="= not 0"

```

which successfully excluded the entries with a '0' in that field.

I changed this to:

```
search:product_inventory="= not 0|IS_EMPTY"

```

but this time the 'IS\_EMPTY' is being completely ignored and all entries that have no value in that field are still returned.

How can I successfully exclude entries that have no value or a value of '0' in that field?

I am running EE v.2.5.3.

# Answer
> 3 votes
This works:

```
search:product_inventory="=not 0|IS_EMPTY"

```

The key is the equals sign immediately preceding not, and IS\_EMPTY at the end (the order seems important for some reason)

---
Tags: parameters
---


# Question
Title: Removing root-level segment with Structure and Freebie
I am using Structure and Freebie on a recent project. I have a root-level page in Structure called “Supernav” with five sub-pages (Students, Parents, Faculty, Alumni, Galleries). When visiting any one of these subpages I would like to remove the root-level segment — in this case “/supernav/” — from the URL so it just looks like this:

```
http://website.com/students/
http://website.com/parents/
http://website.com/faculty/
http://website.com/alumni/
http://website.com/galleries/

```

For the life of me I can’t figure out how to do this with Freebie. Any suggestions? Appreciate any help I can get.

# Answer
Try doing this in your .htaccess file. This **StackOverflow answer** shows how. Something like this:

```
RewriteEngine on
RewriteBase /

RewriteRule ^/(students|parents|faculty|alumni|galleries)/(.+)$ /$1 [L,QSA]

```

---

The **Router** addon may also work for you.

> Router is a regular expression based routing system for ExpressionEngine requests. It allows you to define any custom URL route you like, without needing to worry about template naming and without using large conditional checks.
>
> Router will automatically include the correct template for you, based on which of your regex patterns match the current URL. This can help avoid massive conditional {if} trees.
> 4 votes

---
Tags: url, structure, segments, freebie
---


# Question
Title: Entries still displaying after their expiration date has passed, possible cache issues?
I'm developing a slideshow feature for a client where they enter entries into a particular weblog (the site is running on EE 1.7x) and set entry and expiration dates on each entry to determine when they start and stop displaying.

In theory, the client could add two entries -- "Entry A" and "Entry B" -- and give them different expiration dates, so that "Entry A" will stop displaying and allow "Entry B" to display. (Only one entry will be displayed at any given time.)

I have a jQuery script that will count down to the expiration date for "Entry A". When the countdown reaches 0, it reloads the page, and then "Entry B" will be displayed. (There's probably a more elegant way to handle the refresh, but I wanted to keep things simple initially.)

However, that isn't what happens. Even after "Entry A" has expired, which should stop it from displaying, and the page reloads, "Entry A" still displays instead of "Entry B". "Entry B" doesn't display until I go into the CP and clear all of the caches.

Here's the code that I'm using to display the entries:

```
{exp:weblog:entries weblog="foo" status="spotlight" dynamic="off" limit="1" disable="categories|member_data|pagination|trackbacks" orderby="date" sort="desc" show_expired="no"}

```

So here are my questions:

1) Am I handling/treating the expired entries correctly? Or is my understanding flawed?

2) If this is a caching issue, is there a way to disable **all** caching for this particular page? I've disabled all of the caching that I can in the CP, and yet, something is still obviously being cached.

3) If there's no way to completely disable caching, is there a third-party add-on that lets you clear caching on the front-end via, say, a special URL, e.g., http://www.domain.com/?cache-refresh=1 (I know there are some performance implications here, but I'm kind of at wit's end right now.)

Any ideas?

# Answer
> 1 votes
Make sure **Cache Dynamic Channel Queries?** is turned off.

This feature is found under Admin ‣ Channel Administration ‣ Global Preferences.

---

Make sure you aren't using **tag caching** in the template. The code will look like this `cache="yes" refresh="10"` and will be on your channel:entries tag.

---

It's possible this might also be caused by your browser cache. You can test this by adding the following to your header:

```
<META HTTP-EQUIV="Pragma" CONTENT="no-cache" />

```

---

There is no way that I know to trigger cache clearing with the URL. But you could probably write an addon to do it. The core code for cache clearing is here: /system/expressionengine/libraries/functions.php. Line 1138 in EE v2.5.5, `function clear_caching()`. That's about as much direction as I can give you on this topic. I don't know offhand where the code is in EE1 but it shouldn't be too hard to find with a little searching.

---
Tags: ee1, caching, expire
---