# Question
Title: Why does dynamic='no' affect displaying a banner from a different channel?
The code I have works, but I don't understand why and am seeking an explanation rather than a fix.

I have a template which displays a list of news articles. The channel is called `news`. I also have another channel called `news_overview` which is used to create an "intro" page to my list of news articles (which belong in the `news` channel).

So my template is as follows:

```
{exp:channel:entries channel="news_overview" limit="1"}
   <!-- Display banner and other details from `news_overview` channel -->
{/exp:channel:entries}

{exp:channel:entries channel='news' orderby='date' sort='desc' limit="9" paginate="bottom"}

  <!-- Display each article's title and a link to read it -->
  <h1>{title}</h1>
  <p><a href="{url_title_path='news'}">Read article</a></p>

{/exp:channel:entries}

```

My news entries are categorised.

When I go to a URL (`/news`) it loads up the template above and everything works.

However when I go to a **category based** URL such as `/news/category/events` it loads the appropriate articles....**but not the information from `news_overview`**. In other words, it loads the appropriate list of news articles (which are categorised as "events") but is missing the banner and intro text from `news_overview` at the top of the template - nothing is output there.

I managed to fix this by adding `dynamic="no"` to the first channel entry tag:

```
{exp:channel:entries channel="news_overview" limit="1" dynamic="no"}

```

This fixed the problem. But I don't understand why?

According to the documentation

> There are times, however, where you do not want the parameters affected by what the URL contains. To override the dynamic nature of the channel tag, use dynamic="no".

Why does the URL affect loading data in this way? My understanding of my initial channel entries tag is that it's just asking for 1 entry from `news_overview`. Given that this is the same on every page, and isn't even from the `news` channel, why does it affect it in this way? I understand why it affects the `news` entries that are found in the query...because the categories are tied to `news`, **but not `news_overview`**.

# Answer
> 1 votes
A helpful example of dynamic="no": https://docs.expressionengine.com/latest/how\_to/building\_a\_simple\_news\_site.html#a-dynamic-duo

also see: https://docs.expressionengine.com/latest/urls/url\_structure.html#viewing-your-site

Your /news page is showing multiple entries because there's no valid URL Title in the URL to limit the entries displayed, so everything is displayed (limited by the other channel entries parameters, like channel, status, etc...).

But on the category limited url (/news/category/events) the channel entries tag will look for all entries matching that category. Using the dynamic="no" parameter overrides that and ignores the URL.

So use dynamic="no" any time you want to get a specific set of entries based on that channel entry tag parameters, regardless of where you are.

---
Tags: categories, ee3, dynamic
---


title: Solspace Tags: import into EE3 from EE2

text:
# Question
Title: Solspace Tags: import into EE3 from EE2
Now that Solspace Importer is a legacy product, what is the recommended method to import tags into my new EE3 installation? The rest of the entries are imported (using DataGrab and XML), so I can use the titles and URLs as keys for the import; but I cannot get multiple tags to import just using DataGrab. I tried separating the tags with commas, but when that imported in and was associated with the entry, what I got was one tag with commas in it rather than five separate tags on the entry.

# Answer
> 0 votes
If you are running an upgrade from v2 to v3, Tag will take care of all that when you upgrade the module. https://solspace.com/expressionengine/tag/docs/updates/ compare the table schema for tag 2 vs 3. they may be identical and you can just copy over the tables. Don't quote me on that.
On other upgrades ( for other modules) I have deleted the row in the modules table for the addon. Copy over all your tag tables, upload the tag files for v3, put the data back in the modules table (from your v2 install) and then just run the module update. It's a work around I know, but saves having to try and export and then import and really doesn't take very long. I can confirm it works.

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


title: Reverse rss parser output

text:
# Question
Title: Reverse rss parser output
I am trying to out put the next 5 tour dates for a band. Unfortunately as rss feeds output the latest feed item first I need to find a way to reverse the order. My php skills are limited so I would appreciate any help.

```
{exp:rss_parser url="http://acousti.co/feeds/artist/artist_name"
                    cache_refresh="10"
                    limit="5"
                    }

    {feed_items}

                  <li>{item_date format="%F %d %Y"}  <a href="{item_link}">{item_description}</a>
                  </li>

                 {/feed_items}
                {/exp:rss_parser}

```

# Answer
> 1 votes
You can do the inversion using stash lists.

This works in two stages. First load a stash list with the content of your feed call. Then recall the stash list with whatever ordering you care to specify.

Something like this:

```
{exp:stash:set_list name="tour_dates"}

    {exp:rss_parser url="http://acousti.co/feeds/artist/artist_name"
        cache_refresh="10"
        limit="5"
        }

        {feed_items}
            {stash:item_date}{item_date}{/stash:item_date}
            {stash:item_link}{item_link}{/stash:item_link}
            {stash:item_description}{item_description}{/stash:item_description}
        {/feed_items}

    {/exp:rss_parser}

{/exp:stash:set_list}

{exp:stash:get_list name="tour_dates" orderby="item_date" sort="desc"}

            <li>{item_date format="%F %d %Y"}  <a href="{item_link}">{item_description}</a></li>

{/exp:stash:get_list}

```

Of course you'll need to set the `orderby` tag appropriate to your source data.

HTH

---
Tags: rss, feedparser
---


# Question
Title: Trouble Using DataGrab to Import into Solspace Calendar in EE3
Trying to use DataGrab to import into the Solspace Calendar (specifically an XML / RSS feed) but we get this error when we try going to the step that allows us to match fields to the xml data nodes.

SQLSTATE\[42S22\]: Column not found: 1054 Unknown column 'calendar\_id' in 'field list': SELECT `calendar_id`, `title` FROM (`exp_channel_titles`) JOIN `exp_calendar_calendars` ON `exp_channel_titles`.`entry_id` = `exp_calendar_calendars`.`calendar_id`

ee/legacy/database/drivers/mysqli/mysqli\_connection.php:122

Is there a solution that would allow us to import XML feeds into the Calendar outside of DataGrab or a fix?

# Answer
DataGrab's developer added a base import option for Solspace's Calendar module. Special thanks to http://www.brandnewbox.co.uk
> 1 votes

# Answer
Unfortunately there is no easy way to just import Calendar event data. This is especially because Calendar has several other database tables that need to be populated along with the field/event data so Calendar knows how to handle recurrences, exclusions, etc.
> 0 votes

---
Tags: solspace-calendar, datagrab
---


title: Profile Update Notifications

text:
# Question
Title: Profile Update Notifications
We're using User to manage member profiles for a training academy. Members update their profiles in templates utilizing the user:edit tag.

The client would like to receive notifications whenever a member updates their profile.

I see Profile Update Admin Notification Template in the User settings, but I'm not sure how it's supposed to work. I've added an email address in the field above it, and I've placed this code in the field, but am not receiving any notifications (I've confirmed that other email notifications are being sent):

```
Date updated: {update_date}
{changed}
   {award_name} // I also tried {name} per the instructions
   {value}
{/changed}

```

# Answer
> 0 votes
This is a bug with User and will be corrected in the next release (User 4.0.11). In the meantime, anyone affected by this issue can contact Solspace Support for a patched copy. :)

---
Tags: solspace-user
---


# Question
Title: Most efficient workflow to assign news articles to a list of services with thousands of entries
Is there any way to do this in ExpressionEngine (3.5.10)....

I have a channel of services offered by a company. The channel name is called `services`. I then have a list of news articles in a channel called `news`.

There will be around 50 `services` and hundreds (or potentially thousands) of `news` articles.

What I want to do is when a user is looking at a particular service, I want to show news articles that are relevant.

However, any workflow for the publisher (the person using the EE Admin panel) is tedious, or it seems impossible to write a query in the template to do the job.

For example, it could technically be done like this:

1. Set up a Relationship on `news` such that I can say which `services` it applies to. I don't understand how I could then query this to get the actual news content **when viewing a service on the front-end** because the relationship exists on the `news` channel entry, not the `services` channel entry. *\** see notes below for what the intended outcome is here and you'll understand what the issue with this is.*
2. Set up a Relationship on `services` and select the appropriate `news`. This is impractical because of the amount of work it would involve to maintain. For example *every single time* a `news` entry is published the publisher would have to go into potentially 50 `services` rather than being able to do it from 1 place.
3. Use categories... not really sure where to begin with that as I could set up categories on my `news` articles (where the categories are the names of the services) but then unsure how to query this in the template. For example, I don't understand in terms of writing a query, how you could correlate a category name (or category slug) to specific channel entries.

\** The relevant template is the one which shows details of an individual service. These are set up with a URL structure like so:

* `/services/service-one`
* `/services/service-two`
* `/services/another-service`
* ...

So when the user goes to `/services/service-two` it should list any `news` entries that are relevant to `service-two`.

What is the most efficient way of doing this in terms of:

1. Workflow for the publisher, i.e. the least number of clicks and data entry.
2. Something that scales well given there may be 50 services and \>1000 news articles, with further news articles being added daily.
3. How does the proposed solution work in the template - i.e. when I'm looking at `services/service-two` what code do I need to bring out the list of `news` entries such that I can read at least their title and URL?

My apologies if the answer to this is obvious but I've thought about it so long now I'm asking for help as I can't see a way around it.

# Answer
> 2 votes
Categories is the primary method I would choose given your outline. Each categories category url should match the URL name of the service whereas the category title can be whatever you want it to be. It will require some work upfront and on-going but so would any other approach.

Then, assign all your news articles at least one if not multiple categories. Hey, news articles might apply to more then one service so makes sense.

Grab your traditional services content through

```
{exp:channel:entries channel="services" url_title="{segment_2}....}

  your code here

{/exp:channel:entries}

```

Then wherever you need to insert your news articles (using lows seg2cat)... because EE uses the category ID not the URL in the channel call.

```
{exp:channel:entries channel="news" category="{segment_2_category_id}" dynamic="no" limit="10"}

  your code here

{/exp:channel:entries}

```

Thats about it, you can futz around with order, limits and asc/desc to suit... because no one wants 100's of links to other news.

---
Tags: categories
---


# Question
Title: Low Search: set result_page dynamically via JS
Is there any way to set the result\_page of a Low Search form dynamically via JS? The use case is:

I've got a job search form. It has a select field for category, which produces a URL such as /search?category=1&keywords=foo. For SEO, it'd be much better for the URL to be /search/category\_name?keywords=foo. Is there any way to change the form action using JS, when someone changes that select field?

Thanks loads for any pointers!

# Answer
You wouldn't even need JS to achieve this. You can add a select element that populates the `result_page` parameter, like so:

