# Question
Title: Member groups, Freemember and self-activation via email?
I am using Freemember to manage my site members information and registration etc, however I have come across an issue with my current setup.

I need to use the 'Self-activation via email' option so that new registrants have to verify their email address before gaining access to the site. With this I have 3 initial member groups for different levels of access, so I have 3 separate forms to register.

For this I have setup the forms to use the parameter group\_id="8" for example, so the user is added to the correct group.

Now the problem now is that when a user registers using one of these forms they can login straight away without having to verify their email via the activation link which is due to them being added straight to the member group bypassing the 'pending' stage.

This is the same as this question: New member registration set to require activation, but new registrants are working without it, although it doesn't offer an alternative method.

I need a way to utilise both features where the user is first added as 'pending' but when they activate via the link they are added to the correct member group according to the form they used initially.

Can anyone help please?

Thanks Wes.

# Answer
A user is either pending, and after activation is automatically added to the default member group. Or, if you set the group\_id, is immediatly added to a particular member group.

To get what you want (let user activate, and only then assign to a specific member group) you need a custom solution. For instance, store the group\_id in a custom member field, and on activation use that field, verify it is in allowed range, and then set the group id.
> 2 votes

# Answer
As GDmac mentioned, member email activation and custom member registration groups are mutually exclusive.

This is a limitation of EE, not Freemember (since members are either placed in the "Pending" group, or directly into an active group).

If you need something more complicated, you would probably need to write an extension which runs after each user is activated, which places them into the appropriate group.
> 1 votes

---
Tags: members, freemember, registration
---


# Question
Title: Show results which belong to 2 cateogires
I have the latest version of SuperSearch installed on EE 2.7.3.

I am trying to perform a search which fetches entries that belonged to 2 categories. I need the output to be like this `category="Teeth&&Gums"`, at the moment the auto generated search URL is `category="Teeth+Gums"`

Do i need to put a certain parameter in? Functionally the search is working fine.

Here is the code I have

```
{exp:super_search:search}
    <ul>
        {exp:channel:categories
            category_group="1"
            channel="resources"
            disable="category_fields"
            show_empty="no"
            style="linear"
        }
        <li>
            {exp:super_search:variables}
                <label for="category_{category_url_title}">
                    <input type="checkbox" id="category_{category_url_title}" name="category[]" value="{category_url_title}"  {if super_search_category_{category_url_title}} checked="checked" {/if} >
                    {category_name}
                </label>
            {/exp:super_search:variables}
         </li>
         {/exp:channel:categories}
    </ul>

    <ul>
        {exp:channel:categories
            category_group="2"
            channel="resources"
            disable="category_fields"
            show_empty="no"
            style="linear"
        }
        <li>
            {exp:super_search:variables}
                <label for="category_{category_url_title}">
                    <input type="checkbox" id="category_{category_url_title}" name="category[]" value="{category_url_title}"  {if super_search_category_{category_url_title}} checked="checked" {/if} >
                    {category_name}
                </label>
            {/exp:super_search:variables}
         </li>
         {/exp:channel:categories}
    </ul>

    <input type="submit" name="submit" value="Filter!">
{/exp:super_search:search}

```

# Answer
> 0 votes
in your category list do: value="{category\_name}&&" SuperSearch will recognize this and strip the "&&" off the last category chosen

---
Tags: solspace, search, supersearch
---


title: Expresso Store: Per Item Shipping

text:
# Question
Title: Expresso Store: Per Item Shipping
I want to use flat shipping rates for my store and also want to set one rate for orders in the US & another rate for International orders.

Is there any way to do this on a per item basis?

# Answer
Store doesn't support custom shipping rates for each item out of the box. It does support a "handling" charge for each product, but this is not specified on a per-country basis.

If you need to implement different charges for each product, for each country, then you would need to write a custom shipping extension. You can use the `store_order_shipping_methods` hook:

https://exp-resso.com/docs/extension\_hooks.html#shipping\_hooks
> 1 votes

# Answer
If you are using the default shipping plugin you should be able to create a rule for the US and a rule below it with the country set to "any". In Store with the default shipping method rules are evaluated from top to bottom so people in the US would get the US rate and everyone else would get the rate set for "any".
> 1 votes

---
Tags: expresso-store
---


# Question
Title: How to add products from front-end side in Expresso Store?
I want to add products from front-end side with single product or package of product in Expresso Store ?

It is possible to do this in Expresso Store?

Thanks

# Answer
Store supports Channel Form (previously called SafeCracker).

You can display the Store product details field in the Channel Form field the same way you do other custom fields, and your users will be able to create products on the front end.
> 1 votes

# Answer
Yes, the same exact thing you see in the control panel is available within a channel entries form or loop.

{exp:store:product entry\_id="{entry\_id}"}
> -2 votes

---
Tags: expresso-store, product
---


# Question
Title: Upgrading from 2.5.5 to 2.8 with tons of embeds and reverse related entries?
I am working on a site using 2.5.5 and it uses embeds and related entries quite heavily. The embeds are used to hand parsing data the way the site requires it.

q1 Should I upgrade straight to 2.8 or do it in stages? (if so what)

q2 Does the updgrade change my templates and DB to support the new way embeds and related entries may be handled? Will it break them?

Thx!

# Answer
Answer 1: Backup - files and database.

Seriously, get that site under source control. If anything goes wrong it's easier to roll back.

I'd just go straight to 2.8 -- I did one the other day going from 2.1.3 to 2.8 - if you run into issues then go for 2.7.x

It shouldn't break them if you're using recommended ways of embeds and related entries.
> 2 votes

---
Tags: upgrade, embeds
---


# Question
Title: CE String: Twitterfy Function Creates Bad Hashtag Links
The twitterfy function in CE String is creating bad links for hashtags (they go to an old URL for an API that's no longer supported). Is there a quick fix?

# Answer
> 1 votes
To fix, update system/third\_party/ce\_str/pi.ce\_str.php (around line 1457):

```
$string = preg_replace("/#(\w+)/", "<a href=\"http://search.twitter.com/search?q=\\1\" target=\"_blank\">#\\1</a>", $string);

```

... to this:

```
$string = preg_replace("/#(\w+)/", "<a href=\"https://twitter.com/search?q=%23\\1\" target=\"_blank\">#\\1</a>", $string);

```

---
Tags: twitter, ce-string
---


title: More SMTP issues

text:
# Question
Title: More SMTP issues
Alright -- more SMTP issues. I've looked at some other posts and solutions but so far nothing is working for me.

The login itself has been tested on a separate email client, so we know it works. Here are our config values:

```
$config['mail_protocol'] = 'smtp';
// $config['smtp_server'] = 'ssl://mail.xxxxxxx.net'; <- tried both with and w/o ssl://
$config['smtp_server'] = 'mail.xxxxxxx.net';
$config['smtp_port'] = 995;
$config['email_smtp_port'] = 995;
$config['smtp_username'] = 'xxxx';
$config['smtp_password'] = 'xxxxxxxxxxxx';
$config['smtp_crypto'] = 'tls';
$config['email_newline'] = "\r\n";
$config['email_crlf'] = "\r\n";

```

The error message is quite long, but here's a screenshot: http://downloads.creat-ee.com/zisc/ig\_email\_error.png

Is the issue on the server side? When using PHP protocol, EE says email has been sent but not received either.

Thanks everyone!

# Answer
> 1 votes
The PHP error you posted indicates that mail.\[the domain you apparently want redacted\].net isn't reachable; your mail settings need to be double-checked - I can't ping that domain either. It's possible that there's a firewall blocking your IP, or that you simply have incorrect settings.

---
Tags: email, smtp
---


# Question
Title: Assets (pixel & tonic) channel form - show images only by author
I'm using Assets to provide a form for members to post an icon. I'm using the "{field:assets\_field\_name}" method to provide the file upload ability.

I love it and it works great, however I want users to only see files that they have uploaded and not the whole S3 bucket contents (everyone elses icon uploads as well as theirs).

Is there a way to do this?

Thanks!

# Answer
> 1 votes
I don't believe Assets has support for this (they didn't when I checked recently). It should be doable with Channel Images, and, very possibly, Photo Frame.

---
Tags: assets
---


# Question
Title: Frontend public message with close or hide button
I'm looking for a way to display entries from a channel as a message on the homepage that are able to be hidden once the visitor has read it. Anyone know of a simple way to achieve this or an add-on that would help? Thanks!

# Answer
This really is a questions about HTML/CSS/JavaScript.

From the EE side, in the past I've used a global variable to allow the admins to set a message to be displayed.

Then in the template you just have a conditional surrounding the appropriate markup.

```
{if gv_important_message != ""}
<div class="message">
    <p>{gv_important_message}</p>
</div>
{/if}

```

Obviously the markup would be dependent on the design of the site and your CSS, but this is the general idea.
> 1 votes

---
Tags: ee2, conditionals, messages
---


# Question
Title: Trying to combine entries from "news" and "events" channels
I have a big scroller in the middle of my front page that shows the latest 3 news entries whose "Front Page Feature" field is set to "Yes". Somewhere else, smaller, I display the next upcoming event whose "Front Page Feature" is set to "Yes". I'd like to combine the 3 newest added news -and- events into that big scroller.

The code to populate the scroller is:

```
{exp:channel:entries channel="news" search:front_page_feature="Yes" dynamic="no" limit="3" orderby="date" sort="desc"}

```

I wish I could set channel="news|events", but they use different fieldsets. So I wish I could do channel="news|events" and

search:front\_page\_feature="Yes" search:events\_front\_page\_feature="Yes"

But "AND" is only allowed with multiple search terms, no OR. I don't know if there will be an easy way to do this.

Any ideas?

# Answer
> 2 votes
As mentioned in the comments, setting the front page status using a `status` or `category` would be a good way to accomplish this.

`{exp:channel:entries channel="news|events" status="featured_on_homepage" dynamic="no" limit="3" orderby="date" sort="desc"}`

Or...

`{exp:channel:entries channel="news|events" category="(id number of category for front page entries could go here)" dynamic="no" limit="3" orderby="date" sort="desc"}`

---
Tags: channel-entries, search
---


# Question
Title: Database Error when I attempt to Publish an Entry
I created a new channel and a field group that has a large number of custom fields. When I attempt to Publish a new entry I get the following error:

> A Database Error Occurred Error Number: 1054
>
> Unknown column ‘field\_id\_0’ in ‘field list’
>
> SELECT `field_id_0` FROM (`exp_channel_data`) WHERE `channel_id` = ‘0’
>
> Filename: fieldtypes/select/ft.select.php
>
> Line Number: 154

