# Question
Title: Channel Form: Edit issue with checkboxes not being set
Have an issue where in channel form editing an entry the radios and checkboxes don't retain their value from the entry being edited. An example of the radios is this:

```
{options:myfield}
<input id="myfield" type="radio" name="myfield" value="{myfield}"{checked}>
<label>{option_value}</label></p>
{/options:myfield}

```

But it fails with checkboxes in the same way. I've seen a few threads on similar issues here but there doesn't seem to be any solutions... has anyone got a fix for this? Cheers

# Answer
I had the same issue with no avail.

I ended up making the channel fields text and controlling the text input using a checkbox on the front end.
> 0 votes

---
Tags: safecracker, checkbox
---


title: Custom query ignoring sticky entries

text:
# Question
Title: Custom query ignoring sticky entries
I'm using the query module, to return a list of entries sorted alphabetically, but there are a few sticky entries that I need to appear at the top of the list, and the stickies are being ignored.Here is my query:

```
{exp:query sql="SELECT entry_id AS rel_entry_id, title AS rel_title, (SELECT rel_child_id FROM exp_relationships WHERE rel_id = '{select-location}' LIMIT 1) AS rel_child_id FROM exp_channel_titles WHERE channel_id IN (5, 7) AND status='Open' ORDER BY title ASC "}

```

I tried adding sticky to my select, and 'sticky, title' to the ORDER BY parameter, but it didn't work. Is there a way to get it working?

# Answer
> 4 votes
try to add **sticky DESC**

```
{exp:query sql="SELECT entry_id AS rel_entry_id, title AS rel_title, (SELECT rel_child_id FROM exp_relationships WHERE rel_id = '{select-location}' LIMIT 1) AS rel_child_id FROM exp_channel_titles WHERE channel_id IN (5, 7) AND status='Open' ORDER BY sticky DESC, title ASC "}

```

---
Tags: query, orderby, query-module
---


# Question
Title: url_title and SEO using MX Title Control CE
Hello I am thinking about the url structure of a photo gallery website and could use a little advice on the subject.

For each entry in expression engine we would have a url\_title like the following:

photos/holiday/beautiful-sunset-at-the-beach

This url structure is fantastic for search engines but not so good for duplications. If I was to add a new image adding to say a 2000 collection there is a likely possibility of a duplicate.

So my thoughts are to use an add-on such as MX Title Control CE to append the entry ID like so as a pattern for photos:

photos/holiday/beautiful-sunset-at-the-beach-4576

This way every entry would be unique.

What are your thoughts on this? I can see that iStock follow a similar approach.

I would value a professional opinion regarding future proofing the setup and from an SEO standpoint.

Thanks

Trevor

# Answer
Perhaps I'm not understanding the problem but you seem to be conflating the Entry title, and url\_title of the entries. You'll find that EE will append a number to the url title of any identically titled entries within the same channel.

From an SEO standpoint are you talking about the URL (which would be unique by it's very nature) or the Meta title of the 'page' that displays the image?

MX Title control will change the title of the entry but if you're only concern is what's being displayed on the front-end templates (say within an H1 tag) then you could simply append the entry id when you output the entries info. e.g.

```
<h1>{title}-{entry_id}</h1>

```

The same could be done when you output the meta title.

You may also want to consider something like SEO Lite which makes adding custom Meta data simpler.
> 0 votes

---
Tags: url-title, seo, querystring, mx-title-control
---


# Question
Title: How to edit forms created using solspace freeform pro composer template in sublime
I have just started using solspace freeform pro. I created a contact form with about 30 fields in it using the composer template of freeform pro module in expressionengine. I did this by creating the fields I need and them in the composer I just dragged and dropped them. Now I want to add some conditional statements to the fields such that selecting a checkbox shows some fields else those fields remain hidden. I want to edit the code for this form in sublime but am unable to locate the file. Can someone please help me where to find the file in my FTP client software. I am also unable to figure out how to put this form on my website. I am sorry if this question is too basic but I have been trying to find something on google for past few days but have no luck. Any help in the right direction will be greatly appreciated. Thanks in advance.

# Answer
> 1 votes
I figured it out. I was confused earlier but after reading the docs carefully on the solspace website it was much clear. I just created a template in expressionengine, added the freeform tags and used the fields created in freeform module. It works perfectly now. I also used jquery for hiding/showing some fields.

---
Tags: solspace-freeform
---


# Question
Title: exp_stash rows aren't being expired / deleted
I'm using stash fairly heavily in an addon and creating user scoped stash variables. All worked great but I'm finding that my exp\_stash db table is growing and growing without any rows ever expiring.

Is there a setting I'm missing somewhere or is buying Mustash the only way to prune the exp\_stash table (other than writing an addon myself and triggering it with cron).

Cheers

Jim

# Answer
Mustash is not the only way but it is the most flexible and granular way I can think of. If you are using Stash for caching, Mustash will be your best solution in terms of establishing cache clearing rules.

That being said other, possibly more "brutal", solutions exist that might fit your needs too. These make good use of the Stash Unset/Destro methods.
> 2 votes

---
Tags: stash
---


# Question
Title: Playa not playing with Zurb Foundation css
I'm getting a conflict when using Playa with Zurb Foundation.

I have the playa field in a exp:channel:form tag and it works fine in the current site, which doesn't use foundation, but in the responsive site that I'm building using Zurb Foundation framework, Playa just seems to hang the page load.

Taking the Playa field out, the page loads and behaves fine.

Taking the foundation.css out the page loads and behaves fine.

Putting them together and everything slows down.

Anyone come across this ?

Andy D

# Answer
> 0 votes
I'm using Playa and Zurb Foundation without problem. Try to verify if no have conflict between css class, id in the both css files. For sure there could have hierarchy problems, or class or id with the same name in the both css files (Zurb and Playa).

# Answer
> 0 votes
Looks like the problem was just with an earlier version of Safari. Updating Safari sorted it out.

---
Tags: playa, pixelandtonic
---


# Question
Title: Need to calculate number of hours between two time select fields before form submission if possible
I have a form for event registration under my site that contains two time select fields, an arrival time and departure time. What I want to do is to have the number of hours between these two times calculated and displayed in the 'Total Hours' field automatically before the form is submitted if possible. I'm thinking that I'll need a bit of jQuery to accomplish this or perhaps by using the entry\_submission\_start hook. Any tips or examples for accomplishing this would be greatly appreciated! Thanks

# Answer
> 0 votes
Thanks for comments and for your example accessory foamcow. Reviewing your code helped me get on the right track and I eventually achieved what I needed by creating a little JavaScript snippet for use in my template. If anyone is interested in seeing the code have a look at http://paste.ee/p/9nKli and in the front-end template I just used `<span id="time_spent"></span>` to display the total.

# Answer
> 1 votes
You would need to write an Accessory which uses Javascript/jQuery to grab the data in the fields (say when both fields contain something), perform the calculation and insert it into a third field.

Start by converting the dates/times into timestamps. This will allow you to subtract one from the other. Then convert the resulting timestamp back into hours. You may also find that momentjs would be useful for this but is probably not necessary.

If you don't need this to work on other sites and you know the names of the fields it should be simple.

Look at http://pkg.io for a good starting point to get the necessary outline for you Accessory.

UPDATE:

I very quickly put together an Accessory for you. You'll need to change the field names within the views/accessory\_datecalc.php file. Use with caution as it's very rough! Download it here

---
Tags: datetime
---


# Question
Title: Freeform, Entering a value and inserting the value in another field in same form
Is it possible to use the value that a user inputs into another input on the same form on submit.

The idea is that they input their phone number, in the phone\_number field and on submit of the form it prepends phone\_number infront of some other text in a seperate field on the same form.

So end result is : 07231923738(prepended text)

Cheers.

# Answer
> 1 votes
You should be able to do with Javascript, as long as you explicitly target the fields by name or ID.

---
Tags: solspace-freeform
---


# Question
Title: Create a menu from a different channel on page with separate channel loop
I have a channel rendering a page. I need to make a menu for a different channel with in that page. the two do not seem to be able to work independently. Is there a way to do this

maybe something like this, only this doesn't work correctly.

Thanks for looking!

```
  {exp:channel:entries
   channel="channel-1-content"
   limit="1"
   }

{some content}

{/exp:channel:entries}

{exp:channel:entries
   channel="channel-2-menu-items"
   limit="10"
   }
<ul>
<li><a href="{url_title}">{title}</a></li>
</ul>
{/exp:channel:entries}

  {exp:channel:entries
   channel="channel-1-content"
   limit="1"
   }

{some content}

{/exp:channel:entries}

```

# Answer
> 0 votes
Can you try adding `dynamic=no` on your 2nd loop. By default channel entries look for a segment in the URL, adding dynamic tells it to ignore whatever's in the URL.

---
Tags: channel-entries, templates, list, multiple-channels
---


title: Group by within a Channel Entries loop

text:
# Question
Title: Group by within a Channel Entries loop
I have banner ads stored in a channel and these are associated using a single entry Playa field with clients stored in another. I need to display random banners on a page but without ever showing more than one banner from each client.

Channel entries has no concept of 'Group By' so how am I best to go about doing this?

*Update*

In the end I wrote an extension to do this though the answer below would work equally well. You can download the 'Group By' extension here - https://github.com/ninefour/group\_by.ext.ee\_addon

# Answer
I would use Stash to do this. See the example on the Stash wiki about grouping by with categories, which should work similar for the Playa field you have.

Within a banner's loop first create a stash list (by appending) of the banner ads with the client's id in name, something like

```
{exp:stash:append_list name="banner_{*playa field client entry id tag*}"}

```

then within a client's loop output the stash list, limiting the amount of banners to 1, like

```
{exp:stash:get_list name="banner_{*playa field client entry id tag*}" limit="1"}

```
> 3 votes

---
Tags: channel-entries, loop, grouping
---


# Question
Title: Search module not working when using a template route to display the results page
I am having a bit of trouble getting a search results page to display if the template used for results is being supplied via a template route.

My template faq-search is accessed via /resources/faq/search/results

When I try to search I get an invalid action warning.

```
{exp:search:simple_form result_page="resources/faq/search/result" no_result_page="resources/faq/search/no-result"}

```

If I use the following without a template route it works fine.

```
{exp:search:simple_form result_page="resources/faq-search" no_result_page="resources/faq/search/no-result"}

```

Is this an intended feature or a bug?

# Answer
I just encountered this same issue, and filed a bug report - including a fix: https://support.ellislab.com/bugs/detail/20680
> 1 votes

---
Tags: search, template-routes
---


# Question
Title: In Expression Engine How we can avoid same ip address again from entry views tracking
In expression engine for different channel titles different view count is there .But how we can avoid same ip address again from view count.

# Answer
> 1 votes
The EE template count doesn't filter on individual IPs, or not count duplicate IPs. You're better off using Google's webmaster tools and use their tracking when it comes to page counts.

---
Tags: ee2, channel-entries
---


# Question
Title: Prev/next entry linking when using Transcribe
I'm using Transcribe and Structure to build multi-lingual sites.

I have come across an issue using the Prev and Next entry tags. I want users to be able to go to the next/prev blog posts.

If I include the standard EE tags (below) it includes all entries, from both language sites. I need to just display the entries from the Transcribe language site you are on.

{exp:channel:next\_entry channel="blog" transcribe="disable"}

Next entry: {title}

{/exp:channel:next\_entry}

{exp:channel:prev\_entry channel="blog" transcribe="disable"}

Previous entry: {title}

{/exp:channel:prev\_entry}

Also clicking on a prev/next link that is to a post from another language just gives me an empty screen, which you would expect as the content is specific to the other language site.

Anyone any ideas on how I can work around this issue?

Cheers Darren

# Answer
it should work according to the docs. have a look here: http://eeharbor.com/transcribe/faq

Does Transcribe work with the next\_prev tag? Yes, Transcribe does work with the next\_entry and prev\_entry tags in ExpressionEngine, please note, it requires you to use the parse="inward" parameter, Here is an example of how it works -

```
{exp:channel:entries channel="news" paginate="bottom" limit="1"dynamic="no" }
    <h1>{title}</h1>
{/exp:channel:entries}

{exp:channel:next_entry entry_id='{exp:transcribe:entry_ids channel="news"}' parse="inward"}
    <p>Next entry: <a href="{path='your/path'}">{title}</a></p>
{/exp:channel:next_entry}

{exp:channel:prev_entry entry_id='{exp:transcribe:entry_ids channel="news"}' parse="inward"}
    <p>Previous entry: <a href="{path='your/path'}">{title}</a></p>
{/exp:channel:prev_entry}

```
> 3 votes

---
Tags: structure, transcribe, entry
---


title: jQuery Chained Select & JSON

text:
# Question
Title: jQuery Chained Select & JSON
I am using a jQuery Chained Select Plugin.

But getting stuck loading the data dynamically to select options from my Expression Engine template. Seems pulling the value from the JSON url is causing the error, manually changing the mo'variable from url\_title="{get:series}" to an entry url\_title="test" makes the drop down work. What could be going wrong? How can I check what the URL is the plugin is outputting?

```
<form>
    <select id="mark-remote" data-variable="bar" name="mark">
        <option value="">--</option>
        <option value="bmw">BMW</option>
        <option value="audi">Audi</option>
    </select>
    <select id="series-remote" name="series">
        <option value="">--</option>
    </select>

    <button id="button-remote" type="submit">Button</button>
    <script>
        $(function() {
            /* For jquery.chained.remote.js */
            $("#series-remote").remoteChained({
                parents: "#mark-remote",
                url: "http://example.com/json",
                loading: "--"

            });
        });
    </script>
</form>

```

Expression Engine JSON template

```
{exp:http_header content_type="application/json"}

[
    {"" : "--",
    {exp:channel:entries channel="articles" dynamic="on" url_title="{get:series}" disable="categories|trackbacks|member_data|pagination"}
    {relatedarticle backspace="3"}
"{relatedarticle:url_title}":"{relatedarticle:title}",
    {/relatedarticle}
    {/exp:channel:entries}
    }
]

```

JSON output (Adding this manually to the template loads the data perfectly)

```
[{"" : "--", "data":"data" , "data":"data"}]

```

# Answer
Works now, changing the variable to {get:mark} populates the series drop down. shew!
> 0 votes

---
Tags: jquery, variable, json
---


# Question
Title: RSS Feed works with template type 'web page", but not type 'RSS Feed'
I'm using the sample Ellis Lab code almost verbatim for my RSS feed. When I set the template type to web page, it outputs correctly. When I change it to RSS, I get an empty feed. Right now it is set to RSS. Ideas? http://sequentlearning.com/rss

```
{preload_replace:master_channel_name="blog"}
{exp:rss:feed channel="{master_channel_name}" status="open"}

```

```
<channel>

<title><![CDATA[{channel_name}]]></title>
<link>{channel_url}</link>
<description>{channel_description}</description>
<dc:language>{channel_language}</dc:language>
<dc:creator>{email}</dc:creator>
<dc:rights>Copyright {gmt_date format="%Y"}</dc:rights>
<dc:date>{gmt_date format="%Y-%m-%dT%H:%i:%s%Q"}</dc:date>
<admin:generatorAgent rdf:resource="http://expressionengine.com/" />

{exp:channel:entries channel="{master_channel_name}" limit="10" disable="member_data|pagination" dynamic="no" status="open"}
<item>
  <title><![CDATA[{title}]]></title>
  <link>{title_permalink='site/index'}</link>
  <guid>{title_permalink='site/index'}#When:{gmt_entry_date format="%H:%i:%sZ"}</guid>
  <description><![CDATA[{summary}{body}]]></description>
  <dc:subject><![CDATA[{categories backspace="1"}{category_name}, {/categories}]]></dc:subject>
  <dc:date>{gmt_entry_date format="%Y-%m-%dT%H:%i:%s%Q"}</dc:date>
</item>
{/exp:channel:entries}

</channel>

```

```
{/exp:rss:feed}

```

# Answer
> 2 votes
I'm seeing a literal "empty\_feed" which indicates that you are missing some language files or that they are out of date. To me that puts a question to the state of other files, too, so refreshing your files may be in order (though might not fix the issue. I've commented for some more info, and can update this answer after you've tried that.

# Answer
> 0 votes
Well, that's weird. I refreshed the code and now it works. Ghosts in the machine? Thanks for your help.

---
Tags: rss
---


# Question
Title: Carthrob Get custom order data field value
I am using cartthrob I have created a custom field called notes

I am working on a pre authorize hook

I can retrieve the current order details like $this-\>EE-\>cartthrob-\>cart-\>order('payment\_gateway')

but if i try and retrieve my custom field data nothing is returned even though the data is stored in the order channel entry after i submit the order

when i out put the custom data there is no mention of my custom field

"custom\_data"\]=\> array(0) { } \["subscription"\]=\> bool(false) \["subscription\_options"\]=\> array(0) { } \["payment\_gateway"\]=\> string(6) "stripe" \["subscription\_id"\]=\> bool(false)