```
<select name="result_page">
    <option value="search">Select category</option>
    {exp:channel:categories style="linear" ... }
        <option value="search/{category_url_title}">
            {category_name}
        </option>
    {/exp:channel:categories}
</select>

```

But, as far as I know, forms will not be POSTed by search engines, and therefore search results pages will also not be indexed. Your argument to add the category URL title to the URI might not be valid.
> 0 votes

---
Tags: low-search
---


# Question
Title: Issues searching for '7A' or '6A' with Solspace Supersearch
I'm building a search form using Solspace's Super Search but I'm getting some strange results on one of the fields.

It's a field that searches cable categories. The available options are:

```
<label for="cable_category">Category:</label>
<select name="cable_category">
    <option value="">-</option>
    <option value="8.2" {if super_search_cable_category_82}selected="selected"{/if}>8.2</option>
    <option value="7A" {if super_search_cable_category_7A}selected="selected"{/if}>7A</option>
    <option value="7" {if super_search_cable_category_7}selected="selected"{/if}>7</option>
    <option value="6A" {if super_search_cable_category_6A}selected="selected"{/if}>6A</option>
    <option value="6" {if super_search_cable_category_6}selected="selected"{/if}>6</option>
    <option value="5e" {if super_search_cable_category_5e}selected="selected"{/if}>5e</option>
</select>

```

The form's working perfectly for other fields but if I try to search for '7A' or '6A' it just displays all results. The URL changes but the search doesn't work. If I search for '5e' it works as it should.

I've tried setting the search to use 'exact' searching but that made no difference. I've also tried using lowercase (i.e. 7a) but that made no difference either.

The really strange thing is that if I search for '5e' that works perfectly?

Any ideas to what's going on would be very gratefully received.

Thanks in advance,

Tom

***Versions:*** *EE version 2.9.2, Super Search version 2.2.3*

# Answer
This is a sad issue with Super Search, but it is likely doing this because of a combination of you having `a` in your Ignore Keywords list in control panel and the search query containing/starting with a number. :)
> 0 votes

---
Tags: solspace, supersearch
---


# Question
Title: Possible to add type attributes when using FreeForm Composer
Is it possible to add type attributes to inputs when using the FreeForm Composer Templates? If I hard-code a form I can add type="email" or type="tel" but cant see any way to do this when using Composer.

