title: Search Parameter within Matrix Field

text:
# Question
Title: Search Parameter within Matrix Field
Is there an easy way to search within a Matrix field for a particular value and if it matches to display the associated entry? Similar to how the "search:" parameter allows you to constrain Channel Entries output based on content within your fields. I want to do something like this:

```
{exp:channel:entries
    channel="shows"
    search:show_uid="={segment_2}"
    limit="1"
    show_expired="yes"
    dynamic="off"
}

```

"show\_uid" is the name of my Matrix field and the value I'm trying to match is in column 2.

# Answer
If you mark a Matrix column as Searchable, then its content will be stored as keywords on the parent entry, and you will be able to search for it via {exp:channel:entries}’ `search:field_name=` param.

Couple caveats, though:

* Remember that we’re just talking about *keywords* here. You can’t search for specific cell values, since those values are just getting dumped along with all other cells’ values for all of your searchable columns. So don’t prefix your `search:field_name=` param value with `=`, e.g. `search:field_name="=somevalue"`.
* If you set a column to Searchable after you’ve already saved some entries, you will need to re-save those entries for the setting to take effect.
> 0 votes

# Answer
https://ellislab.com/expressionengine/user-guide/add-ons/channel/channel\_entries.html#search-field-name

You can search in matrix fields, no problem! Just make sure that the matrix column is set to **searchable**. Check this answer for some pictures:

Search in Matrix Fields

```
{exp:channel:entries
    channel="shows"
    search:show_uid="={segment_2}"
    limit="1"
    show_expired="yes"
    dynamic="off"
}

    If you're seeing this, it's because we have a search result within the matrix field you wanted to search in!

{/exp:channel:entries}

```
> 0 votes

---
Tags: matrix, search, parameters
---


title: Editing other members

text:
# Question
Title: Editing other members
Can't seem to edit another member using 'User' by solspace using {exp:user:edit}.

I can edit as a super admin, but not when logged in as custom member group.

When logged in as the custom member group i get a no results instead of my templated edit form.

Is it possible to edit other members not using a super admin account?

```
{exp:user:edit
    password_required="yes"
    screen_name_password_required="yes"
    return="account/profile/{segment_3}/success"
    username="{segment_3}"
    username_override="yes
}

```

# Answer
You will need to goto Members \> Member Groups \> for the member group in question click Edit Group. After that scroll down to the Control Panel Administration section and set Can administrate members accounts to Yes. Save the page and try the User template tags again.

If you are still not able to edit a member group from that account you would need to add `group_id='X|Y'` to your edit forms for any additional member groups other then super admins that you want to be able to edit entries.
> 4 votes

---
Tags: solspace-user
---


# Question
Title: Applying a Discount Code to a Completed Order in Expresso Store?
Just curious whether there’s any way to apply a discount to an order that has been completed using Expresso Store. Applying this discount would change the balance due (to an amount owing back to the customer), then a partial refund could be issued via our payment gateway.

The only way I can see doing this payment gateway is to edit the price of one of the items currently associated with the order.

# Answer
> 0 votes
This is not something built into Store currently you would need to write an extension using one of the hooks to apply the discount code then send refund amount to your payment gateway.

I believe that only the order status hooks would be called from the CP when changing orders.

All extension hooks can be seen here

---
Tags: expresso-store
---


title: Auto login - Solspace User

text:
# Question
Title: Auto login - Solspace User
I would like to auto login returning members who have registered on the site before using Solspace User. Is this possible? Is there an auto login tag/plugin I could use when they register?

# Answer
> 0 votes
User employs the EE member login functions. There is nothing present that overrides them. You will also use the stock https://ellislab.com/expressionengine/user-guide/add-ons/member/#login-form-tag The most you can do is expose the "Remember Me" checkbox.

# Answer
> 0 votes
I use this all the time and it works like a charm (Solspace User and autologin). Remember "In order for this feature to work you must be set to use “cookies only” and not sessions (source)."

Good luck!

---
Tags: solspace-user
---


title: AJW Feed Parser + character/word limit

text:
# Question
Title: AJW Feed Parser + character/word limit
I have the plugin working fine and pulling in {description} however I'd like to be able to shorten the length of that text. I've tried the following addons:

Character Limit, Word Limit, and TruncHtml

I also tried to set this up using Magpie RSS Parser, and none of these worked with that either. Is this just not possible?

Thanks

Edited to add: Also tried Hacksaw

Edited to add code: `{exp:magpie url="{embed:feed}" limit="3" refresh="720"}
 {items}`

### `{title}`

`{exp:eehive_hacksaw char="100"}
 {description}
 {/exp:eehive_hacksaw}
 {/items}
{/exp:magpie}`

I have a feeling this is a parsing issue.

# Answer
Your code will definitely work, and you're right it's a parse order issue. You just need the `parse="inward"` parameter on the magpie tag.

```
{exp:magpie url="{embed:feed}" limit="3" refresh="720" parse="inward"}
    {items}
        {title}
        {exp:eehive_hacksaw char="100"}
            {description}
        {/exp:eehive_hacksaw}
    {/items}
{/exp:magpie}

```

From the ExpressionEngine docs on changing parsing order when using plugins:

> You may change the parsing order and instruct ExpressionEngine to parse an outer Plugin first. This is done by adding a parse=”inward” parameter to the Plugin opening tag. Using that parameter will tell EE to parse that Plugin before parsing any Plugins inside of it.
> 1 votes

# Answer
Trunch and Hacksaw should work, but, understand that they'd be truncating the content on the front-end / template side, and wouldn't be altering the actual content in the database.

I believe you could set the description field to a text input and set the maximum length, and all of the fields would get truncated on the database-side. It wouldn't look very good (things would get cut-off mid-word), but, that's how you could do it on the back-end with the actual data.
> 0 votes

---
Tags: feedparser, magpie
---


title: Missing Fields in Freeform v4.2.3

text:
# Question
Title: Missing Fields in Freeform v4.2.3
Some of my primary fields that are used on multiple forms (like First Name, Last Name, Email) are now missing from the list of available fields. If I try to recreate the field, it says a field with that name already exists. On the forms that use those fields, the space where they should be is blank. Is there a limit to the # of fields, and did these early-created fields get dumped as I added more and more over the years? Any way to repair these missing fields?

# Answer
> 0 votes
EE v2.10.1. 13 fields on the particular form, but the same fields are missing on other forms as well. I reuse the standard fields (First Name, Last Name, Email, etc on lots of forms). Using MSM with several sites, 3 of which have FreeForm forms. Is there a limit to the total # of fields for the entire installation? I do have lots of fields in the system for our various forms, and don't necessarily get rid of old fields that are no longer in use.