Thanks

# Answer
> 0 votes
As I can't comment your question (not enough reputation), I just wanted to remind you that you can use `{exp:cartthrob:debug_info}` to display cartthrob debug data to see if your fields are correctly set. http://cartthrob.com/docs/tags\_detail/debug\_info/index.html

---
Tags: custom-fields, checkout
---


title: Structure with Lowevents and Freebie

text:
# Question
Title: Structure with Lowevents and Freebie
I can't get it work. Ik use structure, low events and freebie in a ee website.

My code looks like this:

```
{exp:switchee variable="{segment_3}" parse="inward"}
{!-- --------------------------------- All agenda items ----------------------------------------------  --}
{case value="''"}

{exp:low_events:calendar channel="ch_agenda" date="{freebie_3}"}

{if '{prev_month format="%Y%m"}' >= '{current_time format="%Y%m"}'}
<a href="{path="actueel/agenda/{prev_month_url}"}" title="{prev_month format='%F %Y'}">
{exp:low_events:prev_date date="{freebie_3}" unit="month" format="%F %Y"}</a>{/if}

<a href="{path="actueel/agenda/{next_month_url}"}" title="{next_month format='%F %Y'}">
{next_month format="%F %Y"}</a>

<div class="maand">
{this_month format="%F %Y"}
</div>

{/exp:low_events:calendar}

{exp:low_events:entries channel="ch_agenda" date="{freebie_3}" unit="month" show_passed="no" no_results="yes"}

<h1><a href="{url_title_path='actueel/agenda'}">{title}</a></h1>
{agenda_datum:start_date format="%j %F %Y"}
{if '{agenda_datum:end_date format="%j %F %Y"}' > "{agenda_datum:start_date format='%j %F %Y'}"} tot {agenda_datum:end_date format="%j %F %Y"}{/if} {agenda_plaatst}
<br />

<a href="{page_url}">read more...</a>

{/exp:low_events:entries}

{/case}

{!-- --------------------------------- 1 detail item  ----------------------------------------------  --}
{case default="Yes"}

{exp:channel:entries channel="ch_agenda" limit="1" dynamic="yes"}

{if agenda_image != ""}<img src="{agenda_image:agendaopmaat}" width="500" alt="{title}">{/if}
<h1 class="agenda-titel">{title}</h1>
{agenda_datum:start_date format="%j %F %Y"}
{if '{agenda_datum:end_date format="%j %F %Y"}' > "{agenda_datum:start_date format='%j %F %Y'}"}
 tot {agenda_datum:end_date format="%j %F %Y"}{/if} {agenda_plaatst}
{agenda_tekst}

{/exp:channel:entries}

{/case}

{/exp:switchee}

```

When I go to agenda I get this URL and what I see is what I want. http://site.nl/actueel/agenda/

In the Freebie settings I have as Breaking Segments: agenda

I did this to be able to use this link: `<a href="{path="actueel/agenda/{next_month_url}"}" title="{next_month format='%F %Y'}">` without problem with structure. I get then this URL: http://site.nl/actueel/agenda/2014-11

But I have a problem with my read more… link: `<a href="{page_url}">read more...</a>` I know it's because of my Freebie settings but how can I get de detail page to work.

# Answer
> 0 votes
I think you can only append segments to the end, so the details may not work if you're telling Freebie/Structure to ignore everything after agenda.

# Answer
> 0 votes
Assuming you need an url like this: site.nl/actueel/agenda/2014-11-1/url-title

* freebie\_1: actueel
* freebie\_2: agenda
* freebie\_3: date
* freebie\_4: url title

You could try to test the freebie segments with a nested switchee:

```
{exp:switchee variable="{freebie_4}" parse="inward"}
    {!-- start by checking the last possible segment --}
      {case value=''}
        {!-- ok, so freebie_4 is empty, now let's test the other segments
        {switchee variable="{freebie_3}"}
          {case value=''}
          {!-- Ok, freebie_3 is empty. this should be the agenda overview page--}
          {/case}
          {case default="Yes"}
            {!-- Ok, freebie_3 is not empty. this should be the month view --}
          {/case}
        {/switchee}
      {/case}
      {case default="Yes"}
      {!-- show the item --}
        {exp:channel:entries channel="ch_agenda" limit="1" dynamic="no" url_title="{freebie_4}"}
          {title}
        {/exp:channel:entries}
      {/case}
    {/exp:switchee}

```

Since you are taking this all out of EE/Structure hierarchy, your page\_url variable will not work properly anymore. Guess you will have to build the links manually like {site\_url}actueel/agenda/date-segment/{url\_title}/

---
Tags: structure, freebie, low-events
---


# Question
Title: Email sent via php mail don't reach Exchange addresses
I've noticed a few problems with Emails not being sent to Exchange addresses via php mail. First I noticed this when using FreeForm. I didn't notice anything out of the ordinary while testing to my gmail account. Forms was successful and I received the emails.

But then the customer said they hadn't received any emails. So I checked it out and added my own Gmail address to the recipients. And I did receive the emails while testing. But the customer did not. Even though both our addresses were set as recipients.

So I narrowed it down to the customer's email being an Exchange address. As a temporary solution, I added the customer's gmail address as recipient. And that works. And since Freeform stores each submitted form on it's own, I had a record of every form.