Additionally if I add attr:required="required" to {freeform:field:{composer:field\_name} the output is required="required" which although correct for xhtml, is not correct for HTML5 - should simply be 'required'. Is there a way to alter this?

# Answer
> 2 votes
It's also possible to use an add-on like CE String to circumvent this:

```
{exp:ce_str:ing replace='required="required"|required'}
{exp:freeform:form}
{freeform:field:myfield
 attr:required="required"
}
{/exp:freeform:form}
{/exp:ce_str:ing}

```

will output

```
<input type="text" name="myfield" value="" id="freeform_myfield" required>

```

# Answer
> 1 votes
You would have to first create a custom Composer Template (can be done from the CP or using the `{exp:freeform:composer}` tag as a tag pair with Composer Template code inside), and manually create/hand-code your field output when your custom field is called. For example, based on the default Composer Template code, there is this conditional:

```
...
{if:else}
    <p>{composer:field_output}</p>
{/if}

```

Which you could change to

```
...
{if:else}
    {if composer:field_name == "my_email_field"}
        <input type="email" name="my_email_field" placeholder="Enter email" />
    {if:else}
        <p>{composer:field_output}</p>
    {/if}
{/if}

```

The other alternative is to use javascript to change the `type=""` when the form is loaded from your template. Again, you would need to target the fields that you want to change.

Finally, you could file a Feature Request, for some setting in the CP for example, under the specific add-on category here: http://support.solspace.com/support/discussions. 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.

As for your sub-question, there's not much that can be done with `required="required"`, short of using javascript to format it the way you want. The other option could be to file a Feature Request for this as well.

# Answer
> 1 votes
A similar approach if using EE3, you can use Streeng and wrap this around form code:

```
{exp:streeng find='required="required"' replace="required"}
    {exp:freeform:form
        attr:required="required"
    }
        ...
    {/exp:freeform:form}
{/exp:streeng}

```

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


title: Organising Album products in CartThrob

text:
# Question
Title: Organising Album products in CartThrob
What's the best way to do organise music album products in CartThrob? Each album would be available to buy as a CD and/or download. And then each track from the album would be available to buy individually. So I was thinking that each item (CD and downloads) would need to be separate products. I could then group them on an album page by treating the album as a department with a separate channel and pulling all the product items onto the album page using a related field in the channel.

# Answer
('m with Vector, the people behind CartThrob)

This is a perfect use case for packages: https://www.cartthrob.com/docs/fieldtypes/packages/index.html

Each track can be set up as a product in one channel, and you can organize them into albums via packages in another channel. Then you can sell them individually or together.
> 0 votes

---
Tags: cartthrob
---


# Question
Title: Solspace User admin notification with custom user fields upon registration
Is there a way to send notifications upon user registration to an administrator with custom fields? EE sends a notification all right, but not with custom fields. Thanks, L.

# Answer
We ended up adding this line to mod.user.php:

`$swap = array_merge($_POST, $swap);`
> 1 votes

---
Tags: solspace-user
---


title: How to get around pagination URLs

text:
# Question
Title: How to get around pagination URLs
Does anyone have a neat solution to using pagination URLs? I would like to set up a simple structure like articles/article-entry with the listing and entry in one template. But once I include pagination in the listing I always end up putting the article-entry into a new template to avoid clashing with the pagination URL (ie articles/P2 etc). I then have articles/entries/article-entry or something equally as clunky.

I could use paginate\_base to create a different URL for the paginated pages. But then I have duplicate templates for the listing. Is there any other way?

# Answer
> 0 votes
Switchee should be able to help you out there:

```
{exp:switchee variable="{segment_2}" parse="inward"}

  {case value=""}
    No value = landing page
  {/case}

  {case default="yes"}
    Default = anything which isn't landing or pagination (below).
  {/case}

  {case value="#^P(\d+)$#|''"}
    This is for paginated pages.
  {/case}

{/exp:switchee}

```

---
Tags: templates, url, pagination
---


# Question
Title: Restricting content based on visitor’s location - EE3
I’m looking for a way to hide certain content on an ExpressionEngine 3 site if the visitor is outside the UK.

I thought I might be able to use IP to Nation, but this proved not to be the case.

Is this possible? Thanks!

# Answer
> 1 votes
You'll need to use an IP plugin but it doesn't look like any of them have been updated to v3 yet. You could try contacting the authors of, for example,

and ask if they have plans to update, or it might not be that difficult to do yourself. You might be able to just add the addon.setup.php and be good to go.

---
Tags: ip, iptonation
---


# Question
Title: How-to connect to secondary external DB in EE2
Im relatively experienced with PHP/HTML, however not so much with EE 2.4. Im working with a company using this set-up, so im on the learning curve at the moment. However, the first db 'expression' has been set up via phpmyadmin on cpanel, a second database to hold a few tables for front-end db search is required and im having trouble figuring out how to connect to this database, and to display data, i.e. select * from tbl\_states

Am i to create a template script/ file for connection, or a webpage (php enabled) file? or will the php method work in ee 2.4?

```
<?php
include("include/dbinfo");
$comm=@mysql_connect(localhost,$username,$password);
$rs=@mysql_select_db($database) or die( "Unable to select database");

$sql="SELECT * FROM tbl_states";
$result = mysql_query($sql) or die("SELECT Error: ".mysql_error());
$num_rows = mysql_num_rows($result);
?>

$DB1 = $this->EE->load->database('ext_db', TRUE);

```

$q = $DB1-\>quesry('SELECT * FROM tbl\_states'); $results = $q-\>result\_array();

trying to use the below code to echo to no avail

```
if ($results ->num_rows() > 0){
  foreach ($results ->result() as $row){
    echo $row->stateName."";
  }
}

```

Help towards this is highly appreciated !!

# Answer
> 0 votes
If this is only going to be used in a single template, you could set that template to allow PHP and then put your connection info directly in the template.

But if it's going to be used in multiple templates, you might need to create a module and put everything in there.

There's also http://360adaptive.com/connecting-to-multiple-databases-in-expressionengine/ which describes connecting to multiple dbs in EE2.

---
Tags: ee2, database, mysql
---


# Question
Title: Render/Submit multiple channel entries on one page
I'm looking to render a list of channel forms of the same page. So something like this:

```
{exp:channel:entries
    channel="my_channel"
    limit="5"
}
    {exp:channel:form
        entry_id="{entry_id}"
    }
        <input type="text" name="custom_field" value="{my_value}">
        <button type="submit">GO!</button>
    {/exp:channel:form}
{/exp:channel:entries}

```

This does show the forms but I can only submit the first one because all the form tokens are the same and as soon as it has been used, it can't be used again.

Also, it's very heavy to load.

Even more ideal would be to have one submit button and one form wrapping all entries.

# Answer
> 0 votes
If you only want to have a single form that covers all entries you could use Stash to save all your entry IDs to a variable which you then use in the `entry_id` parameter of the form, e.g.

```
{exp:stash:set
  name="form_ids"
  parse_tags="yes"
}{exp:channel:entries}{entry_id}|{/exp:channel:entries}{/exp:stash:set}

{exp:stash:parse process="end"}
  {exp:channel:form
    entry_id="{exp:stash:get name='form_ids'}"
  }
    <input type="text" name="custom_field" value="{my_value}">
    <button type="submit">GO!</button>
  {/exp:channel:form}
{/exp:stash:parse}

```

A bit more info in Stash category ID and entries

---
Tags: safecracker
---


title: Stripping line breaks from a template

text:
# Question
Title: Stripping line breaks from a template
I'm working on two templates which use the same snippet for outputting data. One is a HTML template which displays a table, the other forces the download of a CSV.

With some conditionals I've set up my snippet to replace all table tags with either nothing, spaces or commas for the CSV delimiters, but the CSV output still has all the line breaks which I'd ideally like to keep in place so that I can still actually read the template when I need to edit it.

The template that downloads the CSV looks like this:

```
<?php
    header('Content-type: text/csv');
    header("Content-Disposition: attachment; filename=file-{current_time format='%d-%m-%Y'}.csv");
    header("Pragma: no-cache");
    header("Expires: 0");
?>
{sn_filter_urls}

```

Inside the snippet is

```
{if segment_2=='html-template'}<table>
  <thead>
    <tr>
      <th>Line type</th>
      <th>Campaign</th>
      <th>Labels</th>
      <th>Campaign Daily Budget</th>
      <th>Campaign Type</th>
      <th>Networks</th>
      <th>Languages</th>
      <th>Bid Strategy Type</th>
      <th>Enhanced CPC</th>
      <th>Ad Rotation</th>
      <th>Delivery Method</th>
      <th>Ad Group</th>
      <th>Max CPC</th>
      <th>Final URL</th>
      <th>ID</th>
      <th>Location</th>
      <th>Criterion type</th>
      <th>Keyword</th>
      <th>Description</th>
      <th>Headline 1</th>
      <th>Headline 2</th>
      <th>Path 1</th>
      <th>Path 2</th>
      <th>Comment</th>
      <th>Link text</th>
      <th>Feed name</th>
      <th>Header</th>
      <th>Snippet Values</th>
    </tr>
  </thead>
  <tbody>
  {/if}
  {if segment_2=='csv-template'}Campaign,Labels,Campaign Daily Budget,Campaign Type,Networks,Languages,Bid Strategy Type,Enhanced CPC,Ad Rotation,Delivery Method,Ad Group,Max CPC,Final URL,ID,Location,Criterion type,Keyword,Description,Headline 1,Headline 2,Path 1,Path 2,Comment,Link text,Feed name,Header,Snippet Values{/if}
    {exp:channel:entries}
        {embed='_embeds/.filter_url_activity_title'}
    {/exp:channel:entries}
  {if segment_2=='filter-urls'}</tbody>
</table>{/if}

```

And inside the embedded template:

```
{exp:channel:entries}
  {exp:super_search:results}
    {if segment_2=='html-template'}<tr>{/if}
      {if segment_2=='html-template'}<td>{/if}DATA{if segment_2=='html-template'}</td>{if:else},{/if}
      {exp:loopee forint="1" to="17" by="1"}{if segment_2=='filter-urls'}<td></td>{if:else},{/if}{/exp:loopee}
      … other table markup …
    {if segment_2=='html-template'}</tr>{/if}
    {sn_sitelinks}
  {/exp:super_search:results}
{/exp:channel:entries}

```

There's another snippet in there which also has similar table markup but the problem with the line breaks exists in the short example above. Wherever I'm using loopee to output markup or `,` the `,` all come out on one line which is what I want, but where I've put line breaks in my template so a new `td` starts on a new line, that's showing up in the CSV output.

Is there a way I can have the contents of `sn_filter_urls` run through a process to remove the line breaks before it's then downloaded?

# Answer
You can use a wonderful EE utility called **Streeng** to do this (and lots of other things).

`Streeng` performs a broad variety of manipulations on the tag outputs, including stripping out some or all of the `<html>` tags within it, and performing substitutions. You could use these features to achieve what you are describing (and remove the conditional statements used in your code at same time).

With `Streeng` installed, to get a version of the tag output with `<html>` tags removed and the line feeds replaced by single spaces you would need to enclose the tag as follows:

`{exp:streeng
 allowed="none"
 find="NEWLINE"
 replace=" "}
 {sn_filter_urls}
{/exp:streeng}`

HTH

**Extra!**

In response to your comment about it not working, I did this test:

Create template partial `{sn_test_text}` containing:

```
Here is some stuff
Here is a new line
Here is the last line.

```

Then created a template with this code in:

```
{exp:streeng
  allowed="none"
  find="NEWLINE"
  replace=" "}
    {sn_test_text}
{/exp:streeng}

```

And then when I run the template I get this output

```
Here is some stuff Here is a new line Here is the last line.

```
> 2 votes

---
Tags: templates, csv
---


# Question
Title: URLs to entries in search results are wrong - auto_path not working as expected
I have 2 websites both built in ExpressionEngine 3.5.10.

Both use the `{exp:search:simple_form}` tag to provide a basic search facility.

One of the sites works absolutely fine. But the other doesn't - if I do a search for a valid term (by looking at the content in the Admin panel) it will give me a list of results, but the URL to the entry is incorrect. So it results in a 404 error when the user clicks on a result.

The search form syntax is like this:

```
 {exp:search:simple_form channel="news|services|resources|contact_us|about_us|pages|team" no_result_page="search/noresults" results="10" search_in="entries" status="open" where="any"}

```

I have a few entries in the `services` channel. If I search for a valid phrase within the content it is producing these URLs:

The above will result in 404 errors - the correct URL has `services` before the slug. So they should be:

The syntax in my results template (`search/results.html`) to display the URL's is the same on both websites:

```
{exp:search:search_results}
    <a href="{auto_path}">{title}</a>
    <p>{excerpt}</p>
{/exp:search:search_results}

```

The problem seems to be arising from the `{auto_path}` bit because that's what's outputting the URL.

I'm unsure why it works ok on 1 website and not the other. They are separate websites but am sure they have been set up and configured in the same way.

Is there some other setting needed to make my URLs work correctly? Very confusing and slightly annoying that this doesn't just work out of the box.

# Answer
I figured this out, but the way it works is really really bad!

If you go into Channels \> `services` \> Search results you have to specify the URL to that channel's template group, e.g. https://my.domain/services

This will then produce the "correct" URL on the search results page (for example https://my.domain/services/tech-page-1 instead of https://my.domain/tech-page-1).

This is an absolutely terrible system, because not only do you have to do that for every channel (7 in my case)... but if you're working in a development/staging environment you then have to replace all those URL's during go-live rather than it working off 1 setting!

Incidentally if anyone has a better workaround let me know. Although that's "fixed" my problem, the underlying system is absolutely awful.
> 1 votes

---
Tags: ee3, search
---


# Question
Title: Simple form showing "no results" correctly but not displaying "results" correctly
I have tried to include the simple form on my text site but it only seems to work if you type in a keyword that isnt in any of the entries.

I have copied my code below for my search field:

```
 {exp:search:simple_form channel="{channel_content}" results="20" result_page="/search/results" no_result_page="/search/no-results" search_in="everywhere" where="any"}
    <input type="text" name="keywords" id="keywords" class="form-control" placeholder="Search">
    <span class="input-group-btn">
    <input type="submit" class="btn-u" value="Go" />
    </span> {/exp:search:simple_form}

```

---

And below this is the code for the search template:

```
     {exp:switchee variable="{segment_2}" parse="inward"}

        {case value="no-results"}
            {search_message_no_results}
        {/case}
        {case default="yes"}
        <table border="0" cellpadding="6" cellspacing="1" width="100%">
            <tr>
                <th>{lang:title}</th>
                <th>{lang:excerpt}</th>
                <th>{lang:author}</th>
                <th>{lang:date}</th>
                <th>{lang:total_comments}</th>
                <th>{lang:recent_comments}</th>
            </tr>

        {exp:search:search_results switch="resultRowOne|resultRowTwo"}

            <tr class="{switch}">
                <td width="30%" valign="top"><b><a href="{auto_path}">{title}</a></b></td>
                <td width="30%" valign="top">{excerpt}</td>
                <td width="10%" valign="top"><a href="{member_path='member/index'}">{author}</a></td>
                <td width="10%" valign="top">{entry_date format="%m/%d/%y"}</td>
                <td width="10%" valign="top">{comment_total}</td>
                <td width="10%" valign="top">{recent_comment_date format="%m/%d/%y"}</td>
            </tr>

            {if count == total_results}
                </table>
            {/if}

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

        {/exp:search:search_results}

        {/case}

        {/exp:switchee}

```

---

I am also using the switchee add on if that helps.

Thanks Jordan

# Answer
> 0 votes
I have found why it wasnt displaying.

I changed this value:

result\_page="/search/results"

to this value:

result\_page="/search"

And now my search results have started to show. I am not sure why it works when I remove the "/results" but it has.

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


# Question
Title: This page isn't working File Submit Form
I am using FreeForm 4.1.3 and ExpressionEngine 2.7.3. I have a form that was working for a while and I think I am running into an issue now. I did have to recently go into EE settings and update my file upload location of my host. I updated the Server Path to Upload Directory under CP Home -\> File Manager -\> File Upload Preferences -\> Edit File Upload Preferences. I guess the host of my client updated their hosting somewhere along the lines and now when I try to upload certain documents it knocks out my site.... In chrome I get...

This page isn’t working

www.xxxxxxxxx.com didn’t send any data. ERR\_EMPTY\_RESPONSE

I am not sure what is going on.... I can back my page up and submit again with a txt file and it submits....just not a docx....I have file uploads set to all file types.

# Answer
> 0 votes
GoDaddy moved me to a new server that has modsecurity on for docx, since it's a shared environment I cannot disable it to allow docx uploads....hope this helps someone else.

---
Tags: solspace-freeform
---


title: Displaying content from a grid field

text:
# Question
Title: Displaying content from a grid field
We set up a grid field to capture a registration url and text for a registration button label.

{calendar:event\_register:url} {calendar:event\_register:link\_text}

We've tried several ways of trying to set the loop for the grid field without success. How do we display grid field data within a {calendar:events} loop?

Thanks.

# Answer
> 0 votes
While the Calendar:Events template tag may work similarly to the EE Channel:Entries tag, it is much more limited. This is because Calendar looks at event recurrence rules and populates the additional occurrences that way (rather than the recurrences actually existing in database). This inflates the counts and can take a huge hit on performance. In Calendar 1.x we had a large number of customers complain about performance issues, so in Calendar 2.x we sacrificed some extra Channel:Entries functionality in favor of huge performance gains. We did this by rewriting our own version of the Channel:Entries functionality and just included what we believed to be the more commonly used features. Unfortunately some features such as search parameter are not built in at this time.

In some cases, it works to embed a template with Channel:Entries tag to parse extra variables or conditionals. This could be done in the case of your Grid field. :)

---
Tags: solspace-calendar
---


# Question
Title: Hide grid fields based on value of dropdown selection
Is there a plugin around to hide grid fields based on value of dropdown selection?

So say the field is a dropdown and based on the selected option you then hide / show specific fields in the grid based on the selected option.

Kind of like this plugin but only for fields in a grid.

https://devot-ee.com/add-ons/entry-type

# Answer
Maybe missing your point, but not sure you need a plugin.

If you want to show / hide fields within a page without reloading it, you will need to use javascript to do this. There are lots of answers within StackExchange in response to questions about this (for example here), so easy to find a variety of solutions.

If this doesn't help, could you clarify what you are trying to do?
> 0 votes

---
Tags: channel-entries, grid, editor
---


title: jQuery CDN and Expression Engine?

text:
# Question
Title: jQuery CDN and Expression Engine?
We're currently copying the site we developed locally to ExpressionEngine and we are calling all our external libraries via CDN (no server access to upload modules etc). Our jQuery isn't working, however the Foundation 6.4.3 being called referenced via CDN is working. Anyone know if this is a known problem? the CDN script tag is in near the end of the body in our index page before any other jquery requirements (i.e. foundations jquery).

Edit : The sources show that the CDN is loading jQuery and present there, however it's still not applying to the page. Edit2: Seems that it is only sometimes loading into the sources tab, sometimes it is absent.

# Answer
99.9% this isn't an EE issue. EE places no restrictions on what you do with external sources.

Sounds like a server/config issue tbh
> 0 votes

# Answer
$(document).foundation(){}; wasn't being called.
> -1 votes

---
Tags: ee2, javascript, jquery, html
---


# Question
Title: Alternating background colors with exp:calendar:day tag?
We have a day view (schedule) and wanted to tint the background of every-other event in the schedule. The switch variable doesn't seem to work, and there's no count variable we could discover... how would you go about this?

We're inside of the {calendar:events} loop at this point. Are we missing something?

Thanks.

# Answer
> 1 votes
I suppose you could just do this with CSS:

```
tr.yourclassname:nth-child(even) { background: #CCC }

```

---
Tags: solspace-calendar
---


# Question
Title: How to bind code when you delete a row with Grid?
I'm trying to figure out how to run some jquery after you click trash can icon to delete a row in grid. I have ajax code I have to run if you delete a row. EE has code in there that probably has preventDefault() which is stopping my code from triggering.

This is inside a channel form field on frontend. I can't seem to bind anything to that delete row icon

# Answer
> 0 votes
I ended up finding a solution... I changed the selector and that seemed to do the trick. For some reason the selector I was using had too much binded but this new selector worked. I also changed $('body') to $(document) and that worked.

final code that worked was

$(document).on('click', 'ul.toolbar li.remove a', function(){

---
Tags: safecracker, ee3, grid
---


title: EE 3 Live look button

text:
# Question
Title: EE 3 Live look button
Can someone tell me where the Live look button is located in the v3 control panel? In v2 it was alongside the entry title in the edit listing.

# Answer
It should be there also, but there's currently a bug and it's not showing up:

Solution and info here:

https://expressionengine.com/support/bugs/23218/live-look-templates-no-longer-working
> 1 votes

---
Tags: control-panel, livelook
---


# Question
Title: Default Rich Text Editor adding in <p> tags
I dont know whether it is just down to the default RTE that EE give you but when add in a table, save and upload it hads in blank

at the end of the table and table heading. I have outlined the examples below:

Browser View:

EE Control Panel:

And then this is the code the browser outputs:

```
<div class="panel panel-sea teacherList">
  <div class="panel-heading">
   <h3 class="panel-title"> Class Team</h3>
   <p> </p>
  </div>
<table class="table table-striped table-bordered">
<thead>
  <tr>
    <td width="50%"><b>Mrs Harding</b></td>
    <td width="50%">Nursery Teacher and Key Worker</td>
  </tr>
</thead>
<tbody>
  <tr>
    <td><b>Mrs Speakman</b></td>
    <td>Nursery Teacher and Key Worker </td>
  </tr>
  <tr>
    <td><b>Miss Ward</b></td>
    <td>Nursery Teaching Assistant </td>
  </tr>
  <tr>
    <td><b>Mrs Hubbard<br>
      </b></td>
    <td>Nursery Teaching Assistant </td>
  </tr>
</tbody>

```

I think it might just be because of the detault RTE but i just need some confirmation.

Thank you.

# Answer
> 1 votes
well...a table is not really rich text. That's more something for a wysiwyg editor.

---
Tags: ee3, richtext, rte
---


title: Ce Cache clear when conditions are met

text:
# Question
Title: Ce Cache clear when conditions are met
I'm trying to clear cache with ce\_cache:clear and conditionals but it seems if ce\_cache:clear always gets called for. Conditionals are based on cache date and edit date. So when cache date minus edit date is less then 0 clear cache and rebuild it.

I've tried many different ways but without any luck. Things as preload vars, stash set, parse inward etc have been tried but I'm problably overseeing something.

```
{exp:ce_cache:get_metadata id="page"}
    {exp:stash:set name="cache_date_raw"}{made}{/exp:stash:set}
{/exp:ce_cache:get_metadata}

{exp:channel:entries channel='channel'}
    {if '{exp:stash:get name="cache_date_raw"}' < '{edit_date format="%U"}' }
            {exp:ce_cache:clear tags="{url_title}" refresh="5"}
    {/if}
{/exp:channel}

```

Or perhaps I'nm not using ce-cache the right way. I've used the break settings in the CP but things get cleared too often. This is due to the fact members are working in draft modus.

Cheers, Martijn

# Answer
> 0 votes
From memory, the cache clear function always gets called irrespective of conditionals. My only thought is you could call via Ajax or snippet inside the conditional so it is only called/loaded once the conditional has been evaluated.

---
Tags: stash, ee3, ce-cache
---


# Question
Title: How do I include the Category URL Title in the Channel Entry link
I am pulling a series of entries from a Channel that has about a dozen categories. I need to be able to direct each entry's "read more" link to a template group that bears the same name as the category\_url\_title. I have reviewed the entries here and the ee documentation, but I can't figure out how to pull that information in using the channel entries tag.

Ideally I would like to do something like this:

```
{exp:channel:entries channel="features"}
  {summary} <a href="{category_url_title}">read more"</a>
{/exp:channel:entries}

```

What is the correct way to "pull" the category from the entry and reference it there?

Thanks.

# Answer
Category variables are only available within the `{categories}` loop.

```
{categories limit="1"}{category_url_title}{/categories}

```
> 4 votes

# Answer
I've also found that if you're trying obtain the category\_url\_title of a related entry, it can be done like this:

```
{related-products:categories limit="1"}{category_url_title}{/related-products:categories}

```
> 0 votes

---
Tags: categories
---


title: Exp-resso store email template testing

text:
# Question
Title: Exp-resso store email template testing
Is there a way to re-test the emails generated during the payment process? Currently I have to create an order and go through all the checkout steps, payment and wait for a new email, for every change I make. This is extremely long winded. Is there an easier way to test the email templates against an existing order?

# Answer
> 1 votes
Not overly intuitive but hey, it works...

Changing their status would indicate new emails are sent as per the docs: https://www.exp-resso.com/docs/control\_panel\_orders.html#order\_actions

---
Tags: expresso-store
---


title: Find sperator in field

text:
# Question
Title: Find sperator in field
Is there anyway to output entry data from a particular field, find the separator and output HTML based on that separator?

Example:

```
Postcode Field for Entry Outputs: LL21, LL22, LL33, LL44, LL46

```

But I want to find the comma and replace with an opening and closing

```
So the result would be: LL21</span> <span>LL22</span> <span>LL33</span> <span>LL44</span> <span>LL46

```

I would hard code the first and final span.

Is it possible EE2 and EE3?

# Answer
You can use a wonderful EE utility called **Streeng** to do this (and lots of other things).

`Streeng` performs a broad variety of manipulations on the tag outputs, including stripping out some or all of the `<html>` tags within it, and performing substitutions. You could use these features to achieve what you are describing.

With `Streeng` installed, to get a version of the tag output with `,` replaced by `</span><span>` you would need to enclose the tag as follows:

`{exp:streeng
 find=","
 replace="</span><span>"}
 {your_tag_goes_here}
{/exp:streeng}`

HTH
> 1 votes

---
Tags: ee2, ee3, custom-fields
---


# Question
Title: Choosing the guest user for a channel form
I've gone through these

http://dotmeta.com/expressionengine/guide/ee-2101/add-ons/channel/channel\_form/index.html

http://dotmeta.com/expressionengine/guide/ee-2101/add-ons/channel/channel\_form/examples.html

https://docs.expressionengine.com/latest/channel/channel\_form/index.html

And i don't see a way to tell the {exp:channel:form ...} which Guest user account to use when creating a new entry.

# Answer
> 0 votes
Nevermind... Admin \> Channel Administration \>\> Channel Form

---
Tags: ee2, safecracker, channel
---


title: Channel form submit / return issues

text:
# Question
Title: Channel form submit / return issues
I'm currently trying to do quite a few things with Channel Form - unfortunately all of a sudden I'm starting to get some odd things happening. Instead of the page submitting nicely the url is doing this:

http://networkleeds.local/content?RET=http%3A%2F%2Fnetworkleeds.local%2Fcontent&URI=content&return\_url=%2Fcontent%2Fpayment%2FENTRY\_ID&author\_id=1&channel\_id=7&entry\_id=0&ACT=2&meta=qDIxJOIvLN55gCICn%2BLSWCpg6AAVGjQOM38I8s7BJOTAv9ca1mKfPShy1s5pi8UjB58zSLf%2Br6nVBM6P4Q2Wb%2BiZhxRZCj8hlOnzhfICIRzA0s9M6ZGAn4IrnM2k7xr7XcvveK%2BnIVzajgE7x57v4PyY8ugnFm1lDsKTUZoEokwflILWFqjQf7Tf7odrx34V4NjbhHRkMRcYHzfgqdwHobi7hd%2BoAU7%2BGtq2wIywsZtvqKfsb4V7j7RuL%2BJUNgDDuCgDqz9VY4IGPjBJej2bjr63ljfaLAx2X36cwbJU4Pp5HQAA1VdVeS4xdj%2FAuWx6U2zzP8%2Bfnz%2BNP966nHBvXmbeplvj%2F0nqxJQEmJ4E%2BliY7bcaqh4zgmiVKWbVYZsMig9Yu8QGGGgo1JuDARJXb1hNeMzFNOWEQDyYwheQ0me%2BTS%2B1TjgfwujJ6xL%2FXwut82UWCN6CVzvRr0UdmaqnBg1tGHljXpcZ3lMcH646nbrGsuDs95eIu2Qwxt2wh6yLYzxhIruTC655JVNei2r9xhTpsmqd3DkiTJqW5cXh5tbyRvhnXpsBqjglqhxiu6Zis42bT1XQ4L73L5miVIxuGwwpv7szfgWCmKn7thwInPIKs8H4N%2F95dxdXLBu6XSsSPNYdfnZXgOx2ciM%2FCqxDaZyCOeXMOlFrhItnXgzCzp4%3D&return=%2Fcontent%2Fpayment%2FENTRY\_ID

For some of my channels it is working fine - but as far as I can tell I haven't changed anything for the other ones. If I look at the code produced it seems to be that the action on the generated form tag is creating this error.

Any ideas?

Thanks.

# Answer
Ok, so I managed to track down why the action URL was being changed. Turns out if any custom fields are file type then this happens.

Channel\_form\_lib.php - Line 2195

```
if (in_array($row['field_type'], $this->file_fields))
{
    $this->file = TRUE;
}

```

And then line 761

```
if ($this->file)
{
    $action = $hidden_fields;
    $action_url = $action['RET'];
    $action['ACT'] = ee()->functions->insert_action_ids($action['ACT']);
    $action = $action_url . '?' . http_build_query($action);
}

```

In response to the original question, I don't think the action URL is the problem. Rather, somehow you're stopping at that URL rather than being redirected to the return\_url. Hopefully this helps someone else since you've probably resolved your issue already.
> 0 votes

---
Tags: safecracker
---


title: High memory usage EE3.5.3

text:
# Question
Title: High memory usage EE3.5.3
We're getting a Fatal Error when creating a new entry or update anything in the control panel. *Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 61440 bytes) in /var/www/vhosts/DOMAIN/cp/ee/legacy/database/drivers/mysqli/mysqli\_connection.php on line 118*

Memory limit is set to 256 and should be enough. We've got a couple of modules like Structure, Publisher Lite, Bloqs, CE Cache and a couple more.
There are about 750 entries.

We could increase the memory but it seems a bit much. Is this normal memory usage for an Expression Engine install?

# Answer
> 1 votes
Structure keeps a history log and took up to 12000 records in the database. Cleared the records and things went back to normal. Updated Structure and should not happen anymore. https://eeharbor.com/structure/changelog#entry-6

---
Tags: control-panel, memory-limit
---


# Question
Title: Upload entire HTML project directory to EE2 possible?
Required to use ExpressionEngine 2.7.3 due to Hudson module (No API either). We built our site locally in HTML/CSS/JS since that's what we're used to and before we start copying it over we wanted to check if there's a easier way or if it's possible to just upload our current directory to EE?

# Answer
> 1 votes
You can use all your existing site HTML/CSS/JS to setup templates. Though it's not as simple as just "uploading our current directory to EE." Do you have more specific questions? This is a bit vague to provide a concise answer.

---
Tags: ee2
---


title: Low Nice Date days are off on range

text:
# Question
Title: Low Nice Date days are off on range
I am using Low Nice Date (Good and simple addon BTW) to calculate elapsed time between current date and an even in years past. The problem seems to be that it is not taking into account the leap years.

Does anyone know if this can be corrected? @Low ?

\**EDIT

`{exp:low_nice_date:range from="{my_date}" to="{current_time}" localize="yes"}{years} YEARS - {months} MONTHS - {days} DAYS{/exp:low_nice_date:range}`

Where `{my_date}` is an epoch date set in a global variable as '875966400'

# Answer
> 0 votes
The way Low Nice Date calculates the range is just by some intervals between the two timestamps:

```
$data['years']  = floor($diff / (365*60*60*24));
$data['months'] = floor(($diff - $data['years'] * 365*60*60*24) / (30*60*60*24));
$data['days']   = floor(($diff - $data['years'] * 365*60*60*24 - $data['months']*30*60*60*24) / (60*60*24));

```

So yeah, it doesn't take leap years into account. I'm afraid that's the way it is.

---
Tags: low, low-nice-date
---


# Question
Title: Is there a way to easily duplicate/clone an entry in EE3?
This is mainly for pages. My is reusing a lot of the same content on some pages and would like the ability to clone them to save time.

MX Cloner did this is EE2 and I guess I assumed it would be something built in to EE3.

# Answer
Max the developer has Mx Cloner for ee3 development in progress so its on the way no dates on that though http://status.eec.ms/
> 1 votes

# Answer
I have found SimpleCloner for EE3. It is given more option than MX Cloner.

See github link : https://github.com/ThorntonStuart/SimpleCloner
> 1 votes

---
Tags: ee3, duplicate, mx-cloner
---


# Question
Title: Using Contact Form and passing data to a second script
I'm using the Contact Form in an ExpressionEngine 3.5.10 website to send an email from the "Contact us" page to our sales department. All of this works fine.

However, they also want this form to feed data into Salesforce. I have a separate form - on another page of the website - which does this by making a jquery ajax call to a PHP script which I set up to do this. This also works fine, but as mentioned, is on a separate web page to my contact form.

What I'm trying to do is make it so that my Contact Form will make the ajax request to this PHP script - and then afterwards - carry on as normal by using the ExpressionEngine Contact Form functionality.

So I tried to do this...

My Contact Form has an ID, `#contactForm`.

The button that sends my Contact Form has an ID, `#sendBtn`. So I have used jquery to target this and prevent normal form submission `e.preventDefault`:

```
$('#sendBtn').click(function (e) {
    e.preventDefault();
    //...

```

I then run my ajax call to a script (at `ajax/index` \- this is actually an EE template with PHP enabled):

```
$.ajax({
   type: "POST",
   url: '/ajax/index',
   dataType:"JSON",
   data: $("#contactForm").serialize()
   // ...
});

```

I then allow the form submission to occur as normal - because it had been "stopped" with `e.preventDefault()` earlier:

```
$("#contactForm").submit();

```

In the Network tab of my browser I can see it making 2 requests, one to `/ajax/index` and another to `/contact-us` (which is the URL of the contact form page). However, it's giving odd and random results. The email always seems to arrive, but the data doesn't always appear in Salesforce.

Sometimes there is a HTML response message from one script saying "thank you - email has been sent", whereas other times there is an error saying something about not being able to send more than 1 contact form every 20 seconds. These messages and their responses come from ExpressionEngine, they are not something I have coded in.

What's even more bizarre is that the HTML response from `/ajax/index` looks like the response I'd expect from EE's email/contact form functionality. But that should only occur on the POST request to the contact page (`/contact-us`). Because `/ajax/index` script is all custom code, and has nothing whatsoever in it to do with EE's email functionality! In fact my `/ajax/index` script returns a json response - the file sets those headers - and has no HTML response whatsoever, so clearly EE is "doing something" with the way it's processing/handling my scripts.

Am I going about this the wrong way? Is it even possible to do this, i.e. post the data to Salesforce and then have it carry on with the normal contact form script execution?

Any advice would be appreciated.

# Answer
The issue I was having is two-fold:

**Problem 1**:

I was serializing the *entire* form contents before making the ajax request, with `$("#contactForm").serialize()`. The ajax request was being made to a PHP script (`/ajax/index`) but this was actually just an EE template with PHP enabled. The problem - as far as I can tell - is that serializing the entire form submits things such as the `ACT` variable. I imagine EE has something built in to check when this is present and perform the appropriate action. I think this is why it was attempting to send an email when running my ajax call, even though the `ajax/index` script had nothing to do with sending an email in it. To test this I tried making a version of these scripts in vanilla PHP running outside EE and this problem *does not* occur. So this is an EE specific thing, probably due to what is being posted.

**Solution to problem 1:**

Send only the form fields you need in the ajax post. Easy enough, e.g.

```
var firstName = $('#firstName').val(),
lastName = $('#lastName').val(),
// other vars

$.ajax({
     type: "POST",
     url: "/ajax/index",
     data: {firstName: firstName, lastName: lastName, // other vars},
     cache: false
 });

```

**Problem 2:**

I was making an ajax post request to `/ajax/index` then submitting my form, and the script would not "wait" for `/ajax/index` to complete before submitting the form. This is nothing to do with EE but is because ajax is asynchronous. The solution to this is to use Promises (or Deferred objects in jquery, utilising `.done`).

**Solution to problem 2:**

```
var self = this,
// other vars

$.ajax({
     type: "POST",
     url: "/ajax/index",
     data: {firstName: firstName, lastName: lastName},
     cache: false
 }).done(function(result) {
     // Submit the form as normal
     self.submit();
  }).fail(function() {
     alert('error');
  });

```
> 0 votes

# Answer
Take a look at Freeform Next. https://solspace.com/expressionengine/freeform It has CRM integrations build in, including Salesforce. Plus, all your data is stored in the DB and you can run reports against it or set up exports. The built in contact form is fairly rudimentary in how you can interact with it.
> 0 votes

---
Tags: jquery, ajax, email-contact-form
---


# Question
Title: Not able to login to ExpressionEngine 2 Control Panel
When i try to login, i am justing hanging at a white screen. The URL in the browser is, http://myintranetsite.com/system/index.php?/cp/login/authenticate

It stays at that url and never lets me get logged in. After quite some time it times out and i get a Fatal Error.

Maximum execution time of 300 seconds exceeded in c:\path...\root\system\expressionengine\libraries\El\_pings.php on line 244

FYI, I am running the most up to date version of EE2 on a Windows Server

# Answer
> 0 votes
This is the library file that EE uses to phone home. It most likely means your installation can't phone home to Ellis Labs correctly. Your example URL ... `http://myintranetsite.com` make it sound like an internal tool, and not a public facing site. Is the network this site is on connected to the internet?

---
Tags: control-panel, login, authentication, authenticate
---


title: Expresso Store Error Messages

text:
# Question
Title: Expresso Store Error Messages
We sell clothing items on one of our websites and I'm trying to update the error message a customer would receive if they tried to add a product to their cart without selecting a size from the size modifiers. Right now when a user tries to add an item without selecting the size modifier, they are redirected to a new page that reads:

The form you submitted contained the following errors: Store: Can't find product (entry ED: 190, modifiers {"56":"Select"})

I've tried looking into having the error displayed inline on the page, but I don't think I'm able to use error\_handling="inline" in either of the following tags:

{exp:channel:entries

{exp:store:product

We aren't running the {exp:store:checkout tag on this particular page. Any ideas on how to accomplish this? I am also open to updated the default error message templates. I just need the error message to be more useful and say "Please select a size before adding the item to your cart."

Any help would be appreciated. Thank you!

# Answer
> 0 votes
That sounds like something you could validate on the front end when they hit the add to cart button without leaving the page. An html5 'required' attribute on the size selector will do the job, or there a number of fancier javascript validation libraries.

---
Tags: expresso-store, error, expresso, checkout
---


title: Freeform Next - Submit rendering

text:
# Question
Title: Freeform Next - Submit rendering
I need to edit the HTML for the submit buttons when using Freeform Next so I can add a next/prev arrow. I've added my custom formatting template, but when I try changing the submit code only, it shows only one button even when there is a previous button.

I've tried the following, but not sure how to get the previous button to show as well, when I display the field types in the loop, it shows only one submit type when both the next/prev are there. Does anybody have anymore info about how the submit field is rendered or how I can edit both buttons?

```
{if field:type == 'submit'}
    <button type="submit" class="btn">{field:label} <svg width="16" height="16"><use xlink:href="#sprite-rightArrow"></use></svg></button>
{if:else}
    {field:render
        class="freeform-input"
        label_class="freeform-label{if field:required} freeform-required{/if}{if field:input_only} freeform-input-only-label{/if}"
        error_class="freeform-errors"
        instructions_class="freeform-instructions"
    }
{/if}

```

# Answer
Since you're using with a multi-page form and the Submit button handling is a bit complex when displaying both buttons together, there may not exactly be a way to handle this within the template.

However, it'll look a little ugly, but you can probably place that SVG code directly into Composer for the labels of the buttons.
> 0 votes

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


# Question
Title: Solspace user search with dynamic orderby
I'm trying to order my results from a Solspace user search, but I can't find any way of sending a field to sort on via the same form as the main search one. The search results page redirects to a unique URL without passing any of the original form params (via get/post).

I can think of ways to do it via Resource Router, or query string or cookie stuff, but none feel like the 'EE' way to do that.

i.e. how to get {something\_to\_order\_by} from the top tag to the bottom?

```
{exp:user:search return="reports/members/results"}
  <input type="search" name="keywords" id="keywords" value="{keywords}" />
  <input type="text" name="custom_fields" id="custom_fields" value="{custom_fields}" />
  <input type="text" name="something_to_order_by" />
{/exp:user:search}

{exp:user:results orderby="{something_to_order_by}"}
  <table>
    <th><a href="/reports/members/results/{segment_4}/order:something_to_order_by">custom_field</a></th>
  </table>
{exp:user:results}

```

# Answer
You should be able to use orderby:

```
orderby="username"

```

No need for curly braces around the field name.

Check your stack trace and see if the orderby is being included in the query.
> 0 votes

---
Tags: solspace, solspace-user, orderby, parameters
---


# Question
Title: data-label not displaying with {grid_field:table}
data-label="{table:column\_name}" and scope="col" disappears when loaded into template.

```
{table:table cellspacing="0" cellpadding="0"}
<table>
  <thead>
    <tr>
      <th scope="col">{table:column_name}</th>
      <th scope="col">{table:column_name}</th>
      <th scope="col">{table:column_name}</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td data-label="{table:column_name}">{table:grid_field_1}</td>
      <td data-label="{table:column_name}">{table:grid_field_2}</td>
      <td data-label="{table:column_name}">{table:grid_field_3}</td>
    </tr>
  </tbody>
</table>
{/table:table}

```

# Answer
The Grid field's `:table` modifier is actually just a single tag, not a tag pair.

```
{table:table cellspacing="0" cellpadding="0" class="my-table"}

```

That variable by itself will output the entire table including all variables; it's just a shortcut for those who don't want to customize or write their own table markup. See the `:table` modifer docs for details.

You should be able to build your table with whatever markup you need using the regular Grid variable pair, however. E.g.:

```
<table>
    <thead>
        <tr>
            <th scope="col">Foo</th>
            <th scope="col">Bar</th>
        </tr>
    </thead>
    <tbody>

    {table}
        <tr>
          <td data-label="Foo">{table:foo}</td>
          <td data-label="Bar">{table:bar}</td>
        </tr>
    {/table}

    </tbody>
</table>

```
> 2 votes

---
Tags: grid, table
---


# Question
Title: Is it possible to duplicate an EE3 build over to a brand new license/server/database?
Both builds are exactly the same just with different branding. Just looking for the easiest way to set this up.

# Answer
> 1 votes
It should be no more complicated than:

* copy the file stack from the first server to the second
* use a utility (e.g. phpmyadmin) to export the EE database from your first server to a file
* import the database to your new server using a utility (e.g. phpmyadmin)
* update the `config.php` file on the new server to point to the right paths and to the new database, and insert the EE serial number for the second server
* log into the EE control panel on the new server (credentials will be same as on first server) and fine-tune the settings to get it working OK on new server
* do your branding changes to the new server

You can save yourself some time if you like by updating the EE settings on the first copy to use `{base_url}` and `{base_path}` in the various file locations used to configure EE in the CP - then when you change these two entries on the new server, all the entries in CP that use them will be automagically updated too...

HTH

---
Tags: ee3, duplicate
---


title: Freeform Next - Dynamic Recipients

text:
# Question
Title: Freeform Next - Dynamic Recipients
I'm a little confused at how to use the dynamic recipients parameter for Freeform next.

I've provided the emails using `dynamic_notification_recipients="email_1|email_2"` and specified `dynamic_notification_template="standard"` but there doesn't seem to be anymore documentation about how it's chosen. What do I have to name the field? What value do I have to provide, the email address or something else? Or do I need to use this in combination with the recipients field in composer?

# Answer
> 1 votes
It seems to me like you might be mixing up some of the notification types Freeform Next offers. Currently there are 5 different ways to send email notifications:

1. To admin email address(es) for the form (set inside *Notify* area of Composer)
2. To a predefined select menu/radios of email addresses (and labels) for the user to choose (Dynamic Recipients field type).
3. To the user submitting the form, with the email addresses specified/selected in the Email field type.
4. To a user-defined email address (e.g Tell-a-Friend form), with the email addresses specified/selected in the Email field type.
5. At template level with the dynamic\_notification\_recipients parameter.

If you want to setup a predefined list of email options for a user to choose from to notify, then just create a Dynamic Recipients field and place it/set it up in Composer. Nothing else necessary.

If you are wanting to pass an email address(es) to your form at template level to be notified, then you'll want to use the dynamic\_notification\_recipients parameter approach, where you specify the email(s) and the notification template, and Freeform will take care of the rest. :)

---
Tags: solspace, solspace-freeform-next
---


title: before_channel_entry_save hook

text:
# Question
Title: before_channel_entry_save hook
I am writing an extension on EE 3.5.11 and I am using the before\_channel\_entry\_save hook. In the EE documentation it says and modifications to the object will be saved. I am doing something like this but no matter what I do my modifications do not get saved. Ideas?

```
public function set_custom_fields($entry, $values)
{
    $customFields = $entry->getCustomFields();

    foreach ($customFields as $field) {
        if (strpos($field->getShortName() === "my_custom_field_name") {
            // I have tried just and also with the line below
            $field->setData('my custom value');

            // I have tried just and also with the line above
            $values[$field->getShortName()] = 'my custom value';
        }
    }
}

```

If I dump the values after this I see that my custom field value has indeed been updated but it is not saved the database.

# Answer
This was driving me insane but I've figured it out.

You need to edit the `$entry` object (1st parameter of the function) in order for this to work. You can, however, use the 2nd parameter, `$values`, for easy reading of the data.

```
public function before_channel_entry_save( $entry, $values )
{
    // Set value for specific field name
    $entry->setProperty( 'field_name', 'Custom value' );
}

```

`setProperty` will save the field value to the `$entry` object automatically. Nothing needs to be returned for this to take effect.

**Your example**

```
public function set_custom_fields($entry, $values)
{
    $customFields = $entry->getCustomFields();

    foreach ($customFields as $field) {
        if (strpos($field->getShortName() === "my_custom_field_name") {
            $entry->setProperty($field->getShortName(), 'my custom value');
        }
    }
}

```

**Additional info.**

You can view `system/ee/EllisLab/ExpressionEngine/Model/Channel/ChannelEntry.php` for some pointers on what can be done with the `$entry` object (look for `$this->x`). For example:

```
// Get current $entry channel id
$entry_channel = $entry->Channel->getId();

// Check permissions
$entry_permissions = $entry->Author->MemberGroup->can_edit_other_entries;

```
> 5 votes

---
Tags: custom-fields, extension, hook
---


# Question
Title: how can i delete a complete website in EE admin?
I want to remove a demo website from an installation of expressionengine 2.7.1, I would like to purge all files, channels, entries, templates, everything. Is there a button in the menu what I havent found?

Thanks, Peter

# Answer
If you mean the Agile Records demo site, you will have to remove it manually. If this is fresh install, the easiest way is to just reinstall EE and unselect the Agile Records demo so it doesn't get installed.
> 0 votes

---
Tags: delete
---


title: Upgrade from 2.5.5 to latest EE2 update

text:
# Question
Title: Upgrade from 2.5.5 to latest EE2 update
I am currently assessing all aspects for a complete refresh of our site and have seen that we are running EE2 2.5.5. I'm no developer but I do have to establish what steps we should take as the current CMS is restrictive, most certainly down to running a 2012 version...

What advice/warnings can anyone give me to take the best route forward?

Can we migrate all content to EE3 for instance, or is the best advice to go straight to a web design/builder and hand over the problem to them to resolve?

I apologise for such naive questions, but would appreciate any advice someone might be able to give me.

Regards

Steve

# Answer
> 2 votes
The two priorities will be backing up the database/files and ensuring your server meets the requirements of the update.You will need a minimum of php 5.3.10 (though I would personally put 5.6 as the minimum). If you have php7 available on the server, go for that. Huge performance and security improvements.

As to whether you upgrade to the latest version of 2 or up to 3 (btw v.4 is on the horizon) will depend on whatever addons you have installed and if they support version 3. Do note that v2 has been discontinued, so EllisLab is no longer maintaining it.

If you have the ability to run the update in a staging or developer environment first, that's always helpful to find any problems before updating your production site.

Regarding your "current CMS is restrictive" comment, that's rather vague and impossible to comment on.

---
Tags: v2.5.5
---


# Question
Title: Allowing the same member group to create entries for certain channels but being able to edit all channels
(V3.5.11)

I am not sure whether this can be done but I am wondering if the same member is able to create entries on certain channels but is able to edit all channels.

I know there are check boxes in the "Member Groups CP" like below:

So for example; I want the client to edit the homepage channel but I don't want them to create a new entry on that same channel.

Is that possible?

Thanks Jordan

# Answer
> 0 votes
If all you need is to prevent a user from making subsequent entries in the "Home Page" channel, you can limit the amount entries permitted in the channel to "1", or whatever amount you want. They'll have access to edit existing entry(ies), but not to make any new ones past the limit set.

https://docs.expressionengine.com/latest/cp/channel/form.html#maximum-number-of-entries

---
Tags: members, ee3
---


# Question
Title: How do I get error stack trace information for custom module
I am writing an module for EE 3 and when I am displaying data from a search I am getting this error but I am having trouble tracking down the root cause since it is not displaying an trace information and there does not seem to be an details in the apache log files, How do I go about about getting full trace information for this error?

```
Warning

htmlentities() expects parameter 1 to be string, array given

ee/EllisLab/ExpressionEngine/Controller/Addons/Addons.php, line 72

```

# Answer
The problem ended up being that in one of my views I had all the form input names in an array called 'search'. This ended up conflicting with the expression engine admin search form field name 'search' that expected 'search' to be a string and not an array like I created. I renamed my array to 'module\_search' and that eliminated the error.
> 0 votes

---
Tags: error, debugging, developer-log
---


title: Moving Ratings from EE1 to EE3 site

text:
# Question
Title: Moving Ratings from EE1 to EE3 site
I'm currently rebuilding an EE1 site in EE3. The EE1 site is using Rating v2.3.4 and the new EE3 site is using Rating v4.0.4.

What's the best method for migrating ratings between the two sites? Rating v2.3.4 has a rating export utility, with which I created a CSV file of all of the ratings on EE1 site. However, I can't find any method for importing those ratings into EE3 using Rating v4.0.4.

Should I just look into importing the ratings straight into the EE3's DB (after, of course, making sure all of the related entries exist, IDs match up, etc.)? Or is there a different method?

# Answer
> 1 votes
Realistically, the best way to go about this would be to do this in stages. I'd make a clone of the original site. Then upgrade it to EE2 and Rating 3.x. Then upgrade that site to EE3 and Rating 4.x. You could either then work with that site for the new build, or copy over those updated database tables to the new site.

But definitely don't attempt to copy over EE1 Rating 2.x database tables over to EE3 Rating 4.x database, and there is not Import feature (the export CSV feature is only there for customers that wish to copy their rating data into a spreadsheet for internal usage, etc). :)

---
Tags: import, solspace-rating
---


# Question
Title: create select field using api with name/value pairs
Anyone have any example or documentation to create a select field using the EE api in a channel group with name/value pairs for the select option. I cannot find anything on how to do that. I am able to create the select field itself, just not with name/value pairs for the options.

# Answer
I finally figured this out, here is what I ended up with.

```
    ee()->load->library('api');
    ee()->legacy_api->instantiate('channel_fields');

    $field = ee('Model')->make('ChannelField');
    $field->group_id = $group_id;
    $field->site_id = $site_id;
    $field->field_name = $field_name;
    $field->field_type = 'select';
    $field->set(array(
        'field_label' => $field_label,
        'field_order' => $field_order,
        'field_required' => 'n',
        'field_search' => 'y',
        'field_is_hidden' => 'n',
        'field_instructions' => '',
        'field_maxl' => null,
        'field_show_fmt' => 'y',
        'field_fmt' => 'br',
        'text_field_show_fmt' => 'y',
        'text_field_text_direction' => 'ltr',
        'text_field_content_type' => 'any',
        'text_field_show_smileys' => 'n',
        'text_field_show_glossary' => 'n',
        'text_field_show_spellcheck' => 'n',
        'text_field_show_file_selector' => 'n',
        'field_pre_populate' => 'v',
        'value_label_pairs' => array(
            'default' => 'Default',
            'option_2' => 'Option 2',
            'option_3' => 'Option 3'
        ),
    ));

    $field->save();

```
> 0 votes

---
Tags: channel-fields, drop-down, api
---


# Question
Title: issue with cp_js_end not running on multiple extensions
I created 2 little extensions for EE 3.5.11 that use the hook cp\_js\_end and they add JavaScript to each page in the control panel. The problem is that once one runs the other one does not, any idea what I need to do to prevent one from stopping the other one from running?

# Answer
> 0 votes
I was directed to this link which solved my issue.

https://docs.expressionengine.com/latest/development/extensions.html#multiple-extensions-same-hook

---
Tags: control-panel, javascript, extension
---


title: Stash content depending on SSL / https

text:
# Question
Title: Stash content depending on SSL / https
How can i stash content globally depending on https or http scheme?

One way is to store it under a context,
but then i have to change all stash set and get tags site-wide to work with a context parameter

```
{exp:stash:context name="{IS_SSL}"}

{exp:stash:set_list name="news"
  save="yes" replace="no" refresh="30" context="@"
}
{stash:item_link}http://example.com{/stash:item_link}
{/exp:stash:set_list}

```

Without setting this context, the value would be stored once for 30 minutes, and served to everyone regardless of http scheme.

# Answer
> 2 votes
First thing to ask is, do you really need to? Your links could just be protocol relative:

{stash:item\_link}//example.com{/stash:item\_link}

If that's not the issue then you could create a global prefix in your config using Stash's config variable `stash_var_prefix`:

```
$config['stash_var_prefix'] = isset($_SERVER['HTTPS'] ) ? 'ssl:' : 'nonssl:';

```

(Note that a prefix followed by colon `:` is the same result as specifying a `context=""` on each tag individually.)

---
Tags: stash, ssl
---


title: MSM site and Better Meta plugin

text:
# Question
Title: MSM site and Better Meta plugin
How can I get Multisite managed site to work with the Better Meta plugin?

I have templates on one site but how can I get different metadata from the Better Meta options and from channel entries on the second site?

As I am just getting the default meta data from the default site where the template are.

I have tried this for example:

```
{exp:nsm_better_meta:template entry_id="{embed:entry_id}" hide_site_title="{embed:hide_site_title}" robots_index="{embed:robots_index}" site="{msmsite}"}

```

Thanks Peter

# Answer
I ran across this issue today and found the solution. The documentation on the NSM Better Meta plugin available on their site is not comprehensive. I only found the solution by perusing through the plugin code myself.

There is a parameter **site\_id** which can be set to pull metadata from entries contained under a different MSM site. Just be sure to substitute the **site\_short\_name** with the **site\_id**.

Your code should look something like this:

```
{exp:nsm_better_meta:template entry_id="{embed:entry_id}"
                              hide_site_title="{embed:hide_site_title}"
                              robots_index="{embed:robots_index}"
                              site_id="{msmsiteid}"
}

```
> 0 votes

---
Tags: multi-site-manager, metadata
---


title: ExpressionEngine and Amazon SES

text:
# Question
Title: ExpressionEngine and Amazon SES
I am trying to send email from ExpressionEngine using Amazon's Simple Email Service via SMTP and I can't get this working.

https://docs.aws.amazon.com/ses/latest/DeveloperGuide/smtp-connect.html provides direction on how to connect. I configured EE3 outgoing email in the following way:

* **Server Address:** email-smtp.us-east-1.amazonaws.com
* **Server Port:** 587 (I've also tried 25)
* **Username:** \[my AWS-provided SMTP user credential\]
* **Password:** \[my AWS-provided SMTP user credential\]
* **Connection Type:** STARTTLS (I've also tried SSL and unencrypted)

I've tried all of the port/connection combinations that I can think of. Some of them throw a PHP fsockopen() error. Other times no error is thrown and FreeForm shows a successful submission screen, but SES never got the request to send a message.

What is the correct way to configure EE to work with SES?

# Answer
> 1 votes
I know you're working with EE3, but I've got SES working successfully on all my production sites that run various flavours of EE 2 (2.8.1, 2.10.2). The settings you've listed above are exactly what I have setup in my email configuration.

I'm hoping that my config file should point you in the right direction. Perhaps the **email\_newline** setting is what is missing from your local configuration?

```
/*
|--------------------------------------------------------------------------
| Amazon SES
|--------------------------------------------------------------------------
|
*/
$config['email_smtp_crypto'] = 'tls'; // TLS protocol - this needs to be added to each index.php
$config['email_newline'] = "\r\n";  // SES hangs with just \n

```

Other than that, it's most likely an Amazon SES configuration issue. When you first sign up to use the service, you are placed in a sandbox mode - meaning you can only send and receive from domains you have verified.

Have you verified the domains you are sending from and to?

---
Tags: solspace-freeform, ee3, aws
---


# Question
Title: Super Search Plural Not Working When Multiple Keywords are Used
I am using Solspace Super Search version 2.2.4 on EE v2.9.0, and found an issue with its fuzzy/plural search.

Searching a single plural word, e.g. "rods" will show results for products with "rod" in it. Searching "fibreglass rod" will show products with "fibreglass rod" in it. Searching "fibreglass rods" (so two words, plural rods) shows No Results.

The expected results is to show all products with "fibreglass rod" in it.

So it seems that plurals do not work when in multiple words. I do not want to search ANY words as results without fibreglass will be shown.

Is there a solution?

**Search Form**

```
{exp:super_search:search}
<form action="{path='search'}/" method="post" id="search-form" class="search-form">
    <input type="hidden" name="csrf_token" value="{XID_HASH}" /> <!-- Important! -->
    <input
        type="text"
        name="keywords"
        id="search"
        value="{super_search_keywords}"
        placeholder="Search something here..." title="To search for a phrase, place the words inside double quotes. To search for entries without certain words or phrases, place a negative sign (-) before it."
    />
</form>
{/exp:super_search:search}

```

**Results**

```
{exp:super_search:results search_in="title|sku|product_summary|product_description|product_keywords|content_intro" channel="products|made_to_measure|content|blog|gallery|team|videos|testimonials"
 orderby="channel_name+custom+'products,made_to_measure,content,blog,gallery,team,videos,testimonials'"}

{title}

{/exp:search_fields}

```

# Answer
> 0 votes
I know this may not be the answer you would like to hear...

But I would recommend changing your search module to Low Search and rewriting your template code to use this instead.

*Low Search* makes use of filters allowing you to customise the intelligence behind your keyword searches. **keywords:inflect** is the filter option that will enable you to do what you are describing above.

There is a nice example on their website on how to use it:
http://gotolow.com/addons/low-search/docs/examples#keywords

*Super Search* by Solspace has long been discontinued and when they did support it, the list of bugs and odd quirks was a mile long. No wonder they had the sense to finally drop the product

---
Tags: supersearch
---


# Question
Title: How do I get the Channel Entries count within a Channel Categories loop?
I have a exp:channel:categories loop that is filtered by category group, and within that I have an exp:channel:entries loop that is filtered by category\_id. This outputting the data that I expecting.

The issue is that I need to get a count on the entries loop, but all I am able to get is a count on the categories loop.

Here is a slimmed down version of my loops:

```
{exp:channel:categories style="linear" category_group="2"}
    {exp:channel:entries channel="team" category="{category_id}"}
        {title} - {count}
    {/exp:channel:entries}
{/exp:channel:categories}

```

I need to get a count on the channel entries, not the channel categories.

# Answer
Use an embed. Take your `{exp:channel:entries}` loop and put it in it's own template partial. Make a template group and template for it, something like `embeds/myloop`. You can then pass the `category_id` as a parameter.

http://ee2docs.com/templates/embedding.html

So your final categories loop will look like this:

```
{exp:channel:categories style="linear" category_group="2"}

    {embed="embeds/myloop" cat_id="{category_id}"}

{/exp:channel:categories}

```

and your embed will look like this:

```
{exp:channel:entries channel="team" category="{cat_id}"}

    {title} - {count}

{/exp:channel:entries}

```
> 0 votes

# Answer
Thanks for this - works great, though you need to add **{embed:cat\_id}** to grab the variable.

```
{exp:channel:entries channel="team" category="{embed:cat_id}"}

    {title} - {count}

{/exp:channel:entries}

```
> 0 votes

---
Tags: categories, entries, count
---


# Question
Title: ExpressionEngine Expresso Store Super Slow Filtering Categories
Good Morning,

I'm curious on how we can speed up the search results. This website is very slow on the filtering of the category results, but the individual entry works great.

Any thoughts on what would be slowing the results?

Cache http://www.heartlandclassics.com/breeds-available-now/section/category/soft-coated-wheaten-terrier

Without Cache http://www.heartlandclassics.com/breeds-available-now/section-ee-no-cache/category/soft-coated-wheaten-terrier

```
{exp:channel:entries channel="store" limit="6" dynamic="yes" paginate="both"}
    {exp:store:product entry_id="{entry_id}" form_class="form-horizontal"}
        {if total_stock > 0}
              <input type="text" value="1" size="3" name="item_qty" style="visibility:hidden; display:none;">
                {modifiers}
                    <select name="{modifier_input_name}" style="visibility:hidden; display:none;">
                    {modifier_options}
                          <option value="{option_id}" title="{if price_mod_val} ({price_mod}) {/if}" {if option_first} selected {/if}>
                          {option_name}
                          {if price_mod_val} ({price_mod}) {/if}
                          </option>
                    {/modifier_options}
                    </select>
                {/modifiers}
                    <div class="col-md-4 nopaddingnomargin shop-base">

                {exp:channel_images:images entry_id="{entry_id}" limit="1" dynamic="yes"}
                        <div class="image" style="background-image: url('{image:url:large}');"></div>
                {/exp:channel_images:images}

                        <div class="content">
                            <h3>{title}</h3>
                  <p>{price}</p>
                            <p class="relatedProduct">
                  <a href="{path="breeds-available-now/overview/category/"}{categories show_group="1"}/{category_url_title}{/categories}/{url_title}"}">
                  [ Read More ]
                  </a>

                  <input id="related-item-{entry_id}" type="submit" style="display:none;" name="submit" value="1">
                  <input type="hidden" name="XID" value="{XID_HASH}">
                  <a href="javascript:void(0);" onclick="$('#related-item-{entry_id}').click();">
                  [ Add to Cart ]
                  </a>
                  </p>
                        </div>
                    </div>

              {paginate}
              <div class="row centerTxt">
                {pagination_links}
                  <ul class="pagination">
                    {first_page}
                      <li><a href="{pagination_url}" class="page-first">First Page</a></li>
                    {/first_page}

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

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

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

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

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

```

# Answer
> 0 votes
The issues ended up being the amount of "modifiers" that the client has in their entries. They had a dropdown select menu that allowed members to select an airport and then confirm a secondary airport for shipping (785 entries per modifier). The system them had to filter through them all each time... millions of references which caused the system to have memory issues.

Removing that modifier across the board allowed the site to function as normal.

---
Tags: expresso-store
---


# Question
Title: Update to EE to 2.9 Effected Store Dynamic Parameters & Pagination
We recently updated a project from August of 2014 to use EE 2.9 and Store 2.5 which impacted the site's sorting feature and pagination; both no longer work now.

Any assistance would be greatly appreciated.

```
{exp:store:search channel="products" limit="9" dynamic="yes" orderby="date" sort="desc" dynamic_parameters="limit|orderby" search_id="{segment_3}" paginate="top"}
                    {exp:store:product entry_id="{entry_id}" form_class="form-horizontal" return="store/shopping-cart"}

                    {paginate}
                    <div class="page-numbers">
                    {pagination_links}
                    {previous_page}
                       <div class="previous"><a href="{pagination_url}">< Previous</a></div>
                    {/previous_page}
                    {first_page}
                        <div class="num{exp:ifelse parse="inward"}{if current_page}-one{if:else}-two{/if}{/exp:ifelse}"><a href="{pagination_url}">1</a></div>
                    {/first_page}
                    {page}
                        <div class="num{exp:ifelse parse="inward"}{if current_page}-one{if:else}-two{/if}{/exp:ifelse}"><a href="{pagination_url}">{pagination_page_number}</a></div>
                    {/page}
                    {next_page}
                        <div class="next"><a href="{pagination_url}">Next ></a></div>
                    {/next_page}

                    {last_page}
                        <div class="previous" style="margin-left:10px;"><a href="{pagination_url}">Last Page</a></div>
                    {/last_page}
                    {/pagination_links}
                    </div>
                    {/paginate}
                    {/exp:store:product}
                    {/exp:store:search}

                    <div class="pagination-container">
                        <div class="left">

                        {exp:ifelse parse="inward"}

                           {if last_segment =="all"}
                            {exp:entries_number channel="products" category_group="1"}
                            {entries_number} Item(s)
                            {/exp:entries_number}

                            {if:elseif last_segment =="segment_3"}
                            {exp:entries_number channel="products" category_group="1" category="{last_segment_category_id}"}
                            {entries_number} Item(s)
                            {/exp:entries_number}

                            {if:elseif segment_2 =="new"}
                            {exp:store:search channel="products" search_id="{segment_3}"}
                             {if count == 1}
                              {total_results} Item{if total_results > 1}s{/if}
                             {/if}
                            {/exp:store:search}

                            {if:else}
                            {exp:entries_number channel="products" category_group="1" category="{last_segment_category_id}"}
                            {entries_number} Item(s)
                            {/exp:entries_number}
                            {/if}

                         {/exp:ifelse}

                        </div>
                        <div class="right">
                        {exp:dynamo:form return="products/new" search_id="{segment_3}" id="options_form"}
                            <p>Show <select class="form_option" name="limit">
                            <option value="9" {if limit == 9} selected="selected"{/if}> 9 </option>
                            <option value="18" {if limit == 18} selected="selected"{/if}> 18 </option>
                            <option value="27" {if limit == 27} selected="selected"{/if}> 27 </option>
                            </select>
                            per page</p>
                            <p>Sort by <select class="form_option" name="orderby">
                            <option value="title" {if orderby == 'title'} selected="selected"{/if}> Name </option>
                            <option value="price" {if orderby == 'price'} selected="selected"{/if}> Price </option>
                            </select> </p>
                            <p>Min: <select class="form_option" name="search:price:min">
                            <option value="0" {if search:price:min == '0'} selected="selected"{/if}> 0 </option>
                            <option value="100" {if search:price:min == '100'} selected="selected"{/if}> 100 </option>
                            <option value="200" {if search:price:min == '200'} selected="selected"{/if}> 200 </option>
                            <option value="300" {if search:price:min == '300'} selected="selected"{/if}> 300 </option>
                            <option value="400" {if search:price:min == '400'} selected="selected"{/if}> 400 </option>
                            <option value="400" {if search:price:min == '500'} selected="selected"{/if}> 500 </option>
                            </select></p>
                            <p>Max: <select class="form_option" name="search:price:max">
                            <option value="1000" {if search:price:max == '1000'} selected="selected"{/if}> 1,000 </option>
                            <option value="500" {if search:price:max == '500'} selected="selected"{/if}> 500 </option>
                            <option value="400" {if search:price:max == '400'} selected="selected"{/if}> 400 </option>
                            <option value="300" {if search:price:max == '300'} selected="selected"{/if}> 300 </option>
                            <option value="200" {if search:price:max == '200'} selected="selected"{/if}> 200 </option>
                            <option value="100" {if search:price:max == '100'} selected="selected"{/if}> 100 </option>
                            </select>
                            </p>
                        {/exp:dynamo:form}

```

We saw this on EE's site: https://ellislab.com/expressionengine/user-guide/add-ons/channel/dynamic\_parameters.html#13604 Does anyone know how this impacts pagination?

# Answer
> 1 votes
The dynamic filtering was altered in the updates and the combination no longer functioned. Integration of MySQL Queries was needed to create the desired result.

---
Tags: expresso-store, pagination, dynamic, parameters
---


title: Simple Search Form - Show ALL results

text:
# Question
Title: Simple Search Form - Show ALL results
I hope this is a really easy question. I'd like my simple search form to return ALL results, what should I enter in to the results parameter please?

# Answer
Add a high number like 9999. If you can guesstimate the maximum number of results then any figure higher than that would be fine.
> 0 votes

---
Tags: simple-search
---


# Question
Title: Custom Fieldtype: How to check save($data)
Developing a custom fieldtype and having trouble getting the entry data to save to the `exp_channel_data` table. I know that the data passed must be a string and I am trying to catch the data at the `public function save($data)` point so I can properly construct it and pass it on.

My issue is that I can't seem to stop and see anything at that point. No `var_dump(), echo(), print_r(), exit()`, etc are having any effect.

How can I view the `$data` being sent to that method?

# Answer
> 1 votes
I received some help in the slack forum for this one.

Short answer is I was not providing a `name` for my fieldtype during construction. I assumed this was auto-generated by EE due to back end requirements. I was wrong. lol

I added the `name` attribute to the field on creation in the format `field_id_x` where `x` is the config id. Once this was in place, the fields were processed. A little more clear documentation in the dev docs would be nice to clarify this. ;)

---
Tags: add-on-development, custom-fields, fieldtype, fields
---


title: IF statement not working correctly

text:
# Question
Title: IF statement not working correctly
I'm having a really strange problem with an EE if statement being used in conjunction with transcribe (may or may not be related).

I have a field that lets a user submit a hex colour to change the background colour of a box. By default it's red because of the style called "promoBox\_red". On the english side of the site the entries are all applying the hex colour added in the entry via the IF statement. As soon as I switch to French the default style "promoBox\_red" is what takes over. I can't even get the IF statement to run.

Any thoughts? Completely baffled.

```
{exp:channel:entries channel="footer_promos" limit="3"}
        <div align="center" class="col-xs-4 promoBox_red" {if background_colour_hex_number_6_d !=""}style="background-color: #{hex_number};"{if:else}style="background-color: #ef4034;"{/if}>
            <img src="{footer_promo_image}" alt="{title}" title="{title}">
            <a href="{footer_promo_link}" class="btn btn-default btn-sm" role="button" title="{title}" style="margin-top: 20px;">{exp:transcribe:replace name="scribe_button_learn_more"}</a></p>
        </div>
{/exp:channel:entries}

```

# Answer
I had a parse order issue when using mutiple plugins since the {if} would render before other ee calls.

Just in case, please try

```
{if '{background_colour_hex_number_6_d}' !=""}

```

Sometimes you have to add quotes.
> 0 votes

# Answer
I'm also confused by your variable check (ie you're checking for one thing and outputting another) but I'm assuming that there's a reason for it. Have you tried a simple boolean check? eg

```
{if background_colour_hex_number_6_d}{hex_number}{if:else}#color{/if}

```
> 0 votes

---
Tags: ee2, transcribe
---