All other channels work fine and publish without error. I did a search and do not have a field\_id\_0, nor do I have a channel\_id 0.

I enabled Template Debugging and do not get any errors there.

Is there a limit to the number of custom fields you can have with a field group/channel?

Any clues what may be causing this?

Thanks.

# Answer
> 1 votes
Problem solved!

Here's the deal. I had several 'Select Dropdown' fields and on one of those fields a radio button was not selected:

* Populate the menu manually
* Populate the menu from another channel field

If one of them is not selected it throws this error. Personally I think this is a bug, but at least there is a solution.

---
Tags: channel-entries, custom-fields, database-error
---


title: option Groups in select boxes

text:
# Question
Title: option Groups in select boxes
One of my fields is a channel in a select dropdown. Can I add option groups in

Jumpstart \> CP \> Home \> Administration \> Channel Fields \>Edit Field ?

```
<select>
  <optgroup label="Swedish Cars">
    <option value="volvo">Volvo</option>
    <option value="saab">Saab</option>
  </optgroup>
  <optgroup label="German Cars">
    <option value="mercedes">Mercedes</option>
    <option value="audi">Audi</option>
  </optgroup>
</select>

```

# Answer
Not with the native select drop down, no. But, you can do it with the select field from Pixel & Tonic's Field Pack add-on. See the docs for details.
> 1 votes

# Answer
If you mean the option groups in combination with: *Populate the menu from another channel field*, then you would need to modify and customise a fieldtype. Something that makes a dropdown from a table, and modify the fieldtype to make option groups based on category, tags or whatever.

Some starting points to build a custom fieldtype of:
> 1 votes

---
Tags: groups, options
---


title: Listing all channel entries with Ajax

text:
# Question
Title: Listing all channel entries with Ajax
I have about 500 entries in a channel, and I need to show them on Google Map. When I try to read data with {exp:channel:entries} pair, it takes long to load the pages. Is there any way to load the data and start showing them as soon as they are ready on the map? Is it possible to read, for example 50 entries a time show them, then read next 50 entries, etc.? Maybe using a plugin or Ajax? Any idea?

# Answer
> 2 votes
1. Use stash to cache the results (refresh every x minutes, overwrite=no) for fast access.
2. Chain your ajax request, and use channel:entries limit and offset parameters
(e.g. after the first 50 return, hand them to map handler and call same/next ajax with new offset)

Option 2 will do several requests in a row, which might not be what you want.

---

**edit:** example added.