But now we have the same problem on a different site with Expression Engine's own Form. And not freeform. And we have no record of the forms that's been sent. And the customer is not very happy.

Does this mean that we need to stop using php mail in Email settings in Expression Engine? And specify an smtp server by default?

# Answer
safest bet would be to use a service such as sendgrid. Mail sent from hosting servers has a tendency to be either blocked or marked as spam by conservative services such as exchange
> 1 votes

---
Tags: solspace-freeform, email, smtp, email-contact-form
---


# Question
Title: Loop through entries, one category at a time
I'm having a bit of trouble with this, and I can't even describe it very well. Anyways, what I want to do, is list through all the entries I have in a certain channel, just like usual. Except I want to sort it by categories. So on the page, I want category 1 title, then all the entries assigned to category 1, then category 2 title, and all the entries assigned to category 2, etc. Like this:

```
**CATEGORY 1 TITLE**
 _______
|       | {title}
| {img} | {description}
|_______|
 _______
|       | {title}
| {img} | {description}
|_______|

**CATEGORY 2 TITLE**
 _______
|       | {title}
| {img} | {description}
|_______|

**CATEGORY 3 TITLE**
 _______
|       | {title}
| {img} | {description}
|_______|
 _______
|       | {title}
| {img} | {description}
|_______|

```

Hopefully that makes sense. This is what I've tried,

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

{exp:channel:categories channel="mychannel" style="linear"}
    <h2>{category_name}</h2>

    <img src="{img}" alt="{alt}">
    <h3>{title}</h3>
    <p>{description}</p>

{/exp:channel:categories}

```

{/exp:channel:entries}

But that doesn't work at all, because for each entry it shows all the category titles, and then under each title displays that entry's info once.

I really hope that was clear enough. Any help would be greatly appreciated. Thank you

# Answer
Your solution will not perform or scale well. Instead use the native `category_archive` tag: https://ellislab.com/expressionengine/user-guide/add-ons/channel/category\_archive.html (though even that suffers from poor performance).
> 1 votes

# Answer
So I think I got it. I mostly just needed to swap the nesting of the tags:

```
{exp:channel:categories channel="mychannel" style="linear"}

{exp:channel:entries channel="mychannel" category="{category_id}" limit="1"}
    <h2>{category_name}</h2>
{/exp:channel:entries}

{exp:channel:entries channel="mychannel" category="{category_id}"}
    <img src="{img}" alt="{alt}">
<h3>{title}</h3>
<p>{description}</p>
{/exp:channel:entries}

{/exp:channel:categories}

```

I also had to use the channel:entires tag twice to make sure the heading only appears if there are actually entries.
> 0 votes

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


# Question
Title: Where can I see the website processing time
Where can I see the website processing time, serverside? I mean how much time it took to compile the site for delivery.

I installed the ee debug toolbar. But which of this data is it?

The reason I ask is because I wonder if its worth to cache the relatively small site or if the server processing time is neglectable.

Thank you

# Answer
> 2 votes
the processing time is the "0.9711s" on this image.

But you can add this values to your template, if you want to. The `{elapsed_time}`, the `{total_queries}`, etc are all available as standard global variables.

For example, I usually add something like this to the footer of every page:

```
{if logged_in_group_id == 1 OR site_url == "http://dev.domain.com"}
    <div id="devbar" style="position: absolute; top: 0; right: 0; position: fixed; background: #FFE203; color: #000000; padding: 9px; font-family:Helvetica,Arial,sans-serif; font-size:12px; line-height:1.5; z-index: 10000">
        Queries: <strong>{total_queries}</strong><br>
        Elapsed Time: <strong>{elapsed_time}s</strong><br>
        Memory Used: <strong>{memory_usage}</strong><br>
        Debug Mode: <strong>{debug_mode}</strong><br>
        Gzip Mode: <strong>{gzip_mode}</strong><br>
        App build: <strong>{app_build}</strong><br>
        App version: <strong>{app_version}</strong>
    </div>
{/if}

```

The conditional checks for a administrator user or a development domain.

# Answer
> 0 votes
If you are logged in as Admin, you can simply enable Output Profiler and Template Debugging. This will only appear for the Admin usergroup.

**To enable this:** Go to Admin \> System Administration \> Output & Debugging.

Check Yes to Display Output Profiler, and Display Template Debugging.

(This also saves writing unnecessary code in your templates.)

---
Tags: cache, debugging, ee-debug-toolbar
---


# Question
Title: Is it possible for an admin alert when stock is low
I want to enable an alert to notify me when stock falls below a certain number. Is this possible in any way?

Thanks

# Answer
There is nothing out of the box currently that would allow you to do this. Having said that you could use ObjectivHTML's brilliant Post Master add-on to set up a notification when stock is low
> 0 votes

---
Tags: expresso-store, stock
---


# Question
Title: CartThrob checkout with cart_total = 0,00
In certain cases customer check out with a {cart\_total} \<= 0,00. This happens eg. if a customers redeems a coupon code worth, lets say € 20,00 but in his cart there is only an item worth € 10,00 (shipping neclected for ease of understanding).

Whenever this happens I'd like the customer to overjump the page where he would have to decide on which payment method to choose.

This is my basic flow: Cart \> Adress \> Payment method \> Confirmation with purchase Button.

Now, when a customer is on the Adress page and the cart\_total \<= 0,00 they should be redirected to the Confirmation page directly.

How would I go about this? I have tried using if conditionals in the {exp:cartthrob:save\_customer\_info\_form} tag but it won't work (parsing issue I guess).

Something like this:

```
{exp:cartthrob:save_customer_info_form
     {if {cart_total} > 0,00}
          return="cart/payment"
     {if:else}
          return="cart/confirmation"
     {/if}
class="validate" secure_action="yes" secure_return="yes"}

```

Thanks for any ideas! Cheers

# Answer
> 0 votes
Alright folks, I've got this figured out. For the sake of a better answered quota I am answering my own question.

This is how ended up doing it:

```
{if '{exp:cartthrob:cart_total prefix=""}' > 0}
     {stash:embed name="snippets:adress-form-a" process="start"}
{if:else}
     {stash:embed name="snippets:adress-form-b" process="start"}
{/if}

```

In the stash embeds there are two different {exp:cartthrob:save\_customer\_info\_form} with different redirects. Case solved.

---
Tags: cartthrob, redirects
---


# Question
Title: Should I run the EE Install & Update Wizard after updating mySQL
We are currently running EE v2.7.3.

Our IT partners have informed us that they will be updating the server this week.

They will also be updating Linux, PHP, httpd, and mysql-server moving up to the following versions.

Redhat 6.6 php-5.3.3-38.el6-x86\_64 httpd-2.2.15-39.el6-x86\_64 mysql-server-5.1.73-3.el6\_5-x86\_64

I saw the system requirements on the website, but they don’t mention which version of Redhat EE is compatible with. We’ve run into issues before when updating EE so we want to be cautious and aware of any issues we may run into if any.

Currently our IT folks have updated one of our load balanced servers with newer versions of the redhat, php, mysql. However, when i try to login to EE Control Panel, I’m getting the installation and update wizard screen. I'm thinking this is a result of MySQL being updated, but i am not sure.

I'm hesistant to click the "click here to begin!" button because i don't have direct access to the database (I've got a request in to make a backup of the database).

Can someone let me know what should happen after I click “Click here to begin!” button?

I am wondering if this is normal or should i be concerned?

# Answer
> 1 votes
We ran the updates on our server and we didn't run into any problems. It seems EE v2.7.3 is compatible with all of these versions of Redhat, PHP, & MySQL.

---
Tags: ee2, mysql, update
---


# Question
Title: Pagination not working correctly when using categories and Transcribe
I'm using Transcribe and I'm having an issue with pagination on my blog.

When I filter by category the pagination links are also counting entries from my other languages.

It works fine without the category filter, here is the entries tag:

```
    {exp:channel:entries
    channel="blog"
    dynamic="no"
    paginate="bottom"
    limit="3"
}

```

This gives me this url: /blog/ and /blog/P3

My tag for listing Category entries is

```
    {exp:channel:entries
    channel="blog"
    dynamic="yes"
    paginate="bottom"
    limit="3"
}

```

I have had to switch "dynamic" to "yes" so EE can show the correct entries.

This give me this url: /blog/category/category-name/ and EE displays the correct entries.

I'm getting pagination even though there are only 3 entries in this language, clicking the pagination take me to an empty listing as Transcribe knows not to show other language entries.

If I remove posts in the other languages from the category the pagination does not show. This confirms to me that the Pagination is counting all entries across all languages, even though the entries themselves are not displayed.

I cannot seem to find a way to display the category entries and get pagination to work.

Any ideas?

Cheers Darren

# Answer
You can fix this if you limit the entries outputted to those in the language you are in.

You can do this by adding the 'entry\_id' parameter and using a Transcribe tag to output all the entry ids

The refined channel tags is:

```
{exp:channel:entries channel="blog"
dynamic="yes"
paginate="bottom"
limit="3"
entry_id='{exp:transcribe:entry_ids channel="blog"}'
parse="inward"}

```
> 3 votes

---
Tags: categories, pagination, transcribe
---


title: {small_file_url} calling my thunb

text:
# Question
Title: {small_file_url} calling my thunb
When expression engine is creating a small file it is putting them in a folder call "thumb". How do I call that file from a template to render on the finished page?

{m\_topic\_img} calls my full image but how do i customize {small\_file\_url} from the EE docs to call the correct file? I am using GD2 to generate the thumbs.

Thanks

# Answer
If you are generating different sizes of your images you need to use the following tag to output them on the fronted in a channel entries tag

```
{image_field:size_short_name}

```

So in your example this should work:

```
{m_topic_img:small}

```
> 0 votes

---
Tags: templates, thumbnails
---


title: Low Search: Redirect if single result

text:
# Question
Title: Low Search: Redirect if single result
I am trying to do the following - essentially redirect to the correct page if search query only returns a single result.

{if total\_results == "1"}{redirect="{comment\_url\_title\_auto\_path}"}{/if}

This is working, however, it's also appending the domain to the URL, so the resulting redirect is

http://domain.com/http://domain.com/template/view/url-title/

Is this possible at all?

Regards,

Christiaan

# Answer
That approach should work just fine.

The `{comment_url_title_auto_path}` variable is parsed by native EE code. So if that results in an unexpected url, you might want to check the value of that setting in the Channel Preferences.
> 0 votes

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


# Question
Title: Stash not overwriting variable - variable stays same after 2nd setting
I'm having a bit of trouble with getting Stash to change a variable. I'm using it to output a heading in search results when it's not the same as the last result. Here is my code:

```
{!-- Set the sorthead variable to something random --}
{exp:stash:set name="sorthead"}flibberdigibbet{/exp:stash:set}

