title: Freeform: not recieving any submissions

text:
# Question
Title: Freeform: not recieving any submissions
Any chance somebody knows why this freeform form isn't working? With not working I mean not recieving any submissions. i cannot seem to figure it out because on one site it works and on a new site it doesn't.

The only difference is the version number of ee and freeform. On the old site its ee (2.7.3) / freeform (4.1.3) while on the new site it's ee (2.10.1) / freeform (4.2.3)

```
{exp:freeform:form
                        form:id="contact"
                        notify="claudio@maff.be"
                        form_id="1"
                        required="first_name|email|user_message"
                    }
                        <input type="hidden" name="subject" value="Contact from Nunc website.">
                        <div>
                            <label for="firts_name">Name*</label>
                            <input minlength="2" type="text" name="first_name" id="first_name" value="" />
                        </div>
                        <div>
                            <label for="email">e-mail*</label>
                            <input type="text" name="email" id="email" value=""  />
                        </div>
                        <div>
                            <label for="user_message">Note*</label>
                            <textarea name="user_message" id="user_message" ></textarea>
                        </div>
                        <div>
                            <div class="sendButton"><input type="submit" value="Send" /></div>
                        </div>

{/exp:freeform:form}

```

Rendered HTML ;)

```
<div id="form" class="section bg-grey">
        <div class="inner">
            <h2 class="heading size-2 weight-700 all-caps centered-text"><i class="icon icon-icon-circle ico-element"></i>enrol<i class="icon icon-icon-circle ico-element"></i></h2>
            <div class="box-form clearfix">
                <form action="http://dev.projectu-turn.com/?ACT=29" accept-charset="utf-8" method="post"><div style="display:none">
    <input type="hidden" name="params_id" value="218" />
    <input type="hidden" name="csrf_token" value="3a54070ec93939a2610d11a31e867ce6c289e539" />
    </div>
                            <input type="hidden" name="subject" value="Contact from Nunc website.">
                            <div>
                                <label for="first_name">Name*</label>
                                <input minlength="2" type="text" name="first_name" id="first_name" value="" />
                            </div>
                            <div>
                                <label for="email">e-mail*</label>
                                <input type="text" name="email" id="email" value=""  />
                            </div>
                            <div>
                                <label for="user_message">Note*</label>
                                <textarea name="user_message" id="user_message" ></textarea>
                            </div>
                            <div>
                                <div class="sendButton"><input type="submit" value="Send" /></div>
                            </div>
                        </form>
            </div>
        </div>
    </div>

```

# Answer
> 0 votes
Well at least your HTML seems to be rendering properly.

Your issue could be a couple of things. Getting the simplest thing out of the way first...

Does the *name* attributes of your form elements match any of the field names of your new form? After working with EE and Freeform for two years now, even I sometimes forget to update these.

Apart from that, the only other thing I can think of that may be causing the issue is the ACTION id that the form is posting to.

Looking at your form, it uses an ACTION id of 29.

`<form action="http://dev.projectu-turn.com/?ACT=29" accept-charset="utf-8" method="post">`

Take a look in your EE database at the ACTION IDs listed in the *exp\_actions* table. Reading along the table entry, the ID should correspond to the *save\_form* method present in the Freeform Module.

If this entry is non-existent in the table, it means that the installation or update of Freeform has failed. Fix the installation issues and everything should be working again as usual.

---
Tags: solspace-freeform
---


title: Can Expresso do these things?

text:
# Question
Title: Can Expresso do these things?
I'm a newbie to EE so be gentle. I'm looking for a cart addon. Cart must be easy to make PCI DSS compliant, must have selectable product options and oddly, must be able to sell even if stock is zero (third party will fullfill the orders and we don't have their stock levels but they're on the ball so they tell us). Also cart must have import products facility/functionality. If not would it be simple to write my own using PHP or should I not mess with DB directly?

Can Expresso do all this?

Thanks

# Answer
I lead Development at Vector Media Group, which owns CartThrob. I'm clearly biased in my belief that CartThrob is the better product. That said, I can answer your specific functionality questions as well:

> cart must be easy to make PCI DSS compliant

You're certainly able to have PCI compliance using CartThrob. Many of our clients do, and CartThrob does what it can to help in this regard. Obviously a lot of the PCI compliance steps will fall onto your setup and server regardless of what commerce software you use though.

> Must have selectable product options and oddly, must be able to sell even if stock is zero (third party will fullfill the orders and we don't have their stock levels but they're on the ball so they tell us).

CartThrob can do this. You can set the rules for when and how a product is allowed to be sold regardless of its inventory status. And if needed, you can use CartThrob's extension hooks to customize this even more.

> And lastly do either of these two carts have import products facility/functionality. If not would it be simple to write my own using PHP or should I not mess with DB directly?

Because CartThrob stores product information in regular ExpressionEngine channel fields, you can import product data the same way you'd import any other channel entries. If you don't want to mess with DB/PHP, there are two add-ons which can help: Solspace Importer and DataGrab.

Let us know if you have any other questions!
> 1 votes

---
Tags: expresso-store, ee
---


title: Conditionals using current time format

text:
# Question
Title: Conditionals using current time format
does anyone know why this code will not display correctly? It looks right to me.

```
{if "{current_time format='%d.%m'}" >= "06.11" && "{current_time format='%d.%m'}" <= "07.01"}
6 Jan

{if:elseif "{current_time format='%d.%m'}" >= "06.01" && "{current_time format='%d.%m'}" <= "21.02"}
20 Feb

{if:elseif "{current_time format='%d.%m'}" >= "20.02" && "{current_time format='%d.%m'}" <= "28.03"}
27 Mar

{if:elseif "{current_time format='%d.%m'}" >= "27.03" && "{current_time format='%d.%m'}" <= "16.05"}
15 May

{if:elseif "{current_time format='%d.%m'}" >= "15.05" && "{current_time format='%d.%m'}" <= "04.08"}
3 Aug

{if:elseif "{current_time format='%d.%m'}" >= "03.08" && "{current_time format='%d.%m'}" <= "12.09"}
11 Sept

{if:elseif "{current_time format='%d.%m'}" >= "11.09" && "{current_time format='%d.%m'}" <= "07.11"}
6 Nov
{/if}

```

# Answer
You are comparing numbers. {current\_time format='%d.%m'} is outputted as 18.08. This number is bigger than 06.01 and smaller than 21.02. Therefor it is correct that the text 20 Feb is printed.

Use epoch dates to compare. It is a reliable solution.

Edit: The plugin Str To Time seems to have what you want. Use it to convert the date you want to compare to, to a timestamp. Something like this:

```
{if {current_time} >= {exp:str_to_time date="November 6th, {current_time format='%Y'}"} &&
    {current_time} <= {exp:str_to_time date="January 7th, {current_time format='%Y'}"}}
    6 Jan
{if:elseif {current_time} >= {exp:str_to_time date="August 3th, {current_time format='%Y'}"} &&
    {current_time} <= {exp:str_to_time date="September 9th, {current_time format='%Y'}"}}
11 Sept
{if:else}
No date available
{/if}

```
> 0 votes

---
Tags: conditionals, date
---


# Question
Title: Is it possible to create an RSS feed with Solspace Calendar
Is it possible to create an RSS feed with Solspace Calendar. The RSS sample in EE used channels entries. Wondering if I can pull in events from a calendar into an rss feed.

This feed needs to also show all repeating events. I got it started but it only shows one event for a repeating event in my rss reader.

```
{exp:rss:feed channel="calendar_events"}

<?xml version="1.0" encoding="{encoding}"?>
<rss version="2.0"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
    xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
    xmlns:admin="http://webns.net/mvcb/"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:content="http://purl.org/rss/1.0/modules/content/">

    <title>{exp:xml_encode}{channel_name}{/exp:xml_encode}</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://ellislab.com/" />

  {exp:calendar:cal calendar_id="22" event_limit="24" date_range_start="today" show_months="6" pad_short_weeks="n" dynamic="off"}
<item>
      <title>{exp:xml_encode}{event_title}{/exp:xml_encode}</title>
      <link>{path='events'}/{event_id}/</link>
      <guid>{path='events'}/{event_id}/#When:{event_start_date format="%H:%i:%sZ"}</guid>
      <description><![CDATA[{event_summary}]]></description>
      <dc:subject>{exp:xml_encode}{categories backspace="1"}{category_name}, {/categories}{/exp:xml_encode}</dc:subject>
      <dc:date>{event_start_date format="%Y-%m-%dT%H:%i:%s%Q"}</dc:date>
    </item>
{/exp:calendar:cal}

</rss>

{/exp:rss:feed}

```