Caching the output of a channel entries tag for 60 minutes.
(from https://github.com/croxton/Stash/wiki/%7Bexp%3Astash%3Aset%7D#caching-a-variable )

```
{exp:stash:set
    name="my_cached_entries"
    save="yes"
    scope="site"
    parse_tags="yes"
    replace="no"
    refresh="60"
    output="yes"
}
    {exp:channel:entries channel="blog"}
        <p>{title}</p>
    {/exp:channel:entries}
{/exp:stash:set}

```

---
Tags: channel-entries, ajax, google-maps
---


title: Wygwam not loading tool bar

text:
# Question
Title: Wygwam not loading tool bar
All of a sudden wigwam stopped loading the tool bar. I can not click in the field, either to publish or edit, there is no field, no tool bar. Its been working great for 3 months. I am running EE 2.6.1 and wigwam 3.2.1.

I checked the Editor Configurations and they are fine, nothing has changed. I checked he field type and it set to Wigwam. In edit mode, if I change the field type to Textarea, the content is there as with HTML tags (like source mode). The content is still their I can see it on the website, and it formatted. Look great.

# Answer
this probably points to javascript errors. check with devtools or firebug what is going on.
> 0 votes

---
Tags: wygwam
---


title: Cartthrob Lite Problem

text:
# Question
Title: Cartthrob Lite Problem
After installing cart throb lite and default templates, on testing the default checkout page and hitting the checkout button, I get the following error:

```
Error Number: 1364

Field 'title' doesn't have a default value

INSERT INTO `exp_channel_titles` (`entry_id`, `site_id`, `channel_id`, `author_id`, `forum_topic_id`, `ip_address`, `status`, `versioning_enabled`, `entry_date`, `edit_date`, `year`, `month`, `day`) VALUES ('', '1', '2', 1, 0, '::1', 'closed', 'y', 1394557211, '20140311130111', '2014', '03', '11')

Filename: third_party/cartthrob/models/cartthrob_entries_model.php

Line Number: 261

```

The entry id is going as null, even though on\_the\_fly="yes" is set in the template.

What could be the problem?

# Answer
> 2 votes
I've recently been up against this. Check your `sql_mode` doesn't have `STRICT_TRANS_TABLES` enabled.

---
Tags: cartthrob
---


# Question
Title: How can we Spanning a Channel Entry Across Multiple Pages using pagination.?
ExpressionEngine includes a feature that allows to automatically split a single channel entry/article across multiple pages. how can i do this?

**UPDATE**

hi this is my code : here am using one field for pull out the entire news that is {news text} ;i hav only one field .. for entire news... is this correct or required another fields..summery ,body ,extended etc

```
{exp:channel:entries category_group="32" orderby="date" sort="desc" limit="1" paginate_type="field" paginate="bottom" }

    <div class="anw-readmorenewstitle">{title}</div>
    <div class="anw-readmorenewswriter"> {news_writer}</div>

    <div class="anw-readmorenewsimage"><img class="addthis_shareable" src="{news_image_1:anw-readsection}"  addthis:title="{title}" border="0"></div>

    <div class="anw-readmorenewsimagecaption">{news_image_1_caption}</div>

    <div class="anw-readmorenewstext">{news_text}

    {multi_field="page1|page2| page3"}
    <div>
    Last updated on {edit_date format='%M %d, %Y'} at
    {edit_date format='%h:%i %A'}<br />
    </div>

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

    {comments}
    </div>

{/exp:channel:entries}

```

This is one of my detailed news page .. a long articles.. I want to split this content into different pages..

"pagination\_base" this tag is required or not ?

# Answer
> 1 votes
Have you looked at the documentation for setting up pagination? Do you have any code you can post of where you are at with things? It would be helpful for others to assist you if you posted your code along with what you are trying to accomplish.

You can see examples of using pagination here:

Pagination Spanning

# Answer
> 0 votes
To span one entry across multiple pages EE natively requires the use of multiple content fields:

EE Docs for multiple content fields

You determine how the content splits into chunks by how you split up the content into the multiple fields.

In your code you have:

```
{multi_field="page1|page2| page3"}

```

Which assumes you have fields with the names of page1, page2 and page3 in the fieldset assigned to the channel.

---
Tags: pagination
---


title: Cartthrob Currency Issue

text:
# Question
Title: Cartthrob Currency Issue
Hope your all doing well!

All the transaction on the website are charged in USD instead of CAD do I need to change something? Or Push some information in the Checkout Form?

input type="hidden" name="currency\_code" value=""

My second point I have downloaded CartThrob Multi Location Settings Manager Does it's work?

Do I need to make something different from here?

# Answer
Check you haven't got a hidden input in your checkout form process. This can overwrite the currency. If its in there, remove it, or change the value. It usually works like this:

```
<input type="hidden" name="currency_code" id="currency_code" value="CAD">

```

Not sure what that add-on your using is. But the way I recently got around this was to set the location in a session, then used a Matrix field with the "Country" choice on each row.

I made it also pull the "Country" from ones I had set inside Low Variables so the client could add different countries whenever they wanted.
> 1 votes

---
Tags: cartthrob, checkout, currency
---


title: Grid content not showing up in template

text:
# Question
Title: Grid content not showing up in template
I have what should be a very straightforward grid field with very straightforward template code, but the contents are not being displayed in the template. AFAICT I'm using the grid field the same way that I've used it elsewhere on the same site without problems (basically, the grid is used to set up images with alt text, caption, etc). So I'm wondering if there's a problem at a database level -- but I have no idea how to diagnose or fix that.

The grid field's name is about\_company\_photo ad the columns are named image, alt, and caption. The grid has a single row (the field is set to minimum rows: 0, maximum rows: 1), and the image file itself is showing up in the File Manager. Looking at the entry in the CP it looks fine. This is all using native EE stuff, v 2.7.3. My template code is:

```
{if about_company_photo}
    <img src="{about_company_photo:image}" alt="{about_company_photo:alt}" title="{about_company_photo:caption}">
{/if}

```

The template is outputting the ing element, so presumably it is recognising that there is content in the grid itself, but the img tag's src, alt and title attributes are being left empty. Does anybody have any idea why this might be?

# Answer
Stupid me, I see it now. Forgot to include the Grid field's own loop around the column identifier tags. Note to self: don't code tired. D’oh!
> 1 votes

---
Tags: grid
---


title: 2.8.1 Login loop

text:
# Question
Title: 2.8.1 Login loop
I having a login problem with EE 2.8.1. When you type in the username and password on the front end login screen you get redirected back to the same screen and do not seem to get logged in. No errors. The username and password are correct.

I believe this issue may be related to cookies and sessions but I have cleared all cookies, tried in all browsers in incognito windows and it still won't work. I have a 2.7.1 install on the same server and this doesn't have the problem

When I go to site `domain.dev/admin.php` it redirects me to `domain.dev/admin.php?/cp/login?return=` and when I type the username and password it redirects with what I think is a session ID.

To add some additional information, if I disable cookies for the domain I get directed to a page and gives me an error:

"This form has expired. Please refresh and try again."

# Answer
> 4 votes
I finally found out that Structure 3.3.1 is the culprit when you set it to redirect to Structure on login. You can get past it by editing the config file and change `$config['allow_extensions'] = 'y';` to `$config['allow_extensions'] = 'n';`

# Answer
> 3 votes
If you get in touch with Travis at Structure, there's a BETA which will resolve the 'redirect to structure on login' with 2.8x.

# Answer
> 0 votes
Yes — It's a bug that seems to pop up on EE point releases.

But you don't have to disable Structure completely while waiting for a fix: Just turn off (i.e. set **enabled** to **n** in the exp\_extensions table) Structure\_ext's hook into **sessions\_start**.

---
Tags: login, 2.8
---


# Question
Title: Cartthrob not saving purchased items when order created
As the title states, when an order is placed, the order items should appear as entries in the Purchased Items channel but they do not.

The config is all set up as expected.

EE 2.7.2, CT Pro 2.4

# Answer
> 1 votes
I'm having this issue too, with CT Pro 2.4 and EE 2.7.3

* Orders are appearing in the order channel.
* Order items are appearing in the purchased channel

however the order\_items field in the order has no rows to connect them.

---
Tags: cartthrob, mightybigrobot
---


title: Freeform page break count

text:
# Question
Title: Freeform page break count
Is it possible to get a page count for a Freeform composer form by counting the page breaks (or by some other method)?

Right now I'm just using the page\_marker and pulling in the last url segment {last\_segment}, which isn't ideal because I have no way of getting the total count (like - Step {count} of {total\_count}).

I'm wondering if there's a native/better method out there?

```
    {exp:freeform:composer form_name="some_form_name" multipage="yes" page_marker="step/" inline_errors="yes"}

<div class="ff_composer">
{composer:page}

    {composer:rows}
            <div class="line">
        {composer:columns}
                <div class="unit size1of{composer:column_total}">

            {composer:fields}

                        <label class="field_label" for="freeform_{composer:field_name}">
                            {composer:field_label}{if composer:field_required}<span class="required_item">*</span>{/if}
                            {if freeform:error:{composer:field_name}}<span class="error">{freeform:error:{composer:field_name}}</span>{/if}
                        </label>

                    {composer:field_output}

            {/composer:fields}
                </div>
        {/composer:columns}
            </div>
    {/composer:rows}

{/composer:page}
</div>

```

{/exp:freeform:composer}

# Answer
> 1 votes
Freeform:Form variables work in Composer templates, they are just parsed after all {composer: based variables are finished parsing as composer first parses everything that belongs to it, then pases the template to Freeform:Form for its parsing.

Thus if you are trying to get page totals just to display, you can use {freeform:form\_page\_total}

http://www.solspace.com/docs/freeform/form/#freeform\_form\_page\_total

---
Tags: solspace-freeform
---


# Question
Title: Is it possible to have SKUs automatically generated on publish?
I have a store implementation where there will only ever be one SKU per inventory item/product. I am interested in having the SKU field equal the title field (using Title Master so each title is unique).

Has anyone done anything similar?

Cheers, Sean

# Answer
> 0 votes
Title Master is very useful indeed but I'm not sure you could use that to automatically fill in the SKU with Store however. The reason is that the Store field is itself a compound field so I don't think you'd be able to specify which field within it you'd want to have populated.

As nonprofit\_tech mentioned you can either go with a client-side (JS) solution or go server-side (PHP/SQL) but I'd probably look to go with client-side. Either way it will require getting your hands dirty with code to get something working.

For a JS based solution you'd need to use the cp\_js\_end hook but you can cut out some of the custom extension work if you use Brandon's handy addon (CP CSS & JS) which provides an easy way to add custom JS to the control panel. From there you could use JS or jQuery to grab the contents of the title field, format it, and then insert into the SKU field.

I'd agree with nonprofit\_tech though that really you want to keep this short and mimicking the title exactly may not be a good idea as it's open to abuse.

# Answer
> 1 votes
SKUs are better smaller. Say 5 to 10 characters, rather than a full title. There may even be a space limit on the field in `Store`, you'd need to check. But if you were going to auto generate one, I'd recommend the `entry_id` over the title. For one client we use, a 3-4 character code for the product section, say: MEM, PUB, etc for Member or Publication, then the entry\_id. So final SKU looks like MEM56789 or PUB245.

The problem is that you want to solve the auto-create issue. With `entry_id` you have to grab after the record is created. With title, you could insert or modify the 'as you type' javascript that creates the url\_title field and try to auto-fill the SKU field that way. You'd want to check on field limits, maybe remove all spacing. I'm not certain how long your titles generally are. I know our client's can occasionally push the boundaries of the `title` field.

Either way, `entry_id` or `title`, you'd need to create an extension to insert the SKU. You could also do it with a CRON job on a MySQL UPDATE script, as well.

# Answer
> 1 votes
This might help..., Auto Store SKU, if no SKU value is specified it uses the entry\_id to populate the SKU field. You can specify an SKU value and it will leave it as it is.

https://gist.github.com/nathanpitman/9836805

---
Tags: expresso-store
---


# Question
Title: Passing Plugin Values to Entries Parameter Woes
EE v2.7.2 Build Date: 20131008

I can't seem to find an elegant solution to make this work.

I've setup a channel name "test" with a field named 'test\_field' (Text Input). I've created some entries with the test\_field populated the same as entries title.

* apple
* banana
* foo
* bar

The goal is to use the search by parameter field 'test\_field' and return 2 entries - "foo" and "bar".

You can see the Foo Bar plugin here: https://github.com/surprisehighway/foo\_bar

## Attempt 1

The single plugin tag `{exp:foo_bar}` returns the string 'foo|bar'. Looks like the entries tag is parsing before the foo\_bar tag in the SQL query. `LIKE "%{exp:foo\_bar}%"`. That is expected without parse inward?

```
{exp:channel:entries channel="test" dynamic="no" search:test_field="{exp:foo_bar}"}
    <h1>{title}</h1>
{/exp:channel:entries}

SELECT t.entry_id FROM exp_channel_titles AS t
LEFT JOIN exp_channels ON t.channel_id = exp_channels.channel_id LEFT JOIN exp_channel_data AS wd ON wd.entry_id = t.entry_id LEFT JOIN exp_members AS m ON m.member_id = t.author_id WHERE t.entry_id !='' AND t.site_id IN ('1')  AND t.entry_date < 1396016523  AND (t.expiration_date = 0 OR t.expiration_date > 1396016523) AND t.channel_id = '11' AND t.status = 'open' AND ( (wd.site_id=1 AND wd.field_id_111  LIKE "%{exp:foo\_bar}%") )ORDER BY t.sticky desc, t.entry_date desc, t.entry_id desc LIMIT 0, 100

```

## Attempt 2

You would think that parse inward added to the entries tag would fix this. I'm still getting `LIKE "%{exp:foo\_bar}%"` when adding parse="inward" to the entries tag. **This is not expected**

**EDIT**: Should have checked my tweets. Ellislab said this will be fixed in the next release. I am still stumped with Attempt 5 in the meantime.

```
{exp:channel:entries channel="test" dynamic="no" search:test_field="{exp:foo_bar}" parse="inward"}
    <h1>{title}</h1>
{/exp:channel:entries}

SELECT t.entry_id FROM exp_channel_titles AS t
LEFT JOIN exp_channels ON t.channel_id = exp_channels.channel_id LEFT JOIN exp_channel_data AS wd ON wd.entry_id = t.entry_id LEFT JOIN exp_members AS m ON m.member_id = t.author_id WHERE t.entry_id !='' AND t.site_id IN ('1')  AND t.entry_date < 1396016672  AND (t.expiration_date = 0 OR t.expiration_date > 1396016672) AND t.channel_id = '11' AND t.status = 'open' AND ( (wd.site_id=1 AND wd.field_id_111  LIKE "%{exp:foo\_bar}%") )ORDER BY t.sticky desc, t.entry_date desc, t.entry_id desc LIMIT 0, 100

```

## Attempt 3

Knowing from previous experience, EE's template parser struggles at times when plugin tags that are shoved into parameters. What if we make it a pair tag instead? The input value outputs directly to the foobar\_result variable. We end up with `LIKE "%{foobar\_result}%"` in our SQL query.

The foo\_bar:pair tag is a single row output using the ee()-\>TMPL-\>parse\_variables\_row method.

```
{exp:foo_bar:pair input="foo|bar"}
    {exp:channel:entries channel="test" dynamic="no" search:test_field="{foobar_result}"}
        <h1>{title}</h1>
    {/exp:channel:entries}
{/exp:foo_bar:pair}

SELECT t.entry_id FROM exp_channel_titles AS t
LEFT JOIN exp_channels ON t.channel_id = exp_channels.channel_id LEFT JOIN exp_channel_data AS wd ON wd.entry_id = t.entry_id LEFT JOIN exp_members AS m ON m.member_id = t.author_id WHERE t.entry_id !='' AND t.site_id IN ('1')  AND t.entry_date < 1396018169  AND (t.expiration_date = 0 OR t.expiration_date > 1396018169) AND t.channel_id = '11' AND t.status = 'open' AND ( (wd.site_id=1 AND wd.field_id_111  LIKE "%{foobar\_result}%") )ORDER BY t.sticky desc, t.entry_date desc, t.entry_id desc LIMIT 0, 100

```

## Attempt 4

Let's add parse inward to the `{exp:foo_bar:pair}` tag so it's parsed before the entries tag. It works! But...**see Example 5**

```
{exp:foo_bar:pair input="foo|bar" parse="inward"}
    {exp:channel:entries channel="test" dynamic="no" search:test_field="{foobar_result}"}
        <h1>{title}</h1>
    {/exp:channel:entries}
{/exp:foo_bar:pair}

```

## Attempt 5

Let's say we purposefully not find an entry result and return what is within the no\_results conditional. My no\_results condition is not working now because the foo\_bar pair tag is returning a result. I need the no\_result conditioning to work for the entries tag.

```
{exp:foo_bar:pair input="find_no_entry" parse="inward"}
    {exp:channel:entries channel="test" dynamic="no" search:test_field="{foobar_result}"}

        {if no_results}
            <h1>No results buddy</h1>
        {/if}

        <h1>{title}</h1>

    {/exp:channel:entries}
{/exp:foo_bar:pair}

```

## Fini

Stuck at attempt 5 without getting more messy. Preferably without using another plugin. How do I solve this without getting more convoluted by wrapping it all with Stash? ;)

# Answer
Actually, maybe you should consider just extending the Channel Entries tag. Might be the most elegant and lease parse-order-hoop-jumping way:

http://dmlogic.com/blog/extending-the-expression-engine-channel-module/
> 1 votes

# Answer
Can you alter the plugin to return the entire search:test\_field="" parameter? So that your channel entries tag opener looked like:

```
{exp:channel:entries channel="test" dynamic="no" parse="inward" {exp:foo_bar}}

```

I've definitely gotten plugins to work in this manner.
> 0 votes

---
Tags: channel-entries, plugin, parse-order
---


# Question
Title: In Freeform, How do I specify return page from channel field in composer tag?
I'm using the Freeform composer tag to pull a form into an EE template, but I can't work out how to set the return value to whatever page the users puts into the Freeform channel field. It works fine if I specify a specific page in the tag.

This is my tag as it works (form\_select\_form is my custom field):

```
{exp:freeform:composer form_id="{form_select_form:form_id}" form_name="{form_select_form:form_name}" return="/message/thanks"}

```

What I'd like is the equivalent of:

```
{exp:freeform:composer form_id="{form_select_form:form_id}" form_name="{form_select_form:form_name}" return="{form_select_form:user_specified_return_page"}

```

Any ideas?

# Answer
> 0 votes
Currently, you can't. Also "{form\_select\_form:form\_name}" isn't a valid variable. Where you have:

```
form_id="{form_select_form:form_id}"

```

Which is valid, this is doing the work of form\_name="" already, thus you are seeing no error. So even if it did work, it would be redundant.

I've added a feature request for a better way to accomplish this scenario, but one thing you could try is editing:

```
./system/expressionengine/third_party/freeform/ft.freeform.php

```

around line 232 there is:

```
ee()->TMPL->tagdata     = '';

```

Which is a hack to allow the module's composer setup to work as params passed into the channel entries tag for the Freeform field are passed as tagparams to TMPL.

Try editing line 232 to look like:

```
ee()->TMPL->tagdata     = $tagdata;

```

Then around line 32, set:

```
public $has_array_data  = FALSE;

```

to:

```
public $has_array_data  = TRUE;

```

This *should* pass any incoming tagdata towards composer let you put your composer data between field variable pairs like so:

```
{form_select_form}
    //composer tags
{/form_select_form}

```

I will add this to feature requests and see what we can do sometime in the future about making this part of Freeform.

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


# Question
Title: Simple Search form and no results for existing entries
EE 2.7.3 and Simple Search form which looks like

```
{exp:search:simple_form channel="products" search_in="everywhere" result_page="home/search"}
          <label for="keywords">Search</label>
          <input type="text" name="keywords" id="keywords" placeholder="Search" />
          <button type="submit" name="submit"><i class="icon-chevron-right"></i></button>
{/exp:search:simple_form}

```

and result template:

```
<div class="row default">
Search results:
{exp:search:search_results}
{title}
{/exp:search:search_results}
</div>

```

for testing I have type in part of the title from one, existing entry in the Products channel. Unfortunately it gives me `Your search did not return any results` or returns one search result which is not related to search keyword.

Any clue what is going on?

Thanks

# Answer
In my case it required to add `status` to search tag

```
{exp:search:simple_form channel="products" search_in="everywhere" status="open" result_page="home/search"}

```

and I was able to see search results.
> 2 votes

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


title: Expresso Store skipping order numbers

text:
# Question
Title: Expresso Store skipping order numbers
I have Expresso Store set up with PayPal Express as the payment method. Everything seems to be working fine but sometimes there are gaps in the order numbers.

For example, I'll get order #19, 20, 21 and then it will skip a couple and the next order number I receive will be #24.

Any ideas why this is happening?

# Answer
> 1 votes
This usually happens when you have someone that goes through the order process but does not complete the order. You can goto Store \> Orders then sort by the status of "Incomplete" you will probably see the missing order numbers.

---
Tags: expresso-store
---


# Question
Title: Expresso Store and Freemember Autopopulation not working
i have tried to pre-populate the memeber data in checkout template. but prepouplation of any of the custom member field is not working.

```
{exp:store:checkout register_member="yes" next="shop/payment"
             error_delimiters='<span class="help-inline">|</span>'
            require="first_name|address1|city|country|order_email"}

            {if no_items}
                {redirect="shop"}
            {/if}
                    <label class="tburaddrlab" for="billing_first_name">First Name</label>
                    <div class="tburfield">
                        <input type="text" name="billing_first_name" value="{if billing_first_name}{billing_first_name}{if:elseif logged_in}{billing_first_name}{/if}">
                        {error:billing_first_name}
                    </div>
                    <label class="tburaddrlab" for="billing_last_name">Last Name</label>
                    <div class="tburfield">
                        <input type="text" name="billing_last_name" value="{if billing_last_name}{billing_first_name}{if:elseif logged_in}{billing_last_name}{/if}">
                        {error:billing_last_name}
                    </div>

            {/exp:store:checkout}

```

Could you pleas help me finding out,what i am doing wrong here?

Update: For old user ids its not prepopulating but for the new user id s its doing the job. dont know why? is there any solution to fix this or my understanding is wrong?

Here is an another update:

Trick is there in the cart data clearing - time set in CP.

Once i empty the cart, and update the cart again then new updated profile value is prepopulating.

Thnaks, sus

# Answer
If the users have already populated the custom fields in either FreeMember or by completing a purchase in the past they should automatically populate without having to use a conditional since the data is already in the mapped custom fields.

So in your template:

```
<label class="tburaddrlab" for="billing_first_name">First Name</label>
<div class="tburfield">
  {field:billing_first_name}
  {error:billing_first_name}
</div>

```

Should be all that you need to have to pull the data from the mapped fields. I would assume the reason that you are having problems comes down to the EE parse order.

Also the mapped billing fields are only pulled on the initial load so you need to make sure that if you make template changes or mapped data is not loading that you empty your cart to retest.
> 1 votes

---
Tags: expresso-store, freemember
---


# Question
Title: how to define the stash embedded template?
I would like to use the Stash embed functions, but I don't know how to define the template path.

In the Stash docs:

```
{!-- Stash template file at /path/to/stash_templates/test.html --}
{stash:embed name="test"}

```

How to define and set the path to the embedded template called test??

It is similar to the variable setting?

```
{!-- set a variable --}
{exp:stash:set name="foo"}bar{/exp:stash:set}

```

thanks.

# Answer
> 2 votes
As the docs explain, you need to setup your paths in your config:

```
$assign_to_config['stash_file_basepath'] = '/path/to/stash_templates/';

```

The docs are here: https://github.com/croxton/Stash/wiki/Installing-%26-upgrading

---
Tags: stash, embeds
---


# Question
Title: Multiple Freemember login forms on one page, prefix tags?
I have to keep the quick login form in the header whilst on the proper login page.

This means that if you submit either form with an error, it shows the error messages in the header and in the main content area.

Is there any way to prefix the tags?

`{header:field:email}` and `{content:field:email}` for example?

# Answer
> 1 votes
There's no way to prefix the tags - form errors will be displayed anywhere on the page a Freemember login form appears.

In general the accepted design is not to show error messages in the header since there isn't much space anyway - simply redirect to a `/login` page which has the full error messages displayed inline.

If you want to display errors in the header, then you will just need to live with them being displayed in multiple places.

# Answer
> 2 votes
If you set different form\_id on the forms and set different css classes on your error delimiters,
then you will be able to use CSS to hide the errors in the other form.

```
{exp:freemember:login form_id="form1" ... error_delimiters='<span class="error_1">|</span>'}
    ...
{/exp:freemember:login}

{exp:freemember:login form_id="form2" ... error_delimiters='<span class="error_2">|</span>'}
    ...
{/exp:freemember:login}

// css
#form1 .error_2, #form2 .error_1 { display:none; }

```

---
Tags: freemember
---


# Question
Title: Template group not appearing in file system
I've created a template group called temp, and inside this template group I've create a few templates. But when I try to view the templates I get a 404 error. I've checked my files and the template.group folder is not being created. My permissions seem to be fine (every folder up to the root is 755). Any ideas why this is happening?

Thanks

# Answer
> 2 votes
In template global preferences set "allow templates to be saved as files". Then edit a template from the control panel template manager, and check the checkbox to save the template as file.

When you click save a notice should appear (top of window) that the file is saved. If EE is somehow not able to save the file, it will show a notice. Most of the times this is due to file permissions and/or file ownership.

*Figure 1. Notice when unable to save template as file*

**Additional info**

* Inside the template directory, the basic structure is
`default_site/groupname.group/template_name.html`
* Try saving a file from the template manager first
and verify and follow the directory structure from there.

---
Tags: templates, 404
---


title: Freeform Notify Admin E-mail Won't Send

text:
# Question
Title: Freeform Notify Admin E-mail Won't Send
I have a simple setup, but it's not sending the "Nodify Admin" email.

I create a Composer form with just "Email" and "Submit" fields.

Using the Freeform fieldtype (http://www.solspace.com/docs/freeform/channel\_entry\_fieldtype/), I include this form into my channel entry.

I submit the form, and it successfully enters into the database, but I get no email.

The simple EE contact form (exp:email:contact\_form) and Tools \> Communicate both work fine. Checked email address spelling + spam folders.

Using EE 2.7.3 and Freeform Pro 4.1.5. Any ideas?

# Answer
> 0 votes
My initial guess without seeing any code or settings is you might be spelling "Notify" wrong.

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


# Question
Title: It is possible to parse an ExpressionEngine snippet inside a page via Ajax?
It is possible to parse an ExpressionEngine snippet inside a page via Ajax ?

like:

```
{exp:channel:entries channel="news" limit="10"}
    <h2>{title}</h2>
    {body}
{/exp:channel:entries}

```

The EE code would be processed and returned as html or not??

# Answer
I don't think so unless you write a plugin to access the code in the DB. However you could easily create a hidden template IE ( \_parsed\_data.html). Then AJAX load it in to your to your current template using Jquery AJAX .load().

```
$("div#parsedData").load("{site_url}/templategroup/_parsed_data.html");

```

You can also with javascript depending on how you generate that url pass parameter restrictions through the url using segments.

Data Template:

```
{exp:channel:entries channel="news" limit="{segment_3}"}
    <h2>{title}</h2>
    {body}
{/exp:channel:entries}

```

Viewed Template:

```
var seg3 = 3;

$("div#parsedData").load("{site_url}/templategroup/_parsed_data.html/ '+ seg3");

```
> 3 votes

---
Tags: ajax
---


title: Zoo Visitor:details Ajax request

text:
# Question
Title: Zoo Visitor:details Ajax request
I am using malsups form.js to run a login script combined with the zoo visitor add-on. When the login form has been successful the user is successfully logged in with out any need of a page refresh, although when I want to display the username the page needs to be refreshed for those details to appear on screen. Below is my code, any suggestions ?

--

```
                        <div class="username_wrap">
                            <p>Welcome
                                <span>
                                    {exp:zoo_visitor:details}
                                            {visitor:member_firstname}
                                    {/exp:zoo_visitor:details}
                                </span>
                            </p>
                        </div>

```

$("#userLoginForm").ajaxForm({

dataType: "json", success: function (event) {

```
                if (event.success) {
                    member_favourites = "5";
                    //do something
                }
            }
        })

```

# Answer
Create a hidden template that is just the logged in username only. Then load it in via jquery ajax .load(); Once login is complete as well.

```
               if (event.success) {
                    member_favourites = "5";
                    //do something
                    $("div#username").load("_username.html");
                }

```
> 3 votes

# Answer
With this code it's working fine:

```
            $('#form').ajaxForm({
                dataType: 'json',
                success: function(data) {
                    if (data.success) {
                        $("#jqxwindow ").jqxWindow({ height:150,
                                                    width: 250,
                                                    theme: 'bootstrap',
                                                    content: 'Você é registrado',
                                                    resizable: false
                                                                        });
                        $('#jqxwindow').on('close', function (event) {
                            alert("You closed a window");
                           );

                    } else {
                        alert('Failed with the following errors: '+data.errors.login);
                    }
                }
            });

```

Your code is in the header or footer?? If footer, you have to wrap it with document ready:

```
$( document ).ready(function() {

the code here

});

```

In the example code, the box message are from the Jqx framework , but with a simple js alert box it will work too.
> 0 votes

---
Tags: forms, login, zoo-visitor, ajax
---


# Question
Title: Multi Site Manager site dropdown showing on single site
I have a single site on a fresh install. However, in the top right corner, clicking on the site name gives the dropdown as if this were a multi site install. I am not running MSM.

Additionally, it wasn't clear where to edit the site name, I had to do so in the DB.

Bug?

# Answer
> 3 votes
Well, I feel dumb. For some unknown reason, I had this setting in config.php:

```
$config['multiple_sites_enabled'] = "y";

```

Changed to "n" and now things work as expected.

Palm to forehead.

# Answer
> 1 votes
You should be able to edit the site name within the CP under Admin \> General Configuration \> Site Name.

"Additionally, it wasn't clear where to edit the site name, I had to do so in the DB."

Might you have inadvertently created a new site entry within the exp\_sites table when you entered your site name? How many sites do you see when you look at that table?

# Answer
> 1 votes
Try looking inside the system folder if there is this file: system \> expressionengine \> controllers \> cp \> sites.php

if it is there, try to delete it

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


# Question
Title: Alternative to global ee() function for v2.1.3
I'm trying to implement this password protected content method on a v2.1.3 build.

This code...

```
<?php
global $IN;

if ( ! $the_password = $IN->GBL('the_password', 'POST') ) :

?>

```

...returns an error

```
Fatal error: Call to undefined method EE_Input::GBL() in  /homepages/42/d186459053/htdocs/dri/expressionengine/libraries/Functions.php(650) : eval()'d code on line 17

```

After some research, it looks like part of this has been deprecated.

Instead I should be using...

```
ee()->input->post('the_password');

```

However, after reading this, it looks like the

> global ee() function is only available since EE 2.6.0

Upgrading EE at this time isn't an option. What could I do to to retrieve the POST variable in this instance so this method works?

# Answer
> 1 votes
The `ee()` function in 2.6+ is just a shortcut to another function, `get_instance()`, which appears in ALL versions of EE.

```
<?php
$EE =& get_instance();
if ( ! $the_password = $EE->input->post('the_password') ) :
?>

```

# Answer
> 1 votes
So the correct answer to your question is the correct global ee() function for the version of EE you named is...

$this-\>EE =& get\_instance();

$this-\>EE // is the 2.6+ ee() equivalent.

# Answer
> 0 votes
Managed to get it working with the following code

```
<?php if (! $the_password = $this->EE->input->post('the_password')) : ?>

<form action="" method="post">
 <p>
  Enter your password:<br/>
  <input type="password" name="the_password" value="" id="the_password" />
  <input type="submit" name="submit" value="Access Content →" id="submit" />
 </p>
</form>
<?php else : ?>
{exp:channel:entries channel="private_content"
 url_title="<?php echo $the_password;?>"
 dynamic="off" limit="1"}

 {if no_results}<p>Your password is incorrect. Would you like to
    <a href="{path='private'}">try again</a>?</p>{/if}

 {private_content}

{/exp:channel:entries}
<?php endif; ?>

```

---
Tags: fatal
---


title: Form Submission

text:
# Question
Title: Form Submission
I am using malsup's form.js to help write an AJAX commenting feature for an application. The form.js is working for the contact form, although when I try to implement it for comments section the posts are successful, although the page always refreshes. Below is my script and EE tags, any feedback would be appreciated

---

```
// prepare the form when the DOM is ready
$(document).ready(function() {
    $('#output2').hide();
    var options = {
        target:        '#output2',   // target element(s) to be updated with server response
        success:       showResponse  // post-submit callback
    };

    // bind to the form's submit event
    $('#review_submit').submit(function(event) {
        e.preventDefault();
        e.stopImmediatePropagation();
        $(this).ajaxSubmit(options);
        return false;
    });
});

function showResponse(responseText, statusText, xhr, $form)  {

    $('#output2').show();
    $('#output2').fadeIn(300).append('<p>Thanks for your interest, we have emailed you an issue pack!</p>');
}

```

---

{exp:comment:form form\_id="review\_submit" channel="accounts" entry\_id="{entry\_id}" dynamic="no" rating:enabled="yes" rating:allow\_guests="yes" rating:allow\_multiple="yes"} Name

```
                                                                    <div id="rating_it">
                                                                        <label>Rating</label>
                                                                        <select name="rating[default]">
                                                                            <option value="1">1</option>
                                                                            <option value="2">2</option>
                                                                            <option value="3">3</option>
                                                                            <option value="4">4</option>
                                                                            <option value="5">5</option>
                                                                        </select><br />
                                                                    </div>
                                                                    <div class="review_text">
                                                                        <label>Review</label>
                                                                        <textarea id="mycomment" name="comment" cols="70" rows="2"></textarea>
                                                                        <input type="submit" value="Submit Rating  »">
                                                                    </div>

                                                        {/exp:comment:form}

```

---

# Answer
> 1 votes
Try this, and instead of hiding output2 after the dom has loaded add style="display:none;" to #output2 in the html.

```
$(document).ready(function() {
    var options = {
        target:        '#output2',   // target element(s) to be updated with server response
        beforeSubmit:  showRequest,  // pre-submit callback
        success:       showResponse  // post-submit callback
    };

    // bind form using 'ajaxForm'
    $('#review_submit').ajaxForm(options);
});

// pre-submit callback
function showRequest(formData, jqForm, options) {
// Form validation stuff if you need it.
    return true;
}

function showResponse(responseText, statusText, xhr, $form)  {

    $('#output2').show();
    $('#output2').fadeIn(300).append('<p>Thanks for your interest, we have emailed you an issue pack!</p>');

}

```

---
Tags: channel-entries, jquery, ajax, comments, comment-form
---


title: category id with if:else statement

text:
# Question
Title: category id with if:else statement
Basically im looking to show alternate images depending on the category id. Below I have shown my code, which doesnt work, but I would appreciate any information that any one could give me please! Some additional info about the categories can be seen in the screen shot. Also I have the channel:categories inside a channel:entries loop, the channel is grouped with the category.

--

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

```
                                        {if cat_id =="70"}
                                        <figure>

                                                <a href="#">
                                                {if logo}

                                                    <img src="{logo}" class="logo" alt="{title}" />
                                                    {/if}
                                                </a>
                                            </figure>

                                        {if:else}

                                        //do something else

                                    {/exp:channel:categories}

```

# Answer
This is what you will need to do.

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

                                        {if "{category_id}" == "70"}
                                            <figure>
                                                <a href="#">
                                                {if logo}
                                                    <img src="{logo}" class="logo" alt="{title}" />
                                                /if}
                                                </a>
                                            </figure>
                                        {if:else}

                                        //do something else

                                        {/if}

                                    {/exp:channel:categories}

```
> 3 votes

---
Tags: categories, ifelse
---


# Question
Title: Reverted back to 2.7.3 from 2.8.1, finding severe issues with addonbuilder
I get this error when trying to do anything with modules or extensions. I'm currently deleting each ones presence from the db and filesystem, but i really don't want to drop freeform\_pro.

Any ideas on what i can do besides delete files?

A PHP Error was encountered

Severity: Notice

Message: Undefined index: C

Filename: addons/Addons\_installer.php

Line Number: 501

# Answer
Always make a backup of database and the directory. Store them in a zip file. Get the backup running and working on a local development environment, and make another backup of this working copy. This way you can always return to a known working copy.

If any of the crucial modules don't work, then verify the add-on compatibility, but you will be able to keep the production website running on the version that works.

To temporary disable all extensions in 2.8, use the
hidden config variable `$config['allow_extensions'] = 'y';`
and uninstall the offending extension for the time being.

When a new version of the add-on becomes available,
repeat the process (of setting up a local working version)
but prior to updating EE, first update the add-on for a smooth transition.

Troubleshooting on a lower level, does require knowledge of PHP and the system.
> 0 votes

---
Tags: ee2, solspace
---


# Question
Title: EE 2.8.1 Solspace freeform 4.1.5 - composer issue
Using this tag "{exp:freeform:composer form\_name="form"}", I'm receiving this output

---

{composer:page}{composer:multi\_page\_start} {composer:rows} {composer:columns}

---

EE 2.8.1 Freeform Pro 4.1.5

Is anyone having an issue or am i not aware of change in this updated version? I've looked over the documentation and i'm doing the same as before.

Anyone have any luck?

# Answer
I ended up duplicating the form and it works now. Strange enough, seems like the original form became corrupted in my db.
> 1 votes

---
Tags: solspace-freeform
---


title: getting last 3 matrix fields by date

text:
# Question
Title: getting last 3 matrix fields by date
So my members update their courses which is a matrix channel field, tis channel field has 2 cells. Date and course name.

what I would like to do is get the last 3 matrix fields by date across all my members then output the name of the person who updated last.

```
{exp:channel:entries channel="zoo_visitor" limit="10"}
       {member_firstname}{member_lastname}
      {courses_completed}

      {Date}
      {/courses_completed}
      {/exp:channel:entries}

```

# Answer
> 1 votes
Why not just order the matrix field by the date column in descending order and apply a limit of 3? That would give you what you need.

---
Tags: matrix, search, filter
---


# Question
Title: Store - Discount applied in checkout form, but not on final order
I've run into an unexpected issue with manual payments: when checking out, discounts are successfully applied on the front-end (discount amount is returned and total amount updates accordingly) but when viewing the order in the Store admin the discount is missing from the order (i.e. displays $0.00).

This does not happen for credit card orders (processed through Stripe).

A note on my checkout process. I'm using Switchee to check the member group. If the member is in our commercial member group they're presented with a manual payment form so that we can process the order and invoice for the payment.

I'm at a loss for what may be happening during the payment processing that would drop the discount. To be sure there are no conflicts, I disabled the two extensions that I use in conjunction with Store (one hooks into store\_order\_taxes and the other store\_order\_complete\_end), but still no luck.

Has anyone encountered this, or something similar?

Thanks in advance for any insights.

EE 2.7.3
Store 2.2.0

# Answer
I believe the problem here was that after allowing the user to enter a `promo_code`, the `promo_code` field was redisplayed empty.

That way, when the customer submitted the final order for payment, the promo code was reset to a blank string, resulting in the discount being removed.

To avoid this, either hide the `promo_code` field when it is set, or display a field with the current value:

```
<input type="text" name="promo_code" value="{promo_code}" />

```

or

```
{field:promo_code}

```
> 2 votes

---
Tags: expresso-store, checkout, discounts, orders
---


# Question
Title: Field Pack Fields Not Parsing in Zoo Visitor Registration Form
After an ExpressionEngine 2.5.x to ExpressionEngine 2.8.1 upgrade, I'm running into an issue on a Zoo Visitor Registration form where Field Pack fields (previously the pre-ExpressionEngine 2.6 P&T Field Pack fields) are not rendering on the page, just the template tags themselves.

This is the template code for one field:

```
{error:member_child_relationship}
{options:member_child_relationship}
<fieldset>
  <input type="radio" id="child-relationship-{count}" name="member_child_relationship" value="{option_value}" {if option_value == 'Parent'}required{/if}>
  <label for="child-relationship-{count}">{option_value}</label>
  {if option_value == "Other"}
     <label for="child-relationship-writein" class="visuallyhidden">Write in your relationship</label>
     <input type="text" id="child-relationship-writein" name="member_child_relationship_other" >
  {/if}
</fieldset>
{/options:member_child_relationship}

```

And this is what appears on the page with the sign up form:

```
{options:member_child_relationship}  {option_value}
{/options:member_child_relationship}

```

I have the latest versions of both add-ons installed: Zoo Visitor 1.3.31 and Field Pack 2.1.1. Other fields, text and text areas, are render as expected.

Any thoughts on why this might be happening? From looking at the EE 2.8.1 and the Field Pack documentation, the syntax is correct.

**UPDATE (30 March 2014)**

By moving to the stock versions of the checkbox and select fields, I was able to get things up and running again but still curious why the Field Pack equivalents wouldn't parse...

# Answer
It's not directly related to Visitor, i encountered the same problem in a regular Channel Form. Not sure if the bug has already been reported to Pixel&Tonic
> 0 votes

---
Tags: zoo-visitor, field-pack
---


# Question
Title: GWCode Categories and Stash set/get_list
I'm working on a template that outputs large tables of stockists. At the moment they're quite slow so I've reworked it a bit to use Stash set & get\_list but they're still quite slow.

For instance, the template I'm testing has come down from ~9 seconds to ~6.5. I'd like to get that down further and wondering what I can do with the below to achieve that.

```
{exp:stash:set_list
    name="stockists"
    parse_tags="yes"
}

    {exp:channel:entries
        category="{segment_3_category_id}"
        channel="stockists"
        disable="member_data|pagination|trackbacks"
        dynamic="no"
        orderby="title"
        sort="asc"
    }
        {stash:stockist_cat}{categories backspace="1"}{category_name}|{/categories}{/stash:stockist_cat}

        {stash:stockist_row}
        <td>
            {title} <br/>
            {if stock_address_1}{stock_address_1} <br />{/if}
            {if stock_address_2}{stock_address_2} <br />{/if}
            {if stock_address_3}{stock_address_3} <br />{/if}
            {if stock_city}{stock_city}{/if} {if stock_state}<span>{stock_state}</span>{if:else}<span>{segment_3_category_name}</span>{/if} {if stock_pcode}{stock_pcode}{/if}
        </td>
        <td>
            <p>p {if stock_phone}{stock_phone}<br/>{/if}
            {if stock_url}<a href="http://{stock_url}" target="_blank">{stock_url}</a>{/if}</p>
        </td>
        {/stash:stockist_row}

    {/exp:channel:entries}

{/exp:stash:set_list}

<table class="stockists">
    <tbody>

        {exp:gwcode_categories
            cat_id="{segment_3_category_id}"
            depth="2|3"
            parse="inward"
            show_empty="yes"
            style="linear"
        }
            {if depth=="2"}
            <tr>
                <th colspan="3" id="{cat_url_title}" class="location-hd">{cat_name}</th>
            </tr>
            {/if}
            {if cat_description}<tr>
                <td colspan="3"><p>{cat_description}</p></td>
            </tr>
            {/if}

            {if depth=="3"}
                {exp:stash:get_list
                    name="stockists"
                    match="#\b{cat_name}\b#"
                    against="stockist_cat"
                    save="yes"
                    scope="site"
                    refresh="60"
                    replace="no"
                }
                <tr>
                    <th scope="row" class="location-name">{cat_name}</th>
                    {stockist_row}
                </tr>
                {/exp:stash:get_list}
            {/if}

        {/exp:gwcode_categories}

    </tbody>
</table>

```

# Answer
> 3 votes
I think that by caching both lists, you could reduce queries a little bit further. Easier to add Stash caching / Mustash to the mix too.

Something along the lines of:

```
{!-- set stockists list (consider caching with bundles and mustash forever) --}
{exp:stash:set_list
    name="stockists"
    parse_tags="yes"
    parse_conditionals="yes"
    save="yes"
    scope="site"
    refresh="60"
    replace="no"
}

    {exp:channel:entries
        category="{segment_3_category_id}"
        channel="stockists"
        disable="member_data|pagination|trackbacks"
        dynamic="no"
        orderby="title"
        sort="asc"
    }
        {stash:stockist_cat}{categories backspace="1"}{category_name}|{/categories}{/stash:stockist_cat}
        {stash:stockist_title}{title}{/stash:stockist_title}
        {stash:stock_address_1}{stock_address_1}{/stash:stock_address_1}
        {stash:stock_city}{stock_city}{/stash:stock_city}
        {if stock_state}
            {stash:stock_state}{stock_state}{/stash:stock_state}
        {if:else}
            {stash:stock_state}{segment_3_category_name}{/stash:stock_state}
        {/if}

    {/exp:channel:entries}

{/exp:stash:set_list}

{!-- set categories list (consider caching with bundles and mustash forever) --}
{exp:stash:set_list
    name="categories"
    parse_tags="yes"
    parse_conditionals="yes"
    save="yes"
    scope="site"
    refresh="60"
    replace="no"
}

    {exp:gwcode_categories
            cat_id="{segment_3_category_id}"
            depth="2|3"
            parse="inward"
            show_empty="yes"
            style="linear"
        }
            {stash:cat_depth}{depth}{/stash:cat_depth}
            {stash:cat_url_title}{cat_url_title}{/stash:cat_url_title}
            {stash:cat_name}{cat_name}{/stash:cat_name}
            {stash:cat_description}{cat_description}{/stash:cat_description}

    {/exp:gwcode_categories}

{/exp:stash:set_list}

{!-- creating the list using stash nested lists --}
{exp:stash:get_list:categories
    name="categories"
    scope="site"
}
    {if cat_depth == "2"}
        ... do table stuff ...
    {/if}

    {if cat_depth == "3"}
        {exp:stash:get_list:stockists
                name="stockists"
                match="#^{cat_name}$#"
                against="stockist_cat"
                scope="site"
            }
            <tr>
                <th scope="row" class="location-name">{cat_name}</th>
                <td>
                    {title} <br/>
                    {if "{exp:stash:not_empty name='stock_address_1'}"}{stock_address_1} <br />{/if}
                    [...]
                </td>
                <td>
                    [...]
                </td>
            </tr>
        {/exp:stash:get_list:stockists}
    {/if}
{/exp:stash:get_list:categories}

```

Let me know if that helps.

EDIT: added contexts (`exp:stash:get_list:categories` and `exp:stash:get_list:stockist`) for nested `get_lists` to work properly

---
Tags: categories, stash, gwcode-categories
---


# Question
Title: Superseach / Low search - How to handle this type of search criteria
I have 2 category groups (function and material).

In my search for i have the 2 category groups listed as checkboxes, so the user can perform multiple search combinations.

How I need the search to work is, if I selected Sales and Marketing from the functions categories list and selected Videos and eBooks from the materials categories list. I want to be able to see Video and eBooks entries in either Sales or Marketing.

What is the best way for me to handle this type of query.

# Answer
> 1 votes
I cannot comment about Super Search, but Low Search can handle this using the Categories filter and its group syntax. In your case, you could use `name="category:functions[]"` for the one group, and `name="category:materials[]"` for the other.

See also the second part of the Categories filter example here.

---
Tags: solspace, low-search, supersearch, low
---


# Question
Title: Do you think EE is appropriate for a membership-based website with some more advanced functionality?
We're working with a prospect who is a non-profit membership based organization. They have a website that they mainly use for:

* Event listings and registrations (payments processed for events with different prices for different membership types)
* Business listing management (adding, editing, deleting, moderation)
* Membership management. Members are organizations with multiple employees. Memberships grant these organizations a certain number of seats at each event for no charge (included in their membership fee). Admins need ability to log payments for members and see which members are coming-due or past-due.
* Email newsletters and event invitations to member employees and previous event attendees

My questions are: Are there any add-ons we can take advantage of that would provide this functionality? If not, is there any other solution you know of that could provide this functionality that we could custom-integrate with EE?

# Answer
> 3 votes
Event listings and registration is do-able, most of the EE shopping cart addons support different prices per member group. I'd suggest http://www.cartthrob.com here as it can be manipulated to work the way you want.

Business listings - straightforward in EE, use the Safecreacker module for front end add/edit by the logged in member. You can use EE's statuses for moderation.

Membership management is the tricky bit and you'd probably need to write somnething custom to manage the stock control per member group.

Newsletters - you could use EE's stock mailer or a 3rd party service like Mailchimp for added flexibility and features.

# Answer
> 1 votes
Everything you've mentioned is perfectly capable using the following add-ons:

* Membership management: Solspace User or EE Zoo's Zoo Visitor
* Payment: Membrr (EE-based solution) or aMember (non-EE solution)

The important thing to remember is that the member management aspect of the site will be more or less handled separately from the payment aspect.

However, using the combination above will give you enough "bridge" to make sure the entire workflow goes smoothly. Just expect that there will not be an all-in-one solution.

Also consider Andrew's excellent DataGrab or Solspace Importer if you need to grab existing member data into a new EE site.

P.S. I love CartThrob, but it alone will not make the process work. Even an add-on like Charge that works with Stripe will do, to handle the payment processing portion.

---
Tags: add-on, members, email
---


title: Error Field Typewith EE2.8 and Tinymce

text:
# Question
Title: Error Field Typewith EE2.8 and Tinymce
Deprecated function EE\_Fieldtype() called in system/expressionengine/third\_party/nsm\_tiny\_mce/ft.nsm\_tiny\_mce.php on line 61.

When I try to create a new channel field I get this: Fatal error: Call to undefined method EE\_Fieldtype::EE\_Fieldtype() in /home3/bartelsf/public\_html/system/expressionengine/third\_party/nsm\_tiny\_mce/ft.nsm\_tiny\_mce.php on line 61

I am using Tinymce 1.1.1 and updated to the most recent EE 2.8.1

Any thoughts would be very helpful!

# Answer
I would imagine NSM TinyMCE hasn't been updated to work with recent versions of EE. You may need to try another Wysiwyg fieldtype instead. There are a number of them out there.
> 1 votes

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


# Question
Title: Expresso Store limit certain products to member group
I'm building a webshop with hair care products, certain products however shouldn't be available to all members. We plan to have two member groups, regular buyers and haircare professionals.

So what I need to do is mark certain products to only be available to a specific member group(professionals).

What's the easiest way to achieve this? All the products are currently in one channel and I would prefer to keep them this way.

Should I just make a simple switch fieldtype? Is it possible to just write some type of "if member group = 4 AND fieldtype = yes" statement?

thanks!

# Answer
> 1 votes
There are a couple of different ways you could go about it, you could indeed use a P&T Switch or P&T Pill field in your channel then have something along the following:

```
{exp:channel:entries channel="products" limit="100"}
 {if logged_in_member_group == 4 && professionals_switch == "yes"}
  {!-- show Professional items here --}
  {title} -- {price}
 {/if}
 {if professionals_switch == "no"}
  {!-- if you still want to show non-professional items to the professionals you will need to have it here. This will also show only non-professional items to other users --}
  {title} -- {price}
 {/if}
{/exp:channel:entries}

```

You could also do the same with checking a member group and to see if a category has been set.

This approach should work without a problem if you are not using pagination or outputting the products in an ordered list since EE would actually be grabbing all of the products but only showing a portion based upon the conditionals being true which would have some pages resulting in less content or missing numbers.

---
Tags: expresso-store
---


title: EE channel content - exporting

text:
# Question
Title: EE channel content - exporting
I have my users working on a staging server updating copy and I am still working locally deploying my changes to the style etc.

The problem I have is I have installed a module or some something locally which changes the database, if I do a full dump I will losse there data.

Is there a way to export all the data from the channels for importing into my local site.

Thanks

# Answer
> 1 votes
Exporting;

* exp\_channel\_data
* exp\_channel\_titles
* and maybe exp\_channel\_entries\_autosave

Should get you there. Obviously back it all up first in case it goes horribly wrong.

You may also be to approach it the other way and install the add-on on the staging server and get them in synch that way. There may well be much less data to deal with.

---
Tags: channel-entries, import, export, ee
---


# Question
Title: Global Variable Parsing in Add-On Module
Trying to figure out what appears to be a global variable parse issue in a module add-on template tag.

Here's a sample of the tag used in the template:

```
{exp:syn_fb_comments:show url="{current_url}"}{fb_comments}{/exp:syn_fb_comments:show}

```

---

In the module, when I grab the param `url`:

```
$url = $this->EE->TMPL->fetch_param( 'url' );

```

My understanding is that the `{current_url}` tag should already be parsed as the actual URL. However, in fetching the parameter value, it returns the raw tag itself, `{current_url}`.

Question, is there something specific that needs to be done to have these template variables parsed before processing the tagdata for the add-on?

Assuming either I'm missing something simple here, or I'm just doing it wrong! Any insight is appreciated.

EE Version 2.5.5

# Answer
> 4 votes
I think UltraBob is right in that if you need a global variable available inside the module you need parse them inside the add-on. `parse_globals()` looks to be the way to do so (thanks to this answer on Stack Overflow).

The following will show that the parsed global is available in the module:

```
$parameter = $this->EE->TMPL->fetch_param('parameter_name');
$parameter = $this->EE->TMPL->parse_globals($parameter);
echo 'The parsed global is: ' . $parameter;
die();

```

# Answer
> 1 votes
I think you either have to return global variables as they stand and let the parser handle them later on, or if you actually need to do something with them, you'd need to actually parse them inside your add-on.

The global variables are stored in `$this->EE->config->_global_vars`, so I guess one thing to do would be to parse through looking for `{}` pairs and doing something like

```
foreach ($matched_brace_contents as $potential_global_var) {
    if ( isset( $this->EE->config->_global_vars[$potential_global_var] )) {
        //do your worst
    }
}

```

That is untested code, and may very well need some work, but hopefully it gives an idea of one way of checking if the curly brace pair you see is a global variable or not?

Alternatively, perhaps the Template class can do what you need without you needing to do it on your own.

# Answer
> 1 votes
The answers here didn't work for me, but a simple query does. Just in case this helps soneone else...

```
$sql = "select variable_data from exp_global_variables where variable_name = '$glob_var' ";
$results = $this->EE->db->query($sql);
$row = $results->first_row();  //returns an object
$global_var_value = $row->variable_data;  //get result from property

```

---
Tags: add-on-development, parse-order, global-variables, v2.5.5
---


# Question
Title: PHP errors displayed in CP when using an Assets filed within a Matrix within Low Variable
I'm using:

* EE v2.7.3
* Assets v2.2.4
* Matrix v2.5.10
* Low Vars v2.4.1

Error message (only displayed when on Low Vars page):

> A PHP Error was encountered Severity: Notice Message: Undefined index: entry\_id Filename: assets/ft.assets.php Line Number: 647

It's obviously got something to do with that switch statement in assets/ft.assets.php if I comment the grid/matrix case out the error disappears. Of course that causes more issues though.

Any assistance appreciated.

Cheers,

Andy

# Answer
Andris was close to the solution:

Add the following code right above the switch statement.

```
`if (($context == 'grid' || $context == 'matrix') && !empty($this->var_id))
{
    $context = 'low';
}`

```

Then in the 'low' case (around like 163) change the query to:

```
`$sql .= " ae.var_id = {$this->var_id} AND ae.row_id = '{$this->row_id}'";`

```

Now Low Variables knows what row to use. :)
> 2 votes

# Answer
If you add the following code before the switch, the error should go away - this will be included in the next Assets release :)

```
if (($context == 'grid' || $context == 'matrix') && !empty($this->var_id))
{
    $context = 'low';
}

```
> 0 votes

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


title: Creating a Member Checklist

text:
# Question
Title: Creating a Member Checklist
My site is powered by Zoo Visitor. I need to set up an "at-a-glance" checklist for the members on there so they can see what they've completed and what they still need to do. It would be nice if they could check what they've completed, but the admin would also have the option via the CP. So a sample list might look like this:

```
DUE DATE          TASK                      COMPLETE
5/1/14          Purchase movie ticket          [ ]
5/1/14          Arrange for hotel              [ ]
5/5/14          Call for transportation        [ ]
5/7/14          Purchase soft drink            [ ]
5/7/14          Purchase t-shirt               [ ]
etc

```

The list would be the same for all of the members, but obviously need to be separate for each.

Before I start working on creating a custom field, I wanted to make sure there wasn't something that would automatically take care of this.

Thanks for any thoughts or ideas!

# Answer
> 0 votes
A lot of it comes down to how you create the task list for the users. Even though it is exactly the same for all members, will the items need to be changeable, etc?

It could be as simple as a channel form that submits the yes/no on each task in their list with entries going to a channel for "task statuses" or something like that. Presumably you need your members to be able to update the status of the tasks asynchronously and therefore have the ability to return and change the status on items? Once they have submitted a status for an item as complete do they have the ability to edit it after that? Or does a "yes" status make the item uneditable going forward (i.e. what if something is the list falls through, for example)?

In a more complex scenario, I've done something like this with each individual task status being an entry (rather than all in a single entry), with the update occurring with Ajax and a modal window. That let me handle the status for each independently and take different actions accordingly, especially since in some cases my checklist wasn't limited to yes/no.

I think you could accomplish this solidly with a channel form, but you'll have to map out the member interactions with the form a fair bit to determine which approach to editing will make the most sense.

---
Tags: custom-fields
---


# Question
Title: Updating Cartthrob Order Status on Entry Item Id Level
I'm working on a site where the client needs to approve each order on the order\_id level. They also need to be able to approve order items on the specific entry\_id level as well. So if one item is not available for purchase, they can change the status of that item and still approve the order itself. For example, based on the image I've attached, the user would like to be able to look at this order and set a status for entry\_id 24 to Approved and then set the status to Denied for entry\_id 23.

Is there a way to do this in the backend of Cartthrob via the control panel using statuses?

Thank you for your time.

# Answer
> 1 votes
I don't think there is an easy way to accomplish this natively.

One thing you could try is saving a custom "status" item\_option when adding to cart. Give it a value of "pending" or something similar.

The downside is you'd have to type the status in manually.

On the back end you could write a little add on that would replace the default order items input field with a select that has your statuses.

---
Tags: cartthrob, status, orders
---


# Question
Title: Any reason to buy Playa over the native EE relationship module?
Is there any reason to buy Playa over the relationship module? I have a fairly complex relationship setup and need something to assist. Playa looks good but does it offer anything the native relationship module does not?

# Answer
This is why I buy Playa, from the relationship field docs :

> Currently it is not possible to get the parents of a relationship field that is inside of a Grid field. You can also not use Relationships inside of a Grid field that does not store Channel data.
> 3 votes

---
Tags: playa, relationships
---


title: Upload field has disappeared in WYGWAM

text:
# Question
Title: Upload field has disappeared in WYGWAM
My client has alerted me that some time in the last 2-3 months, they've lost the ability to upload files directly through WYGWAM. I've updated WYGWAM to its most recent version, and disabled any advanced settings, but I am not seeing the upload options anywhere.

I've asked WYGWAM to use the EE file manager, and I can succesfully upload images via the regular File Manager, but just not via WYGWAM.

Any ideas?

**Edit** I am running version 2.4.0 of EE, and 3.2.1 of Wygwam. I realize that 2.4 is pretty old, so I am having our systems guy update it this week.

# Answer
> 3 votes
Make sure that the particular Wygwam editor configuration assigned to this custom field has a chosen upload directory. To double check this go to...

*Modules \> Wygwam \> Editor Configurations*

...and in the editor configuration settings you will see a select menu labelled "Upload Directory" where you assign this.

# Answer
> 2 votes
I had this same problem and after some head scratching, found that for some reason the other member groups didn't have file upload priviledges. So, check:

*Content -\> Files -\> File Upload Preferences -\> Edit (select at least one location)*

And check that at least one upload location allows the Member Groups to upload files.

# Answer
> 1 votes
The file upload option is now available from the LINK icon.

Then, if you click on Browse Server, you'll get the native EE file upload dialog window.

**UPDATE**

Just to confirm, when clicking on the image icon, I am seeing the Browse Server button as well. I'm running EE 2.7.2 and WYGWAM 3.2.1.

---
Tags: pixelandtonic, wygwam, file-uploads, file-manager
---


# Question
Title: Need help creating a dynamic multi-select to use with Freeform Pro
I'm trying to create a multi select field that pulls in data from a matrix field. I have that part working, but am having trouble getting it to be a multi-select as well as pushing it to the freeform control panel.

Any thoughts? Thanks in advance.

```
<label for="product_size_chosen">Size</label><br />

<select multiple="multiple" name="product_size_chosen[]" onChange="MM_jumpMenu('parent',this,1)"> //product_size_chosen[] is freeform field//

{product_sizes_available} //This is the matrix wrap//
<option value="{product_size}">{product_size}</option> //matrix field variable//
{/product_sizes_available} //End or matrix wrap
</select>

```

**UPDATE**

I've tried using http://www.solspace.com/docs/freeform/default\_fieldtypes/#multi\_select unfortunately it outputs the matrix rows all as one long row and outputs all other store entries and their matrix fields on additional rows (not what's expected).

**This is what it outputs**

* small large medium x-large //each sizeis a matrix fields in a single entry//
* large x-large xx-large
* small medium xx-large

Using the regular select html tags I'm able to output... (code above)

* small
* Medium
* Large
* x-large

This outputs correctly (1 single entry displaying all matrix rows correctly), unfortuantely I can't get the selection to be added to the database and display in freeform field. Any thoughts?

# Answer
> 1 votes
Given your code all you should need to do is add the select attribute multiple.

```
<select multiple="multiple" name="product_size_chosen[]" onChange="MM_jumpMenu('parent',this,1)"> //product_size_chosen[] is freeform field//
{product_sizes_available} //This is the matrix wrap//
<option value="{product_size}">{product_size}</option> //matrix field variable//
{/product_sizes_available} //End or matrix wrap
</select>

```

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


# Question
Title: Expresso Store: Getting all products on sale throws PHP error
Not sure what I'm doing wrong, but the following code gives me a PHP error.

```
{exp:store:search channel="treatments" search:on_sale="yes"}
{exp:store:product
    entry_id="{entry_id}"
    input:gcc="Gavekort"
    input:msg="Melding"
    input:recipient_name="Mottakernavn"
    input:recipient_email="Mottakers e-post"
}
{/exp:store:product}

```

{/exp:store:search}

Error: **Fatal error: Using $this when not in object context in /\***/expressionengine/third\_party/store/src/Store/Tag/SearchTag.php on line 37\**

# Answer
This is a known issue affecting Store 2.3.1 with PHP 5.3, and will be fixed in the next version.

In the meantime, if you need a quick fix, please replace `$this->ee` with `ee()` on lines 37 and 38 of `third_party/store/src/Store/Tag/SearchTag.php`.
> 5 votes

---
Tags: expresso-store
---


# Question
Title: How to cache Stash Data when EE native template caching doesn't work
I needed custom event grouping by category within a Solspace Calendar table. The only way I could find to do this was the following:

Use {exp:stash:append\_list} within {exp:calendar:cal} to store the events by category and day.

```
{exp:stash:append_list name="cal-day-events-{date format="%m"}-{date format="%j"}-{categories show_group="7" limit="1"}{category_id}{/categories}"}

```

Then use EE's native {exp:channel:calendar} in an embedded template with {exp:stash:get\_list} to retrieve the events.

Good news is, it worked!

Since the page is so query intensive I'd like to do some caching to improve the speed of page load.

I tried use EE's native template caching to cache the entire template. It worked on the first load, but subsequent page loads showed no events. It seems that the stash + embedded template approach doesn't work with template caching. Turning it off fixed the issue.

What is a better way to cache this data? Suggestions?

# Answer
Have a look at the caching options available with stash. See Mustash for cache breaking rules.

The most basic option here would be to cache the lists when creating them with append list. You might also consider using set\_list tags instead of append\_list where possible as they will be more efficient (that's my understanding at least)
> 1 votes

---
Tags: stash, solspace-calendar, cache, caching
---


# Question
Title: Solspace Facebook Connect: Load Likes for a page
I have a blog listing page. Under each of the 10 entries listed I would like to show how many likes that article has. Is there a way to do this with Facebook Connect Addon?

# Answer
You can simply put a facebook like button on each article:

http://www.solspace.com/docs/facebook\_connect/fb\_like\_button/

That will show a count. I don't know if there is a way to get a count without showing the like button though. I suspect facebook wouldn't want you to do that.
> 1 votes

---
Tags: solspace-facebookconnect
---


# Question
Title: Matrix PHP preference error on Pages module admin
Am updating an old EE site to a new server, I have had a few errors that seem strange that they worked on last server.

ee v2.7.1 matrix 2.5.8 pages 2.2

If I go to Addons \> Modules \> Pages If I click on any of the pages links I get: Fatal error: Call to undefined method Tools\_model::get\_upload\_preferences() in /var/www/website/sys/expressionengine/third\_party/matrix/celltypes/file.php on line 121

Anyone seen this as to where I would look to change the upload prefs or which thing might have a problem.

thanks

Note:

On the second site I am moving I get this msg in the dev log: The system has detected an add-on that is using outdated code that may stop working or cause issues with the system. What does this mean?

Deprecated function get\_upload\_preferences() called in /var/www/website/sys/expressionengine/third\_party/matrix/celltypes/file.php on line 121. Deprecated since 2.2. Use File\_upload\_preferences\_model::get\_file\_upload\_preferences() instead.

# Answer
You're running Matrix 2.5.8. In the Matrix Changelog for Matrix 2.5.9 (released 5 months ago) is:

> Fixed a PHP error that could occur when a new File cell was saved for the first time

I suggest updating to the latest version (currently 2.5.10). In general, it's a good idea to update to the latest version of any software if you run into a PHP error, as these are often quickly caught and fixed by the developers.
> 1 votes

---
Tags: matrix, pages, ee
---


# Question
Title: Shipping costs not updating during checkout
We are using the aus post shipping extension.

The price during check out does not reflect this, however Store knows about the price that should be used.

How do i get the shipping price to update?

I have thoroughly read the documentation. I feel this is missing info or a bug!

Please read carefully the below our result:

{exp:store:checkout ...

# Answer
> 1 votes
I believe this was caused by caching issues in an old version of Store (the shipping API response was cached too long, which meant customers sometimes saw a shipping price which didn't reflect changes in the cart). This was fixed in Store 2.2.0.

https://exp-resso.com/docs/release\_notes.html

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


title: counting channel field rows

text:
# Question
Title: counting channel field rows
I want to check if there are any channel field entries so something like

```
{exp:channel:entries channel="vacancies" author_id="{logged_in_member_id}"}

{if count==0}
there are no entries in this channel
{/if}

{/exp:channel:entries}

```

is there are count, rows or total\_rows variables I can use?

# Answer
Almost there, take a look at the available parameters and variables, here:
http://ellislab.com/expressionengine/user-guide/add-ons/channel/channel\_entries.html

```
{exp:channel:entries channel="vacancies" author_id="CURRENT_USER" limit="1" dynamic="no"}
{if no_results}
there are no entries in this channel
{/if}
{/exp:channel:entries}

```

When using CURRENT\_USER it only works if the visitor is logged in (see user guide)
so you probably also want to check {if logged\_in} or {if logged\_out}.
The {if\_no\_results} conditional is a dedicated conditional for this purpose.

* **author\_id=CURRENT\_USER** the logged\_in\_member\_id is parsed late,
therefore this special parameter setting is available: current\_user.
* **dynamic=no** prevent the system from interpreting and acting on the url segments
* **limit=1** no need to for more entries
> 2 votes

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


# Question
Title: Remove .php extension from index.php. where .htaccess file is to be located?
I have code in .htaccess file

RewriteEngine On

RewriteCond %{REQUEST\_FILENAME} !-f

RewriteRule ^(\[^.\]+)$ $1.php \[NC,L\]

My directory like..

www/careers/index.php

And i have putten .htaccess file in www/careers directory

But it's not working..

i think it's not working only at localhost...

Please help me my thing is true or i have done some mistake in code...or directory??

# Answer
99.9% of the time, you'll only need one copy of ExpressionEngine's index.php file, and it should live in the webroot:

`www/index.php`

Your .htaccess file with those mod\_rewrite rules should be placed in the same directory as index.php:

`www/.htaccess`

Those mod\_rewrite rules will work for all URLs that are children of that directory, including /careers.
> 1 votes

---
Tags: php, .htaccess
---


# Question
Title: Non super admin cannot delete zoo visitor member
what permissions do I need to give editors to allow them to be able to delete zoo visitor members? They can edit them fine but when they click on 'delete' when on the edit page of a zoo visitor member they get 'Error: you are not authorized to access this page'. Is it just super admins that can delete zoo visitor members?

# Answer
I've just released I need to give them permissions to the EE 'member' area of the site. They can delete zoo visitor members now.
> 1 votes

---
Tags: zoo-visitor, super-admin
---


title: Why doesn't Freeform Captcha show?

text:
# Question
Title: Why doesn't Freeform Captcha show?
I am working on a contact page that uses Freeform 4.1.5 and for some reason the Captcha does not show.

I have taken the required step of confirming that captcha is required for logged in users, but the Captcha does not show whether I am logged in or not. Am I missing something?

Here is the form:

```
{exp:freeform:form form_name="contact" required="name|email" return="contact/thanks" require_captcha="yes" }
<!--basic info start here-->
<div class="top-form">
<div class="text-input">
<label for="name">name</label><br/>
<input type="text" name="name"  placeholder="Your First & Last Name" />
</div>
<div class="text-input">
<label for="email">email</label><br/>
<input type="text" name="email" placeholder="myname@example.com" />
</div>
<div class="text-input">
<label for="address">Address</label><br/>
<input type="text" name="address" placeholder="123 Coastal Lane" />
</div>
<div class="text-input">
<label for="address2">City, State, Zip</label><br/>
<input type="text" name="address2" placeholder="Savannah, GA 31401" />
</div>
<div class="text-input">
<label for="phone">Phone Number</label><br/>
<input type="text" name="phone" placeholder="(912) 555-1234" />
</div>
</div>

{if freeform:captcha}
<div class="text-input">
{freeform:captcha}<br />
<label for="captcha">enter the word you see in the image</label><br/>
<input type="text" name="captcha" />
</div>
{/if}

<!--questions & comments start here-->
<div class="submit">
<input type="submit" value="Submit" />
</div>
<!--questions & comments end here-->
{/exp:freeform:form}

```

# Answer
Check the permissions on your images/captchas directory. It needs to be writeable so the system can store Captcha images in there.
> 2 votes

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