{exp:low_search:results
    channel="magazine-articles"
    status="not closed"
    limit="10"
    paginate="both"
    disable="member_data|category_fields"
    category="1"
    orderby="articles-sorthead"
    sort="asc"
 }

      {!-- check the variable before setting --}
      before: {exp:stash:get name='sorthead'}

      {!-- output heading if it's not  the same as the last one --}
      {if "{exp:stash:get name='sorthead'}" != "{articles-sorthead}"}
          <h2>{articles-sorthead}</h2>
      {/if}

      {!-- set the variable so that next time we can check again
           THIS IS NOT HAPPENING FOR SOME REASON --}
      {exp:stash:set name="sorthead"}{articles-sorthead}{/exp:stash:set}

      {!-- check it has worked --}
      after: {exp:stash:get name='sorthead'}
{/exp:low_search:results}

```

So I don't really know what is going on, but both before and after output as 'flibberdigibbet' and the setting never seems to happen the second time. unless the first set is happening on every loop of the low search tag - but I don't think it should be!

Hope you can help!

# Answer
> 4 votes
You use plugin with the same parameters. So EE cached it.

Try to add **random**

```
{exp:stash:set name="sorthead" random} {/exp:stash:set}

```

or change name.

---
Tags: ee2, stash, low-search
---


# Question
Title: P&T Assets - old image selections returning
I've recently upgraded a site to use Assets 2.3.2 instead of the built-in File field-type. This field is a column in a Matrix field.

During the process of setting the new field-type I did notice that there were a lot of very similar rows in the `exp_assets_selections` table like this:

```
INSERT INTO `exp_assets_selections` (`file_id`, `entry_id`, `field_id`, `col_id`, `row_id`, `var_id`, `element_id`, `content_type`, `sort_order`, `is_draft`)
VALUES
    (19, 3270, 26, 31, 44019, NULL, NULL, NULL, 0, 0),
    (22678, 3270, 26, 31, 44019, NULL, NULL, 'matrix', 0, 0);

```

For some entries that are updated the old image will reappear and the new image selection will not seem to be remembered. The rows above are one such example of this happening.

Which row is the correct selection format and is it possible to delete the unwanted rows with SQL as a means to clean up the database?

Thanks.

# Answer
> 0 votes
We have had the same problem on two sites. Updating Assets to 2.5 seems to solve the problem for us on both installations (so I guess this was a bug that's been fixed).

---
Tags: assets
---


# Question
Title: Expresso Store: Shipping Name - Surname goes missing
I've recently updated my installation of Store to 2.3.1. All seemed to be going smoothly, but my client has recently reported that surnames are going missing from peoples orders.

I'll break it down below:

The shipping name is captured as `{field:shipping_name} {error:shipping_name}`

Any name captured here is displayed correctly in the order admin screen:

However, when trying to show this name in the confirmation email only the first name is displayed. The template code is: `{shipping_name}`

Checking the member record the surname isn't being added to that either:

Have I missed some template changes? Do I need to capture first and surname separately now?

Any advice much appreciated.

T

# Answer
> 1 votes
I fixed this in my situation by swapping the combined field

```
{field:shipping_name} {error:shipping_name}

```

for the separate first name and surname fields

```
{field:shipping_first_name} {error:shipping_first_name}
{field:shipping_last_name} {error:shipping_last_name}

```

though this is a workaround, not a fix.

---
Tags: expresso-store, upgrade, tags
---


# Question
Title: EE Calendar Sorting Function by category
I'm trying to sort the Solspace calendar by category. The categories are set up and I have a dropdown in the monthly calendar. Each category will display a category # in the class file for example category7. I just can't get the dropdown to sort the categories once selected.

--Filter by Category-- {exp:channel:categories channel="calendar\_categories"} {category\_name} {/exp:channel:categories}

# Answer
> 0 votes
I've done this by adding the category as a css class to the events. Then you can use your dropdown menu to filter with js/jquery.

---
Tags: calendar
---


# Question
Title: cannot log in to control panel after 2.9.2 update. credentials are being accepted
I just updated my EE install to 2.9.2 and cannot log into the control panel.

It is recognizing my username and password, but I am redirected back to the log-in page. If I enter bogus credentials, it lets me know either the username or password are incorrect.

I have tried adding the following to my config file as suggested across StackOverflow:

```
$config['cookie_prefix'] = '';
$config['cookie_path'] = '';
$config['cookie_domain'] = '';
$config['user_session_type'] = 'c';
$config['admin_session_type'] = 's';

```

I have tried clearing caches and everything like that.

The oddest part is, I've tried logging in many times now. Seemingly randomly, it does allow me to log in (maybe 2 times out of 100 attempts), but as soon as I click anything in the CP, i am bumped back out to the log in screen.

# Answer
for whatever reason, i had this line in my config.php file that was the culprit

```
$config['server_offset'] = '-60';

```
> 1 votes

---
Tags: ee2
---


# Question
Title: Solspace Tag: Not all tags from the tag group are listed
I have tagged products with colors and to display list of those colors I'm using code below:

```
{exp:channel:entries channel="products" category_group="1" category="not 7|8|9" status="retail|showroom|open" dynamic="no" orderby="title" sort="asc"}
{exp:tag:tags entry_id="{entry_id}" tag_group_name="Attributes" websafe_separator="-"}
{tag}
<?php $tags['{tag_id}'] = '{tag}'; ?>
<?php $web_tags['{tag}'] = '{websafe_tag}'; ?>
{/exp:tag:tags}
{/exp:channel:entries}

{!-- Sort tags by name ascending --}
<?php print_r($tags); ?>

```

and output looks like:

```
blue ivory lacquer wood wooden black brass chrome lacquer black brass chrome lacquer silver brass chrome white black brass lacquer black brass chrome lacquer black lacquer silver brass glass gold brown wooden black tan beige tan chrome mirror silver steel white black brown gold multicolor black silver black silver multicolor white black silver black gold black white black white black gold white black gold brass leather mahogany red wood wooden black and white acrylic acrylic black glass

Array ( [19] => blue [14] => ivory [137] => lacquer [129] => wood [23] => wooden [12] => black [109] => brass [111] => chrome [31] => silver [33] => white [76] => glass [38] => gold [21] => brown [47] => tan [46] => beige [138] => mirror [114] => steel [16] => multicolor [13] => leather [157] => mahogany [6] => red [166] => black and white [15] => acrylic )

```

but in the tag group "Attributes" I have 57 tags and above displayed not even half of them.

Any clue what is going on?

Thanks

# Answer
It looks like issue is related to EE default settings not Tag addon

> I set the {exp:channel:entries} limit="" to 1000. When this parameter was not used, which defaults at 100

That solves the problem.
> 0 votes

---
Tags: solspace, solspace-tag
---


# Question
Title: Unable to send email through Exchange SMTP
I'm trying to send email through a Microsoft Exchange SMTP server using the Communicate Tool in EE admin. When I try to send an email, the browser spins for 5-10 seconds and then I get the following error message:

```
An Error Was Encountered

Unable to send email at this time.

220 xxxxxxxxxxxxxxxxxxxx Microsoft ESMTP MAIL Service ready at Wed, 10 Dec 2014 07:52:35 -0600

hello:

The following SMTP error was encountered:
Unable to send email using PHP SMTP. Your server might not be configured to send mail using this method.

```

I know my settings in EE's Email Configuration are good. I've tested connecting to the Exchange server and sending email through both telnet and a PHP script and those both worked. And yet, ExpressionEngine won't send mail. What am I doing wrong?

# Answer
For Exchange, there are a couple of configuration overrides that you need to set for email to work:

```
$config['email_crlf']    = "\r\n";
$config['email_newline'] = "\r\n";

```

Add those, restart your server, and you should be good to go.

**Note**: Make sure to use those double quotes around the `\r\n` strings.
> 2 votes

---
Tags: email, smtp
---


# Question
Title: P&T Assets not functioning correctly after migrating to new server environment
After moving my site to a staging environment I'm no longer able to view any images within the Assets portion of the CP or upload files to any Assets related fields. I'm also unable to update the indexes within Assets (it just appears to freeze).

I've double checked the following:

* That the Assets and EE cache folder have proper permissions.
* That the paths are correct in the upload destination's File Upload Preferences.
* That I'm able to successfully upload to the folder via EE's native File Manager.

I started poking around in the DB and noticed that in the `exp_assets_index_data` table all of the `uri` fields had the incorrect file path in them (they're all showing the path from my local environment). I ran a `REPLACE` query in MySQL and fixed the paths, but still am still experiencing the same issues.

The site is running EE 2.7.2 (build 20131008) and the latest version of Assets 2.5.

Any thoughts on what might be happening or tips on how to get things back up and running would be much appreciated.

# Answer
I never did end up finding out what the issue was, but I suspect something got borked in the DB when moving between environments. I ended up pushing a fresh install into staging and working with backup copy of the DB and all is working as expected again. Strange internet magic.

I'm posting this as an answer because I'm pretty sure this was caused by user error somewhere along the way vs. being an issue with Assets itself.
> 0 votes

# Answer
This is not the exact solution but it may help none-the-less.

Have you tried Deploy Helper?

It will show you all the places a path may be causing havoc.

https://devot-ee.com/add-ons/deeploy-helper
http://www.hopstudios.com/software/deeploy\_helper/

(You can download it off their website to try before you buy. This has helped me many times)
> 0 votes

---
Tags: assets, pixelandtonic, file-manager, staging-server
---


# Question
Title: Updating to EE 2.9.2 on WAMP, blank screen after terms & conditions
I've upgraded EE our production and QA environments with no problem (both IIS), but when I tried to upgrade EE on my local environment (WAMP 2.2), I get stuck with this screen after accepting the terms and conditions:

Anyone else encounter this? How did you get around this?

# Answer
Since posting my question, I haven't figured out *why* this happened, but I did come up with a workaround for it:

1. Import your upgraded production environment's MySQL database on your local environment\*
2. Follow the update instructions from EllisLab up to but not including step 6.
3. Change `$config['app_version']` in `system/expressionengine/config/config.php` to `292`
4. Delete the `system/installer` folder
5. Open your ExpressionEngine CP and you should be running 2.9.2 as you hoped and dreamed

\*If importing a dump of your production DB isn't something you normally do, be aware that the following things will need to be updated after you complete your import:

* **DB:** `channel_url` in `exp_channels` (for each channel), example query:

```
UPDATE `[YOUR DB NAME]`.`exp_channels` SET `channel_url`='[YOUR URL]' WHERE `channel_id`='[YOUR CHANNEL ID]';

```
* **DB:** `server_path` in `exp_upload_prefs` for each upload destination, example query:

```
UPDATE `[YOUR DB NAME]`.`exp_upload_prefs` SET `server_path`='[YOUR LOCAL PATH]', `url`='[YOUR LOCAL URL]' WHERE `id`='[YOUR UPLOAD DESTINATION ID]';

```
* **CP:** URL to the root directory of your site in `Admin > General Config`
* **CP:** Theme Folder Path in `Admin > General Config`
* **CP:** Server path to site's templates in `Design > Templates > Global Template Preferences`
* **CP:** File path in `Add-Ons > Extensions > Low Variables > Extension Settings`

These are the things we have to update in our setup, so your milage may vary. Godspeed.
> 1 votes

# Answer
Something similar - possibly a plugin not responding. Remove third-party plugins in your system folder, try updating again and then return your plugins...you should update fine, and then you'll need the third-party items back in to open the control panel.
> 1 votes

---
Tags: update, install
---


# Question
Title: ElectricPutty - Thumber add-on not working with EE 2.9.2
upgraded from 2.8.1 to 2.9.2 and ElectricPutty's add-on Thumber stopped working. Any ideas?

Getting this debugging output:

(1.414562 / 37.32MB) Calling Class/Method: Thumber/create (1.414701 / 37.32MB) -\> Class Called: Thumber (1.414785 / 37.33MB) -\> Method Called: create (1.575988 / 37.33MB) **Thumber** Can't find Ghostscript on your server. (1.576109 / 37.33MB) -\> Data Returned

Ghostscript has been installed for years.

# Answer
> 1 votes
This happens using Thumber 1.2. Rolling back to Thumber 1.1 returns normal functionality.

---
Tags: 2.9
---


title: Supersearch form escapes brackets

text:
# Question
Title: Supersearch form escapes brackets
I'm trying to filter using supersearch and checkboxes. Multiple checked checkboxes should create a get parameter like &myfield=value1&&value2. However, when I submit the form it escapes characters and fails to work.

Here's the bit of code with the checkboxes. It's a bigger form, but isolating this block won't work either:

```
<form method="get" action="/destinations/search">
    {exp:super_search:search}
    <fieldset class="amenities">
        <h3>Filter by feature</h3>
        {exp:low_options:amenities}
        {options}
        <span>
            <input type="checkbox" name="amenities[]" value="{option:value}">
            <label>{option:label}</label>
        </span>
        {/options}
        {/exp:low_options:amenities}
    </fieldset>
    <input type="submit" class="update" value="Update results">
    {/exp:super_search:search}</form>

```

The resulting url gives something like: ?amenities%5B%5D=barbecue&amenities%5B%5D=car-essentials

In the example I'm using low\_options but I've also tried simply coding the fields. Am I missing something obvious? This is the last piece of a big project and has me scratching my head over and over.

Thanks in advance!!

Best, Santiago.-

# Answer
Super Search works best as a **POST** form. **GET** forms are more limited. As mentioned in the docs (http://www.solspace.com/docs/super\_search/post\_get\_or\_template/):

> GET does have it's limitations. As mentioned above, it is impossible to pass search arrays via GET.

Try using `method="post"` instead for your form.
> 2 votes

---
Tags: solspace, supersearch
---


title: Page Timeout When Minimee is Enabled

text:
# Question
Title: Page Timeout When Minimee is Enabled
I have a template that is making a request to remote CSS & JS files that are hosted on the same server, different domain:

```
{exp:minimee:js}
    <script>https://www.remotesite.tld/assets/js/plugins/cycle.js</script>
    <script>https://www.remotesite.tld/assets/js/init/index.js</script>
{/exp:minimee:js}

```

When I try to load the page, the browser gets stuck in loading-mode for several minutes before throwing a "page not available" error.

If I disable Minimee in my config, the page loads without issue:

```
$env_config['minimee']['disable'] = 'y';

```

No server errors are logged when this happens.

* EE 2.9.0
* Minimee 2.1.12

# Answer
By default, Minimee tries to fetch "remote" assets using cURL; if you find that your server setup somehow doesn't like this, you can try configuring Minimee to use file\_get\_contents() as an alternative.

--

If it is possible for Minimee (or PHP more specifically) to access those assets via the filesystem, then you can try to "map" the external URL to the physical location, with a combination of setting your base\_path and base\_urls. You can pass these as tags rather than global configs:

```
{exp:minimee:js
    base_path="/path/to/www.remotesite.tld"
    base_url="http://www.remotesite.tld"}
    ...
{/exp:minimee:js}

```

With that set, when Minimee encounters that remotesite URL, it will replace it with the base path, and then attempt to fetch their contents.
> 1 votes

# Answer
What is the HTTP Status code? 500?

It could be related to a bug on 2.9.0 See here for a fix: https://support.ellislab.com/bugs/detail/20471/site-index-template-is-rendered-after-the-404-template
> 0 votes

---
Tags: minimee
---


# Question
Title: Can I link an entry to an Assets folder, instead of adding files?
I am using Assets to manage documents associated with entries, but each entry will have sub-folders. Categories for each document. I am hoping to show a folder navigation on the front end to click the sub-folder, then even another, then list files.

I can create the folder hierarchy in Assets.

But instead of uploading/linking files to an entry, all I need to do is link the Assets folder. Can I do this in Assets?

The only way I can think of is make sure to name the folders the same as the entry url title so we can grab the correct folder, but thats open to mistakes.

Thanks

# Answer
I could not find a solution, so I wrote a fieldtype that allows linking an entry to an Assets folder. You can now create multiple folders and sub-folders, then link an entry to different parent folders, then using Asset tags retrieve the sub-folder list based on the entry's asset folder id.

https://github.com/amityweb/assets\_folder
> 1 votes

---
Tags: assets, files
---


# Question
Title: Transcribe language switcher only showing one language
Transcribe language switcher is only showing English even though I have 2 other languages enabled. I am using this code directly from the docs with minor changes

```
                        {exp:transcribe:language_links show_all="yes"}
                    <ul class="pull-right list-inline">
                        <li>{exp:transcribe:replace name="select_language"}</li>

                        {languages}
                            <li><a href="{link}" class="{if current}active {/if}text-uppercase">{abbreviation}</a></li>
                        {/languages}
                    </ul>
                {/exp:transcribe:language_links}

```

Only shows EN :( should show EN DE ZH. Anyone ever run into this?

# Answer
The language switcher will not show the additional languages until you save a variable set. In transcribe go to variables and change to another language and add at least one variable and save. Your language will now show in the switcher :)
> 1 votes

---
Tags: transcribe
---


# Question
Title: Content Elements and P&T Fieldpack List Problem
Trying to use the P&T List from the Fieldpack within Content Elements and the values do not seem to parse. Example code:

```
{exp:channel:entries channel="page" ...}

  {!-- Content Elements Field --}
  {cf_page_body}

    {textarea}
      <p>{value}</p>
    {/textarea}

    {fieldpack_list}
      <ul class="compact-list">
        {values}
          <li>{item}</li>
        {/values}
      </ul>
    {/fieldpack_list}

  {/cf_page_body}

{/exp:channel:entries}

```

The output does not seem to get parsed only for fieldpack's list element in CE, neither the "values" tag pair or the "item" var - i.e.; it's returned as:

```
{values}
  <li>{item}</li>
{/values}

```

Any ideas? I've tried numerous variations on the fieldpack's list Content Elements tag syntax in case it is a documentation error, tried running the values through Stash as a stash list with parse depth set accordingly, setting parse="inward" on the EE channel tag, but to no avail.

**Project Setup Info:**

* ExpressionEngine Ver. 2.7.3
* Content Elements Ver. 1.6.10
* P&T Fieldpack Ver. 2.1.1
* Stash Ver. 2.5.3

# Answer
In case any others might be struggling with this annoying problem: it's a compatibility issue, get the latest Field Pack (2.2) and everything works as it should :)

The Field Pack Changelog lists the following updates for Content Elements support:

* Added support for {element\_name} tags within Content Elements.
* Fixed compatibility issues iwth Content Elements.

http://docs.pixelandtonic.com/fieldpack/changelog.html
> 1 votes

---
Tags: pixelandtonic, field-pack, content-elements
---


# Question
Title: Is it possible to have a front end tag entry form that is responsive? How?
I'm trying to create a front-end channel form using bootstrap and I have a Tag Module field in it. I'd like to make the field responsive so it could be used on a phone. Is there any way to do this?

# Answer
You could use CSS rules that override the rules applied to the Tag widget.

If you don't want to use the Tag widget, you could have a simple textarea form with `name="your_tag_field_name"`:

`<textarea name="your_tag_field_name"></textarea>`

This lets you customize the form field the way you want (eg. make it responsive). Each tag would have to be on their own line in this case.
> 1 votes

---
Tags: solspace-tag
---


# Question
Title: Early Parsing with Low Variables and Member Export
I am using the Add-On *ajw\_export* and *Low Variables* to export a csv of member details. When the page loads the member data is exported on page load. I would like to use Low Variables for early parsing, to allow the system to know which member group is trying to access the page.

Im having two issues, either the content is exported regardless of which member group is logged in or else nothing is exported. Im certain I have written the tags incorrectly. Any help would be appreciated

```
               `{exp:low_variables:parse var="gv_member_export" multiple="yes"}

                    {if logged_in_group_id == 1}

                        {exp:ajw_export sql="SELECT * FROM exp_member_data" format="csv" filename="ascertusers.csv" }

                    {if:else}

                        Theres Nothing here for you to see

                    {/if}

                {/exp:low_variables:parse}`

```

# Answer
> 1 votes
If I understand correctly, you only want to execute the exp:ajw\_export tag if the logged in member ID is 1. For this, you don't need the low\_variables:parse tag. Instead, in the Low Variables settings, make sure Early Parsed Member Data is set to Yes. Then use (simple, pre EE2.9) conditionals:

```
{if logged_in_group_id == 1}
    {exp:ajw_export sql="SELECT * FROM exp_member_data" format="csv" filename="ascertusers.csv"}
{/if}
{if logged_in_group_id != 1}
    There's Nothing here for you to see
{/if}

```

The LV tag syntax you're using makes early parsing irrelevant. Also, the `multiple="yes"` parameter only applies to a number of variable types.

# Answer
> 0 votes
Resolved: Using the tags provided by low and by placing the ajw\_export on to a separate template.

```
                {if logged_in_group_id == 1}
                    <a href="template_group/template_name" class="button_export">Download</a>
                {/if}
                {if logged_in_group_id != 1}
                    There's Nothing here for you to see
                {/if}

```

---
Tags: members, low-variables, export, low, parsing
---


title: Request file through email

text:
# Question
Title: Request file through email
I want public users to have the possibilty to "order" a file (that is already on the webpage/server) through a form. After the form has been submitted successfully, an email should be sent to the entered user email with the file that has been ordered. Payment is not necessary! It's only about the sending process!

I'm searching a way to do it with an addon, but can't find one. Postmaster, Firemail, Forms, Freeform - all those are great tools for building forms, or sending mails - but no possibility to easy handling file attachements? Is there any other?

Might it be a solution to use PHP-Code within the "FormSubmitSuccessful"-Template and do it "on the fly" with phpmailer, for instance? Any other possible solutions?

# Answer
> 1 votes
I don't know of any add-ons that will attach the file to send attached to the email itself, having said that the easiest solution would be to use FreeForm or similar add-ons to collect the users information.

Then in your FreeForm user email template you would add a link to the file on your server or a download page that would allow the user to download the attached file.

# Answer
> 0 votes
You could do this with freeform: http://www.solspace.com/docs/freeform/form/

---
Tags: php, email
---


# Question
Title: Install lock in the config file, what does it do?
I notice there is a line $config\['install\_lock'\] = ""; in the config file but I cannot find any reference to this in the docs.

What does this do exactly?

# Answer
> 1 votes
I'm guessing here, but I can't test right now. Can you?

I guess it prevents the edition of the `config.php` file by the Config File Editor: Control Panel \> Admin \> System Administration \> Config File Editor

# Answer
> 1 votes
I think it's to prevent loading the installer interface if there's an 'installer' folder. But may not affect newer EE versions?

---
Tags: ee2
---


# Question
Title: MX Title Control - Not working with EE 2.8.0?
I've just set up a new testing environment and a brand new copy if EE 2.8 for testing new Add-Ons. After installing the latest MX Title Control (2.8.4) i can't seem to get it to work.

I've never had any problems with MX Title Control with older versions of EE.

Anyone experiencing the same problem?

# Answer
> 5 votes
The awesome Eric Lamb helped me track down the fix for this problem. It isn't related to the CP URL change. It's a problem in the addon file.

Change line 326 from:

```
$out = '//  THIS IS TEST';

```

to this:

```
$out = '';

```

# Answer
> 2 votes
I was able to fix the plugin by updating the ext.mx\_title\_control.php file on line 333 and 338. I replaced the following code:

element('channel\_id', $get)

with

element('/cp/content\_publish/entry\_form?channel\_id', $get)

# Answer
> 1 votes
There are a lot of Javascript related issues surfacing with 2.8, and I believe MX Title Control is highly JS-dependent, so this isn't surprising.

You might try applying the patch posted on this Bug Tracker: https://support.ellislab.com/bugs/detail/20165

# Answer
> 1 votes
This thread is a few months old, but the solutions provided so far have not worked for me. Until MX Title Control is updated for 2.8.1 (it still isn't as of posting), a simple fix to modify the "Title" and "URL Title" labels is to simply add some JS within the "instructions" field of any field within that channel's field group:

```
<script>// We're using this field's instructions to hijack labels via JS at DOM-ready
$(function() {

    // Make sure that this is the publish form (just for a level of safety)
    if (!EE.publish) return;
    // Set your channel's field group here (just another level of safety)
    if (EE.publish.field_group == 4) {

        // "Title" Label
        var titleLabel = $("#sub_hold_field_title").prev("label")
        var titleMarkup = titleLabel.html();
        titleLabel.html(titleMarkup.replace('Title','Custom Title'));

        // "URL Title" Label
        var URLTitleLabel = $("#sub_hold_field_url_title").prev("label")
        var URLTitleMarkup = URLTitleLabel.html();
        URLTitleLabel.html(URLTitleMarkup.replace('URL Title','Custom URL Title'));

    } else return;
});</script>

```

It's less than elegant, but it works for now.

# Answer
> 0 votes
In case anyone else stumbles on this looking for an answer, when upgrading isn't possible, change line 328:

```
parse_str(parse_url(@$_SERVER['HTTP_REFERER'], PHP_URL_QUERY), $get);

```

to

```
parse_str(parse_url(parse_url(@$_SERVER['HTTP_REFERER'], PHP_URL_QUERY), PHP_URL_QUERY), $get);

```

The URLs in 2.8 add an additional "?" to the query string (e.g. "/system/index.php?/cp/content\_publish/entry\_form?channel\_id=22") because of this the `parse_url` function doesn't properly parse the URL and thus creates issues for the rest of the `cp_js_end` function.

Also worth noting is that line 432 should also be updated to work with the new input field format (i.e. the removal of the ID attribute).

change line 432 from:

```
$out .= '$("#title").attr("maxlength", "'.$max_title.'");';

```

to

```
$out .= '$("[name=\'title\']").attr("maxlength", "'.$max_title.'");';

```

---
Tags: mx-title-control
---


# Question
Title: advantage of using Stash with LVs or Low Variables by itself
Can someone comment on if there is an advantage over Option 1 vs Option 2 or vice-versa.

```
Option 1 - Stash with LVs

{exp:stash:set name="product_description"}
{if segment_3 == 'content-management'}{lv_cm}{/if}
{if segment_3 == 'crm'}{lv_crm}{/if}
{if segment_3 == 'project-management'}{lv_pjm}{/if}
{if segment_3 == 'business-intelligence'}{lv_bi}{/if}
{if segment_3 == 'marketing-automation'}{lv_ma}{/if}
{/exp:stash:set}

{exp:stash:parse}
<p>{stash:product_description}</p>
{/exp:stash:parse}

Option 2 - Low Variables only

{if segment_3 == 'content-management'}{lv_cm}{/if}
{if segment_3 == 'crm'}{lv_crm}{/if}
{if segment_3 == 'project-management'}{lv_pjm}{/if}
{if segment_3 == 'business-intelligence'}{lv_bi}{/if}
{if segment_3 == 'marketing-automation'}{lv_ma}{/if}

```

Any advice is appreciated!!

# Answer
There'll be a slight hit to the stash version but if used correctly it can be utilized to cache the results.

So there's plus & minus to both versions.
> 1 votes

# Answer
The main advantage of using Stash here is for markup reusability. In your example you've wrapped a simple `<p>` tag around your `product_description` variable... In real world use on a large site, that markup might be 50 lines long and be reused in a dozen different templates. Stash allows you to abstract that markup away so that you only need to update it once. In the pure LV approach, you'd need to repeat that markup 5 times.
> 0 votes

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


# Question
Title: How to display the lowest number from multiple fields - PHP?
I have channel entries with around 20 number fields, each containing a price: {price\_1}, {price\_2}, etc.

I need to display the lowest of these prices in the entry's template but am finding it strangely difficult to do!

My PHP skills are just copy and paste level, and I thought I could just do:

```
echo min({price_1},{price_2}...)

```

But some of the price fields may be empty, so I am getting PHP errors.

Any help gratefully received!

# Answer
> 1 votes
How about this?

```
<?php
$list = array('{price_1}','{price_2}','{price_3}','{price_4}');
$result = array_filter( $list, 'strlen' );
echo min($result);
?>

```

---
Tags: php, math
---


title: Images uploading sideways

text:
# Question
Title: Images uploading sideways
I'm having an issue with a site where some members are experiencing sideways photos uploading via a Safecracker form.

I've looked into it, and found a solution (using Channel Images to upload, crop and rotate), but the client is reluctant to make the changes required. It seems EXIF data is at fault, i.e. not being stored correctly. But I'm not 100%.

Has anyone else experienced a similar issue? And was there a solution?

# Answer
> 2 votes
I managed to get this working. Here's how.

I made a hack for VZ Exif (by Eli Van Zoeren) that reads in orientation data. You can use this with CE Image to accomplish conditional rotation based on the photo's orientation. Click here to download the hack.

1. Put the hacked plugin in ./system/expressionengine/third\_party/vz\_exif/pi.vz\_exif.php
2. Install and enable CE Image
3. Use the below code in your template, replacing {photo} with the relevant field. `{exp:vz_exif image="{photo}"}
{if orientation == "1"}
 {exp:ce_img:single src="{photo}"}
{if:elseif orientation == "2"}
 {exp:ce_img:single src="{photo}" flip="h"}
{if:elseif orientation == "3"}
 {exp:ce_img:single src="{photo}" rotate="180"}
{if:elseif orientation == "4"}
 {exp:ce_img:single src="{photo}" flip="v"}
{if:elseif orientation == "5"}
 {exp:ce_img:single src="{photo}" flip="h" rotate="-270"}
{if:elseif orientation == "6"}
 {exp:ce_img:single src="{photo}" rotate="-90"}
{if:elseif orientation == "7"}
 {exp:ce_img:single src="{photo}" flip="h" rotate="-90"}
{if:elseif orientation == "8"}
 {exp:ce_img:single src="{photo}" rotate="-270"}
{if:else}
 {exp:ce_img:single src="{photo}"}
{/if}
{/exp:vz_exif}`

You may want to use some of CE Image's other options too. That's it! The result is a page that handles EXIF orientation better than Google Drive, Dropbox, Github, Imgur, Pinterest, Tumblr, WordPress, and many others.

# Answer
> 1 votes
It could be that the photo was shot sideways but the user's OS (normally Windows) has applied some kind of transformation for displaying on the local system. This doesn't actually change the photo, just sets some orientation (probably in the EXIF data) so the OS displays it the "correct" way around.

Because this transformation means nothing in the real world (or EXIF data is stripped/ignored) when they upload it, the photo appears as it was shot.

I don't think there's much you can do about this other than properly transform the photo either on the desktop or on the site (as you suggested to the client).

# Answer
> 1 votes
You should have a look at what this person has done.

http://ellislab.com/forums/viewthread/227175/#1036442

Even if this doesn't work properly. You can have a checkbox

http://devot-ee.com/add-ons/pt-field-pack

that asks if the image needs to be rotated. If its the case you can modify the plugin to take in the params you need and rotate it via the plugin.

---
Tags: file-uploads
---


title: Transcribe with Relationship fields

text:
# Question
Title: Transcribe with Relationship fields
I'm using Transcribe to create multiple language sites and also using relationship fields on some of my channels.

The problem is that the relationship field on the publish screen shows all entries from the related channel, regardless of which language site it belongs too.

This isn't ideal as on the publish page there is no way to tell what language those entries belong too, and you could accidentally relate entries that belong to another language site.

Anyone any ideas on a solution to this?

Cheers Darren

# Answer
We ran into the same issue with Transcribe and Playa fields. We had a 'staff' channel (amongst many others) so we had lots of identically named entries for each person in each language (4 x John Smiths, etc), so it was tricky trying to pick the correct language 'John Smith' in a Playa field.

First of all, the ideal solution would be if there was a Transcribe extension that had the option to automatically filter the Playa/Relationship entries by language, or else add a language column or label to these fields so you can easily choose the correct language entry. I think that's a feature request though.

In the meantime, Tom from EE Harbour suggested the following workaround to us:

> Most people end up adding the language prefix to the title of the entry. From there, they create a "Display Title" field that they use in the template to actually display the title without the language prefix.

This is probably the simplest workround and the one that we'd recommend if we did this again. At the time though, we weren't keen on using the Title field in this way, and having to create a Display Title field. It seemed like extra work and extra copying and pasting for the client. It would have been the most simple solution for us to implement though.

So rather than use the above workaround, we created a 'Language' category group, and created a category for each language that's being used on the site. We then used the Category Field add-on to add a 'Language Helper' custom field (showing a single option category drop down) to each channel that appears in Playa fields:

Then when the client is using a Playa field, they can use the category filters to filter the entries by language:

The client wasn't 100% happy with having to manually set this additional dropdown field for every entry, so we added the following JS to the control panel (adding it to the Custom Javascript field within the CP CSS & JS add-on) to make this field automatically populate itself based on the Transcribe Language Association dropdown (and we made sure our category names exactly matched the labels in this dropdown).

In the following code, field ID's 95-106 are all the 'Language Helper' custom fields we added to the various channels on the site, so you might not need so many if you have a smaller site).

```
$(window).on('load', function() {
  var transcribeModule = (function() {

    var $hold_field = $('#sub_hold_field_transcribe__transcribe_language').find('select');
    if(!$hold_field.length) {
      return false;
    }

    var $target_field = $('#hold_field_94.publish_category_field, #hold_field_95.publish_category_field, #hold_field_96.publish_category_field, #hold_field_97.publish_category_field, #hold_field_98.publish_category_field, #hold_field_99.publish_category_field, #hold_field_100.publish_category_field, #hold_field_101.publish_category_field, #hold_field_102.publish_category_field, #hold_field_103.publish_category_field, #hold_field_104.publish_category_field, #hold_field_105.publish_category_field, #hold_field_106.publish_category_field').find('select.category_field_select');

    if(!$target_field.length) {
      return false;
    }

    function mirrorFields() {
      var selected_text = $hold_field.find(':selected').text();
      $target_field.find('option').each(function() {
        var $this = $(this);
        $this.removeAttr('selected');
        if($this.text() == selected_text) {
          $this.attr('selected', true);
        }
      });
    }

    mirrorFields();

    $hold_field.on('change', function() {
      mirrorFields();
    });
  }());
});

```

So all in all, there's no ideal solution that we know of here, but hopefully, one these two workaround are of use to you.
> 2 votes

---
Tags: relationships, transcribe
---


title: Can't get channel files to work

text:
# Question
Title: Can't get channel files to work
I have been trying to add a channel field where I can allow the user to upload files with ease especially PDF files. I just bought the "Channel Files" module but I cannot get it to work for me. The problem is that I cannot see the files on the page where i'm trying to upload the files. It seems to work perfectly fine on the publishing page and I am able to upload files there. I think I just didn't get the code right on the template.

```
     <div class="files">
     {exp:channel_files:files channel="news" field="section"}
     <a href="{file:title}">{file:title}</a>
     {/exp:channel_files:files}
     </div>

```

# Answer
Actually if you are using this within an entry, it is easiest to just use the field name.

```
{exp:channel:entries channel="whatever" limit="1"}

{my_files_custom_field}
<a href="{file:url}">{file:title}</a>
{/my_files_custom_field}

{/exp:channel:entries}

```

If that doesn't work and you get empty values for the url and title you are most likely having some variable collision. Most likely you called the channel field "files".

So do this then

```
{exp:channel:entries channel="whatever" limit="1"}

{my_files_custom_field prefix="cf"}
<a href="{cf:url}">{cf:title}</a>
{/my_files_custom_field}

{/exp:channel:entries}

```

You will see here I am changing the variable prefix so it doesn't conflict with another variable called "files".
> 0 votes

# Answer
The channel files tag pair displays the files associated with a specific entry, so for troubleshooting purposes, have you tried to remove all of the parameters to see what the tag pair returns? If you do this:

```
{exp:channel_files:files}
 <a href="{file:url}">{file:title}</a>
{/exp:channel_files:files}

```

Do you get anything within your template (I'm ignoring for the moment any possibility that you have multiple channel file fields within your channel)?
> 0 votes

---
Tags: ee2, file-uploads, devdemon, channel-files
---


title: Multiple keywords low search

text:
# Question
Title: Multiple keywords low search
I have just purchased Low Search.

Is it possible to perform multiple keyword searches like the following:

Holiday, Cyprus

This does not return the same results as if I searching for the following individually:

Holiday

or

Cyprus

What I would expect is results based on keyword Holiday and ALSO keyword Cyprus but this is not the case.

A heads up on this would be great.

Thanks

# Answer
Yes, with Low Search you can use multiple keywords. Here are the docs on the Keywords filter.

Specifically, check out the `search_mode`. By default, this is set to *All*, meaning searching for "holiday cyprus" will return entries that contain both "holiday" *and* "cyprus". You can change that to *Any*, which will return entries that contain either "holiday" *or* "cyprus" (or both).

If you're getting unexpected results, submit a ticket in the official Low Search support forums.
> 0 votes

---
Tags: low-search
---


# Question
Title: Clever ways to flag EE entries and comments?
I've got a site with a list of entries on a single page (I'm not using single entry pages) and I'd like an elegant way to let users flag entries on this page without adding a ton of extra code (such as with forms for each entry). Ideally, this method would be able to change the status of the entry to "closed" when a certain number of flags have been reached.

I've reviewed all the modules I can find out there which attempt to do some of these things but they are all designed to add a form to a single entry page rather than a list of entries on one page.

Unfortunately, if I were to use these modules, such as FlagMaster, I would end up with a form on my page for each entry and the code would make the page massively more complex and weighty.

Can anyone suggest how to flag entries in this manner? Thanks!

# Answer
> 0 votes
What kind of spam do you mean? Comment spam? Registration? Honee pot is an effective way of dealing with it and recaptcha is as well. Definitely lots of ways of fighting it. Even the built blacklist/whitelist addition has been helpful too.

# Answer
> 0 votes
Free VZ-average is a framework for for rating and/or tallying.
If you're comfortable with a bit of php coding by yourself,
you can easily make a flagging solution.

https://devot-ee.com/add-ons/vz-average

---
Tags: entries, spam
---


# Question
Title: Structure module - How to display a dynamic page for all my products
(I am using Structure module version 3.3.6)

Hey guys! I have made this structure so far :

Home -\> Products -\> Commercial furniture -\> Showcase counters So showcase counters is a sibling of commercial furniture, which the last one is a sibling of products, etc..

So right now when I am on my showcase counters page, the url looks like this : http://www.my-web-site.com/products/commercial-furniture/showcase-counters

In my showcase counters page, I created channel of my products but this is where I am stuck, how can I get on my product page with this kind of url : \[...\]/products/commercial-furniture/showcase-counters/product-1

I tried this in my showcase counters page : {exp:channel:entries channel="products" \[...\]} \[...\] a href="{title\_permalink='/products/commercial-furniture/showcase-counters/'}"\>{product\_name} \[...\] {/exp:channel:entries}

When I created this href, I get the right URL but is there any way to tell which template to use? Cause right now I got this url : \[...\]/products/commercial-furniture/showcase-counters/product-1 which is exactly what I want but I can't find where to put a specific template...

Is there any way to achieve this? Thanks!!

# Answer
> 0 votes
You would want to attach a listing channel to /showcase-counters/ and use a channel tag to call of those entries from the /showcase-counters/ template. Don't forget dynamic="no" as EE requires this to call entries not related to the current URL structure (with or without Structure).

---
Tags: channel, structure
---


# Question
Title: Low search returning results from other channels when no options are selected
I have a (low) search form set up like so (stripped out example) to search a collection Ive set up called 'walks'. This collection is for the 'walks' channel.

```
{exp:low_search:form collection="walks" query="{segment_3}" result_page="walks/results"}

  <input type="text" name="keywords" id="keywords"/>

  and then a category dropdown and two sets of checkbox fields to
  search within checkbox fields in the entries.

{/exp:low_search:form}

```

It all works perfectly, apart from whenever I perform a search without entering a keyword, selecting a category from the dropdown, or checking any checkboxes. When doing this it returns entries from other channels.

Any idea why it would do this?

# Answer
As per version 3.0, Low Search doesn't accept filter-parameters in the Form tag. Instead, you should move these parameters to the Results tag or add them as (hidden) input fields inside the Form tag.

So, try removing the collection="" parameter (which is part of the Keywords filter) from the Form tag, and add it to the Results tag instead.
> 2 votes

---
Tags: low-search
---


# Question
Title: Supersearch conditionals on custom fields
I have a supersearch form with checkbox filters for a custom field. The results are working great and the url looks like this: /search&amenities=dryer&&dvd&&fireplace/

Now I'm trying to set the conditionals to make the active checkbox checked. Following the docs here's what I've tried:

```
<input
type="checkbox"
name="amenities[]"
value="dvd&&"
{if super_search_amenities_dvd}checked="checked"{/if}/>

```

The && at the end of the value are made to chain more than one filter (dryer&&dvd). I also tried

```
{if super_search_amenities_dvd&&}checked="checked"{/if}

```

but it doesn't work. Any ideas? How can I make this conditional work?

Thanks in advance! S-

# Answer
> 1 votes
If you're using EE 2.9+ maybe try the new "contains" conditional:

`{if super_search_amenities *= 'dvd'}checked{/if}`

Could probably check against the entire last\_segment if you prefer.

# Answer
> 0 votes
Super Search's `{super_search_FIELD_checkboxvalue}` was made with *OR* searches in mind (not *AND* searches). Using `&&` in fact throws a PHP error as Super Search can't read something like `{super_search_amenities_dvd&&}` properly.

However, `{super_search_amenities}` should output `dryer&&dvd&&fireplace`, which means you could break up this string using PHP and use the individual values in conditionals to output your `checked="checked"` string.

First, turn on PHP for your template and set it to **Output**.

Then, break up the string into an array of individual categories:

```
<?php $items = explode("&&", '{super_search_amenities}'); ?>

```

Next, for each checkbox field, loop through each item in the array and use a conditional to check if there's a match with your checkbox field value:

```
<?php foreach($items as $item) :?>
    <?php if($item == 'dvd') :?>
        checked="checked"
    <?php endif ?>
<?php endforeach ?>

```

Repeat for each checkbox.

**Perhaps too lengthly?** PHP has more than one way to deal with data. You could instead create an array of your checked values and check if each checkbox field item is in this array. Starting from the top:

```
<?php $items = explode("&&", '{super_search_amenities}'); /* --Break up the Super Search string-- */ ?>

<?php $item_array = array(); /* --Start with an empty array-- */ ?>

<?php if(count($items) > 0) :?>
    <?php foreach($items as $item) :?>
        <?php $item_array[] = $item; /* --Adding checked items to the array-- */ ?>
    <?php endforeach ?>
<?php endif ?>

{!--
     The array is now built.
     Now go through your checkbox fields, and with a single line
     check if each value is in $item_array, eg. :
--}

<input type="checkbox" name="amenities[]" value="dvd&&"
   <?php if( in_array('dvd', $item_array) ) :?>checked="checked"<?php endif ?>
>

```

Repeat for each checkbox.

> Based on the solution for breaking up category values found here: http://support.solspace.com/solution/categories/115922/folders/257413/articles/184200-handling-searches-with-multiple-categories-or-multiple-values-for-a-custom-field-i-e-an-array-of-se , and modified for this answer.

---
Tags: solspace, supersearch
---


# Question
Title: Using Grid and thumbnails to create a photo gallery
I am building a photo gallery. I have a folder called "\_small" which has small thumbnail images in to of the photo gallery images. I am using Expression image Grid to build the page. How do I call the the small image since the code already requires a ":"

Here is my code

```
{photos}
    <img src="{photos:image:small}" alt="{photos:image_name}">
{/photos}

```

In other areas I called thumbs by using something like this:

```
<img src="{image:small}" alt="{image_name}">

```

But grid requires the field followed by a : to work, which seems like to many :'s to process. Any thoughts. Thanks for looking!

# Answer
Check out this tutorial from Mike Boying covering this exact subject: responsive portfolio site using Grid

His code for the slides looks similar to what you need.
> 1 votes

---
Tags: templates, grid, image
---


# Question
Title: Solspace Calendar, ICS_Update & Google Calendars
I am having problems with Solspace Calendar 1.8.4 in EE 2.7.0 using the ICS Update function.

I've created a template with the following code:

```
{exp:calendar:ics_update calendar_id='179'}{/exp:calendar:ics_update}

```

I've verified that there is an entry with id 179 in the Calendar: Calendars channel that is 'open'. I've also confirmed that the following is in the "URL to iCalendar (.ics) file" field:

```
https://www.google.com/calendar/ical/canadian__en@holiday.calendar.google.com/public/basic.ics

```

When I browse to the template, I don't see any output at all (logged in as super admin). No items are imported into the calendar. The calendar was initially created without the ics URL filled in, but I have also tried creating a new calendar and adding the URL to the ics file at that time. Neither option has worked at this point, and I am attempting to get this done for my client this week.

Does anyone have experience with the ics\_update that can point me in the right direction to get this fixed?

# Answer
I managed to get the calendar to import events by making some changes in the code to patch a couple of bugs when Solspace support wasn't able to help after upgrades, patches applied, etc. I submitted the changes I made to Solspace.
> 0 votes

---
Tags: solspace-calendar, google
---


title: Postmaster email issues

text:
# Question
Title: Postmaster email issues
Currently we are using Postmaster to send all automated email, we are very happy to see such module.

Unfortunately we got some issues with it;

1. All email that has been sending with the ExpressionEngine service got equal signs in the mail. We already check the NewLine and the CRLF, but all options are failing.
2. Mandrill gives us some error: "Mandrill Service - Error: SSL certificate problem, verify that the CA cert is OK. Details: error:14090086:SSL routines:SSL3\_GET\_SERVER\_CERTIFICATE:certificate verify failed"

PHP version : 5.3.13 and running Wamp.

# Answer
Please send bug reports to support@objectivehtml.com. I will be able to help you a lot better there.

StackExchange is best left for usage questions, not technical support issues (bugs) as I need to ask a series of questions before I can give an answer. I have not experience any of these issues first hand though, but I am sure there is a simple solution.
> 1 votes

# Answer
This is an issue with cURL's ability to communicate over SSL, and this solution worked for me:

https://stackoverflow.com/a/16495053/1919543
> 0 votes

---
Tags: email, postmaster
---


# Question
Title: Expresso-store: Shpping rule and descrtiption
Is it possible to display related description from shipping rule at the checkout process for particular shipping method?

# Answer
> 1 votes
You would need to use the Shipping Method tag pair to loop through available shipping methods. You will want to look `shipping_method_name`, `shipping_method_class,`method\_title`, and`method\_price\` tags in particular.

---
Tags: expresso-store, shipping
---


# Question
Title: Toggle Editor not working after upgrade to EE 2.9.2
I just updated a site to EE 2.9.2 and the Template Editor is exhibiting funny behavior. If I click Toggle Editor, the row numbers truncate and the template text disappears. If I click it again, the template text is there but without the color coded text. See attachment. Has anyone else experienced this and is there a solution?

# Answer
> 1 votes
I was having the same issue. I copied a new version of the "themes" folder from a fresh 2.9.2 install into my webroot. Then I put my third-party themes back in and all works great now. I think it's a set of styles or JS in the themes folder that you're missing.

Good luck!

Greg

---
Tags: templates, ee2-upgrades, editor, template-manager
---


title: Pagination Links

text:
# Question
Title: Pagination Links
We are using pagination\_links throughout a site and would like for the tag page to match. I'm wondering if there's a way to get pagination\_links to work with Tag? I tried simply adding "tag\_" to all the variables, but that did not work.

This is the pagination\_links code we are using:

```
{paginate}
  {pagination_links page_padding="5"}
<hr>
    <ul class="pagination">
      {first_page}
        <li><a href="{pagination_url}" class="page-first">First Page</a></li>
         {/first_page}

         {previous_page}
           <li><a href="{pagination_url}" class="page-previous">Previous Page</a></li>
         {/previous_page}

        {page}
          <li><a href="{pagination_url}" class="page-{pagination_page_number} {if current_page}active{/if}">{pagination_page_number}</a></li>
         {/page}

         {next_page}
           <li><a href="{pagination_url}" class="page-next">Next Page</a></li>
         {/next_page}

        {last_page}
          <li><a href="{pagination_url}" class="page-last">Last Page</a></li>
         {/last_page}
       </ul>
<hr>
    {/pagination_links}
{/paginate}

```

# Answer
> 0 votes
Which template tag are you using? Tag:Entries? If so, just prepend the {paginate} and {pagination\_links} variable pairs with **tag\_**, and no others (Re: Docs).

Your final solution would look like this:

```
{tag_paginate}
   {tag_pagination_links page_padding="5"}
      <ul class="pagination">
         {first_page}
            <li><a href="{pagination_url}" class="page-first">First Page</a></li>
         {/first_page}
         {previous_page}
            <li><a href="{pagination_url}" class="page-previous">Previous Page</a></li>
         {/previous_page}
         {page}
            <li><a href="{pagination_url}" class="page-{pagination_page_number} {if current_page}active{/if}">{pagination_page_number}</a></li>
         {/page}
         {next_page}
            <li><a href="{pagination_url}" class="page-next">Next Page</a></li>
         {/next_page}
         {last_page}
            <li><a href="{pagination_url}" class="page-last">Last Page</a></li>
         {/last_page}
      </ul>
   {/tag_pagination_links}
{/tag_paginate}

```

---
Tags: solspace-tag
---


# Question
Title: search: different custom fields across multiple channels
I have a couple channels with different custom fields. I would like to combine the entries of multiple channels using the search: parameter, however, I can't specify to which channel the search: parameter applies.

Something equivalent to this:

```
{exp:channel:entries
    channel='articles|videos|news'

    search:[channel:articles]:article_videos="not IS_EMPTY"
    search:[channel:videos]:video_url="not IS_EMPTY"
    search:[channel:news]:news_video="not IS_EMPTY"

    limit="30"}

```

Can it be done? Does someone has a suggestion? Custom query?

# Answer
> 1 votes
In the end it seemed that this is not possible in any current way. So I tried it with Low Search (no luck) and contacted Low via his GetSatisfaction support board. For a fee, he made a special filter for Low Search that would apply the search parameter fields only tho the channels containing them, in order to accomplish my goal. Now it works like a dream.

The code I now use is:

```
{exp:low_search:results
    channel='articles|instagram'
    disable="categories|category_fields|member_data|pagination"
    status="not closed"
    dynamic="off"
    limit="50"
    collection="articles|instagram"
    orderby="date"
    sort="desc"

    smart_field_search="yes"
    search:article_videos="not IS_EMPTY"
    search:instagram_video_url="not IS_EMPTY"
}
    {if channel_short_name == 'instagram'}
        <!-- CODE -->
    {if:elseif channel_short_name == 'articles'}
        <!-- CODE -->
    {/if}
{/exp:low_search:results}

```

He might release it is some future version.

---
Tags: channel, search
---


# Question
Title: 404 not working - must not have strict URLs
I have set the 404 page on Templates \> Global Template Preferences, but it is having no effect.

I do not want to turn on 'Enable Strict URLs' as it cause several problems on some pages. And anyway, I don't mind if http://www.domain.com/product/not-the-right-url defaults to /product, or the last channel entry in /product.

What I do want is that http://www.domain.com/not-the-right-directory defaults to the 404 page.

The problem is the setting in Global Template Preferences is having no effect on the site. All that happens is that you see the home page if you type in the wrong URL.

The site is running EE 2.9.0 on a Plesk 12.0.18 Apache Server.

# Answer
> 1 votes
Specifying the 404 page doesn't cause it to appear in 404 situations - you need to do more work yet.

You pretty much have to turn on strict urls in order to setup a basis for the 404 template to show. Strict urls ensure that segment 1 is a valid template group name. From there you'll need to handle deeper 404 situations at the template level.

This article is a great overview of the 404 management in EE: http://joviawebstudio.com/index\_ee.php/blog/guide\_to\_404\_pages\_with\_expressionengine/

If you have a template where turning on strict urls causes issues that should be addressed separately.

---
Tags: 404
---


# Question
Title: Add-on Dev: Extending channel->entries and tagdata
I have a search module that grabs locations based on coordinates and estimates distances. I've decided to extend then channel class so I can take advantage of the entries method to display search results. In my method, I use an sql query to find the entry\_ids and estimated distance. I then have the following:

```
public function search_results() {
    ...
    $entry_ids = '4|24|265|23';
    $distances = array(
        1.023536,
        1.254824,
        3.000325,
        4.923142
    );

    ee()->TMPL->tagparams['entry_id'] = $search_ids;
    return parent::entries();
}

```

This works great with the following code in my template, with one problem:

```
{exp:module:results}
    <li>
        <span>{distance}</span>
        <h4><a href="/location/{url_title}">{title}</a></h4>
        <div>{my_custom_field}</div>
    </li>
{/exp:module:results}

```

The "distance" is not a channel field, but that calculated value. Any suggestions on how I can inject that into the parsing per row?

# Answer
You could create an extension which uses the channel\_entries\_query\_result hook to add your variable to each entry row. That will get parsed along with the native vars. To pass data from your module/plugin file to the extension, you'd need to use the Session cache.

You might be interested to know that Low Search offers a straight forward API for custom filters, which basically extends the channel:entries tag, too. With it, in the same file, you can add your filter rules (which you have in your module/plugin file) and manipulate the output of the results (which you can do with an extension).
> 3 votes

---
Tags: channel-entries, add-on-development, plugin, extension
---


# Question
Title: PHP Error Notice Undefined index: field_ta_rows in textarea/ft.textarea.php
I have this PHP warning noticed that's appearing in one of my channels and I'm not sure what the issue is. My channel has 9 custom fields; 4 grid fields, 3 text input fields, a text area field and a file upload field. I don't think there is anything overly complicated happening with these fields. I have Field Pack installed but i'm not using it within this channels custom fields. Has anyone else had a similar issue? What are some things I should look out for that might be causing this to appear?

Notes: This was a fresh install of EE 2.9.2. Field Pack version is 2.2.

```
A PHP Error was encountered
Severity: Notice
Message: Undefined index: field_ta_rows
Filename: textarea/ft.textarea.php
Line Number: 77

```

# Answer
I came across this just now and fixed it by changing the number of rows assigned to the gird textarea field. Possibly related to this Structure bug (if you're using that?): http://structure.tenderapp.com/discussions/problems/18867-bug-with-assets-and-grid-and-a-structure-field-type
> 1 votes

---
Tags: custom-fields, php-errors, textarea
---


# Question
Title: Buy 2 get 1 free across all products in Expresso Store
I'd like to offer "buy 2 get 1 free" on my site which sells CDs. So if people put more than two items in their cart, the cheapest is free.

Using the "Buy X get Y" discount type, I can only seem to get this to work if they buy three of the same product, but if they buy three different ones.

Is there a way to do this in Expresso? Thanks for your help!

# Answer
> 0 votes
Just got this reply from DevDemon:

*There is no built in way in the current Exp-resso Store discount system to do this with cross products. They must be the same product. Using the Extension capabilities of ExpressionEngine you could however write an extension that does this logic and make the deals.*

If anyone ever does make an extension for this would be great – my coding skills don't stretch to that!

---
Tags: expresso-store
---


title: Add <br> button in WYGWAM toolbar

text:
# Question
Title: Add <br> button in WYGWAM toolbar
Is there a way to add a button to the WYGWAM styles or controls that allows user to easily insert a `<br>` tag inside a paragraph?

# Answer
shift-enter is easy enough. Hoop it helps
> 2 votes

---
Tags: wygwam
---