Live page with form showing missing fields (http://sdyc.org/race/forms/odw\_reg). Should have First Name, Last Name, Boat Name, Email, Phone, and an Agree button at the bottom.

I also notice that the fields are showing up correctly on the main site, just not the MSM sites...

Attached a picture of the template page. Not sure how to grab the template code itself.

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


# Question
Title: Email Notification for specific member group
I have never used EE before this project, and I am getting used to it. So far I like it. I have taken the project through completion, yet now I am having a hiccup.

A client wants to have an email notification of a new member, but for specific member groups, they would like it to go to different email addresses.

For example, I have used two different forms from Simple Registration plugin to have two different groups. Vendors and then Supporters.

When supporters register, a notification should go to one email address, where when a vendor registers the client wants it to go to a different email, as these two are handled by two different people.

Also, is there a way to control that email notification? I have custom membership fields, and when someone registers it does not show any of my custom membership fields in the email notification to myself upon new sign up.

Sorry if I am not explaining well enough!

# Answer
You want to use this free addon:

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

This allows you to create different triggers for notification. You can set one for member registration, and actually pick which member groups trigger that notification. Just make one notification for vendors, and one for supporters. Tada!

**Edit**

Here is a **functioning** example from a live application I have in the wild. When a "Records Custodians" member registers, it sends an email (it uses a message template, last field). You would just need two of these rules, one with your Supporters member group selected, one with your Vendor member group selected.

Are you sure your **email settings** are correct for this ExpressionEngine install? Go this Control Panel spot:

`Your site -> CP Home -> Tools -> Communicate`

And fire off a test email.

This addon is working on a very important application I've developed. (I redacted the name of the University I work at).
> 1 votes

---
Tags: members, registration
---


title: Where can I find CartThrob modules

text:
# Question
Title: Where can I find CartThrob modules
I have a project that I'm working on in which I needed the Gift Certificate module... which can no longer be purchased. I already sold the project and this puts me in a terrible situation since Cartthrob closed it's doors so abruptly I have to ask if anyone has the latest working copy of the module (or any others since it appears these make be gone forever)

I hate even asking this, but there's no other option at the moment.

# Answer
As you may know, CartThrob was recently taken over by us (Vector Media Group). More information can be found here: https://www.vectormediagroup.com/blog/view/vector-acquired-cartthrob-ct-admin/.

We've now put this back on the site, and added CartThrob Fees, CartThrob Subscriptions, CartThrob Wish List, and CartThrob Invoice. You should be able to get it here: http://www.cartthrob.com/.
> 0 votes

---
Tags: cartthrob
---


# Question
Title: CartThrob Is Calling It Quits... Can't Download Final Build 2.6.1
Edit (7.25.2015): CartThrob has been acquired by Vector Media Group! This question no longer really applies, but it will be left up for archival purposes.

---

So apparently and rather abruptly, CartThrob / MightyBigRobot is calling it quits and they are closing their business. I do hope nothing catastrophic has happened and it is just a time for change for them. I also wish them well on their future endeavors. You can read their official statement at their website:

http://cartthrob.com/

Now, I have a CartThrob Pro license and after logging in to the site my purchases and downloads are not appearing. I have not yet had a chance to download the most recent/final build of CartThrob, and as I transition to a new shopping cart solution I was hoping I would be able to get the most recent files for safekeeping. If any CT support staff are still active and possibly reading this, is there any chance you could reactivate the purchases and downloads on the site for my account?

Are there any other CartThrob customers who are having the same issue not seeing their purchases and downloads on the site?

# Answer
Are you still looking for help with this? I'm with Vector Media Group, and we've taken over CartThrob. More information can be found here: https://www.vectormediagroup.com/blog/view/vector-acquired-cartthrob-ct-admin/.

Can you Submit a support request here with your information and we can look this up and get it resolved for you?
> 1 votes

# Answer
I appriciate your gander here, and I too hope it's not 'curtains' for BigMightyRobot, but rather bigger better things. However the nature of their leaving (no support, no contact, no refunds, but you can still buy it ) sounds like they are abandoning \[insert your own reason why here\]...

I assume that after the link in the statement this is where your existing purchases are missing?

I would contact BigMightyRobot direct and be firm. "I paid a premium price for your product, now your going out of business I require a copy of the goods I purchased". I mean if I purchased in April for development this month I'd be getting robbed, paid for products I can not recieve, thats not the right way to do business!
> 1 votes

---
Tags: cartthrob
---


# Question
Title: JavaScript Must Be Enabled to View This Email Address
I am using the MX Notify Control plugin to email when a new member registers, the template I am using for the email is simply:

```
<strong>Email:</strong>{email}<br>

{exp:member:custom_profile_data member_id="{member_id}"}

<strong>First Name:</strong> {member_firstname}<br>

<strong>Last Name:</strong> {member_lastname}<br>

<strong>ZipCode:</strong> {member_zipcode}<br>

{/exp:member:custom_profile_data}

```

Yet for some reason, when I send it like this, the email is blank. I used the Simple Registration plugin to create the form.

Then I tried:

```
{exp:member:custom_profile_data member_id="{member_id}"}

<strong>First Name:</strong> {member_firstname}<br>

<strong>Last Name:</strong> {member_lastname}<br>

<strong>Email:</strong>{email}<br>

<strong>ZipCode:</strong> {member_zipcode}<br>

{/exp:member:custom_profile_data}

```

And I get the following error: .(JavaScript must be enabled to view this email address)

Anyone have any ideas?

# Answer
> 1 votes
That plugin is **2** years old, and appears un-maintained.

Go with Freemember, my friend.

https://devot-ee.com/add-ons/freemember

I know for a fact the registration form tag works on EE 2.10.1 (source: me! I'm a professional developer. But more importantly, I have it working in an EE 2.10.1 app).

---
Tags: members, email, mx-notify
---


# Question
Title: EE Conditionals failing due to '' and ""
I have this conditional:

```
{if '{spieldaten_datum:first unit="month"}' == 'y'}
 Blabla whatever
{/if}

```

On my mamp environment with php 5.5.10 it all looks fine.

On my live Server with php 5.5.26 a part of the conditional is actually displayed like this:

I guess this has to do with the nesting of `''` and `""` But why is it working on one environment but not on the other. How do I need to write this?

The tag `{spieldaten_datum:first unit="month"}` is from the low events plugin.

ee version: 2.10.1

# Answer
> 0 votes
I rolled back to v2.6.1 The latest ee v2.10.1 seems to no screw with encoding somehow in that server config.

# Answer
> 0 votes
**Always use duplicate environments between development and production machines**. There are so many environment variables to compare:

1. Apache config
2. Apache version
3. PHP agent config
4. PHP agent version
5. OS environment

Are your operating systems different? Remember that Linux and Windows use **different** line ending characters:

```
Windows: "\r\n"
Linux: "\n"

```

Are you saving your files in Windows set to Windows line-endings and then moving them to a Linux server?

I highly recommend duplicating your development and production environments. This could still be unrelated to this issue, but there is so many variables, and since it's clearly working in one place and not the other, I think we have a fantastic clue to the issue.

**Edit**

Are you sure you have duplicate templates and Low Events (same version please!!) between the two environments? This:

```
{if " == 'y'}

```

looks like this to me:

```
{if 'something-is-not-showing-up-here' == 'y'}

```

---
Tags: conditionals, low-events
---


title: Entry linking meta data

text:
# Question
Title: Entry linking meta data
Just wondering if it is possible to show the `{author}`, `{entry_date}` and `{comment_total}` in the Prev/Next entry links? Here is what I have currently for the Next entry link, but only the `{title}` field is working—

```
{exp:channel:next_entry channel="news"}
      <div class="element clearfix col1-3 home grey">
        <a href="{path='news/index'}" title="" class="whole-tile">
        <h3>{title}</h3>
          <p class="small"><span class="italic">by</span> {author} <br />
            <span class="italic">posted</span> {entry_date:relative}<br />
          <span class="italic">with</span> {comment_total} Comments</p>

          <div class="bottom">
            <p class="alignleft">Read more</p>
          <span class="arrow">→</span></div>
        </a>
      </div>
{/exp:channel:next_entry}

```

# Answer
Those single variables are not available in that tag (exp:channel:next\_entry). It would be somewhat inefficient, but you could run a template embed to achieve this. This would be the code in your main template:

```
{exp:channel:next_entry channel="news"}
    <div class="element clearfix col1-3 home grey">
        <a href="{path='news/index'}" title="" class="whole-tile">
            <h3>
                {title}
            </h3>
            {embed="embeds/next_entry" entry_id="{entry_id}"}
        </a>
    </div>
{/exp:channel:next_entry}

```

And this would be the code in your embeds/next\_entry template:

```
{exp:channel:entries entry_id="{entry_id}"}
    <p class="small">
        <span class="italic">
            by
        </span>
        {author} <br />
        <span class="italic">
            posted
        </span>
        {entry_date} <br />
        <span class="italic">
            with
        </span>
        {comment_total} Comments
    </p>
    <div class="bottom">
        <p class="alignleft">
            Read more
        </p>
        <span class="arrow">
            →
        </span>
    </div>
{/exp:channel:entries}

```
> 0 votes

---
Tags: entry, next-prev
---


title: A no shipping option

text:
# Question
Title: A no shipping option
Is it possible to not require shipping info, my client wants pick up one but when I remove the shipping fields it doesn't process.

# Answer
You can use the Default Shipping gateway and create a new method called "Pickup" without any prices associated with it along with your other shipping methods.

Then in your template you can use a conditional to check if the `shipping_method_id` is not equal to Pickup in which case you need the shipping details such as address, city, state, zip.
> 1 votes

---
Tags: expresso-store
---


title: (MSM) - Products not adding to cart

text:
# Question
Title: (MSM) - Products not adding to cart
I am using MSM, i have two subdomains with expresso store.

If i add an item to a cart on (sub1.domain.com) and then go to (sub2.domain.com) and try to add an item to the cart it gives {no\_items}.

If i empty the cart on (sub1.domain.com) the products Will appear in the (sub2.domain.com) cart that i added previously and vise vera.

Does anyone know what could be causing this?

# Answer
Store is MSM compatible but currently carts and products are restricted to the site that they are created in.

If you Store tags make sure that you are setting the `site_id="X"` to the proper site.
> 0 votes

---
Tags: expresso-store, multi-site-manager
---


title: Sagepay Protocol 3.00 upgrade notes

text:
# Question
Title: Sagepay Protocol 3.00 upgrade notes
I'm looking to upgrade our Cartthrob 2.2.9 version to bring in the changes required for V3.00 Sagepay. Does anyone have any advice on what i'd need to upgrade for this version? I can see in the Sagepay notes that there are changes to the encryption method which i have successfully implemented on a Cakephp store but need to what requires modification on Cartthrob? Thanks

# Answer
> 1 votes
I'm with Vector, and as Justin says, we are the new owners of CartThrob.

We've just released version 2.62 of CartThrob, which includes support for the SagePay v3 API. You can get it from your "Downloads" area on http://www.CartThrob.com.

Alternatively, if you can't upgrade CartThrob itself for any reason, the updated gateway files are here: http://www.cartthrob.com/free\_downloads/payment\_gateways/sagePay.zip. Just download them and replace the files in your installation.

*\[Edited because this has now been released\]*

# Answer
> 0 votes
Currently CartThrob 2.6.1 which is the most recent released version of CT does not support SagePay v3 api. CartThrob recently changed ownership to Vector Media Group (blog post) which has said on other channels that they are aware of the looming deadline for SagePay api requirements and are working on getting an update out soon.

Having said that I believe that v2.3 of CT requires at least EE 2.6 and that CT2.6 adds support for EE2.8/2.9.

---
Tags: cartthrob, ee
---


title: Low Search Fuzzy Search Questions

text:
# Question
Title: Low Search Fuzzy Search Questions
I've got Low Search working in a site thats using keyword and a separate category filter menu.

The client has pointed out that when he searches for...

> Director - Product appears (As is in 'Title')
> Directors - Product doesn't appear
>
> Robens - Product appears (As is in 'Title')
> Roben - Product doesn't appear

I've got this current setup...

```
{exp:low_search:form
    result_page="shop/search"
    form_class="form-inline"
    collection="shop_product"
    keywords:lang="en"
    keywords:inflect="yes"
    keywords:loose="both"
    keywords:mode="all"
    keywords:stem="yes"
    search_mode="any"
}
    <ul>
        <li>
            <input type="text" name="keywords" placeholder="I'm looking for...">
        </li>
        <li>
            <input type="submit" value="Find" class="button alternate">
        </li>
    </ul>
{/exp:low_search:form}

```

But I feel like I'm adding too many parameters in for this to work. I've read through numerous docs and form/stackexchange posts and still can't seem to get this working.

Any ideas?

# Answer
> 2 votes
As per the docs:

> \[P\]arameters can be applied in two ways: as input fields in a Form, or as hard-coded parameters in the Results or URL tag.

You've got the filter parameters set on the Form tag, which will have no effect (as per v3.0, anyway). You should move all those parameters (except `result_page` and `form_class`, which are valid Form tag parameters) to the Results tag.

Also, make sure you're running version 4 at least, as the inflection and stemming rules were added in that version.

Finally, I'd recommend *not* using `keywords:loose="both"` *unless* you're searching a language that has no spaces as word delimiters, like Chinese or Thai.

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


# Question
Title: Populate Custom Order Fields for Logged In Members
I have the pre-populated fields working but it doesn't seem to work for custom fields. This is the code that I am using. I am mapping the custom member field to the custom field in store but it's not pulling in the info. The other ones I set up worked but they weren't custom. Any thoughts?

```
<div class="control-group {if error:order_custom2}error{/if}">
    <label class="control-label" for="order_custom2">Cell Phone</label>
    <div class="controls">
        {field:order_custom2} {error:order_custom2}
    </div>
</div>

```

# Answer
To pull in data automatically you need to make sure that you have mapped your `order_customX` fields to member fields in the Store \> Settings \> Order Fields.

Once you have done that you will need to make sure that the user in question has completed an order since they are mapped. If you have added them to your template with an item in already in the cart you will need to empty your cart and add a new item to the cart to reload the member data.

If after that it still does not work:

* What version of EE and Store are you using?
* Check the Member \> View All \> Member Account in question \> Edit Profile to see if the data has been mapped and is displayed
* Try adding just `{order_custom2}` to the template to see if is outputting data properly.
> 1 votes

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


# Question
Title: Is there a way to make a vimeo gallery with playlist thumbnails using channel videos?
I'm trying to create a vimeo video player with playlist thumbnails. Has anyone ever done this using dev demon's channel videos? Does anyone have any good advice or can point me in the right direction? Thanks!

# Answer
I've done this with Antenna http://dvt.ee/adQTgdT and html/css.

> Antenna is a plugin that will generate the exact, most up-to-date YouTube, Vimeo, Wistia, or Viddler embed code available. It also gives you access to the video’s title, its author, the author’s YouTube/Vimeo URL, and a thumbnail. All you have to do is pass it a single URL.

Except I use only the 8 digit numeric ID from the URL so I can add the proper URL in the template to display the vimeo player in a modal window.

```
player.vimeo.com/video/{custom_field}?autoplay=1

```
> 2 votes

# Answer
If Channel Videos outputs the default Universal Embed Code iframe from Vimeo then you should be good using following embed code variable:

```
{video:embed_code}

```

Otherwise you could do it with the video service id variable along with the iframe directly from Vimeo like so:

```
<iframe src="http://player.vimeo.com/video/{video:service_id}" width="WIDTH" height="HEIGHT" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>

```

You could then use one of the jQuery responsive slideshows for example Flexslider or Camera.

Assuming you have the correct embed code (vs using the service id setup I described) and say Camera setup then your gallery/slide might look like this example:

http://www.pixedelic.com/plugins/camera/development/camera\_1.0.6/demo/features.htm

You'd probably then do something like following in your template to get the videos via the Channel Video tags:

```
<div id="videos">
    {exp:channel:entries channel="videos"}
        {exp:channel_videos:videos entry_id="{entry_id}"}

            <div class="video">
                <div data-thumb="{video:img_url}" data-src="{video:img_url_hd}">
                    {video:embed_code} {!-- Use this or use the iframe and video service id var instead. --}
                </div>
            </div>

        {/exp:channel_videos:videos}
    {/exp:channel:entries}
</div>

```

This will loop through all your videos for a certain channel and create the iframe along with the thumbnail playlist.

Note in the above code we are bringing in two more variables which are for the images:

* `{video:img_url}` \- link
* `{video:img_url_hd}` \- link

And the jQuery for Camera might look something like this:

```
jQuery(function(){

    jQuery('#videos').camera({
        height: '56%',
        loader: 'bar',
        pagination: false,
        thumbnails: true,
        imagePath: '../images/',
        time: 4500
    });

});

```

(don't forget to link to camera's js file itself as well!)
> 2 votes

# Answer
If you want to use the default Vimeo player, then its better to use a plugin to achieve the functionality.

You can try the Youmax plugin - it will embed your Vimeo videos with thumbnails and play it in the Vimeo player.
> 0 votes

---
Tags: channel-videos, vimeo, thumbnails, video
---


title: Stash list empty on refresh

text:
# Question
Title: Stash list empty on refresh
**Edit**

After some debugging, the issue seems to be around the text content of the tweet or Instagram photo. Looking in the database, if I save the caption or tweet text, the data suddenly cuts of in the parameters column.

---

I'm trying to create a social media wall pulling in photos from instagram and tweets from twitter with a certain tag. I create a list for each network (Twitter, instagram, EE) and then we join them lists.

I've got this working fine, the tweets and photos pull in fine, but when I try to cache the stash lists, I get some odd behaviour.

On the first load, it works great, the list is created and the list is saved in the database. If I then refresh that page, all of a sudden the list is either empty, has less results or has tags not rendering.

If I tell Stash to replace the list every time, then it works. Any idea's whats happening here?

```
{exp:stash:set_list name="instagram--{embed:term}{get:ig}" parse_tags="yes" parse_conditionals="yes" save="yes" scope="site" replace="no" refresh="60"}
    {exp:ig_picpuller:tagged_media user_id="1" limit="12" max_id="{get:ig}" tag="{embed:term}"}

        {!-- Instagram Data --}

    {/exp:ig_picpuller:tagged_media}
{/exp:stash:set_list}

{exp:stash:set_list name="twitter--{embed:term}{get:tweet}" parse_tags="yes" match="#^(?!\s*$).+#" against="image" parse_depth="2" parse_conditionals="yes" save="yes" scope="site" replace="no" refresh="60"}
    {exp:ce_tweet:search q="#{embed:term}" count="100" max_id="{get:tweet}"}
        {statuses}

            {!-- Twitter Data --}

        {/statuses}
    {/exp:ce_tweet:search}
{/exp:stash:set_list}

{exp:stash:set_list name="posts--{embed:term}" parse_tags="yes" parse_conditionals="yes" parse_depth="10"}
    {exp:channel:entries channel="channelName" limit="300" dynamic="no" disable="categories|category_fields|member_data|pagination"}

        {!-- EE Data --}

    {/exp:channel:entries}
{/exp:stash:set_list}

{exp:stash:join_lists name="media--{embed:term}" lists="twitter--{embed:term}{get:tweet},instagram--{embed:term}{get:ig},posts--{embed:term}"}

{exp:stash:get_list name="media--{embed:term}" limit="20" offset="{get:offset}" unique="id" orderby="date" sort="desc" sort_type="numeric"}
    {!-- Play with the list --}
{/exp:stash:get_list}

```

# Answer
I figured out the issue, as mentioned in my edit, the problem was to do with the text content from the tweet or Instagram caption. I simply JSON Encoded/Decoded the text and everything started working again.
> 0 votes

---
Tags: stash, caching
---


title: Vote up or 'Like' Post/Reply

text:
# Question
Title: Vote up or 'Like' Post/Reply
How would i go about introducing some sort of 'like post' feature in EE's discussion forum.

Something similar to Solspace's 'Rating' module would be great, is it possible to use this with discussion forum.

# Answer
Off the top of my head I wonder if you could use the comment feature to make a "Like" system.

Assuming you aren't using comments for the things you wish to add the "Like" feature to. Imagine if the "Like" button submitted a hidden comment form with minimal/common detail in it. You can then show the count of the number of comments as "Likes".
> 0 votes

---
Tags: forum
---


# Question
Title: Solspace Tag entries page not displaying list
I've reached out to SolSpace for help with this, but they aren't proving to be very smart. Perhaps the SE community can come to the rescue.

I am trying to display a list of my entries associated with a certain tag, but so far this only yields a blank page. I know my tags are working correctly because they are automatically showing up on the categories left-hand list and below the articles.

Code for the by\_tag EE template.

```
        {exp:tag:entries channel="blog_entry"}
        <div class="entry-tease" style="width:100%;float:left;clear:both;">
            <img src="{blog_image}" class="teaser-image">
            <h2><a href="{url_title_path='blog/entry'}" title="{title}">{title}</a></h2>
            {exp:trunchtml chars="450" inline="..."}
                {entry_text}
            {/exp:trunchtml}
            <a href="{url_title_path='blog/entry'}" title="Read more" class="read-button">Read more</a>
        </div>
        {/exp:tag:entries}

```

Any thoughts why this isn't working? SolSpace said it should with the exp:tag:entries opening and closing blocks, but again, nothing. I know there's 2 articles tagged with news as well. I do have Structure installed, but I don't see why it would be causing interference.

# Answer
> 0 votes
Have you tried this?

https://solspace.com/docs/tag/tags/#tag\_group\_name

Set your tag\_group\_name parameter to {segment\_4}.

```
{exp:tag:entries channel="blog_entry" tag_group_name="{segment_4}"}
    ...
{/exp:tag:entries}

```

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


# Question
Title: Ordering Channel Entries results based on Grid content?
Is it possible to order `{exp:channel:entries}` results based on the content of a Grid field? In my case, I want to order a list of conference sessions by start time.

This is the `{exp:channel:entries}` tag I'm using:

```
{exp:channel:entries channel="sessions" orderby="{session_time}{session_time:start}{/session_time}"}

```

The Channel Entries entry in the ExpressionEngine documentation doesn't state Grid fields aren't supported.

# Answer
You can only order entries by the literal contents of the fieldtype's column in the `exp_channel_data` table. So you can order by `session_time` (if you set that Grid field to be searchable - otherwise the column will not hold any data) - but you will be ordering by the concatenated contents of all columns and rows in that entry's `session_time` field.

You cannot specify a specific column in a Grid field to order by though.
> 1 votes

---
Tags: channel-entries, grid, orderby
---


title: MSM specific config settings

text:
# Question
Title: MSM specific config settings
Is it possible to only target specific MSM sites, as opposed to all sites.

I have two subdomains and a www site using the same MSM installation.

Is it possible to share a cookies between sub1.domain.co.uk and sub2.domain.co.uk but not affect www.domain.co.uk

Basically i want my members to be able to login to sub1 and automatically be logged in for sub2 domains but not www.

# Answer
You can use the `$assign_to_config` array in each site's `index.php` and `admin.php` files to set *some* per-site config items. (See docs.)

But you might have better luck using a `switch` statement in your main `config.php` file, e.g.,

```
switch($_SERVER['SERVER_NAME'])
{
    case 'www.domain.co.uk':
        $config['foo'] = 'bar';
        break;
    case 'sub1.domain.co.uk':
        $config['foo'] = 'baz';
        break;
}

```

For sharing cookies, look at the `$config['multi_login_sites']` variable, e.g.,

```
$config['multi_login_sites'] = 'http://sub1.domain.co.uk|http://sub2.domain.co.uk';

```
> 1 votes

---
Tags: multi-site-manager, cookies
---


# Question
Title: Return URL issue in DevDemon Subscriptions
I'm setting up Subscriptions and keep running into an issue where, on the subscription page shown here: http://d.pr/i/1jWCX, if the user fills out the form in a way that results in an error (say, a bad credit card), when they click back to this page from the error message page, they see something like this: http://cl.ly/image/3o0v3Y3w041t

The URL is the issue.

In the working page, the url is /join/membership-payment/premier - with segment\_3 being the trigger for different plans they can buy. In this case, premier.

In the page they are returned to, the url is /join/membership-payment/dev.augi.com/join/membership-payment and segment\_3 is the domain name.

This makes me think that Subscriptions is creating its return URL value incorrectly. It works just fine if there are no errors in the form.

This is my subscriptions tag:

```
{exp:subs:subscribe
  payment_method="authorizenet_cim"
  plan="{embed:plan}"
  return="join/create-profile/step-1/%SUBS_HASH%"
}

```

# Answer
Chad,

I make sure the the error is embedded into the {exp:subs:subscribe ....} subscription form that way an error doesn't leave the page. You could test with variables as seen below:

```
       <!-- Errors Section -->
        <div class="row">
            {if subs:no_results}
            <div class="alert alert-danger">This plan does not exists</div>
            {/if}

            {if subs:no_access}
            <div class="alert alert-danger">You don't have access to this resource</div>
            {/if}

            {if subs:total_errors}
            <div class="alert alert-danger">
                <ul>
                    {subs:form_errors}
                    <li>{subs:error}</li>
                    {/subs:form_errors}
                </ul>
            </div>
            {/if}
        </div>
        <!--/ End Errors Section -->

```

The other thing I noted while looking at your code is that the return for me always starts with a slash as seen below:

`return="/membership/thank_you_gift/%VOUCHER_HASH%`

Let me know if that helps.
> 0 votes

# Answer
After a heck of a lot of searching and trial and error, resulting in a lot of malformed URLs along the lines of my original problem description, I began to look at the url\_cancel field in the exp\_subs\_requests table after each failed test transaction that was sending me to a junk URL. I finally got it to send me to the correct URL upon subscription error by changing line 39 in /subs/src/model/Request.php:

```
//$charge->url_cancel = ee()->functions->fetch_current_uri();
$charge->url_cancel = ee()->config->item('site_url').'/'.ee()->session->tracker['1'];

```

it appears that this line is setting the url\_cancel after the URI has already changed in some manner. Setting it to the last page in the tracker array was the only way I could get it to send me back to the page with the sub form upon error. Not sure why this is but for me its now working.
> 0 votes

---
Tags: devdemon, subscriptions
---


title: Magnific popup retrieving entry problem

text:
# Question
Title: Magnific popup retrieving entry problem
I have a page that uses Magnific Popup to show popups (http://dimsemenov.com/plugins/magnific-popup/documentation.html). This popup it being loaded with the following peace of Javascript:

```
$('.popoup-team').magnificPopup({
    type: 'ajax'
});

```

There an overview page (which is the page that you can click the popup) and when clicking the popup, another page is loaded with ajax, which only contains the popup.

```
    {exp:channel:entries
    channel="team"
    dynamic="no"

}
    <div class="ajax-text-and-image white-popup-block">
        <div class="row">
            <div class="col-xs-4 team-image">
                {exp:ce_img:single
                    src="{team_afbeelding}"
                    class="img-responsive"
                    width="279"
                    height="279"
                    crop="yes"
                }
            </div>
            <div class="col-xs-8">
                <h1>{title}</h1>
                <h2>{team_functie}</h2>
                {team_beschrijving}
            </div>
        </div>
    </div>
{/exp:channel:entries}

```

The problem is that the id of the entry that I'm trying to show in the popup is established in url of the overview page, and I'm unable to reach that id in the detail page that contains the popup.

So the URLS are: Overview page URL: domain.com/team/25 Detail page URL: domain.com/team/detail

Does anybody know a solution for this?

# Answer
> 0 votes
Never mind, I was thinking way too complicated, obviously... Of course while loading the popup in the overview page, I could just change the link into

```
<a href="team/detail/{entry_id}"/>

```

Instead of overthinking it and trying to put the entry\_id into an id and retrieving it through jQuery...

---
Tags: channel-entries, url, ajax, entry, entryid
---


# Question
Title: Show modifiers with their own qty field in Expresso Store
In Expresso Store, I want to show all modifiers for a certain product instead of putting them in a dropdown. I saw this post which shows how to transform it into radio buttons, but it is not exactly what I need. I would like to have a quantity box next to each modifier option. The client should select an option first and then have to fill in a quantity, but he should be able to just enter a quentity next to the option of his choice.

How can I solve this?

# Answer
I was looking for a solution of such problem, later figured out myself. Sharing here my solution if anybody still looks for it -

```
{exp:store:product_form return="/store_example/checkout"}

  {exp:channel:entries channel="products" orderby="product_order" sort="asc" disable="categories|member_data|pagination" dynamic="no" entry_id="3" }
    {exp:store:product entry_id="{entry_id}" disable_form="yes"}

      <section id="product_{count}" class="product">
      <h2>{title} // {price}
          {if no_modifiers}<input type="text" class="qty" name="items[{count}][item_qty]" size="1" placeholder="Quantity" />
          <input type="checkbox" data-qt_field_name="items[{count}][item_qty]" name="select_item">{/if}</h2>

      {modifiers}
        <p>
          <label>{modifier_name}</label>
          {if modifier_instructions}<small>{modifier_instructions}</small><br />{/if}
          {if modifier_type == 'var' OR modifier_type == 'var_single_sku'}
  <div class="checkbox">
            {modifier_options}

    <label>
      {option_name}
      <input type="text" class="qty" name="items[{count}{option_id}][item_qty]" size="1" placeholder="Quantity" />
      <input type="checkbox" name="items[{count}{option_id}][{modifier_input_name}]" value="{option_id}" class="select_item" checked="checked" />
    </label>

            <input type="hidden" name="items[{count}{option_id}][entry_id]" value="{entry_id}" />

            {/modifier_options}
  </div>

          {if:else}
            <input type="text" name="items[{count}][{modifier_input_name}]" />
          {/if}
        </p>
      {/modifiers}

    {if no_modifiers}
    <input type="hidden" name="items[{count}][entry_id]" value="{entry_id}" />
    {/if}

      <p> </p>
      </section>

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

  <p>
    <input type="submit" name="submit" value="Add to Cart" />
  </p>

{/exp:store:product_form}

```

You might see, i've checked on for option modifier field. You've to do the same or change its value to check ON using javascript before form submission.
> 1 votes

# Answer
It sounds like you need the Product Form tag. The product form tag allows you to create forms which add multiple products to the cart at once (you need this if you want customers to specify quantities for more than one product and add them all at once).

It looks like this:

```
{exp:store:product_form}
  {exp:channel:entries channel="products" dynamic="no" limit="5"}
      {exp:store:product disable_form="yes" entry_id="{entry_id}"}
          <!-- add to cart form / product details -->
    {exp:store:product}
  {/exp:channel:entries}
{/exp:store:product_form}

```

Normally this works with individual products, so you will probably need some creative templating using the query module if you want to let customers add different variations of the same product to their cart at the same time.
> 0 votes

---
Tags: expresso-store
---


# Question
Title: Using a grid/matrix field to set stock levels for different colours with CartThrob
I'm working on a fabric store where each entry for a type of fabric has multiple colours: each colour is the same price so I don't really need price modifiers, but they can have different stock levels.

How would I set this up using CT and Grid or Matrix?

Also, the error message that comes up when trying to order an item that doesn't have enough stock is:

> There are just X remaining of item 'Y'…

but this site is selling some items which are measured in metres, some in pairs, and some in pieces and the client would like to be able to customise the error message to indicate the type, e.g. *20m of 'Y'*. Is that possible?

# Answer
> 2 votes
You should be able to setup a product modifier field as a regular grid or matrix that allow counting the inventory of each item separately but don't make a difference on price, or are priced in the same way.

For the message, you could do it one of two ways. One is that you could update the text in the various language files (`third_party/cartthrob/language/english/cartthrob_lang.php` and `third_party/cartthrob/language/english/cartthrob_errors_lang.php`) to be something that's more general and applies to all the products. Alternatively you could write an extension that fires on either CT's add to cart or ordering (or both) hooks that "understands" the product types a bit more and outputs the customized errors for each type. (We can help with this as well if you file a support request!).

Is that helpful?

---
Tags: cartthrob, matrix, grid
---


# Question
Title: How can I efficiently output a large channel entries query?
I need to display a large list of channel entires...between 500 and 800 entries. The list is simply a list of names in alphabetical order. When I run this query, I run out of PHP memory. I've tried to disable all parameters that I can, but I still get a memory error. This list can be cached and refresh once a day or so, but I can't even get to that point without running gout of memory.

Is there anything that can be done to output such a large number of channel entries, other than upping the PHP memory limit (which I understand is a bad idea)?

# Answer
I would do as @Ballonatic says, and use pagination. But if this isn't an option, you can set your PHP Mem limit higher.

You can change your php.ini file to reflect this:

```
memory_limit = 64M

```

Replease `64M` (or whatever your's is set as) with and upped value. Another option, if you (for some unfathomable reason) **only** want the memory raised for that particular page, but remain at it's lower setting for all other pages, you can turn PHP on for that template and use this PHP function:

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

```

That will change the memory limit for the duration of the script execution, but will return to it's php.ini set value on next script execution (some other page).
> 1 votes

# Answer
You could use pagination. Or if you want the whole list loaded on one page you could use pagination in combination with ajax. Than you load one batch at a time and add it on your page.
> 0 votes

---
Tags: php, php-errors
---


# Question
Title: Low Variable and Matrix count not showing
I have a matrix field in a low variable and I would like to access the loop value (count) of the row. The loop runs throug without any problem and the values are shown on only the count isn't working

This is the code:

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

        <div class="radio-style">
            {lv_Form:count}
            {count}
            {lv_Form:row_count}
            <input type="radio" id="dest_0{lf_Form:count}" name="destination" value="0{lv_Form:count}" /><label for="dest_0{lv_Form:count}">{lvFormDest_{user_language}} {lvFormStartDate format="%m/%Y"}</label>
        </div>
{/exp:low_variables:parse}

```

This is the result:

```
<div class="radio-style">
                        {var:count}
                        {count}
                        count
                        {lv_Form:row_count}
                            <input type="radio" id="dest_0{count}" name="destination" value="0{lv_Form:count}" /><label for="dest_0{count}">Tenerife 12/2015</label>
                        </div>

                        <div class="radio-style">
                        {var:count}
                        {count}
                        count
                        {lv_Form:row_count}
                            <input type="radio" id="dest_0{count}" name="destination" value="0{lv_Form:count}" /><label for="dest_0{count}">Nicaragua 12/2015</label>
                        </div>

                        <div class="radio-style">
                        {var:count}
                        {count}
                        count
                        {lv_Form:row_count}
                            <input type="radio" id="dest_0{count}" name="destination" value="0{lv_Form:count}" /><label for="dest_0{count}">Nicaragua 02/2016</label>
                        </div>

```

So you see that the loop works well except for the count value and as you can see I tryed all options.

Cheers

# Answer
> 1 votes
I found it!

I was trying to use a LV field tags to get the row count of a matrix field while I needed to use the matrix field tag {row\_count}.

```
{exp:low_variables:pair var="lv_Form"}
    <div class="radio-style">
        <input type="radio" id="dest_0{row_count}" name="destination" value="0{row_count}" /><label for="dest_0{row_count}">{lvFormDest_{user_language}} {lvFormStartDate format="%m/%Y"}</label>
    </div>
{/exp:low_variables:pair}

```

---
Tags: matrix, low-variables, loop, count
---


# Question
Title: Anyone happen to give a hand to solve issue with Solspace Ratings module?
I have a bit odd issue with Solspace Ratings Module. It should hide the form after guest giving their review points but it keeps showing the form. Im on EE 2.10.1 running on php 5.6.2. No MSM, very basic installation. Ratings Module is the latest 3.3.1. System folder is renamed and above webroot for extra info if that might count?

The form does get hide ONLY if you are logged in. But for guests, it just keeps showing up and worse, guests can submit as many reviews they want, even that form params are setup to allow only one vote.

Below is the setup for the form I have:

```
{exp:rating:form entry_id="{segment_3}" required="rating" anonymous="yes" collection="food-related" return="food/index" duplicate_check_guest_ip="no" allow_duplicates="no"}

{if not_duplicate}
<div class="heading-block"><h1><span>So, did you like this?</span></h1></div>
<p><b>1 = Didnt like. 5 = I want more!</b>, Tell us, please:<br>
<select name="rating" id="rating" class="required">
<option value="1">1 points</option>
<option value="2">2 points</option>
<option value="3">3 points</option>
<option value="4">4 points</option>
<option value="5">5 points</option>
</select></p>
<p><input type="submit" name="submit" value="Submit!" class="button button-3d button-small button-rounded button-red" /></p>
{/if}

{if duplicate} {/if}
{/exp:rating:form}

```

# Answer
> 0 votes
try removing this parameter.

```
duplicate_check_guest_ip="no"

```

# Answer
> 0 votes
have you checked the Preferences tab?

Check the member groups settings that are allowed to post ratings

## Check the Require email address for Guests?

My working code..

```
{exp:rating:form
collection="contest"
entry_id="{entry_id}"
allow_duplicates="no"
required="rating|email"
anonymous="no"
return="{current_url}/rating-success/"
user_template="user_template"
form:class="validate"
}

```

Cheers.

---
Tags: channel, solspace-rating
---


title: Exclude weekends Low events Calendar

text:
# Question
Title: Exclude weekends Low events Calendar
Is it Possible to exclude weekends from the {exp:low\_events:calendar} tag? Weekends is not needed.

# Answer
> 0 votes
Not with the current version (v1.4.1). Will make a note of adding something like a `{is_weekend}` variable to the tag, so you can use that in a conditional.

---
Tags: low-events
---


title: Low events date in the url

text:
# Question
Title: Low events date in the url
Is there any way of switching the date around in the url? I currently have /2015-07/ for a month and /2015-07/02/ for a day. But it would be great if i could get UK date range eg: /02-07-2015/

# Answer
No, the URL variables in Low Events return a format according to the ISO 8601 standard, as this is always unambiguous.
> 1 votes

---
Tags: low-events
---


# Question
Title: Any way to have the default HTTP Authentication redirect to a template when user fails to authenticate?
Referring to https://ellislab.com/expressionengine/user-guide/cp/design/templates/template\_access.html#http-authentication

Right now a failed or canceled authentication redirects to the standard server 401 page.

Is there any way to have this redirect to a specific url?

# Answer
> 1 votes
If you look in the EE source (v.2.10.1) you will see the following in `system/expressionengine/libraries/Auth.php` (*line numbers on the left*):

```
156                 if ($authed === FALSE)
157                 {
158                         @header('WWW-Authenticate: Basic realm="'.$realm.'"');
159                         ee()->output->set_status_header(401);
160                         @header("Date: ".gmdate("D, d M Y H:i:s")." GMT");
161                         exit("HTTP/1.0 401 Unauthorized");
162                 }

```

EE's authentication hijacks the 401 response, dumping out a header and using PHP's `exit()` function to dump out an "helpful" text string. AFAIK, and based on this evidence, there is no way to catch a 401 HTTP error code in a template, or even a raw Apache directive, *without* hacking the EE source, which is not recommended.

I have submitted this as a bug to Ellis Labs but have no heard anything back yet. If I do, I will add it to my own SO question that is similar to this.

---
Tags: authentication, http
---


# Question
Title: Is there a way to import to a Freeform Form?
Is there a way to import to Freeform Forms? I wanted to create a form with pre-filled information, and users can login and use freeform edit their existing entries?

Thanks and I appreciate your feedback.

# Answer
> 1 votes
Yes, but it would require some knowledge about MySQL and your form fields. Steps below:

1. Create your form in `EE CP > Add-Ons > Modules > Freeform Pro`
2. Note the newly created Freeform `form_id` (open the form page and look at your URL - you will see in the GET request the `&form_id=XX` where `XX` is an integer.
3. Open MySQL from the command line
4. Select your database. My EE db is called `expression_engine`, so I would type `use expression_engine` at the command line.
5. If you type `show tables` you will see all your EE database tables. Your Freeform form will have the table name `exp_freeform_form_entries_XX` where `XX` is your `form_id`
6. Take a look at the Freeform form table schema by typing `describe exp_freeform_form_entries_XX`. You will see all the fields and their types. An example below:

```
mysql> describe exp_freeform_form_entries_1;
+--------------+------------------+------+-----+---------+----------------+
| Field        | Type             | Null | Key | Default | Extra          |
+--------------+------------------+------+-----+---------+----------------+
| entry_id     | int(10) unsigned | NO   | PRI | NULL    | auto_increment |
| site_id      | int(10) unsigned | NO   |     | 1       |                |
| author_id    | int(10) unsigned | NO   |     | 0       |                |
| complete     | varchar(1)       | NO   |     | y       |                |
| ip_address   | varchar(40)      | NO   |     | 0       |                |
| entry_date   | int(10) unsigned | NO   |     | 0       |                |
| edit_date    | int(10) unsigned | NO   |     | 0       |                |
| status       | varchar(50)      | YES  |     | NULL    |                |
| form_field_1 | text             | YES  |     | NULL    |                |
| form_field_2 | text             | YES  |     | NULL    |                |
| form_field_3 | text             | YES  |     | NULL    |                |
| form_field_4 | text             | YES  |     | NULL    |                |
+--------------+------------------+------+-----+---------+----------------+
12 rows in set (0.00 sec)

```

The `author_id` field is your EE member/user primary key (the `member_id` in the `exp_members` database table). The `form_field_X` fields are your custom form fields created in Freeform. Be careful to match them up correctly! You should make sure the `entry_date` field is filled out with a valid UNIX timestamp.

Now you have all the critical fields ids you need to write a simple PHP or shell script that would run a sequence of MySQL `INSERT` statements to add your pre-filled information to the form.

I hope that helps, and good luck!

---
Tags: solspace-freeform
---


title: Migrate localhost (WAMP) EE install

text:
# Question
Title: Migrate localhost (WAMP) EE install
I have an EE site configured via WAMP on my local computer-- that pretty much mirrors the site's production environment-- and I'm about to perform a clean OS install and am wondering what might be the easiest way to recover/restore my current EE site configuration to a clean WAMP install? I plan to copy entire WAMP directory, with all my sites in the "www" directory, and presumably any related configuration files. Has anyone performed this sort of migration before who could offer some guidance? Thanks in advance.

# Answer
http://flowingmotion.jojordan.org/2013/07/19/12-steps-to-rebuild-your-wamp-server-without-losing-your-data/

This seems generally useful. Make sure you reinstall the **same** version of WAMP. Things like your config files and your entire web root are the most important to back up. Make sure you know all of your users and passwords. You can't just make a backup folder and restore it; WAMP does stuff in the Windows registry and port configs when it installs so it can open up; Make sure you install it with the same configuration (did you change the default install folder??).

Lastly, of course you need to do a full database dump.

And honestly, if you are duplicating in production, all you really need to do is make sure you install the same version of WAMP with the same configuration and set the same users and passwords (and don't forget your CONFIG FILES! think virtual host settings). If you have a good development to production work flow, this should be a breeze! When in doubt, **back it up**.
> 1 votes

---
Tags: migration, localhost
---


# Question
Title: Display results by relevance in keyword search only using Low Search
By default, I want my Low Search results to display with an orderby\_sort of last\_name|asc:

```
{exp:low_search:results
    collection="my_collection"
    default:orderby_sort="last_name|asc"
}

```

But when a keyword is present, I want the search results to be displayed by relevance.

I tried using a conditional around the orderby\_sort parameter above like this:

```
{if low_search_keywords}orderby_sort="low_search_score|asc"{if:else}default:orderby_sort="last_name|asc"{/if}

```

But this does not seem to work.

# Answer
> 0 votes
Parameters like that won't work for various parse order reasons. Right now, it's not possible to achieve with just hard-coded params. However, you could use a hidden input field for the `orderby_sort` parameter in the form, and populate it with one or the other using JavaScript, based on whether the keywords field was empty or not.

---

**Edit:** In the latest version, it should be possible to define the sort order like this: `orderby="low_search_score|title" sort="desc|asc"`. When no keywords are given, the results should be ordered by title.

---
Tags: low-search, orderby
---


title: .htaccess not rewriting for missing www

text:
# Question
Title: .htaccess not rewriting for missing www
I need all non-www requests to redirect to www. I believe I'm doing this right, but this code is not working:

```
<IfModule mod_rewrite.c>

Options +FollowSymlinks
RewriteEngine on

# If www is missing from the beginning of the URL
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]

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

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

</IfModule>

```

Any ideas what could be wrong here?

UPDATE:

I thought the answer was here: http://www.jarrodoberto.com/articles/2011/11/enabling-mod-rewrite-on-ubuntu

I'm on Ubuntu and my default site did not have AllowOverride to to All in areas shown below:

```
<Directory />
    Options FollowSymLinks
    AllowOverride All                                 <- HERE
</Directory>
<Directory /var/www/>
    Options Indexes FollowSymLinks MultiViews
    AllowOverride All                                 <- HERE
    Order allow,deny
    allow from all
</Directory>

```

I was hoping that after an Apache restart the problem would be resolved, but I'm still not seeing a redirect.

# Answer
THE SOLUTION

It seems that the problem was a mis-configuration in my vhost setup file:

**This is wrong.** Notice that the ServerName is set to www.mysite.com and the ServerAlias is set to www-prod.mysite.com:

```
<VirtualHost *:80>
    ServerName www.mysite.com
    ServerAlias www-prod.mysite.com
    DocumentRoot /var/www/vhosts/.../html_www
    <Directory /var/www/vhosts/.../html_www>
        AllowOverride All
    </Directory>
    CustomLog /var/log/apache2/...-access_log common
    ErrorLog /var/log/apache2/...-error_log
</VirtualHost>

```

**This is right.** The ServerName and ServerAlias need to be set as such:

```
<VirtualHost *:80>
    ServerName mysite.com
    ServerAlias www.mysite.com
    DocumentRoot /var/www/vhosts/.../html_www
    <Directory /var/www/vhosts/.../html_www>
        AllowOverride All
    </Directory>
    CustomLog /var/log/apache2/...-access_log common
    ErrorLog /var/log/apache2/...-error_log
</VirtualHost>

```

In my defense, this was not configured by me. I think our other developer was attempting to do something tricky with the server alias.
> 0 votes

---
Tags: .htaccess, mod-rewrite
---


title: Unwanted dynamic URLs appearing

text:
# Question
Title: Unwanted dynamic URLs appearing
I've got a client who is reporting that unwanted dynamic URLs for static pages are appearing in Google Webmaster Tools. This means that content is being duplicated as far as Google in concerned. How would these dynamic URLs get created (if not deliberately), and how can I prevent this happening again?

# Answer
Assuming you've eliminated any links that are being generated by your templates, the bad URLs could come from old Google results, external links, user bookmarks, sent emails, anything really.

You'll need to attack this from two routes:

1. Adding 301-redirects for old URIs. Detour Pro add-on is the best way to manage these, otherwise you end up with a very long, ugly, hard-to-debug htaccess file.
2. Ensuring that requests for non-existent URIs return a 404 header. You can do this with conditionals using EE's `redirect` tag and the `channel entries` tag's `no_results` variable and `require_entry` parameter. This can get fiddly depending on your tag nesting, but many third-party add-ons supply their own `prefix` parameter or similar that allows them to use their own `no_results` variable.

Here's another answer with a good overview: Strange URLs appeared in Webmaster tools
> 0 votes

---
Tags: pages, dynamic, seo, duplicate, google-webmaster-tools
---


title: Single entry with multiples pages

text:
# Question
Title: Single entry with multiples pages
I search how to have a entry with multiple pages if the product created has multiples colors.

Indeed, i work on a product website and my client want to have the possibility to define a product in different color but he wants one channel in admin but several pages in front-end. And in search system, he wants to find only one product :-(

There is a possibility (module, add-on, custom field) to have a system in admin when it's activate it's create multiple pages but with only one channel.

I hope someone'll understand what i try to do :-)

Thanks.

# Answer
This is perfectly feasible in EE without any add-ons. Since EE doesn't really have a concept of pages, a single channel entry can appear at multiple URIs no problem - You'll just need to use some logic in your template to show the right entry.

There are lots of different ways to approach this, but let's say you want your URIs to be:

```
/products/widget-A/in/blue
/products/widget-A/in/red
/products/widget-B/in/blue
/products/widget-B/in/red

```

You could use a category or custom field to define the colours and then pipe the values through to a channel entries query. For example, with categories, your `products/index` template could look a bit like this (also using Low Seg2Cat to get the cat ID here):

```
{exp:channel:entries
    channel="products"
    disable="member_data|pagination"
    dynamic="no"
    category="{segment_4_category_id}"
    url_title="{segment_2}"
    limit="1"
}
    <h1>{title}</h1>
{/exp:channel:entries}

```

You could do the same thing with a custom field, such as checkboxes or radio buttons and the `search` parameter. Just be a little bit careful that you don't pipe URI segments directly into a channel entries tag as this could be a (minor) security risk (exposing private entries etc if you're not careful). I would usually use Stash to pre-screen/normalise any incoming segments to prevent this.
> 1 votes

---
Tags: entry, pages, multiple-channels
---


# Question
Title: Jquery Freeform AJAX submission form error
I have created a basic submission form using expression engine's plugin free form. From the CMS side of things my data is being submitted into the EE CMS. However after i have submitted my details, rather than receiving a success message i receive the following message on my form `object object`. `<div id="form-messages" class="success">[object Object]</div>`

I am assuming this has something to do with my jquery As the function was working when i was validating the submission through php.

Below is a snippet of my code.

```
var form = $('#ajax-contact');
var formMessages = $('#form-messages');

$(form).submit(function(e) {

e.preventDefault();
var formData = $(form).serialize();

// Submit the form using AJAX.
$.ajax({
    type: 'POST',
    url: $(form).attr('action'),
    data: formData
})
.done(function(response) {
    //  formMessages div has the 'success' class.
    $(formMessages).removeClass('error');
    $(formMessages).addClass('success');

    // Set the message text.
    $(formMessages).text(response);

    // Clear the form.
    $('#name').val('');
    $('#email').val('');
})
.fail(function(data) {
    // Make sure that the formMessages div has the 'error' class.
    $(formMessages).removeClass('success');
    $(formMessages).addClass('error');

    // Set the message text.
    if (data.responseText !== '') {
        $(formMessages).text(data.responseText);
    } else {
        $(formMessages).text('Oops! An error occured and your message could not be sent.');
    }
});

})

```

HTML

```
exp:freeform:form
            form_id="1"
            admin_notify="me@email.com"
            form:class="main-contact submit-fade ajax-form"
            form:id="ajax-contact"

        }

            <ul class="small-block-grid-2 medium-block-grid-2 hide-form">
               <li>
                  <label for="name">Name</label>
                  {freeform:field:first_name
                      attr:class="form-control"
                      attr:placeholder="First Name"
                      attr:class="required"
                  }

                </li>

                <li>
                  <label for="email">Email</label>
                  {freeform:field:email
                      attr:class="form-control"
                      attr:placeholder="Email"
                      attr:class="required"
                  }
                 </li>
              </ul>
              <input type="submit" class="btn btn-success">

        {/exp:freeform:form}

```

# Answer
> By default, Freeform auto-detects if you are using AJAX for the form submission. AJAX requests will return errors and success mesages in JSON. If you wish to disable this, specify a value of no.

That's a JSON object you're getting back, buddy. Can't just dump it, you have to parse it somehow. Start by replacing this line

```
$(formMessages).text(response);

```

with this line:

```
console.log(response);

```

and open your developer console after a test submission. Then investigate the JSON object and figure out what you're looking to dump. It's probably something like this:

```
$(formMessages).text(response.msg);
// or
$(formMessages).text(response.error);
//// or
$(formMessages).text(response.im_a_json_object);

```
> 1 votes

---
Tags: solspace-freeform, jquery, ajax
---


title: Cell Padding in Wygwam

text:
# Question
Title: Cell Padding in Wygwam
I am trying to use cell padding to add some white space in Wygwam table cells. It works in the editor view, but doesn't show up in the live view. (I am very new to Wygwam and know nothing about HTML.) Thanks.

Labeled screen shots attached. Notice the lack of padding in the live version even though it is set to 5 in the edit version.

# Answer
> 0 votes
This is a **stylesheet** issue. To actually help you with this, we'll need to override your current stylesheet rules; basically, the WYGWAM table is inheriting styles from rule sheets included after WYGWAM rules that are probably running with an `!important` override.

Using Firefox or Chrome, right click on your table, and there should be an option to `Inspect Element`. Look at your table elements (table `<table>`, table row `<tr>`, table cell `<td>`), and tell us what style rules are being applied, and from what rule sheets.

---
Tags: wygwam
---


# Question
Title: Reading from multiple channels by category ID in ExpressionEngine
Question is related to using ExpressionEngine version 2.10.1

I'm trying to build a page which lists PDF catalogues belonging to a particular brand. Brands are unique, but each brand may have 1 or more catalogues.

Set up in EE is as follows:

* Each brand name has been entered under Channel Administration \> Categories.
* There are channels called 'Brand' and 'Catalogue'.
* When a channel entry is made under 'Brand' it is assigned to the appropriate brand category - using the Categories tab when making the channel entry. The same applies when making channel entries under 'Catalogue', i.e. they are also assigned to the appropriate brand category.

Template starts like this:

```
{exp:channel:entries channel="brands"}
...
{/exp:channel:entries}

```

Where I've put \[...\] I want to retrieve anything in the 'Catalogue' channel which has been assigned to the appropriate brand category ID. I can read the brand category ID like this but not sure what to do next:

```
{categories}{category_id} {/categories}

```

After this I'm stuck because I can't use another `{exp:channel:entries}` tag inside an existing one, unless I'm wrong?

Any help appreciated. I had a look at solutions which use custom queries, e.g. by using `{exp:query sql="` but that doesn't seem right?

To clarify why I am starting by looping through the "brands" channel: the markup for the page requires a lot of other information about the brand to be output by the template.

# Answer
You literally can use a {exp:channel:entries} loop inside of another one using template embeds. Here is an example:

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

    {categories}

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

    {/categories}

{/exp:channel:entries}

```

and then, you have a template group (you'll have to make it) called embeds with a my\_embed template with contents like this:

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

    Product Name - {title}
    etc...

{/exp:channel:entries}

```
> 0 votes

---
Tags: channel-entries
---


title: Page Always Redirects to Home

text:
# Question
Title: Page Always Redirects to Home
This is a basic general question, but my site always redirects to the home landing page even when I click the links it redirects. So thissite.com/link1 shows in the URL input, but the home page still shows.

# Answer
? You probably have a segment related issue; EE is probably expecting a {segment\_1} to look up channel entries from, and just defaults to something else. You might want to set your templates to require all segments. Can you post your template code and some more details? Are you using Structure or the Pages module??
> 0 votes

---
Tags: routing
---


title: Low events Calendar conditional

text:
# Question
Title: Low events Calendar conditional
Is there a conditional for {exp:low\_events:calendar} for passed days, so for example if the day is in the past add a class?

```
{if passed}class="passed"{/if}

```

# Answer
> 1 votes
jrothafer, you're thinking of Low Events, not Low Calendar (which doesn't exist). Should be no reason to bring Low Nice Date into things.

The `{if passed}` conditional is not supported in the low\_events:calendar tag. But you might be able to compose a conditional using the `{day_url}` and `{current_date}` variables.

# Answer
> 0 votes
Cheif, you should peruse your third-party vendors a little more carefully.

http://gotolow.com/addons/low-nice-date/docs

```
{exp:low_nice_date:range from="{date_one}" to="{date_two}"}
    {if days == 0}
        The two dates are on the same day
    {if:else}
        The two dates span {days} days
    {/if}
{/exp:low_nice_date:range}

```

That one is completely free, and since it's the same vendor, seems like it should be about 100% compatible with Low Events.

---
Tags: low-events
---


title: Menus in backend

text:
# Question
Title: Menus in backend
After having a 3rd party company upgrade us to 2.10.1, we have a couple nagging issues. A couple of the nav menus in the backend have items that are underscored descriptions, instead of menu items. Where do I fix that?

Same thing for the label for the user and password, when the system logs me out, its something like password\_label, instead of Enter Password.

Tried to Google this but only got results for front end UX.

# Answer
> 0 votes
This occurs because you are missing language files or they are corrupt. That language variable lives here:

```
/your_web_root/system/expressionengine/language/english/cp_lang.php

```

That file has an array of language variables. Look for that one, if it's missing, the file is probably corrupt and you should get a new copy of that entire directory and re-upload it. Before you do, though, **back up that folder**. Always back-up before modifying core files and directories, although those are just language files so it's not likely you will crash your site.

**Edit**

Oh, also, why are **you** fixing this? Your 3rd party company must be really awful if they aren't willing to look into this, especially since this is clearly their mistake.

---
Tags: ee2
---


# Question
Title: Default Value Radio Button and Form Question
I am new to EE and am faced with an issue on a clients site. They have two radio buttons that are in their code like this:

```
<script>
$('#shippingAdd').hide();
$("input[name=use_billing_info]:radio").change(function() {
    if ($(this).val() === 'y') {
        $('#shippingAdd').hide();
    } else {
        $('#shippingAdd').show();
    }
});
</script>

```

Is it possible to set the radio button to default to 'y' being selected? How do I change this? If setting a default value is not a viable option is it possible to change this to a pulldown menu?

I'm not sure exactly how the above code works. Any feedback/advice would be greatly appreciated.

Thanks in advance!

# Answer
I mean no offense, but if you don't understand the code you pasted, you should not be the person editing your clients code. It's extremely simple jQuery stuff. I'm serious; tell your client to hire a developer. You are doing them a disservice by trying to solve issues you aren't capable of solving. I'm sorry if that comes out harsh but as professional developer, this kind of activity makes me turn away clients all the time; shoddy work always means clients not returning to your business. This is also a developers forum which is why I gave you that speech; this isn't a help center or tutorial site for self-trained devs.

All of that said, I'm still going to help you. This code should be added just before the **end** of your `<body>` tag:

```
<script>
$(document).ready(function(){
    // when our document is ready, set that input to 'y'
    $("input[name=use_billing_info]:radio").val('y');
});
</script>

```
> -1 votes

---
Tags: forms
---


# Question
Title: Solspace Calendar displaying a list of events and their individual occurrences
I need to display each calendar and the related events. The events are reoccurring and I want the dates and times for each occurrence to appear under the event title. To save my life I can't figure it out. I don't have much experience with Calendar and I've already spend a crazy amount of time trying to figure this out. It has to be simple but no luck. Below is an example of what I'm needing to display.

# **Calendar Title**

## Event Title

- Day and Time
- Day and Time

## Event Title

- Day and Time
- Day and Time
- Day and Time

# **Calendar Two Title**

## Event Title

- Day and Time
- Day and Time

Each event has various days and times throughout a given week and I want to avoid displaying the event name over and over. I just need it to display cleaner.

# Answer
> 0 votes
> **VERY recommended initial reading** on Calendar tag use: https://solspace.com/docs/calendar/getting\_started/

If you're looking to display an event, then display all its occurrences, then move to the next event, display all its occurrences, etc, then you should try `{exp:calendar:events}` with either `{occurrences}...{/occurrences}` or `{exp:calendar:occurrences}...{/exp:calendar:occurrences}` inside the `{exp:calendar:events}` tag pair. Eg.

```
{exp:calendar:events /* your parameters */}
    <h2>{event_title}</h2>
    <p>This event happens on these days</p>
    {occurrences}
       {!-- Could use {exp:calendar:occurrences} as an alternative --}
       ... your occurrence code ...
    {/occurrences}
{/exp:calendar:events /* your parameters */}

```

> **Keep in mind that this does not create a chronological list of events**, since occurrences will be listed one event after another, and therefore will not overlap if they overlap over time. See the above link (and image) for some more detailed explanations why.

If you're looking for a **chronological listing of event occurrences**, in which event occurrences for each day, or on a specified day, are displayed chronologically, use `{exp:calendar:cal}`. This is the tag to use if you're looking for occurrences within a specific time frame. Eg.

```
<h2>Event occurrences on August 3rd, 2015</h2>
{exp:calendar:cal
   date_range_start="2015-08-03"
   date_range_end="2015-08-03"
   pad_short_weeks="n"}
    {event_title}: {event_start_date format="%Y-%m-%d %H:%i"} ~ {event_end_date format="%Y-%m-%d %H:%i"}<br />
{/exp:calendar:cal}

```

# Answer
> 0 votes
Perfect! I'm not sure what I was doing wrong before but this worked. Thought I had tried it but apparently without success. I read the documentation early on but evidently I had poor implementation. Thanks for the help. My issue was fixed within minutes.

---
Tags: solspace, calendar
---


# Question
Title: "Unable to initialize ExpressionEngine" when accessing CP URL
Experiencing some strangeness after deploying to Staging. I get this error when trying to access the EE CP:

> Unable to initialize ExpressionEngine. The EE core does not appear to be defined in your autoload file. For more information please contact technical support.

This only happens if I try to go to:

http://stagingurl.com/ee/

Where admin.php has been renamed inside an /ee/ folder as index.php

However, strangely,

http://stagingurl.com/ee/?S=0&D=cp&C=login

Works, allows me to log in. The site also works as expected in the front-end.

I'm not sure what's going on here and how to fix? And what happened?

I also happen to be using Focus Lab's Master Config. My local install is perfectly fine as well. Help! Don't want to break the site when it's ready to deploy LIVE.

EE v2.7.2 - Build Date: 20131008

# Answer
> 1 votes
For shits and giggles, have you tried renaming to anything else as a test? yourfunname.php? Is there some sort of htaccess conflict using index?

# Answer
> 0 votes
Same thing happened to me. A possibility is you didn't copy the config folder to the live version of your website. The routes.php file has some new code which is necessary to enter the control panel like you are used to.

---
Tags: error, login, admin.php
---


# Question
Title: freeform sending emails to control panel but not to my inbox
I am using freeform as a contact form, i have never had any problems with it before, when i submit an email from the developed form it returns as a submission in my freeform control panel, although the contact form submission is not reaching my inbox. Anyone any ideas why this is?

# Answer
> 3 votes
The following is partly taken from the Freeform troubleshooting guide, but here is a list of items to verify when email isn't being sent:

* Verify that your email address(es) is(are) correct.
* Check the **spam folder** of your email account
* Try sending email using the **Communicate Tool** in the CP? (CP =\> Tools =\> Communicate)
* Review your **template tag parameters** correctly (For example, the admin\_notify="" and admin\_notification\_template="" parameters)
* Make sure you're using the **parameters for Freeform/Freeform Pro 4.x** and not 3.x (when using Freeform/Freeform Pro 4.x)
* Make sure you're using the parameters for Freeform 3.x and not Freeform/Freeform Pro 4.x (when using Freeform 3.x)
* Make sure there aren’t **malformed form fields or parameters** with curly/fancy/typographic quotes instead of straight quotes. Eg  vs `"`.
* Try sending **email using EE's native contact or tell-a-friend form**. See the official EE documentation for details on using these forms.
* Check your **server logs** for any errors.
* Verify that you are getting **redirected correctly after form submission**. If you are not being redirected correctly, have a look at your EE settings and .htaccess file for redirection issues that might then affect email.

# Answer
> 1 votes
Use the parameters admin\_notify, admin\_notification\_template as well as notify\_admin="yes".

---
Tags: solspace-freeform
---


# Question
Title: Solspace User: submit name with registration
Can't find this anywhere, but can you let the user submit their first and last name when registering for membership using Solspace User?

# Answer
> 1 votes
I see in the doc where any custom field is support by using the short name. I didn't realize first and last was a custom field and thought it was standard. Must have been created when I install Social Login Pro.

---
Tags: solspace-user
---


# Question
Title: ee forum + Scaffold vs non-ee forum software
I am intending to have a separate section of a hugh(000's threads) discussion forum for my website but have a dilemma. Either I purchase/free download a non-ee reputable forum software such as 'ip.board review'/'phpbb', or to purchase EE Discussion Forum v3.x and improve it with devot-ee's 'Scaffold'.

Option 1: I should be needing with most/all of the advanced features of non-ee software mentioned but I will loose the smooth integration my ee-developed website. e.g. A member may have to logon to ee-developed website and forum separatly. This is not what I want to see.

Option 2(preferred): Stick with ee + devot-ee solution, this is a full integration of website and forum. But I worry the ee forum features will not be as competitive as a non-ee solution.

Please someone shine me some lights.

cheers donnie

# Answer
> 1 votes
It depends on your sites primary purpose. Either you have content that is supported by a forum to discuss the content or you have a forum that has some additional content to support the forum.

If the later then the forum is more important that the content and the functionality of the forum will be paramount. In that case the EE forum might not be the best option.

If the forum is there to support your content then the EE forum is plenty fine for doing the job and yes do use scaffold - it will make getting the forum looking right a whole lot easier.

Either way whatever forum set up you go for you will have a shed load of work to do to get it just right.

Best of luck.

---
Tags: forum
---


title: How to make the Rich Text area larger?

text:
# Question
Title: How to make the Rich Text area larger?
I'm using the standard EE 'Textarea (Rich Text)' field (on EE 2.10.1), but no matter what I put in the 'Textarea Rows' field, when viewing the field in the control panel it's only around 150 pixels tall.

I can of course drag the bottom right hand corner of the field to make it display more of its contents but it's a pain to have to do this each time.

Is this a known bug or is there a way to get this field to display deeper?

# Answer
Have you inspected the field using your developer console? Oh, and FYI, this isn't an EE question. Textarea rows constraint has **nothing to do** with styling, just how many rows are allowed to be typed.

Want a different height? You need to style it with CSS:

```
textarea {
    height: 666px;
    width: 999px;
}

```

Use this:

https://devot-ee.com/add-ons/cp-css-js

to add custom CSS to your Control Panel.
> 1 votes

---
Tags: custom-fields, fieldtype, fields, richtext
---


# Question
Title: How can I remove "thank you" page after login
I'm looking at the best way to remove the dreaded "thank you, you are now logged in" page after login.

I'm using Solspace User to manage user accounts and for registration.

I'm using the NSM Email Login to allow user's to login with their email address.

I've already tried to use Twomile Login Redirect to remove this screen but it won't work as we have MySQL in "strict" mode due a Solspace User requirement.

The only other thing I see is FreeMember but due to already using two other add ons I don't want to go and cause issues with those.

Does anyone have any ideas? Thanks.

# Answer
EDIT: Whoops, I see you are already aware of Freemember and don't want to use another add-on. I think that, or a custom add-on as jrothafer mentioned (still another add-on!) is the way to go. Or as Mark mentioned, you can style the system message templates. *CP \> Design \> Message Pages \> User Messages*

---

If you're open to installing an additional add-on, Freemember's login tag bypasses the interstitial "Thank you, you are now logged in" EE system message page.

Freemember also has lots of other useful features, including an improved forgot/reset password flow. You can use Freemember and Solspace User on the same install.
> 1 votes

# Answer
Buddy pal, probably your best option is to craft yourself an extension that does a redirect. I would use one of the top three hooks on this page:

https://ellislab.com/expressionengine/user-guide/development/extension\_hooks/module/member\_auth/index.html

I'll give you an example, but I'm not entirely sure if it will work (you do know how to make your own extensions, correct?):

Hook to this thing:

```
member_member_login_single($hook_data)

```

And have your extension method look something like this:

```
function my_extension($hook_data)
{
    // lets get out of here!
    ee()->functions->redirect('where/we/going');
}

```

It might not be that exact hook, but one of them should be triggered before the redirect to the "Thank you" page.
> 0 votes

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


# Question
Title: Unable to load site preferences - Error Message
I have been receiving a error message randomly on a expressionEngine site I created.

You can see teh errror message here http://cl.ly/image/2w1a061e0i0d

Any ideas on what could cause this error? I am running ee v2.5.3

# Answer
Since this is happening intermittently, I'd guess it's an issue with EE not being able to connect to the database server and not an EE specific issues.

The first place to start would be to contact your web host to see if they are having issues on their end. Record the date/time when you next see this error and have them check the mysql error logs to see if there is a specific error logged at the same time.

You might also take a look at the php error logs to see if anything is logged there that may be related.
> 2 votes

# Answer
That could point to a problem with your config.php file. Check that both your config.php and database.php files have 666 permissions.

```
system/expressionengine/config/config.php
system/expressionengine/config/database.php

```

Also check that your details in database.php are all correct as it may be having problems connecting to the database.

If they're both OK then the chances are that there's some problems with the database. At this point in your main index.php file turn on output debugging so we can see any PHP errors being reported by changing:

```
$debug = 0;

```

to:

```
$debug = 1;

```
> 0 votes

# Answer
If you changed your database access passcode (server, MySql admin, hosting company interface, etc.), you will need to change the original passcode in the database.php file.
> 0 votes

---
Tags: error
---


title: Search for Tags with Super Search

text:
# Question
Title: Search for Tags with Super Search
Is it possible to use Super Search keyword parameter to search for Tags? I have Super Search and Tags, and I'm trying to include a way to search for tags.

So if I had a tag called "space" and I search for Outer Space in the keyword field, I could get "space" as a Tag result.

# Answer
> 0 votes
Yes, you can search for Solspace Tags in the `keywords` field. From the documentation (https://solspace.com/docs/super\_search/search/#keywords):

> The keywords field allows your users to perform a search on across all entries on your site. By default, keyword searches look into all searchable custom fields and titles. Please make sure that each custom field is marked as searchable in the custom fields' settings in the EE CP. Search terms are inclusive (so all words searched on must be present in the entry to show up as a valid result), search on words within words (a search for cat could return caterpillar), **and also search into Solspace Tag add-on tags (if installed)**.

---
Tags: solspace, supersearch, tags
---


# Question
Title: Random channel entries won't open for member group
**OK**

Deets:

```
EE 2.9.2
Assets 2.5
Structure 3.3.17
Tag 4.2.9
Matrix 2.6.1
Playa 4.5.2.

```

Those should be the only possible relative ones.

I spent half my morning trying to figure this one out. I have a member group that has access to a particular channel that lives in Structure. For channel fields, we have this variety going on for this channel:

```
Text
Matrix
Playa
Relationships

```

There are about 10 channel entries in this channel. Now, a Super Admin account can open the entry\_form for all of these entries, and save channels entries, no problem. But the member group that is meant for editing these channel entries can **only** open some of the entries. About half of them pull a WSOD. I've gone through and compared working ones to non-working ones endlessly, and can't find a single consistent difference. Ex: Some have Wygwam fields with images in them, some don't, both varieties of entry work and don't work. Some have revisions turned on, some don't, both varieties of entry work and don't work. Some are authored by members of this member group, some are authored by our main content editor (whose member group has more privileges), both varieties of entry work and don't work.

After spending a painful amount of time comparing them, I moved on to the member group settings. Here's what I tried:

I created a temporary member group (duplicated from the one that I assumed was the issue). I then moved a member over to this temporary one, and then methodically went through the member group settings, and gradually escalated the groups privileges, until they were basically Super Admins, but to no avail. The main content editor is **not** a Super Admin, but she can view and edit all of the entries just fine.

Side note; we upgraded from 2.5.(3 or 5, can't remember) a few months ago, and I think this wasn't an issue before then.

At this point, I can only guess it's some setting related to individual entries, perhaps in the channel\_title rows, but I glanced them and didn't see anything out of order (I'll check again). Can anyone suggest any other debug paths? This one is maddening. Thanks.

**Edit**

I duplicated the Super Admin group as a test group, and that test member group **cannot** view the channel entries that aren't working for the original problem member group. What the hell is going on here? Some addon has a weird conditional hardcoded for Super Admin (aka member\_group == 1)? But yet another member group (main content editors member group) can also view and save all channels entries? WTF??

**Edit**

I have no new info, but this is still a persisting issue. I'm bumping it in hopes that a few other heavy-weights on this exchange can weigh in... I am very versed with digging through core files, but I'm at least looking for suggestions. I know I could turn on error logging and grep through it.. but the site in question is for a University that has 17 thousand students and probably several thousands employees and who knows how many interested potential students and employees.. so 10 seconds of that error/debug log can be 10's of thousands of lines and a pain to accurately grep. Hell, even if someone had a suggestion on what I'm looking for in the log files so I can craft a grep/regex to search the log...

**Edit**

Ok, I'm down to this error, popping on up on the test installation with debugging on:

```
Fatal error: Uncaught exception 'Exception' with message 'Assets could not complete the requested operation.' in /storage/av02422/www/public_html/test/control/expressionengine/third_party/assets/sources/ee/file.ee.php:43
Stack trace: #0 /storage/av02422/www/public_html/test/control/expressionengine/third_party/assets/sources/base_source.php(793): Assets_ee_file->__construct(66718, Object(Assets_ee_source), NULL)
#1 /storage/av02422/www/public_html/test/control/expressionengine/third_party/assets/libraries/Assets_lib.php(1048): Assets_base_source->get_file(66718)
#2 /storage/av02422/www/public_html/test/control/expressionengine/third_party/wygwam/helper.php(981): Assets_lib->get_file_by_id(Array)
#3 /storage/av02422/www/public_html/test/control/expressionengine/third_party/wygwam/ft.wygwam.php(540): Wygwam_helper::replace_asset_tags('<h3>Upcom...')
#4 /storage/av02422/www/public_html/test/control/expressionengine/fieldtypes/EE_Fieldtype.php(335): Wygwam_ft->display_field('<h3>Upcom...')
#5 [internal function]: in /storage/av02422/www/public_html/test/control/expressionengine/third_party/assets/sources/ee/file.ee.php on line 43

```

I tracked down the code, and it's throwing an exception where a cache variable is empty in `$this->EE->session->cache['assets']`. Then I tracked down the rows by var\_dumping and inserting die()'s ... the file in question hasn't been found yet (haven't grepped the folders yet), but based on it's file name it appears to be completely unrelated to the channel entry it's attached to (I'm working on one of several broken entries, others could have different issues).

I'm going to grep for the file name (err, i think `find` is better for this), and if I can't find it, remove those rows from the database in the test install. If that works, @Anna\_MediaGirl probably gets the prize for pushing me the right way.

**LAST EDIT**

F\***ing damnit. It was a malformed Wygwam field data cell. I just tried temporarily emptying and saving the Wygwam fields content, saving it, and pasting it back in, and now the trouble member group can open and edit the channel entry. WTF? Why do I even get paid? Thanks @Anna\_MediaGirl. You win all 100 tacos.

It turns out those Wygwam fields did have links to Assets files. That was somehow related.

# Answer
A white screen is 99% always a PHP error being suppressed.

Here's what I'd try.

---

FIRST, make sure this is set in your control panel's index.php or admin.php file to ensure you're seeing errors.

```
$debug = 1;

```

Also, set this in your config file just to be thorough:

```
$config['debug'] = '1';

```

NEXT, add this code to your config file and retest:

```
$config['allow_extensions'] = 'n';

```

If the error displays, it''ll point you in the right direction.

---

If no error, set the extensions back to being "enabled" and add this code to your config file and retest:

```
$config['disable_csrf_protection'] = 'y';

```

If you're able to get into the entries, then there is something inside the entry copy that EE is objecting to and you'll need to track down what that is. You can track it down by going into the database and manually removing the copy for each field specific to that entry and retesting. Once you find the field, you'll need to narrow down to the actual copy. I've had this happen with URLs that contain certain weird character combinations. EE doesn't run certain checks on SuperAdmin users which is why SuperAdmin can open the entries.

NOTE: Sometimes enabling debug isn't enough because an addon will turn off errors after the config file is loaded. Previously, I've had to edit the control panel's index.php or admin.php file to remove the conditional which shows/hides errors. I replaced it with the following code to show errors.

`error_reporting(E_ALL);`

Then I had to search all the EE files, including the 3rd party files, to find any other reference to errors display. Use the search term "error\_reporting" for the search.

If you're not seeing an error, I'd say confidently something in code is suppressing it. It's probably an addon.

---

If all else fails, search all the EE files for "group\_id" and "admin\_sess". You're looking for any conditionals for the member group "1". Look at each conditional and if you can find the one that is stopping your entries from loading.
> 0 votes

---
Tags: channel-entries, members
---


# Question
Title: Expreso Store - Don't show modifier price if zero
We're using Store 2.5.0 and EE 2.9.2. On the checkout page we're showing the value of any modifiers using:

```
{if price_mod_val}({price_mod}){/if}

```

It's returning the value of the modifiers ok, but it's also displaying +0.00 if the modifier is empty.

Is there a way to not show the modifier value if it's 0?

# Answer
I would say:

```
{if price_mod_val && price_mod_val != "+0.00"}({price_mod}){/if}

```
> 1 votes

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


title: Solspace Calendar ICS for single event

text:
# Question
Title: Solspace Calendar ICS for single event
Is it possible to have an .ics file to download a single event in a calendar? right now downloading the .ics downloads the entire calendar

```
{exp:calendar:icalendar
event_id="{segment_3}" dynamic="on"
{/exp:calendar:icalendar}

```

I figured something like the above would only export the one event using the dynamic on and event id but it downloads the entire calendar

# Answer
> 1 votes
Well..

https://solspace.com/docs/calendar/icalendar/

> All of the parameters listed in Calendar:Events are available for use here.

and then..

https://solspace.com/docs/calendar/events/#event\_id

Have you tried hard coding a known (and **open**) event\_id?

---
Tags: solspace
---