This code displays 3 out of 4 events (only one of the repeating events in Chrome RSS reader, it doesn't work at all in Firefox. Only shows the feed title and no events. Firefox says the rss feed is empty)

# Answer
> 0 votes
```
{exp:rss:feed channel="calendar_events"}

<?xml version="1.0" encoding="{encoding}"?>
<rss version="2.0"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
    xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
    xmlns:admin="http://webns.net/mvcb/"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:content="http://purl.org/rss/1.0/modules/content/">

    <channel>

    <title>{exp:xml_encode}CHP Events{/exp:xml_encode}</title>
    <link>{channel_url}</link>
    <description>CHP Events List</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://ellislab.com/" />

  {exp:calendar:cal calendar_id="22" event_limit="24" date_range_start="today" show_months="6" pad_short_weeks="n" dynamic="off"}
<item>
      <title>{exp:xml_encode}{event_title}{/exp:xml_encode}</title>
      <link>{path='events'}/{event_id}/</link>
      <guid>{path='events'}/{event_id}/#When:{event_start_date format="%Y-%m-%d %g:%i:%s"}</guid>
     <description><![CDATA[{event_summary}]]></description>
      <dc:subject></dc:subject>
      <pubDate>{event_start_date format="%D, %d %M %Y %H:%i:%s"}</pubDate>
      <dc:date>{event_start_date format="%Y-%m-%d %g:%i:%s"}</dc:date>
    </item>
{/exp:calendar:cal}

</channel>
</rss>

{/exp:rss:feed}

```

---
Tags: solspace-calendar, calendar, rss, events, feed
---


# Question
Title: Searchable content not appearing in search results
I've got an existing site, and recently changed the settings of a few Channel Fields to make them searchable.

There are lots of pages using the Channel already, so I was hoping that my change to the channel fields would make all that content searchable immediately, but this hasn't been the case. I've also tried editing and saving a page (in case that triggered a new index) but that hasn't worked either.

I can't find how to reset or rebuild the search index to include this content. Any pointers much appreciated!

T

# Answer
> 0 votes
It was user error as I feared. In order to make a new channel searchable I needed to change the channel="" parameter on my simple search form to include the new channel.

```
   {exp:search:simple_form channel="originalchannel|newlysearchablechannel" form_class="search-form" results="14" result_page="/search/results" no_result_page="/search/no_results" search_in="entries"}
                <label for="search">Search</label>
                <input type="search" id="search" name="keywords" placeholder="SEARCH" value="" />
                <input type="submit" value="Search" />
            {/exp:search:simple_form}

```

Thanks to Mark for the steer that I needed to make more changes than I had.

---
Tags: search, channel-fields, index
---


title: Shopping Cart Recommendations

text:
# Question
Title: Shopping Cart Recommendations
I've developed several sites using CartThrob, over the years, and it has been a love/hate relationship. They're great guys, and when they are on, they are super. When they're off, however, not so much.

Their support has been hit or miss, and has created problems for me with clients. Their responses to requests that I think should be included – like being able to set the tax rates by multiple parameters, produce pick lists for purchased items, etc. – are often met with estimates for expensive custom development.

Now, they are charging $1.00/minute for support. I think it's time to move on.

The problem is that there don't seem to be a lot of options out there that meet my clients' various needs. In addition to the standard shopping cart operations, we need:

Destination-based Sales Tax (for states like North Carolina) Gift Certificates with Stored Values Recurring Billing Flexible Reporting (packing slips, pick sheets, taxes, etc.) First-Time Order Charges (setup fees, etc.)

Does anyone have recommendations?

Thanks,

ty

# Answer
The other two big names in EE ecommerce are Expresso Store and Brilliant Retail.

Store has recently been taken over by DevDemon and is being actively developed by them.

BR is also still in active development, but does things a little differently from Store and CT.

Helpfully, BR has a demo store online to test (front end and back end). From my experience, if this fits closely, functionality-wise, with what you want to do, then BR is probably a good fit and it's possible to get up and running quickly. However, be aware that trying to do anything differently from the way BR is set up can be an exercise in frustration.

If you need something with more flexibility or outside of what BR offers, then I would suggest looking at Store.
> 1 votes

# Answer
I know this is a really old post, but I do want to let you know that CartThrob has been acquired by us, Vector Media Group, and we're committed to supporting and improving it going forward. More information can be found here.

If you're still looking for help, please feel free to let me know at matt@vectormediagroup.com or by submitting a request to the helpdesk: https://www.cartthrob.com/support/index.php?pg=request. I am confident you'll be happy with the recent progress and response times.
> 0 votes

---
Tags: shopping-cart, recommendation-request
---


# Question
Title: Custom Field Type - Data is not being saved
I'm creating a custom field type. But the data isn't being saved to the database. There are several values that are being combined into a string, divided by a pipe character.

I've checked the `save()` function, and it returns the string that I want to have saved in the database. But when I check the database, the field is empty, or has only one character.

Example string: `http://s3-eu-west-1.amazonaws.com/xyz/xyz/filename.jpg|55|170|541|541|1:1|260|260`

But actually, it doesn't matter what string it is. It never gets saved. Or in some cases only the first letter.

What could I be doing wrong?

EDIT: the save function itself

```
function save($data)
    {
        $content = FALSE;
        $custom = array();

        foreach($this->custom_fields as $key)
        {
            $val = ee()->input->post($key.'_field_id_'.$this->field_id);
            $custom[] = $val;

            if (strlen($val)>0)
            {
                $content = TRUE;
            }
        }

        $toReturn = "";

        if ($content)
        {
            $toReturn = utf8_encode(implode('|', $custom));
        }

        return $toReturn;

    }

```

# Answer
> 0 votes
The problem is resolved.

The fieldtype was using array data. But I rewrote it to save the data as a simple string. Makes things easier if you want it to work with some add-ons like Publisher.

But I forgot to remove `var $has_array_data = TRUE;` from the class. Simply removing it, or setting it to `FALSE` solved the issue.

---
Tags: custom-fields, database
---


# Question
Title: How to show one entry from multiple categories?
I have a masonry style setup for a portfolio page and would like to allow the client to chose multiple categories per portfolio entry. The issue I'm having is each entry is displaying multiple times in the 'Show All' section when more than one category is being selected.

Here is the basic markup I have for the portfolio section—

```
{exp:channel:entries channel="projects"}
{categories}
    <div class="element clearfix col1-3 portfolio {category_name}">
        <a href="{title_permalink='projects/index'}" title="">
            <figure><img src="{project_image:project_thumb}"/></figure>
        </a>
    </div>
{/categories}
{/exp:channel:entries}

```

Here's an image of what's showing on the 'Show All' section. The two items at the bottom are in more than one category, but I'd only like one to show.—

Thanks in advance.

# Answer
> 0 votes
Summary: you should be using the category parameter in the channel entries loop.

Longer answer:

The issue here is that you're displaying your entries within the {categories} tag pair; the typical use-case of {categories} is to build a category list, just like you have in the first tile of your layout.

```
{exp:channel:entries channel="projects"}
    {categories}... this gets looped through multiple times ... {categories}
{exp:channel:entries}

```

I suggest installing URL Helper, which would allow you to have a URL like example.com/portfolio/education - URL Helper will then give you the category ID of segment 2 - {segment\_2\_category\_id} - which you can use as the parameter in your channel entries loop.

```
{exp:channel:entries channel="projects" dynamic="no" category="{segment_2_category_id}"}
    {!-- channel fields here, without any {categories} tags --}
{exp:channel:entries}

```

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


title: Expression Engine - PHP error, endif

text:
# Question
Title: Expression Engine - PHP error, endif
I have a site using EE 2.5.2. When logged in as a super admin, on some accounts we get the following error when clicking on a link in one section of the site:

Parse error: syntax error, unexpected T\_ENDIF in /var/www/html/system\_giy/expressionengine/libraries/Functions.php(680) : eval()'d code on line 692

This only happens on some Super Admin accounts. Other super admin accounts work fine.

Update with code block from template. `

{title}
 {exp:switchee variable="{group_status}" parse="inward"} {case value="Public"} {exp:stash:get name='meetings'}

{imported_description}
 {if group_champion}

Group Contact(s)

{group_champion}

{group_champion_phone}

{group_champion_email}
 {/if} {group_documents} {if row_count == '1'}

Public Documents

{doc_title}
 {if:else}

{doc_title}
 {/if} {if row_count == total_rows}

 {/if} {/group_documents} {/case} {case value="Private"} {if "{exp:stash:get name='is_member'}" == 1} {exp:stash:get name='meetings'}

{imported_description}
 {group_documents} {if row_count == '1'}

Public Documents

{doc_title}
 {if:else}

{doc_title}
 {/if} {if row_count == total_rows}

 {/if} {/group_documents} {if:else}

This group is private. You must be a member of the group to see information on it.
 {/if} {/case} {/exp:switchee} {if "{exp:stash:get name='is_editor'}" == 1} {exp:channel:entries channel="giy_documents" entry_id='9385' dynamic='no' disable="categories|category_fields|member_data|pagination"}
 {if count =='1'}

Featured Admin Documents

 {/if} {documents_files}

{document_caption}
 {/documents_files} {if count == total_results}

All Documents

 {/if} {/exp:channel:entries} {/if}
 {if "{exp:stash:get name='is_editor'}" == 1}

 {exp:channel:entries channel="announcements" sort='desc'dynamic='no' disable="categories|category_fields|member_data|pagination"} {if count =='1'}

Announcements
 {/if}

{title}
 {exp:trunchtml chars="120" inline="..." }
 {exp:strip_html}{announcement_text}{/exp:strip_html} {/exp:trunchtml} Read More
 {if count == total_results} Announcement Archive

{title}

{announcement_text}
 ×
 {/if} {/exp:channel:entries}
 {/if}

 {/exp:channel:entries} {/if}`

# Answer
I'd start by commenting out sections of the code to isolate which field(s) are throwing the errors - once you do that, you should be able to track down what the issue is; I think I've seen bugs like this when there are poorly handled single/double/curly quotes in fields.
> 1 votes

---
Tags: php-errors, super-admin
---


# Question
Title: retrieve the value of a custom field depending on the value of a custom member field
I have a custom member field that can have a value of "1", "2" or "3"

In channel entries I need to output the value of one of three custom fields, depending the member field value.

ie : {field\_{member\_field}}

I've tried to put together a plugin but I'm a bit stuck in parsing order issues.

Any ideas ?

# Answer
> 0 votes
If it can help anyone, here is how I solved it:

1 - Forget the plugin idea

2 - Allow PHP on input in the template

3 - Query the database to get the custom member profile field value

```
    $member_id = ee()->session->userdata('member_id');

    if ( $member_id ) {

        $results = ee()->db->select('m_field_id')
            ->from('exp_member_data')
            ->where(array(
                'member_id' => $member_id
            ))
            ->get();

        $value = $results->row('m_field_id');

    }

```

4 - echo the php value in the template tag

```
{field_<?=$value?>}

```

---
Tags: parse-order
---


title: Compare entry date with 90 days ahead

text:
# Question
Title: Compare entry date with 90 days ahead
I need to display a message if an entry is more than 90 days old. The below code doesn't appear to be working, any tips on how to get this done?

```
{if {current_time} > {entry_date} + 7776000 }
    <div id="message">
        <h4>Your safety training is out of date.</h4>
    </div>
{/if}

```

# Answer
> 0 votes
You can't do math in an EE template without an an add-on; Will Hunting is my favorite, although there are others.

Edit: You couldn't do math in an EE template, within a conditonal, until the relatively recent EE 2.9.0; if you have an older install than that, you have to upgrade and/or use the add-on I mentioned.

# Answer
> 0 votes
It's proably becasue the tag in normal format outputs a string representation of the date, try the below which causes the output to be done as a UNIX Epoch time :

(Tested on EE 2.7.1)

```
{if {current_time format="%U"} > ( {entry_date format="%U"} + 7776000 ) }
  <div id="message">
    <h4>Your safety training is out of date.</h4>
  </div>
{/if}

```

Or , you could use a PHP flavour (if EE is having a string/number issue in the tags) :

**PHP On Output**

```
<?php
  if ( intval('{current_time format="%U"}') > ( intval('{entry_date format="%U"}') + 7776000 ) { ?>
    <div id="message">
      <h4>Your safety training is out of date.</h4>
    </div>
<?php } ?>

```

---
Tags: date, comparison
---


title: Custom SQL query to retrieve info

text:
# Question
Title: Custom SQL query to retrieve info
Do you guys know of a library where there's sample queries to retrieve info like how many pages are in a specific site ect?

What I mean is a custom select statement.

Thanks, Dan

# Answer
> 0 votes
I'll give you an example in PHP (within EE of course) here, this will count all posts in a channel, and I assume you drive your pages of a channel too :

```
<?php
  //count all Open posts in Channel 1, of site ID 1
  $res = ee()->db->select("COUNT(*) AS 'total'")
             ->from('channel_entries')
             ->where('status','open')
             ->where('channel_id','1')
             ->where('site_id','1')
             ->get();
  $totalChannel1Posts = 0;
  if ( $res->num_rows() > 0 ) {
    $res = array_unshift($res->result_array());
    $totalChannel1Posts = $res['total'];
  }

```

Is that any help?? Of course you can work out the query itself from the above too.

Otherwise, are you looking for some sort of site crawler? Because EE itself has no concept of a 'page', but rather templates that could be static or dynamic pages, a router and channels to store similar data, which in turn use a dynamic template to provide a new 'page' with entry specific data...

You might be best off using something like google to count your pages!

---
Tags: ee1
---


# Question
Title: Channel form problem when using inline errors
I am using channel forms to publish articles and would like to use inline errors but when I have this enabled I get an error.

```
A PHP Error was encountered
Severity: Notice
Message: Undefined property: EE::$view
Filename: libraries/File_field.php
Line Number: 704
Fatal error: Call to a member function head_link() on a non-object in /web/nifootball2/system/expressionengine/libraries/File_field.php on line 704

```

My template code

```
 {exp:channel:form channel="reports" return="clubhouse/fixtures" class="sky-form" rules:report_body="required|min_length[50]" error_handling="inline" }
                     <header>Publish Match Report</header>
                        <input type="hidden" name="report_match" value="{segment_3}" />
                        <input type="hidden" name="report_club" value="{club_name}">
                        <input type="hidden" name="report_club_url" value="{club_url_title}">

                      <fieldset>
                      <section>
                            <label class="label">Title</label>
                                    {exp:teammanager:club_team_match match_id="{segment_3}" team_id="{segment_4}" }
                                    <input type="hidden" name="title" id="title" value="{match_report_type} - {home_team_name} v {away_team_name} {match_date}" size="50" maxlength="100" >
                                    <input type="hidden" name="url_title" id="url_title" value="{match_report_type}-{home_team_url}-v-{away_team_url}-{match_date}" maxlength="75" size="50">
                                    {match_report_type} - {home_team_name} v {away_team_name} {match_date}
                                    {/exp:teammanager:club_team_match}

                                </section>

                         </fieldset>

                           <fieldset>
                           <section>
                       <label class="label">Report Body</label>
                                      {error:report_body}
                                    {field:report_body}
                            </section>
                           </fieldset>

                           <fieldset>
                            <section>
                            <label class="label">Cover Image</label>
                            <p>Add a cover image for the Article to be displayed beside the Article snippet on the Reports lists and at the top of the full article.</p>
                                {field:report_image}
                            </section>

                            </fieldset>

                            <footer>
                                <button type="submit" class="btn-u">Submit</button>
                            </footer>
                        {/exp:channel:form}
                        <!-- End Publish Report Form-->

```

# Answer
Seems this is reported elsewhere, and here. One solution would be as so :

**Core Edits - Danger, there be pirates!!!**

File : /system/expressionengine/libraries/File\_field.php

Line : 699 -\> 705 (EE 2.10.0 )

```
/**
 * Add the file browser CSS to the head
 */
private function _browser_css()
{
    ee()->cp->add_to_head(ee()->view->head_link('css/file_browser.css'));
}

```

Change this function as so :

```
/**
 * Add the file browser CSS to the head
 */
private function _browser_css()
{
    ee()->load->library('view');
    ee()->cp->add_to_head(ee()->view->head_link('css/file_browser.css'));
}

```

Because the error is coplaining that if there's errors it can't add the css for the file field, this is becasue `ee()->view` does not exist. The extra line above ensures it's loaded.

This is untested so please let me know how you fare...
> 0 votes

---
Tags: safecracker, wygwam
---


# Question
Title: Expresso-store - Comma in quantity field
It seems that if a user enters a comma in the quantity field (as in 2,000) the system ignores the figures after the comma and will add just the amount before the comma (ie '2').

Is there a way to prevent this happening?

(version 2.4.1)

# Answer
> 0 votes
You should be able to use HTML5 form validators such as

```
<input type="number" name="item_qty">

```

# Answer
> 0 votes
My friend-o, I would make use of this addon's extension hooks. You would want to create an extension that hooks to one of these:

https://www.exp-resso.com/docs/extension\_hooks.html

Like this one:

```
store_order_item_add_start

```

And then parse and modify the quantity value of the `form_params` variable array where the item quantity value most likely lives. Regular Expression out the commas, or even easier, string replace with an empty value!

http://php.net/manual/en/function.str-replace.php

# Answer
> 0 votes
Not the best solution by any means, but you can also use JS to prevent anything but numbers and decimal points from being entered. I do this on CC forms.

```
<script>
$('#fieldID').on('keypress', function(evt) {
var charCode = (evt.which) ? evt.which : event.keyCode;
return !(charCode != 46 && charCode > 31 && (charCode < 48 || charCode > 57));
});
</script>

```

---
Tags: expresso-store
---


# Question
Title: Admin->Synchronize Templates, show Only changed?
How can I modify the code to show ONLY templates that have changed? I think it kind of ludicrous to show unchanged templates in the Synchronize Templates page.

# Answer
You need to write an ExpressionEngine Accessory. Accessories allow you to inject code into Control Panel pages.

https://ellislab.com/expressionengine/user-guide/development/accessories.html

Please go that route, and **not** the "let's edit core files derp derp" route. You can use this method to inject some jQuery using a function like this:

```
ee()->cp->add_to_foot('
<script>
    $(document).ready(function(){
        $('.class-of-unchanged-template-rows-goes-here').remove();
    });
</script>
');

```

This answer has a more thorough example of how an accessory is structured:

Include custom JavaScript in the control panel
> 1 votes

# Answer
This is the final working accessory for everyone to use. If you make mods, please post them here.

```
<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');

/**
 * ExpressionEngine Developer Accessory
 *
 * @package     Synch Templates fix
 * @category    Accessory
 * @description Shows only CHANGED templates in Synchronize templates view
 * @author      MB34
 */

class Synch_templates_acc
{
    var $name           = 'Fix Synch Templates';
    var $id             = 'default_value';
    var $version        = '1.0';
    var $description    = 'Shows only CHANGED templates in Synchronize templates view';
    var $sections       = array();

    // --------------------------------------------------------------------

    /**
     * Constructor
     */
    function __construct()
    {
        $this->EE =& get_instance();
    }

    // --------------------------------------------------------------------

    /**
    * Set Sections
    */
    function set_sections()
    {
        // hide accessory from footer tabs
        $this->sections[] = '<script type="text/javascript" charset="utf-8">$("#accessoryTabs a.default_value").parent().remove();</script>';

        // add css, js and html
        $this->EE->cp->add_to_foot('
        <script type="text/javascript">
            $(document).ready(function(){
                var table = document.getElementById("entries");
                for (var i = table.rows.length-1, row; row = table.rows[i]; i--) {
                    if(row.parentElement.nodeName != "THEAD") {
                        //iterate through rows
                        //rows would be accessed using the "row" variable assigned in the for loop
                        col = row.cells[5];
                        if(col.firstChild && col.firstChild.nodeType != 3) {
                            if(col.firstChild.nodeName != "INPUT") {
                                row.remove();
                            }
                        }
                    }
                }
            });
        </script>
        ');
    }

}
// END CLASS

/* End of file acc.synch_templates.php */
/* Location: ./system/expressionengine/third_party/synch_templates/acc.synch_templates.php */

```
> 1 votes

---
Tags: templates
---


# Question
Title: Adding interest groups when using SL Mailchimp Subscribe
I know there are alternatives but does anyone know how to set up the interest groups field when using SL Mailchimp Subscribe?

I've currently got a checkbox field containing the different Interest groups set up on the Mailchimp Mailing list but I'm unsure what values to use for each checkbox.

There is nothing in the documentation about this feature and an old video I found just shows the use of a dropdown field but with no indication of how that is actually configured.

# Answer
You just use the names of the Interest Groups as the checkbox values! Duh! Easy when you don't overthink things.

Mailchimp accepts a comma delimited string of the group names. So if you use checkboxes it will only ever set one interest group. To set multiple groups you need to send the content from a plain text input.
> 0 votes

---
Tags: mailchimp
---


# Question
Title: Cartthrob with SagePay suddenly stopped working; error 4020
An existing site running CT 2.5 and EE 2.7.3 with SagePay (server) has suddenly stopped working on the LIVE server.

Initially I thought it might be due to the recent SagePay API update to v3.0, so I have updated the gateway files provided by the new owners Vector Media Group but still no luck.

The error presented is as follows: "4020 : Information received from an Invalid IP address."

Previously this was working so I know the valid IP's were setup and were ok, so I'm not sure why else this error would be present?

Also, this error appears before getting onto the SagePay server, after submitting the checkout form to go to SagePay it stops and this error shows up.

Any ideas anyone please, I'm stumped at the moment?

To start with I'm looking for ideas without having to update both EE and CT please! Thanks in advance.

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

This error is coming directly from SagePay and honestly, is usually exactly what it sounds like: your server is making a request from an IP that's not whitelisted in SagePay's system, so they're rejecting it. Common causes of this include:

* You're using a VPS or cloud server and the IP has changed
* You're using a server that has different IP addresses to make outgoing requests than the ones used for DNS (this is common on some cPanel/WHM servers)
* Your IP has recently changed.

You should definitely consider contacting SagePay to see if they can somehow tell you what IP your requests are coming from so they can be whitelisted.
> 1 votes

---
Tags: cartthrob, checkout, sagepay
---


# Question
Title: CE Image - Source image is not readable or does not exist
We moved a site into a sub folder while we upgrade it, so the site is now at: mysite.com/2014/ . Everything seems to be ok, except CE Image is not returning any images. I've tried all variations on the CE Image tags, but we get nothing. I've checked that the folders have 777 permissions. The code below should be returning the image url:

```
<img src="{exp:ce_img:single src='{event_image}' width='225' height='225' crop='yes' allow_scale_larger='yes' url_only='yes'}" alt="{title}" />

```

But all I get is:

```
<img src="" alt="Ferris wheel">

```

I've switched on debugging and get the following errors:

\*** CE Image debug: Base path: '/chroot/home/winter14/public\_html/' (0.728373 / 24.88MB)

CE Image debug: Base path: '/home/winter14/public\_html/2014/' (0.806898 / 27.42MB)

\*** CE Image debug: Source image: 'http://www.example.com/2014/uploads/events/ice.jpg', Fallback image: '' (0.806906 / 27.42MB)

\*** CE Image debug: Source image is not readable or does not exist: '/2014/uploads/events/ice.jpg'.

(0.806914 / 27.42MB)

\*** CE Image debug: Fallback source image is not readable or does not exist: ''.

# Answer
You also need to reset all your file upload paths and urls. this setting also comes in handy.

```
$config['ce_image_cache_dir'] = '/images/made/';

```

http://www.causingeffect.com/software/expressionengine/ce-image/user-guide/configuration

Also, as Blatant says, running the sync on the file upload prefs has been known to make everything better.

what does this give you?
> 1 votes

# Answer
Sorry, simple answers first...

Following relocation, did you update all your settings paths (hint: use ReeLocate for a quick win here)?

After this, did you re-sycronise all your upload directories? (Content \> Files \> File Upload Preferences \> Syncronise (Column) )????
> 0 votes

---
Tags: ce-image
---


title: Use of Status Groups EE2?

text:
# Question
Title: Use of Status Groups EE2?
I have created channel 'History' and in Edit Group Assignments I have chosen 'None' as Status Group, though I am able to have option selecting Status during publish entries and am able to filter statuses with open and closed.

I would like what is the purpose of Status Group(None/Statuses) in channel Edit Preference??

# Answer
You can assign custom statuses by creating a status group. By default EE will always have Open and Closed statuses enabled even if you select none. The channel entries tag defaults to only show entries marked open by default and would not show anything if there was not a status assigned to the entry.
> 1 votes

---
Tags: status
---


# Question
Title: Compare url segment and category name with conditional
I'm trying to write a conditional so that the I can output an `active` css class when the url segment is the same as the category name. Because the url segment includes dashes between each word and small case and the category name have uppercase characters without dashes the `==` operator is not evaluating true. Any advise on how to best accomplish this?

**My Current Code:**

`{if segment_4 == category_name}active{/if}`

**Updated Answer**

Found a solution using Low Seg2Cat plugin to get `category_id` from segment url:

`{if segment_4_category_id == category_id}active{/if}`

# Answer
> 2 votes
Found a solution using Low Seg2Cat plugin to get category\_id from segment url:

`{if segment_4_category_id == category_id}active{/if}`

---
Tags: categories, conditionals, url, segments, css
---


# Question
Title: how to work with the MVC in EE as we do on the CI for custom functionality?
I need to implement the custom search function that will search data from another database so where I write the code as we do in CI MVC ?

# Answer
The short answer is you won't be able to. ExpressionEngine is built **in** CodeIgnitor, not on top of so to speak.

While you have access total the CI Libs, helpers and modules, expressionengine impliments a complete templating solution which is designed to remove the need to understand MVC.

What you can do, (advanced extension topics herein!) Is write MVC within modules and plug-ins, to a fashion. You can also extend EE itself, if you spy into the EE system directory you'll see MVC starting to com through. You'll be able to load these MVC components using the EE loader too. One example is I like to replace the EE Mail class with my own implimentation.

Now for the completely off the hook, gone too far method. Take a look at the index.php in the root of the site, at the bottom you'll see run\_ee() function call. This is what starts up the whole EE parsing system. in the system folder you'll see a similar index.php with a call to fire up the admin pages. In theory, you could keep the EE system and admin panel but impliment your own custom front end system, you could base this off CI MVC and all that.
> 0 votes

---
Tags: search
---


# Question
Title: Search dynamic content in Expression Engine
I am displaying JSON data dynamically on template and I would like search that dynamic content using search option. Any solution in Expression Engine???

# Answer
> 1 votes
By its very nature, no. You're using JSON data dynamically, i.e. you're loading it when the page is viewed, its not stored at all.

Search works by querying the DB tables (or rather the index but I won't get too deep here), this works becasue all the data is there in one place.

One suggestion (short of pulling in all JSON data and searching that) is to cache your JSON calls inside a Channel. Something like this:

1. Set up a Channel with a text field and a text area field.
2. When you call a piece of JSON data, save the URL to the textfield and the result to the textarea
3. When you search, let the text area be searchable, your search results will now include entries in that channel that might have (i.e. last time they where called) the keyword in them.
4. When displaying the search results, call the JSON URL, double check the keyword is still in there and if it is show your result, if not step over it.

It's just a thought, of course you have the issue that you can only get results from the last call of the JSON url, there's no guarantee the dynamic content will still contain the word.

You'll also need to consider the title/url\_title of your caching channel, so that you overwrite existing entries for the same URL. one option would be to alphanumeric the url and use that as a title code.

You could also get really clever, set up a template that polls all the JSON URL's you are using in a loop, and updates your channel entries accordingly. Set a cron job up to hit that template once/twice a day and get a nice little refresh system going on...

Just a brain dump for you, who know it might give you a good idea of how to proceed!

---
Tags: search
---


# Question
Title: Use Category URL Titles In Links set to Yes, both types of link showing
Working on a site with EE 2.5.1, so maybe this can only be resolved with an upgrade...

I have set the "Category URL Title in Links?" to "yes" in Global Channel Preferences. The site does output example.com/category/actual-category-name, but it is also outputting example.com/index.php/category/C5. How do I stop the /index.php/category/C5 links from being active?

Thanks.

# Answer
If you don' mind the pages being 'active' in the system, but want to get rid of them from the crawlers ect, perhaps a .htaccess solution will suit?

I'm thinking of a sort of rewrite rule, something like this that will pick up bad formatted URL's and direct to the 404 page. as long as your 404 page sends the right status header crawlers wont index them.

```
RewriteRule ^category/C([0-9]+)? /404 [L]

```

Thats an example, but you'll need to experiment, and of course direct them to wherever your 404 page is.
> 0 votes

---
Tags: categories
---


title: Use of lang in search tag?

text:
# Question
Title: Use of lang in search tag?
I came across below tags in EE during advance search..

Where do we define variables and what is the use of them?? What exactly is "lang" and where can I find in EE??

```
{lang:search_by_keyword}
{lang:exact_phrase_match}
{lang:search_in_titles}
{lang:channels}
{lang:any_category}

```

# Answer
These tags are used in the EE search module. You can find here how to use them.
> 1 votes

---
Tags: search
---


# Question
Title: Pagination not working for structure pages
I have my pages setup in Structure in a channel called Products (screenshot).

I'm viewing the listing of products at a URL that looks like: **domain.com/nl/rental-shop/producten/**

If I click 'next page' the pagination active link changes, P10, P20 etc get appended to URL but the entries don't change.

Here's my template code:

```
<ol>
    {exp:channel:entries channel="product" entry_id="{structure:child_ids}" fixed_order="{structure:child_ids}" disable="categories|category_fields|member_data|trackbacks" paginate_base="/{segment_1}/{segment_2}/" paginate="bottom" cache="yes" refresh="60" dynamic="yes" limit="10"}
    <li>{title}</li>

    {paginate}
    <li>Page {current_page} of {total_pages} pages {pagination_links}</li>
    {/paginate}

    {/exp:channel:entries}
</ol>

```

Any idea why this might not be working?

# Answer
> 2 votes
I recently had this same issue, when I learned that you need to set `paginate_base="template/page"` So lets say you have a news group and inside of that you have a index page it would be "news/index" for me that worked. With dynamic and cache set to "no"

# Answer
> 1 votes
Try adding `dynamic="no"`. For some reason that's fixed issues I've had with Structure pagination in the past. We currently use something like this on our projects:

`{exp:channel:entries channel="news" dynamic="no" paginate="bottom" limit="5"}`

# Answer
> 1 votes
Have you considered checking your *Global Preferences* under *Channel Administration*? "Cache Dynamic Channel Queries?" should be set to **No**.

---
Tags: add-on, channel-entries, structure, pagination
---


title: Low Search: Ignore query params?

text:
# Question
Title: Low Search: Ignore query params?
I have a primary exp:low\_search:results loop which the user can filter using low search form. The form updates the URL using normal query strings. So /index?foo=bar displays matches where field foo is equal to bar.

Simultaneously, I have a Count in the header which tallies all matches from that same channel with a certain special criteria:

```
{exp:low_search:results channel="my_channel" status="special_status"}{if count == 1}{total_results}{/if}{/exp:low_search:results}

```

My issue is that when we pass "?foo=bar" in the URL, there is no way to avoid having it affect the count query as well. So the count is incorrect on results pages for this channel.

We also have a global search page using a "keywords=foo" query parameter, and it affects the count query too. Is there a way we can tell the count query to ignore parameters in the URL, or must we re-write the count query?

Thanks!

# Answer
> 0 votes
If you're using GET variables (ie. not encoding the query), then there's currently no way to ignore the search params; they will always be applied. If you must ignore them, use encoded queries and omit the `query=""` parameter.

As a sidenote: use `{absolute_results}` when paginating results to get the correct result count.

# Answer
> 0 votes
Are you looking for the total posts in the channel, as opposed to the total search results in the channel?

If so use a standard `channel:entries` tag to get your total, then use the search results tag for the results?

---
Tags: low-search
---


# Question
Title: Submitting data to Channel Images from outside EE
I run sports leagues, and want to have an interface where my photographers can upload images for a particular game in our system. I've added some custom fields so that the photos can be tagged with the particular sport, the game ID in the database, and the team IDs of the two teams playing -- but they don't know any of this information, and the only way I'm able to do it is going to change all of the default values first (otherwise, clicking and typing all that data in is a big pain).

What obstacles would I hit if I try to create a form outside of EE that would submit to the same handler, and pass that information along in the form post? I just want an interface where I can have my photographer click a game, and then drag/drop their photos, hit upload, and that's it. On the back-end, I'd pass along the sport/game ID/team IDs to fill in the custom data.

# Answer
> 1 votes
I'd start by looking at the Channel Form. https://ellislab.com/expressionengine/user-guide/add-ons/channel/channel\_form/

It is designed for creating front end forms to input/edit channel entries without needing CP access.

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


title: User - move group on Edit?

text:
# Question
Title: User - move group on Edit?
Is it possible to move the Member group on editing of the User profile?

We've set it up so that members in Group A see a profile where they fill in some custom fields (required) and on submission should be moved to Group B - can it be done?

Also is it possible that on this action occurring a mail be despatched to the site Admin to notify them?

Anyone know of the best way to do this?

# Answer
> 2 votes
Ermm...

https://solspace.com/software/expressionengine/user/docs/edit/#f\_group\_id

Just make a hidden input for `group_id` on the form, and set it to Group B.

As for dispatching an email, write up a quick extension that is triggered by this hook:

https://solspace.com/software/expressionengine/user/docs/extension\_hooks/#user\_edit\_end

And just use the email class:

https://ellislab.com/expressionengine/user-guide/development/usage/email.html

to fire off an email. Boom.

**Edit**

As far as I can tell, MX Notify only has a trigger for Solspace User when a person is registered, not on profile edit. I would still go for writing a quick extension, it would take me less than 30 minutes.

https://ellislab.com/expressionengine/user-guide/development/extensions.html

---
Tags: members, solspace-user
---


# Question
Title: Expresso Store, USPS shipping options for individual products?
I'm using the USPS Shipping plugin to calculate shipping in my store. We use USPS Flat Rate Boxes to ship and most products fit in those boxes. In order to pull the correct shipping rates during checkout I have to set the container to "Flat Rate Box" in the shipping extension settings.

This works great, except we have couple products that do not fit in a flat rate box and need special packaging. When I try to add one of these products to the cart I get an error stating:

> Store (Shipping): The entered length must be less than or equal to 11.00000 inches.

Is it possible to use the USPS Shipping extension but set a custom shipping option for the individual products that need a custom option?

So far I have been unable to find a solution.

Thank you!

# Answer
> 0 votes
There is not a way currently to set the shipping type per product in Store.

You have two options really.

You could modify the current USPS plugin to allow for selection of both Flat Rate boxes and normal shipping boxes with some logic that would default to flat rate for items that would fit into flat rate boxes. Then larger items would calculate based upon the normal boxes for the correct shipping cost.

I have not tested this but you should also be able to duplicate the USPS gateway file with a slightly different name then rename all of the classes to match and then you would be able to setup both gateways separately for flat rate and normal boxes.

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


# Question
Title: CartThrob - Deposit & Installment Payments with special timing
We are evaluating CartThrob for a client's site that has some quirky requirements for recurring charges and the timing of these charges. I'm trying to figure out if CartThrob can provide the necessary functionality, be adapted to meet the requirements, or connect to a payment gateway that has these built in.

Client is selling a product that requires a deposit of $X amount and subsequent installment payments of $Y amount (installment payments are all equal). The deposit must be charged right away, and the installment payments must be charged on the 1st or 15th of the month (recurring monthly for a few months) for accounting reasons.

From the docs, it appears CT (using CT Subscriptions) would allow for the $X deposit to be treated as a trial subscription and the $Y installments to be a set number of rebillings (e.g., 1x per month for 4 total\_occurrences). I see that we can set the start date of the subscription; however, I do not see a way to have the trial billed immediately but have the rebillings occur on a different date of the month. (Client is not willing to wait until 1st of 15th to charge deposit.)

Is there a way to do this 'out of the box', or could something simple be coded to update the rebilling date after the deposit is received? We really appreciate any input on this ... and thank you Vector for acquiring CT!

# Answer
(I lead Development at Vector; thanks for your kind words!)

You could do this pretty easily with an extension that uses CartThrob's hooks-- basically your idea of `"something simple be coded to update the rebilling date after the deposit is received"`. I have to think about a good way to do it natively, which might be possible using some combination of a single-purchase item and a subscription item with the multi-add to cart tag. I can get back to you on that. But regardless, it's doable with the hooks without much trouble (and we can help you write this if you're not comfortable doing it yourself. Just submit a contact request: https://www.cartthrob.com/support/index.php?pg=request).
> 1 votes

---
Tags: cartthrob
---


# Question
Title: Is it safe to change the MySQL storage engine on a live site?
I've got a site that will not let me create any new custom fields. On a test install I changed the MySql storage engine from InnoDB to my MyISAM, which seemed to fix it. Is this safe to do on a live site?

# Answer
> 1 votes
I have a production site running tables on the InnoDB engine; triggers and full-text search indexing and all. Everything seems copacetic. However, I would recommend (before building anything that will be pushed to production) that you store an **image** backup of your entire environment (or at least your database server) before moving forward with this.

It's running on EE 2.9.0.

# Answer
> 1 votes
We often change most or all of our tables to InnoDB on our highest traffic sites. The absolute safest thing would be to take the site offline before doing it. That said, we have done it live before and not had an issue except a few seconds of unresponsiveness. I'd strongly suggest taking a backup first though.

# Answer
> 0 votes
Well, the default storage engine of EECMS is MyISAM.

From the user guide:

> ExpressionEngine uses the default MySQL storage engine as specified by the MySQL server when it is installed, which in nearly every case will be MyISAM. This is an appropriate choice since ExpressionEngine is primarily a read-heavy application, hosts are typically much more familiar with tuning the server for that storage engine, and using different storage engines for different tables requires greater resource usage and more nuanced server management than most administrators will typically allow.

---
Tags: mysql
---


title: Cartthrob DB error

text:
# Question
Title: Cartthrob DB error
When trying to login I get the following error:

```
A Database Error Occurred
Error Number: 1142
INSERT command denied to user 'ID121723_herbaco'@'79.174.131.25' for table 'exp_security_hashes'
INSERT INTO `exp_security_hashes` (`date`, `hash`, `session_id`) VALUES (1440241989,'d89e683a2775a41b7d75cb9ef4de58e06d431d5c',0)
Filename: core/EE_Security.php
Line Number: 237

```

Anyone have any idea? Site uses Cartthrob but I have no idea if that's the culprit. Any insight much appreciated.

# Answer
> 0 votes
I don't think this is related to CartThrob, because that table is part of the EE default tables. I've seen this before when exp\_security\_hashes is corrupted. Can you (or your host) try repairing it?

---
Tags: cartthrob
---


# Question
Title: Solspace Freeform Pro - Add value to field using segment
Is it possible to use a segment as a Freeform input field value? Essentially, something like this...

```
{freeform:field:name attr:placeholder="Name" attr:value="{segment_3}"}

```

I know I could just do a hidden input, but I want to suggest the value and allow the user to modify it if it's wrong.

Cheers

# Answer
```
{freeform:field:first_name default_value="{segment_2}"}

```

https://solspace.com/docs/freeform/form/#freeform\_field\_field\_name

Dwam. There be your answer. Tested on `EE 2.10.1` and `FreeForm 4.2.2`.
> 0 votes

---
Tags: solspace-freeform
---


# Question
Title: Expresso Store not adding products & no exp_store_carts table
I'm running Store 2.5.1 and EE 2.10.1. (Building locally.)

The `{exp:store:cart}` isn't displaying anything and the system doesn't seem to be adding products to the cart. The `{exp:store:checkout}` also turns up blank.

Also, there's no `exp_store_carts` table in my DB.

Not sure what could be causing this or how to fix.

# Answer
Finally got this working. Had to save settings to ensure that the cart would work. That, and had to correct a bit of code on the cart/checkout page to get it working right.
> 0 votes

# Answer
If the carts table is missing from your install I would uninstall Store and reinstall Store. You should also be able to open up (if I am remember correctly) `third_party/store/config/scheme.php` to get the columns name/type/length/default values for the cart table and add it manually.
> 1 votes

---
Tags: expresso-store
---


title: WYGWAM caching images?

text:
# Question
Title: WYGWAM caching images?
I create an image and upload it to the server under a name, say Test Graphic A. Then inside WYGWAM, I click the picture icon, and choose Test Graphic A from the server. Everything is okay at that point.

Then, I correct a mistake in Table Graphic A in Photoshop, and use File Manager to delete it from the server, and then I upload the corrected version under the same file name, i.e., Test Graphic A.

Then, I go to WYGWAM and delete the old Test Graphic A, click the picture icon and choose (the corrected) Test Graphic A.

But, WYGWAM continues to use the old Test Graphic A. The only way I have found around the issue is to rename the corrected version, upload it again, and place it again.

This shouldn't be necessary. What am I doing wrong? Thanks.

# Answer
Are you using EE caching or a third-party plugin for caching, or a caching service like CloudFlare? And are you making sure your local browser is set to never cache pages?

Caching issues almost always breakdown to a cache set not breaking. You should make sure all of your caches are cleared. WYGWAM is **not** caching your files, so the issue is systemic to a different caching solution that is currently working. Update with some answers to my question and I can expand.
> 0 votes

---
Tags: wygwam
---


title: Solspace Tags - Import Data

text:
# Question
Title: Solspace Tags - Import Data
I had to remove and reinstall Solspace tags to fix what I thought was a bug it was causing, and in the process lost all the associated data.

Luckily it was just on a dev server, but I want to add in the data from another mysql database.

Is there a way of importing the data and settings using something like Solspace Importer?

# Answer
> 0 votes
Solspace Importer can import Solspace Tags. What you would actually be doing is updating entries, with the update being these tags. You will need something to detect the currently existing entries in your EE installation however, such as an entry title for example. Importer would then be able to detect the existing entry in your system, and apply the tags to the corresponding entry.

Make sure the tags are in one data "field" in your file, eg. a CSV cell, an XML node, etc. Tags will need to be delimited with a character, such as a comma.

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


# Question
Title: Removing index.php gives *no* 404 errors for wrong template groups
I have the opposite problem to many: When I use the official method to remove index.php and then enter an invalid url/template group, e.g.

http://www.example.com/blahblah

I **do not** get a 404 error, instead the most recently added page is shown.

Here's my setup:

* EE 2.9.2
* Strict URLs are enabled.
* The correct 404 template is set.

Because most have the inverse situation I could not find much to help me debug this issue. If I delete the code that removes index.php I get a 404 as expected.

Any pointers are greatly appreciated. Thank you.

# Answer
> 0 votes
I found the issue. In the 404 template I embed a generic template, and the url to that template was wrong.

If you are stuck with the same issue, track your template nesting for clues. Good luck!

---
Tags: 404, index.php
---


title: Stash static cache and Freeform

text:
# Question
Title: Stash static cache and Freeform
I'm using Stash's static cache on a site and have wrapped my Freeform tags in `{stash:nocache}` but whenever I try to submit a form, I get taken to a page like /?ACT=XX with the error *No input file specified*.

`stash_file_sync` is set to false and I'm using the .htaccess rules printed out in the CP:

```
#################################################################################
# START MUSTASH STATIC CACHE RULES

# -------------------------------------------------------------------------------
# default_site
# -------------------------------------------------------------------------------

# Exclude image files
RewriteCond $1 !\.(gif|jpe?g|png|ico)$ [NC]

# We only want GET requests
RewriteCond %{REQUEST_METHOD} GET

# Exclude CSS/ACT EE URLs and 'preview'
RewriteCond %{QUERY_STRING} !^(css|ACT|URL|preview)

# Uncomment this if you want to disable static caching for logged-in users
#RewriteCond %{HTTP_COOKIE} !exp_sessionid [NC]

# Remove index.php from conditions
RewriteCond $1 ^(index.php/)*(.*)(/*)$

# Check if cached index.html exists
RewriteCond ../static_cache/1/$2/index.html (.*\.(.*))$
RewriteCond %1 -f

# Rewrite to the cached page
RewriteRule ^(index.php/*)*(.*)(/*) /static_cache/1/$2/index.%2 [L]

# END MUSTASH STATIC CACHE RULES
#################################################################################

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

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

</IfModule>

```

Each template looks similar to:

```
{stash:embed
  name="home"
  file_name="views:home"
  process="static"
  context="@URI"
}

```

Also, is anyone using Mustash but not getting a main menu item which gives you access to create cache-breaking rules? I can access different settings by navigation to the Mustash module or extension, but that doesn't give me a link to create cache-breaking rules.

# Answer
## Static caching

A static cached page is just plain old HTML, it doesn't pass through EE or PHP at all. You cannot therefore escape regions of the page from caching:

https://github.com/croxton/Stash/wiki/%7Bexp%3Astash%3Astatic%7D

Freeform forms cannot be cached as they require a token to be generated for each user that views the form, and that is only possible if the freeform tag is parsed each time the form is viewed.

If you still want to static cache the page containing the form, I would suggest using javascript to load a form template (containing just the freeform tag) into the page, e.g with jQuery:

```
$("#form").load("/inc/myform");

```

## "No input file specified"

You may need to append a '?' mark to the last rewrite rule to force query strings:

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

```

https://ellislab.com/expressionengine/user-guide/urls/remove\_index.php.html#test

Test without Stash being involved at all and make sure this is working as expected before trying to cache anything.

## Mustash menu

You should see a 'Mustash' menu in the main menu of the control panel. If you are using Zoo Flexible Admin then you will need to add it to the custom menu for your member group. If not, then please check to see if you have any extensions using the `cp_menu_array` hook and disable them one by one - it could be they are not returning the array as they should.
> 2 votes

# Answer
Try commenting out this line:

```
RewriteCond %{QUERY_STRING} !^(css|ACT|URL|preview)

```
> 0 votes

---
Tags: solspace-freeform, stash, cache, mustash
---


# Question
Title: Call thirdparty module function directly from PHP in template
I'm in a situation where I need to logout the current logged\_in member without him clicking a logout link. (Javascript click trigger is not an option.)

I'm using the great freemember module (https://github.com/devdemon/freemember/)

How can I call the freemember lougout function directly from PHP in a template ?

# Answer
> 0 votes
```
<php

include PATH_THIRD . 'freemember/libraries/freemember_lib.php';

$free = new Freemember_lib();

$free->logout();

?>

```

Have you tried something like that? There's is also the `load` function attached to the EE core, but things like above usually always work for me.

Also, freemember **is** probably loaded to the core...

```
<?php ee()->freemember->logout(); ?>

```

Could work. Also, this seems likely to work as well...

```
<?php ee()->session->destroy(); ?>

```

---
Tags: php, freemember, logout
---


title: Deleting old templates from CP

text:
# Question
Title: Deleting old templates from CP
How can I delete old templates that no longer exist in my repo from EE cpanel?

I can see you can multi-select and sync, but is there a way of deleting them?

# Answer
??

```
Your Site -> CP Home -> Design -> Template Manager

```

Can you not access this control panel page? Head over there and click delete on templates you don't want. You may have to FTP into your server and also manually delete templates stored as files.

After you delete things, just run an `add` and `commit` in your repo.

**Edit**

Based on your comment, there are more complex solutions related to repos and deleting files. For example, with `git`, you could use git hooks to guarantee a deletion synchronization between your template database table and the actual templates that are stored as files. But `eeeiik`, that's way too much work for what you're looking to do (I assume).
> 0 votes

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


# Question
Title: PHP.ini max_execution_time setting not being honoured by EE
I've being trying to increase the `max_execution_time` php variable for an EE site (EE 2.6.1, FastCGI on php 5.4.44, running on SiteGround's Managed Cloud hosting with cPanel) but it's not updating the local value, currently only 300. Only the global value changes to 800.

This is what I see in EE's CP \> Tools \> Utilities \> PHP Info

Whereas another php info file that sits in the webroot for the site shows this

Using cPanel's PHP Variable Manager, I've increased the `memory_limit` and `max_input_vars` without issue: both the local and global values change.

My host's support say that it's an EE "thing". But I've never come across anything of the sort. How do I get the `max_execution_time` already set as a global value to be honoured by EE?

Any pointers?

# Answer
> 1 votes
Apparently to resolve this you have to hack the `/system/expressionengine/libraries/Core.php` file.

From

```
@set_time_limit((REQ == 'CP') ? 300 : 90);

```

to

```
@set_time_limit((REQ == 'CP') ? 800 : 90);

```

Not pretty nor advisable.

# Answer
> 1 votes
Roll this:

http://php.net/manual/en/function.ini-set.php

into your main index.php file, and set your `max_execution_time` via that method. It only sets it for that script execution, so you may have to put it in your `system` index.php file as well, depending on your use case.

This really isn't an EE thing (unless someone manually set it like how I'm suggesting you fix it), so your host is being incompetent.

```
ini_set('max_execution_time', '800');

```

---
Tags: php, server, php.ini
---


# Question
Title: When Logging In: Admin is loading Extremely long
I have an old EE site that I haven't logged into for a year. Now I'm trying to login to it, but it's taking over 1 minute just to log in...

After I'm finally logged in every consequent page load in the admin also takes over a minute to load.

The thing is: I changed Nothing. All I did was not login for a year and now when I try to login it just loads for ages.

Before I thought it might be the 3000 pending comments that are causing this, so I deleted them in the database to see, but it didn't improve one bit. It's still crazy slow.

My EE version is 2.0

Please suggest how to fix this, I have no idea where to start and I can't work on the admin to try things because it's too slow.

P.S. the font end still loads fine and speedy.

# Answer
Hrmmm.. a site I have that that has all of the major addons, and has had 25 thousand unique visitors in the last 24 hours, only hits 12mb of memory usage... but...

https://dev.mysql.com/doc/refman/5.0/en/gone-away.html

You connection to the MySQL sever has gone wonky!

Your connection between your application server and your database server is suffering hard. This could be a host issue, or it could be a configuration issue. Check with your host to see if they've upgraded any infrastructure, or any software (MySQL, etc...) recently. Also, SSH into your application server, and ping your database server. What do you see?

Also, if they are the same server, run this command in a bash shell:

```
top

```

What are we seeing? You may also need to run a repair on your database, or better yet, restart your MySQL server agent.

Take all of this with a grain of salt; something is wrong, and you should **definitely** back up your entire database and, just for poops and giggles, your web root as well.
> 0 votes

---
Tags: ee2, admin, slow
---


title: Fatal Memory Error Solspace FreeForm

text:
# Question
Title: Fatal Memory Error Solspace FreeForm
I have a site with a simple form on it 9 fields total. It has worked fine for quite some time but is now up to 2875 responses. I am getting the following error and the site is not coming up.

Allowed memory size of 134217728 bytes exhausted (tried to allocate 267409 bytes) in ...../expressionengine/third\_party/freeform/mod.freeform.php on line 4138

I have the contacted the host about raising the memory\_limit but I am wondering if anyone else has come across this. It doesn't seem like enough responses to cause memory issues. In the template I am calling up and displaying all the response names (its a petition).

EE 2.9.0 with Freeform 4.2.3 Current memory is set to 128M

# Answer
> 0 votes
Yah, that'll do it. Remember that you aren't storing that data raw, PHP variables take up more space than their raw data.

Get your memory raised, or you can temporarily do it yourself. Add this to your sites index.php file (the one in your web root):

```
ini_set('memory_limit', '256M');

```

---
Tags: solspace-freeform, memory-limit
---


# Question
Title: {site_url} global variable not outputting in php header redirect
Trying to create the following redirect template for some structure pages, however the url is outputting like this `http://example.com/{site_url}#section`. Any idea why `{site_url}` variable isn't working? And/or any idea how to resolve issue. Thanks in advance.

```
{exp:channel:entries channel="pages"}
    <?php
        header( "Location: {site_url}#{homepage_section}" );
        exit;
    ?>
{/exp:channel:entries}

```

# Answer
> 0 votes
You have PHP set to **input** on this template. That means that that something like:

```
<?php
    $test = "{site_url}";
?>

```

Causes the template parsing engine to `eval` the raw PHP code before replacing `{site_url}` with the actual site URL. You need to set PHP to **output** for this template, which means that EE template tags get parsed **FIRST**, then it `eval`s the PHP code, meaning the above will look like this by the time the raw PHP gets executed:

```
<?php
    $test = "http://www.domain.com";
?>

```

Soooo yeah. FYI, if you have PHP on that template in other places, switching from input to output could definitely break things.

**Edit**

Wait.. so one EE tag is getting parsed, but the other isn't?

---
Tags: templates, structure, redirects, global-variables
---


# Question
Title: Solspace Calendar Orderby Date vs. Title
If I want to output the same list of occurrences by date vs. by title, is the best way to do this by switching tags? So for by date, use {exp:calendar:cal}, but for by title, use {exp:calendar:occurrences}?

# Answer
> 0 votes
Yes, you would use `{exp:calendar:cal}` for ordering by **date** (it's the only tag that truly orders events and its occurrences in chronological order), and `{exp:calendar:events}` (or `{exp:calendar:occurrences}` if you need occurrences of each of those event entries) if you want to order by something else such as **title**.

---
Tags: solspace-calendar, orderby
---


# Question
Title: Edit channel fields view displaying short name not field label, with no link to edit
Since I upgraded from 2.5.5 to 2.10.1, I can no longer edit channel fields.

When attempting to edit channel fields, the edit view displays the fields listed by short name in input tags, instead of by field label in links.

It appears there's some javascript that's hiding the field label instead of the short name, as both are present in the DOM. No idea where it could be coming from, however.

No errors are shown.

Here is a screenshot for reference:

# Answer
Try disabling Draggable first, then if that doesn't work, NSM Morphine Theme. Be careful, I think there are a few random addons out their that depend on NSM Morhpine Theme. Do your usually due diligence: **Back it up first**.
> 0 votes

---
Tags: control-panel, channel-fields
---


# Question
Title: Channel Form checkbox fields not saving on edit
I have a channel form with several checkbox fields. They go in fine but when I try to edit the form content the edits do not save. The rest of the fields save when edited so I am looking for how to modify the checkbox fields and have them save properly.

Here is the code for the entire form.

```
{exp:channel:form channel="facilities" url_title="{segment_3}" author_id="CURRENT_USER"  return="supply-chain/facility-preview/ENTRY_ID" }

    <input type="hidden" id="facilityCounter" value="1" />
     <div id="facilities">
       <fieldset class="facility-info">

        <dl>
        <dt><label>Facility Name*</label></dt>
        <dd class="validate"><input type="text" name="title" class="required" value="{title}"></dd>

        <dt><label>Street address*</label></dt>
        <dd class="validate"><input type="text" name="facility_street_address" class="required" value="{facility_street_address}"></dd>

        <table class="city-state-zip">
            <thead>
                <tr>
                    <th scope="col">City*</th>
                    <th scope="col">State*</th>
                    <th scope="col">Zip*</th>
                </tr>
            </thead>
            <tbody>
                <tr>
                    <td class="validate"><input type="text" name="facility_city" class="required"  value="{facility_city}"></td>
                    <td><!--<input type="text" name="facility[1][facility_state]" value="">-->
                                <select name="facility_state">
                                <option selected value="{facility_state}">{facility_state}</option>
                                <option value="AL">Alabama</option>
                                <option value="AR">Arkansas</option>
                            <option value="FL">Florida</option>
                            <option value="GA">Georgia</option>
                            <option value="KY">Kentucky</option>
                            <option value="LA">Louisiana</option>
                            <option value="MI">Mississippi</option>
                            <option value="NC">North Carolina</option>
                            <option value="SC">South Carolina</option>
                            <option value="VA">Virginia</option>
                         </select>

                    </td>
                    <td class="validate"><input type="text" name="facility_zip" class="zip required" value="{facility_zip}"></td>
                </tr>
            </tbody>
        </table>
        <dt><label>Facility description*</label></dt>
        <dd class="validate"><textarea name="facility_description" class="required">
        {exp:eehive_hacksaw}
                {facility_description}
        {/exp:eehive_hacksaw}
        </textarea></dd>
            </dl>

        <p>This facility supplies components or services for:</p>

            <table class="survey">

                <thead>
                    <tr>
                        <th scope="col"> </th>
                        <th scope="col">Currently<br />Supply</th>
                        <th scope="col">Don't Currently<br /> But Could Supply</th>

                    </tr>
                </thead>
                <tbody>
                    <tr class="nacelle">
                        <td>Nacelle</td>
                        <td><img src="/photos/arrow_down.png" alt=""><input type="checkbox" name="nacelle[data][]" value="{nacelle}" {if nacelle == "current-supply"}checked="yes"{/if}></td>
                        <td><img src="/photos/arrow_down.png" alt=""><input type="checkbox" name="nacelle[data][]" value="{nacelle}" {if nacelle == "could-supply"}checked="yes"{/if}></td>
                    </tr>

                    <tr class="nacelle-group">
                        <td class="title">Drivetrain / Gearbox</td>
                        <td><img src="/photos/spacer.gif" alt=""><input type="checkbox" name="drivetrain_gearbox[data][]" value="{drivetrain_gearbox}" {if drivetrain_gearbox == "current-supply"}checked="yes"{/if}></td>
                        <td><img src="/photos/spacer.gif" alt=""><input type="checkbox" name="drivetrain_gearbox[data][]" value="{drivetrain_gearbox}" {if drivetrain_gearbox == "could-supply"}checked="yes"{/if}></td>
                    </tr>

                    <tr class="nacelle-group">
                        <td class="title">Generator / Electrical</td>
                        <td><img src="/photos/spacer.gif" alt=""><input type="checkbox" name="generator_electrical[data][]" value="{generator_electrical}" {if generator_electrical == "current-supply"}checked="yes"{/if}></td>
                        <td><img src="/photos/spacer.gif" alt=""><input type="checkbox" name="generator_electrical[data][]" value="{generator_electrical}" {if generator_electrical == "could-supply"}checked="yes"{/if}></td>
                    </tr>

                    <tr class="nacelle-group">
                        <td class="title">Control System</td>
                        <td><img src="/photos/spacer.gif" alt=""><input type="checkbox" name="control_system[data][]" value="{control_system}" {if control_system == "current-supply"}checked="yes"{/if}></td>
                        <td><img src="/photos/spacer.gif" alt=""><input type="checkbox" name="control_system[data][]" value="{control_system}" {if control_system == "could-supply"}checked="yes"{/if}></td>
                    </tr>

                    <tr class="nacelle-group">
                        <td class="title">Yaw / Pitch</td>
                        <td><img src="/photos/spacer.gif" alt=""><input type="checkbox" name="yaw_pitch[data][]" value="{yaw_pitch}" {if yaw_pitch == "current-supply"}checked="yes"{/if}></td>
                        <td><img src="/photos/spacer.gif" alt=""><input type="checkbox" name="yaw_pitch[data][]" value="{yaw_pitch}" {if yaw_pitch == "could-supply"}checked="yes"{/if}></td>
                    </tr>

                    <tr class="nacelle-group">
                        <td class="title">Housing</td>
                        <td><img src="/photos/spacer.gif" alt=""><input type="checkbox" name="housing[data][]" value="{housing}" {if housing == "current-supply"}checked="yes"{/if}></td>
                        <td><img src="/photos/spacer.gif" alt=""><input type="checkbox" name="housing[data][]" value="{housing}" {if housing == "could-supply"}checked="yes"{/if}></td>
                    </tr>

                    <tr class="professional">
                        <td>Professional Services</td>
                        <td><img src="/photos/arrow_down.png" alt=""><input type="checkbox" name="professional_services[data][]" value="{professional_services}" {if professional_services == "current-supply"}checked="yes"{/if}></td>
                        <td><img src="/photos/arrow_down.png" alt=""><input type="checkbox" name="professional_services[data][]" value="{professional_services}" {if professional_services == "could-supply"}checked="yes"{/if}></td>
                    </tr>

                    <tr class="professional-group">
                        <td class="title">Engineering</td>
                        <td><img src="/photos/spacer.gif" alt=""><input type="checkbox" name="engineering[data][]" value="{engineering}" {if engineering == "current-supply"}checked="yes"{/if}></td>
                        <td><img src="/photos/spacer.gif" alt=""><input type="checkbox" name="engineering[data][]" value="{engineering}" {if engineering == "could-supply"}checked="yes"{/if}></td>
                    </tr>

                    <tr class="professional-group">
                        <td class="title">Environmental Services</td>
                        <td><img src="/photos/spacer.gif" alt=""><input type="checkbox" name="environmental_services[data][]" value="{environmental_services}" {if environmental_services == "current-supply"}checked="yes"{/if}></td>
                        <td><img src="/photos/spacer.gif" alt=""><input type="checkbox" name="environmental_services[data][]" value="{environmental_services}" {if environmental_services == "could-supply"}checked="yes"{/if}></td>
                    </tr>

                    <tr class="professional-group">
                        <td class="title">Law / Finance</td>
                        <td><img src="/photos/spacer.gif" alt=""><input type="checkbox" name="law_finance[data][]" value="{law_finance}" {if law_finance == "current-supply"}checked="yes"{/if}></td>
                        <td><img src="/photos/spacer.gif" alt=""><input type="checkbox" name="law_finance[data][]" value="{law_finance}" {if law_finance == "could-supply"}checked="yes"{/if}></td>
                    </tr>

                    <tr class="professional-group">
                        <td class="title">Other Consulting</td>
                        <td><img src="/photos/spacer.gif" alt=""><input type="checkbox" name="other_consulting[data][]" value="{other_consulting}" {if other_consulting == "current-supply"}checked="yes"{/if}></td>
                        <td><img src="/photos/spacer.gif" alt=""><input type="checkbox" name="other_consulting[data][]" value="{other_consulting}" {if other_consulting == "could-supply"}checked="yes"{/if}></td>
                    </tr>

                    <tr class="services">
                        <td>Field Services</td>
                        <td><img src="/photos/arrow_down.png" alt=""><input type="checkbox" name="field_services[data][]" value="{field_services}" {if field_services == "current-supply"}checked="yes"{/if}></td>
                        <td><img src="/photos/arrow_down.png" alt=""><input type="checkbox" name="field_services[data][]" value="{field_services}" {if field_services == "could-supply"}checked="yes"{/if}></td>
                    </tr>

                    <tr class="services-group">
                        <td class="title">Construction</td>
                        <td><img src="/photos/spacer.gif" alt=""><input type="checkbox" name="construction[data][]" value="{construction}" {if construction == "current-supply"}checked="yes"{/if}></td>
                        <td><img src="/photos/spacer.gif" alt=""><input type="checkbox" name="construction[data][]" value="{construction}" {if construction == "could-supply"}checked="yes"{/if}></td>
                    </tr>

                    <tr class="services-group">
                        <td class="title">Logistics / Transportation</td>
                        <td><img src="/photos/spacer.gif" alt=""><input type="checkbox" name="logistics_transportation[data][]" value="{logistics_transportation}" {if logistics_transportation == "current-supply"}checked="yes"{/if}></td>
                        <td><img src="/photos/spacer.gif" alt=""><input type="checkbox" name="logistics_transportation[data][]" value="{logistics_transportation}" {if logistics_transportation == "could-supply"}checked="yes"{/if}></td>
                    </tr>

                    <tr class="services-group">
                        <td class="title">Operations & Maintenance</td>
                        <td><img src="/photos/spacer.gif" alt=""><input type="checkbox" name="operations_maintenance[data][]" value="{operations_maintenance}" {if operations_maintenance == "current-supply"}checked="yes"{/if}></td>
                        <td><img src="/photos/spacer.gif" alt=""><input type="checkbox" name="operations_maintenance[data][]" value="{operations_maintenance}" {if operations_maintenance == "could-supply"}checked="yes"{/if}></td>
                    </tr>

                    <tr class="services-group">
                        <td class="title">Other Services</td>
                        <td><img src="/photos/spacer.gif" alt=""><input type="checkbox" name="other_services[data][]" value="{other_services}" {if other_services == "current-supply"}checked="yes"{/if}></td>
                        <td><img src="/photos/spacer.gif" alt=""><input type="checkbox" name="other_services[data][]" value="{other_services}" {if other_services == "could-supply"}checked="yes"{/if}></td>
                    </tr>

                    <tr class="singleton">
                        <td>Blades / Rotor</td>
                        <td><img src="/photos/spacer.gif" alt=""><input type="checkbox" name="blades[data][]" value="{blades}" {if blades == "current-supply"}checked="yes"{/if}></td>
                        <td><img src="/photos/spacer.gif" alt=""><input type="checkbox" name="blades[data][]" value="{blades}" {if blades == "could-supply"}checked="yes"{/if}></td>
                    </tr>

                    <tr class="singleton">
                        <td>Tower</td>
                        <td><img src="/photos/spacer.gif" alt=""><input type="checkbox" name="tower[data][]" value="{tower}" {if tower == "current-supply"}checked="yes"{/if}></td>
                        <td><img src="/photos/spacer.gif" alt=""><input type="checkbox" name="tower[data][]" value="{tower}" {if tower == "could-supply"}checked="yes"{/if}></td>
                    </tr>

                    <tr class="singleton">
                        <td>Foundation</td>
                        <td><img src="/photos/spacer.gif" alt=""><input type="checkbox" name="foundation[data][]" value="{foundation}" {if foundation == "current-supply"}checked="yes"{/if}></td>
                        <td><img src="/photos/spacer.gif" alt=""><input type="checkbox" name="foundation[data][]" value="{foundation}" {if foundation == "could-supply"}checked="yes"{/if}></td>
                    </tr>

                    <tr class="singleton">
                        <td>Transmission / Electrical</td>
                        <td><img src="/photos/spacer.gif" alt=""><input type="checkbox" name="transmission_electrical_services[data][]" value="{transmission_electrical_services}" {if transmission_electrical_services == "current-supply"}checked="yes"{/if}></td>
                        <td><img src="/photos/spacer.gif" alt=""><input type="checkbox" name="transmission_electrical_services[data][]" value="{transmission_electrical_services}" {if transmission_electrical_services == "could-supply"}checked="yes"{/if}></td>
                    </tr>

                    <tr class="singleton">
                        <td>Marine Trades</td>
                        <td><img src="/photos/spacer.gif" alt=""><input type="checkbox" name="marine_trades[data][]" value="{marine_trades}" {if marine_trades == "current-supply"}checked="yes"{/if}></td>
                        <td><img src="/photos/spacer.gif" alt=""><input type="checkbox" name="marine_trades[data][]" value="{marine_trades}" {if marine_trades == "could-supply"}checked="yes"{/if}></td>
                    </tr>

                    <tr class="singleton">
                        <td>Research / Academic / Workforce Development</td>
                        <td><img src="/photos/spacer.gif" alt=""><input type="checkbox" name="research_academic_workforce_dev[data][]" value="{research_academic_workforce_dev}" {if research_academic_workforce_dev == "current-supply"}checked="yes"{/if}></td>
                        <td><img src="/photos/spacer.gif" alt=""><input type="checkbox" name="research_academic_workforce_dev[data][]" value="{research_academic_workforce_dev}" {if research_academic_workforce_dev == "could-supply"}checked="yes"{/if}></td>
                    </tr>

                </tbody>
            </table>
        </fieldset>
        <div class="clearer"></div>
        <input type="image" src="/photos/btn_submit-survey.png" alt="" value="Submit">
    </div>
</div><!-- end div.facility-form -->

    {/exp:channel:form}

```

However, neither one works. What is the correct way to accomplish this?

# Answer
> 1 votes
Just add a hidden field name called **checkbox\_fields** with list of all checkbox which you use in Channel Forms.

```
<input type="hidden" name="checkbox_fields" value="checkbox_field_1|checkbox_field_2|checkbox_field_3">

```

---
Tags: safecracker
---


# Question
Title: Solspace Favorites for logged out members
Is there any way to allow logged out users to favorite an entry?

I understand the purpose of favoriting is to add the entry to their favorites list, but we'd like to use it for 'liking' functionality too for all users irrespective of whether they're a member.

# Answer
> 0 votes
Sorry, that is currently not available. I recommend submitting this as a Feature Request under the specific add-on category. It'll also give other users the option to vote up the feature request, and help us prioritize features to add in upcoming versions of this add-on. http://support.solspace.com/support/discussions

Although we haven't tried this ourselves, if there is an add-on that can "make guest members logged in", then perhaps you can use that as a workaround to allow guests to mark favorites. Again, never tried this ourselves so can't guarantee this would work.

---
Tags: solspace
---


# Question
Title: Search result page navigation by either click enter or click img
```
I want to search content with search keyword and it should navigate to search result page.

Can you please correct them to achieve search functionality in EE either by clicking enter or click searchimage..

<form id="search" class="wow fadeInUp" data-wow-duration="1s" data-wow-delay="0.2s" action="search.php" method="GET" accept-charset="utf-8">
{exp:search:simple_form channel="news" name="" result_page="news/searches"}
              <input name="s" type="text" value="Search "/>
              <a onclick="document.getElementById('search').submit()">
                <img src="/images/search.png" alt=""/>
              </a>
{/exp:search:simple_form}
            </form>

```

# Answer
> 0 votes
Uhhh.. `submit()` is a jQuery bind, not native JavaScript.

```
$('.your-img-class').click(function(){
    $('submit[name="your_submit_button_name"]').submit();
});

```

---
Tags: search
---


title: Weird icons in Wygwam

text:
# Question
Title: Weird icons in Wygwam
I updated Wygwam to the most recent version (3.3.3) and now the icons in the toolbar all got messed up. I tried re-uploading the themes folder, and emptying the cache, but no luck so far.

# Answer
Looks like the image was still in the Nexcess CDN cache. I forgot to purge that one.
> 2 votes

# Answer
EE version? And do you have a custom theme? What accessories do you have installed? They can inject CSS/JS into your CP pages.

Using Chrome or Firefox, right click on one of the mal-positioned icons, and look at the CSS rulesets applied to the icon. See what CSS asset file is messing with your icon elements.
> 0 votes

# Answer
don't just overwrite on the upgrade. Delete everything from the theme directory, then clear the cache, then try to load an entry page with Wygwam, then reupload the files and refresh the page
> 0 votes

---
Tags: wygwam
---


# Question
Title: Does low_search_collection_id work in conditionals?
I've been trying the following without luck. Any help would be appreciated.

Search Form:

```
> {exp:low_search:form query="{segment_3}" result_page="search/results"}
> <input type="search" name="keywords" placeholder="Search a word...">
> <select class="form-control" name="collection" id="collection">
>     <option value="" selected="selected">Show results from</option>
>     <option value="1">Collection 1</span>)</option>
>     <option value="2">Collection 2</option>   </select>   <button type="submit" class="btn btn-default">Search</button>
> {/exp:low_search:form}

```

Results page:

```
{exp:low_search:results query="{segment_3}" limit="50" orderby="date" sort="desc"}
{if low_search_collection_id == "1"}
<p>show this</p>
{if:else}
<p>show this</p>
{/if}
{/exp:low_search:results}

```

Thanks in advance.

# Answer
> 0 votes
Yes, that should definitely work for keyword searches.

If it doesn't, check if the variable actually generates output, along with any other `{low_search_x}` variables. If that doesn't generate output, then there could be an extension conflict. Disable all extensions, *except* Low Search and try again. If that solves the problem, one of the other extensions isn't checking for `ee()->extensions->last_call` and/or not returning the correct value in the `channel_entries_query_result` hook.

If the above doesn't help, submit a support request here: https://getsatisfaction.com/low

---
Tags: low-search
---


title: How to pass sql entry_ids to playa?

text:
# Question
Title: How to pass sql entry_ids to playa?
I trying have a **SQL query** pass some information to a **playa**. I can fetch the entry ID and even the field output, but can't pass to `exp:playa:`

Here is a cleaned up snippet of the call

```
{exp:query sql="SELECT DISTINCT entry_id AS id FROM exp_channel_data WHERE entry_id IN (100,101,102)"}
    {exp:playa:children var_prefix="widget" entry_id="{id}"}
        {embed="widget/{widget:channel_short_name}" entry_id="{widget:entry_id}"}
    {/exp:playa:children}
{/exp:query}

```

The playa call isn't successfully embedding the templates. I can however grab the playa field directly, but I would have to manually parse it.

# Answer
> 1 votes
Turn on template debugging, you should be able to see if the entry id is being passed correctly to the playa tag.

# Answer
> 1 votes
The Query is good. Setting issue unique to my setup on the database itself. Once DB issue was taken care of, everything worked out.

# Answer
> 0 votes
You didn't properly close your playa tag pair.

```
{exp:playa:children}

```

Should be

```
{/exp:playa:children}

```

---
Tags: playa, sql
---


title: Too many redirects error (htaccess)

text:
# Question
Title: Too many redirects error (htaccess)
I recently got an SSL for my website and I'm trying to set up a htaccess so whenever someone joins the site it automatically takes them to the secure version of the site, but whenever I upload my htaccess with the code containing the redirect I got the too many redirect error, this is my code.

```
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.scryptedhosting.com/$1 [R,L]

```

This code for some reason results in a too many redirect loop, can anyone help as to why?

Sincerely Tom.

# Answer
try this:

```
RewriteCond %{HTTP_HOST} ^www.domain.com [NC]
RewriteRule (.*) https://www.domain.com/$1 [R=301,L]

```

Do you know if there is a load balancer in front of your servers?
> 0 votes

---
Tags: error, htaccess, redirects
---


# Question
Title: Use conditional to check that the current user is the author of the post
How can I check that the current user is the author of the post? Something like this?...

```
{if author_id="CURRENT_USER"}{/if}

```

*(My setup is basically an entries loop, with a snippet inside of that containing all the variables to display each entry. Within that I want to conditionally show an embedded include which holds a delete form. So basically I only want to show the delete form for entries which are authored by the current user. Got it all working okay, just need the conditional now.)*

# Answer
Compare to the `member_id` global variable:

```
{if member_id == author_id}

```

Or use the alternative syntax:

```
{if logged_in_member_id == author_id}

```

Just remember that global variables are parsed at the end of parsing stages. So, the content inside the conditional will bee removed only after all previous parsing stages. Because of that, you **should not** put an embed inside it.
> 2 votes

---
Tags: conditionals, author
---


# Question
Title: Unresolved error with EE 2.10.1 and MimeType.php
I'm getting the same error as this question:

> Fatal error: Call to undefined function EllisLab\ExpressionEngine\Library\Mime\finfo\_open() in /home/foo/bar/EllisLab/ExpressionEngine/Library/Mime/MimeType.php on line 117

There are two suggestions offered (originally from an Ellis blog post):

> 1. Login to your CP and go to Tools, then Utilities, then PHP Info. If you see --disable-fileinfo on that page (I recommend using your browser’s search function) then you will need to contact your host and have them provide a version of PHP with fileinfo not disabled (i.e. enabled).
> 2. Check your system/expressionengine/config/mimes.php file. If it does not contain $whitelist = array around line 31 you will need to upload a fresh copy.

... but I've checked both of those, and I'm still getting the same error. Any other suggestions?

I'm in a fresh install of EE 2.10.1, on a Dreamhost server running PHP 5.6.10.

# Answer
> 4 votes
I just encountered this, and found that I had to follow the instructions in this Dreamhost wiki entry to *truly* enable `fileinfo` functions. (The default "shared" `fileinfo` support didn't cut it.)

---
Tags: file-uploads, error
---