# Question
Title: Solspace User forgot_password return link broken
**EE 2.11.5**

**User 3.5.3**

Everything about my Reset Password chain of templates works, except for the return link in the forgot\_password form.

```
{exp:user:forgot_password
    secure_action="yes"
    secure_return="yes"
    secure_reset_link="yes"
    return="members/forgot-sent"
    password_reset_template="members/reset-password/%id%"
    password_reset_email_subject="Password Reset Request"
    password_reset_email_template="members/_password_reset_email_template"
}

```

After the form is submitted, instead of getting redirected to: **https://domain.com/members/forgot-sent**, I get redirected to: **https://domain.com/https://domain.com/members/forgot-sent**

Which brings me to a blank page with just the following error: *The URI you submitted is not allowed.*

I've tried adding a beginning slash and putting in the full URL in the return parameter, but no matter what, that return parameter is not working.

I go back to the email that was sent, click on the link to the reset page, and using the create new password form, everything works fine. I even have on my reset form a return parameter that DOES work fine.

```
{exp:user:reset_password
    reset_code="{segment_3}"
    return="members/login/success"
}

```

So only the return parameter on my forgot\_password template code is not working properly. Any ideas?

# Answer
> 1 votes
Ah, it's this parameter that's causing the issue.

```
secure_return="yes"

```

If I remove that from the forgot\_password form, then the form works and the return template I put in works properly.

---
Tags: solspace-user, forgot-password
---


# Question
Title: Try to set Low Search to match one Category and any from Group of Categories
I have two category groups. One is for *Towns* and the other is for *Designations*. Some *Designations* are state-related, some are national-related. So I've combined the categories that are state and the categories that are national into the value in checkboxes. I've put all *Towns* in a select. The *Designations* categories are in checkboxes and look like this:

`<input type="checkbox" class="checkbox" name="category[]" value="2336|2332|2335" selected>National Register
 <input type="checkbox" class="checkbox" name="category[]" value="2334|2337" selected>State Register`

and the *Town* categories look like this:

`<select name="category[]" id="ctm_city">
<option value="">-- Select option --</option>
<option value="2158">Andover</option>
 <option value="2159">Ansonia</option>
 <option value="2160">Ashford</option>
 <option value="2161">Avon</option>
</select>`

I'd like if a *Town* category is selected that it is required but the designation categories can be any of the categories listed in its value. But I've only been able to get results from any of the combined categories (meaning the results match the town or match any of the Designations). Or if I use:

`<input type="hidden" name="require_all[]" value="category">`

then the results are only what matches everything...which is almost nothing. So being that both *Towns* and *Designations* are all categories (but 2 different category groups) how would I match selection from one *Town* category AND any category included in the selected *Designation* category checkbox?

As a test I've tried the query string: `?category=2148&2334|2337` and I get a disallowed query string error.

# Answer
Since different parameters are always combined with `AND`, you can use a category group setup, with 2 different groups.

So, for example, for designations, use `category:designations[]`, and for town, use `category:town`. You can omit the `[]` in the latter, as you're only selecting a single category there.

That will generate a query string like `category:designations=2334|2337&category:town=2148`.
> 0 votes

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


# Question
Title: Simple Registration 1.6.1 compatible with and EE3.5.10?
Simple Registration displays error messages after installation

> Only variables should be assigned by reference
>
> user/addons/simple\_registration/libraries/ab/ab\_common.php, line 19

# Answer
Thanks for the report.

This was a PHP7 compatibility issue that has been fixed in 1.6.2. Please download the latest version.
> 0 votes

---
Tags: members, registration
---


# Question
Title: EE Store: Add csv file to order confirmation email
LS I would like to add a csv file to the order confirmation email containing fields from the order.

Like so:

Header: Type verzending ; Familienaam ; Adres 1 ;land ; Postcode ; Woonplaats ; Vooraanmeldingstype 1 ; Contactgegevens 1 ; Proactive rule 1 ; Pro-active taalinstelling 1

Rule: NCP,PRO;None;Test;NL;3145ER;Woerden;email;bvanzandvoort@gmail.com;1;NL

• Type verzending: always "NCP,PRO" • Familienaam: {shipping\_name} • Adres 1: {shipping\_address1} • Land: {shipping\_country} • Postcode: {shipping\_postcode} • Woonplaats {shipping\_city} • Vooraanmeldingstype 1: always "email" • Contactgegevens 1: {order\_email} • Proactive rule 1: always "1" • Pro-active taalinstelling 1 : always "NL"

Is there anyway to add this as CSV file (or txt) as an attachment to the confirmation email?

# Answer
I think it would be easier to include a link to a CSV file rather than attach it.

All you have to do is create a template that generates the CSV and in your email, you set a link to that template that contains the order ID number. Then the template pulls that order info and generates a CSV that you can force to download. I've not used expresso-store but if the data is stored in EE you can do this. I know you can do it with CartThrob.

to generate the CSV you can use http\_header component then you template looks something like this:

> {exp:http\_header content\_disposition="attachment" content\_type="text/csv" filename="{current\_time format="%y\_%m\_%d"}-members.csv"}ID,Status,Last name,First name,Email,Last Payment,Join Date {exp:user:users orderby="total\_entries" sort="desc" dynamic\_parameters="no" limit="500" }{member\_id},{if group\_id == 4}Pending,{/if}{if group\_id == 6}BO Member,{/if}{if group\_id == 7}Expired,{/if}{if group\_id == 8}Content Admin,{/if}{if group\_id == 9}Order Admin,{/if}{if group\_id == 1}Admin,{/if}{if group\_id == 5}Expired,{/if}{if group\_id == 10}Member Admin,{/if}{last\_name},{first\_name},{email},{payment},{join\_date format="%m/%d/%y"} {/exp:user:users}
> 1 votes

---
Tags: expresso-store
---


# Question
Title: Remove inline CSS and size attributes from user-inputted iframe?
I have a channel field that prompts a content editor to copy and paste a Google maps embed code for a specific destination. Using either default EE tag behavior, or jQuery, I'd like to remove certain attributes from the default `<iframe>` markup-- specifically, the "height", "width" and "style" attributes that Google includes by default in the embed code.

I'm not sure if there's a way to do this via EE, but I tried the following line of jQuery to at least remove the `style` attribute to no avail:

```
 $('div.item iframe').removeAttr('style');

```

Anybody have any ideas as to how I might achieve this? I'm currently overriding the attributes via my stylesheet using `important!` declarations, but I'd prefer to remove them from the markup entirely, if possible.

Thanks for any insight here.

# Answer
> 2 votes
You aren't able to edit an iframe's content, true. But the iframe's itself still belongs to your page, and you can edit the attributes. I just tested and was able to do something similar to:

`var i = $('div.item iframe');
// Did the selector work?
console.log(i.length);
i.removeAttr('width');
i.removeAttr('height');`

That being said, using `!important` in this situation is not bad. If you're worried about CSS maintenance, leave a comment that the `!important` is overriding the element's attributes. `!important` is often demonized, but in this case it is a valid use to increase the specificity of your CSS.

The advantage of doing it in CSS is that it will apply before your JavaScript is loaded, so you won't get a split second of those attributes and styles applying before the JavaScript removes the styles.

# Answer
> 0 votes
I am unable to test it right now but I don't think you'll have much luck here. Because the iFrame is essentially a different site you will not be able to use Javascript to manipulate its content due to cross domain issues.

Basically you cannot easily and reliably manipulate a page from domain B using Javascript from domain A.

I don't know if it will fit your exact application but you may want to look at something like Google Maps for ExpressionEngine. This would allow your users to create a map directly on your site rather than pasting in code.

Because the map would be generated on your site you can then use Google Maps styling options to make it look however you wish.

# Answer
> 0 votes
The only way to do it is server-side. You will need to create a custom extension, that will take user's submission for this field and convert it to the form that you like, using regular expressions and some PHP coding.

# Answer
> -1 votes
if You want to add Google Map Width also after remove attribute width, google map will response well.

See the code -

var i = $('div.item iframe'); i.removeAttr('width'); i.css('width','100%');

Thankyou!!!

---
Tags: channel-entries, jquery, css
---


# Question
Title: PHP error when uploading images using DevDemon Channel Images
I'm getting the following error when trying to upload images to my site using DevDemon's Channel Images (v5.4.18):

> Server response was not as expected, probably a PHP error. OPEN ERROR

Clicking on the OPEN ERROR link presents me with a blank white screen.

I'm running EE 2.9.0 and also have the Expresso fieldtype installed (v3.3.3). However, the Channel Images field is listed before the Expresso one, when editing my Entry. I noticed some other posts had found that to be a solution in the past.

# Answer
I had created a CI field, and the first Size/Action I created was Watermark (Image). I then added a Resize (Adaptive) action to this.

Uploading an image brought up this error.

I then removed the Watermark action, saved, then tried uploading again. Worked. Re-added the watermark Image (using path images/layout/mywatermark.png), saved, then tried uploading. This time it worked.

So anyone that sees this error, (using Watermark) try removing/saving/re-adding the action.
> 1 votes

---
Tags: expresso, php-errors, channel-images, devdemon
---


# Question
Title: Cartthrob php waring Illegal string offset 'onclick' in ft.cartthrob_matrix.php?
Started seeing this after server upgrade to php 7.1.6

I have CT 3.1 installed.

Any Ideas?

# Answer
Ok just in case anybody hits this issue, I'm pretty sure that it has something to do with the php version. The server that had this was recently upgraded to 7.1.6. Switching back to 5.x made the warning go away.

A kind person over at StackOverflow found a fix.

https://stackoverflow.com/questions/45204089/illegal-string-offset-with-php-7-1-6/45205713#45205713
> 2 votes

---
Tags: cartthrob
---


title: Anything like Freemember for EE3?

text:
# Question
Title: Anything like Freemember for EE3?
Or some other means of bypassing the 'thank you, you're logged in' message pages on login/redirect?

# Answer
> 0 votes
You should be able to do something similar with Visitor (https://devot-ee.com/add-ons/visitor) but it's a little more kitchen sink thank Freemember was.

---
Tags: redirects, freemember
---


# Question
Title: "the temporary folder is missing" file upload error
All of a sudden I've started getting an error message when I try to upload anything. EE just says "The temporary folder is missing."

I've talked with the host, and they've verified that the d:\temp folder exists and is writable.

Has anyone else seen this or have any advice on how to fix it?

Porter.

# Answer
That's on a windows machine. You have to make double sure php and apache are also aware of the location of the temp folder.
> 0 votes

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


# Question
Title: DevDemon Channel Videos searches return "The vimeo request failed!"
Trying to add vimeo videos in a channel entry and all attempts return "The vimeo request failed!"

EE 2.11.9 and CV 3.2.0

What I have tried: \- search with or without kewords \- search with or without author \- enter vimeo's Video URL

Don't see anything in the logs.

# Answer
> 1 votes
(I'm with Vector, the people behind DevDemon)

This problem is due to Vimeo changing their API which requires some changes to Channel Video's integration.

We updated Channel Videos for EE3 for this API Change back in February and as of August 2nd 2017 have updated the EE2 version as well. Download and install Channel Videos 3.3 for a fix.

# Answer
> 0 votes
How can we fix this error if using EE 2.11? Now all of us want or have upgraded to EE3.

---
Tags: devdemon, channel-videos
---


# Question
Title: Datagrab import entries - delete entries that do not match
I have a client site where they have a large list of members. Each month, the list of active members changes based on offline transactions.

Initially, I used Datagrab to add these members, but as each month arrives, the client wants to delete all members that are not in their CSV file of active members.

Clearly, this isn't EE or Datagrab standard practice, but I was hoping someone could shed some light on a way to tackle this that wouldn't require dumping the entire list and importing from scratch. While a complete purge would be the easy solution, the members that need to stay already have had their passwords set manually and would require even more manual client work.

TIA for any help!

# Answer
I seem to recall a similar issue a long time ago. The system was automated so we generated a Cron job to set all entries to 'closed' prior to import. Then when the import ran we set the status to 'open'.

Entries that didn't exist then remained closed.

If your doing it manually, you could run a MySQL query manually then run your import thereafter.
> 0 votes

---
Tags: members, ee, datagrab
---


# Question
Title: Freeform Next - Field validation options
Is there a way to control the validation options for fields in **Freeform Next** forms?

The default processing for email fields, for example, appears to simply be a check that somewhere within the string there is an @ symbol.

HTML5 field checking is more powerful - but the documentation does not appear to discuss how to enable alternative validation methods.

Is this possible?

# Answer
> 1 votes
Freeform Next 1.0.4 fixes the bug where email validation was not complete. :) https://solspace.com/expressionengine/freeform/docs/changelog/

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


title: View private content with access code?

text:
# Question
Title: View private content with access code?
I'm working on an ExpressionEngine-based site in which the client would like to restrict the download of a file to those with one of a set of access codes, and given my limited familiarity with EE and its base of add-ons, I thought I'd ask here and see if anyone has any suggestions? In essence, the goal is very simple— allow for entry of an access code on a certain page, and reveal a download link to anyone with a valid code. No need for the user to create an account, membership, etc. Ideally, we'd be able to create multiple codes, and track the number of uses for each code (e.g. "access code 20202 has been used 15 times")

I'm open to any suggestions, either via native EE functionality, add-on or anything else that might work with the EE platform. Thanks in advance for any ideas here!

# Answer
Have done similar and ended up using channel entries to control the access to the file/page then the excellent module File Vault by masuga to obfuscate the actual files url so users cannot share with others.

On the landing page we verify, say {segment\_3} to a valid channel entry (could be entries id or a text field within the entry). If there is a valid entry ie. not closed or no entry exists with the particular 'code' then display the obfuscated link.

The Vault module has tracking to view downloads or you can place a Google tag/tracking o the page to record specific segment in analytics.

That's about it. You can forego the module if your cool with others maybe sharing URL.
> 2 votes

# Answer
Protected Links from Yuri is a very good and efficient add-on to.hide and secure your links.

https://devot-ee.com/add-ons/protected-links
> 1 votes

---
Tags: add-on, password
---


title: convert rte field to wyvern

text:
# Question
Title: convert rte field to wyvern
I have a live site with a Rich Text Editor field. The RTE field is really not allowing them to accomplish what I need them to be able to. specifically linking to files. So I have decided to use wyvern instead. In the past in EE2 I had changed fields from RTE or textarea to wygwam with no issue. In this case I have installed wyvern and created a test field just to make sure all was working well. When I go back to the main field to change the type from RTE to Wyvern wyvern is not listed as an option. In fact the options are very limited (email address, text input, textarea, URL)

Does anyone know why wyvern wouldn't be listed as an option or why the options are so limited? I really dont want to have to migrate all the data to a new field as I would have to copy paste everything and then go change the field name in all the templates.

# Answer
> 1 votes
After much searching I found out this is not just Wyvern but an issue or design feature in EE3. Developers need to add what their fieldtype compatibility is but not all of them have. This post describes the same issue with wygwam. https://expressionengine.com/support/bugs/21302/field-type-not-changeable-after-creation You can follow the same instructions and change the fieldtype to wyvern.

As with anything backup your database first in case their are unintended consequences.

---
Tags: richtext, wyvern
---


# Question
Title: How to output a relationship field within a grid field?
This pdf contains my question with screenshots: http://swmc.online/speakername.pdf

I am building a very simple conference website. Each year there is a conference. Each conference contains different speakers.

I have a **speakers** channel. I have a **conferences** channel.

The conferences channel contains a field group named **conferences**

The conferences field group contains a grid named: **teachings**

The grid contains a relationship field named: **speaker**

When adding conferences I select the **speaker** from the relationship field

I want the selected speaker’s name to appear in the conference listing page http://swmc.online/index.php/home/speakername

How can I pull the two fields **{first\_name}** **{last\_name}** from the **speakers** channel field group named **speakers** within the Conferences tag pair?

# Answer
Try this: `{teachings:speaker}
 {teachings:speaker:first_name}
 {teachings:speaker:last_name}
 {/teachings:speaker}`
> 0 votes

---
Tags: relationships, grid
---


# Question
Title: Custom add-on accessing method from another custom add-on …
I've got a custom add-on/extension that extends the `Store` module by tapping into the `store_order_complete_end` hook to save details of an order to an XML file stored on the server.

I want to access this method from within another plugin. How best to achieve this? In Craft CMS I would abstract this method in my first plugin into a service that could then be called by another add-on. However, my EE is a bit rusty and not sure how best to achieve this in EE (EE2).

Thoughts appreciated.

Cole

# Answer
> 2 votes
I agree with the advice provided by Brian in EECMS Slack. You can do this:

```
require_once PATH_THIRD . 'your_addon/somefile.php'
$someFile = new SomeFile();
$someFile->method();

```

---
Tags: expresso-store, add-on-development, extension, hook
---


title: too many redirects EE 2.5.4

text:
# Question
Title: too many redirects EE 2.5.4
I have moved the site www.webawards.com.au and followed the information in regards to moving the existing site to a new server. I have a problem with too many 302 redirects and the hosting company says it is not them. I have a modified HBP5 .htaccess file. I have commented out different sections of the rewrite engine rules and tested these to no avail. here is the code I have used for the rewrites.

```
<IfModule mod_rewrite.c>

# (1)
RewriteEngine On

# (2)
Options +FollowSymlinks

# (3)
# Options +SymLinksIfOwnerMatch

# (4)
RewriteBase /

# (5)
# RewriteOptions <options>

# (6)
RewriteCond %{HTTPS} =on
RewriteRule ^ - [env=proto:https]
RewriteCond %{HTTPS} !=on
RewriteRule ^ - [env=proto:http]

</IfModule>

# Option 2: rewrite example.com → www.example.com
#
# Be aware that the following might not be a good idea if you use "real"
# subdomains for certain parts of your website.

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{HTTPS} =on
    RewriteCond %{HTTP_HOST} !^www\. [NC]
    RewriteCond %{SERVER_ADDR} !=127.0.0.1
    RewriteCond %{SERVER_ADDR} !=::1
   RewriteRule ^ %{ENV:PROTO}://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
</IfModule>
# ----------------------------------------------------------------------
# | Forcing `https://`                                                 |
# ----------------------------------------------------------------------

# Redirect from the `http://` to the `https://` version of the URL.
# https://wiki.apache.org/httpd/RewriteHTTPToHTTPS

<IfModule mod_rewrite.c>
   RewriteEngine On
   RewriteCond %{HTTPS} !=on
   RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]
</IfModule>

```

Is there anything in the version of EE I am using that would cause the redirects. I am at a loss as to what it can be. It happens when ever I save or submit a change via control panel and it is also happening to people who are entering the awards and saving their entries.

Any help would be appreciated.

# Answer
Take it back to basics *note* I'm no htaccess guru, heres my personal https file

```
<IfModule mod_rewrite.c>
  Options +FollowSymlinks
  RewriteEngine On
</IfModule>

# Option 1:
# Rewrite "www.domain.com -> domain.com"

<IfModule mod_rewrite.c>
  RewriteCond %{HTTPS} !=on
  RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
  RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
</IfModule>

<IfModule mod_rewrite.c>
        RewriteEngine On
        RewriteBase /

        # 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>

```
> 0 votes

---
Tags: htaccess, redirects, .htaccess
---


# Question
Title: Input Radio buttons are processed in Cartthrob only according to their position
I have a big doubt about Carttrob.

**Here a simple form code:**

```
 {exp:cartthrob:add_to_cart_form    allow_user_price="yes" return="{template_group}/view_cart"}

                    <input name="price" autocomplete="false"
                          type="number"placeholder="" />

                        <label for="15">15</label>
                        <input type="radio" name="price" value="15" id="15"/>

                        <label for="30">30</label>
                        <input  type="radio" name="price" value="30" id="30"/>

                        <label for="45">45</label>
                        <input  type="radio" name="price" value="45" id="45"/>

                <label class="clear">
                    <textarea placeholder="None" name="item_options[donation_note]" ></textarea>
                </label>
                <button type="submit" class="button">Add to Cart</button>

    {/exp:cartthrob:add_to_cart_form}

```

if  **is placed before** the **radio buttons** block code `<input type="radio" name="price" value="x" id="x"/>`

**it works fine**, because in the **In the mysite/donate/view\_cart** page, appears:

but if  is **placed after the block code** `<input type="radio" name="price" value="x" id="x"/>`

here the simple form code **modified**, the **input type number is placed after**.

```
 {exp:cartthrob:add_to_cart_form    allow_user_price="yes" return="{template_group}/view_cart"}

                            <label for="15">15</label>
                            <input type="radio" name="price" value="15" id="15"/>

                            <label for="30">30</label>
                            <input  type="radio" name="price" value="30" id="30"/>

                            <label for="45">45</label>
                            <input  type="radio" name="price" value="45" id="45"/>

                        <input name="price" autocomplete="false"
                              type="number"placeholder="" />

                    <label class="clear">
                        <textarea placeholder="None" name="item_options[donation_note]" ></textarea>
                    </label>
                    <button type="submit" class="button">Add to Cart</button>

        {/exp:cartthrob:add_to_cart_form}

```

The `<input type="radio" name="price" value="x" id="x"/>` buttons **are not processed**, In the **mysite/donate/view\_cart** appears:

So the **input radio buttons are not processed** if they are placed before the **input type="number**. It appears **R$0.00**. Only the **input type="number** is processed, **the radio buttons not**.

Why the **radio buttons** are **processed** only if they are **placed after the** **input type="number** ? A process priority problem ?

# Answer
Perhaps is not the better solution, but thanks to the **Source Ordering** (from the Zurb Foundation framework) the order columns could be shifted.

```
                <fieldset class="small-8 small-push-4 columns">
                                    <input name="price" class="" style="width: 9rem; margin-bottom: 0;"
                                           onkeypress="return isNumeric(event)"
                                           oninput="maxLengthCheck(this)"
                                           autocomplete="false"
                                           placeholder = "Livre"
                                           type = "number"
                                           min = "1"
                                           max = "9999999" />
                                </fieldset>

                    <fieldset id="defined_price" class="small-4 small-pull-8 columns">
                                    <!--<label for="doar_{valor_1}">{valor_1}</label>-->
                                    <input name="price"  type="radio" value="{valor_1}" id="{valor_1}" id="doar_{valor_1}"><label for="{valor_1}">{valor_1}</label>
                                    <input name="price" type="radio"  value="{valor_2}" id="{valor_2}" id="doar_{valor_2}"><label for="{valor_2}">{valor_2}</label>
                                    <input name="price" type="radio"  value="{valor_3}" id="{valor_3}" id="doar_{valor_3}"><label for="{valor_3}">{valor_3}</label>
                    </fieldset>

```

The two display fieldsets are inverted, so the **input type="number"** is placed before the **radio input**, but thanks to the Zurb Foundation Grid css command.
> 0 votes

---
Tags: cartthrob, forms
---


title: Blog posts - subscribe? Pin to top?

text:
# Question
Title: Blog posts - subscribe? Pin to top?
Is it possible for visitors to subscribe to categories on the EE blog, so they receive email notifications whenever a new blog is posted?

Also, it is possible to "pin" a blog post at the top of either the blog homepage and/or the blog category homepage, so it always shows up at the top of the page?

Thank you!

# Answer
Use the "Make Sticky" checkbox under "Options". That will promote any entry to the top of the list in a Channel Entries loop.
> 0 votes

---
Tags: ee
---


# Question
Title: DevDemon Channel Videos searches return “The vimeo request failed!” after Update to 3.3
I didn't have enough reputation points to simply respond to the answers on the other post dealing with this. I can confirm that I have updated to Channel Videos 3.3 which was released Aug 2, 2017. However, I am still receiving “The vimeo request failed!”. I am completely green when it comes to Expression Engine, though I have quite a bit of experience with PHP itself, as well as other CMS's. My main priority was to migrate this aging EE2 system to an Azure-Hosted VM before beginning the migration away from EE2. This one piece (Channel Videos) seems to be the only component not working. Any help you can offer would be greatly appreciated.

I am running EE v2.11.6 on PHP v5.6.31

Thank you.

**Additional Info**

After digging in a little bit, I find line 379 in `/themes/channel_videos/js/pbf.js`

```
function vimeoSubmitUrl ...

$.ajax({
 url: 'https://api.vimeo.com/videos/' + id,,
 headers: {"Authorization": "Bearer " + ChannelVideos.VIMEO_ACCESS_TOKEN},
 success: function(video_info) {
   if (typeof video_info.name == 'undefined') {
      loading.hide();
      inner.html("<p>The vimeo request failed!</p>");
      return;
   }
   ...

```

However, even though this simple ajax request should be all that is necessary to return the video name, when I look at Chrome Dev Tools, I'm seeing a GET request that looks like this:

`https://vimeo.com/api/rest/v2?format=jsonp&full_response=1&method=vimeo.videos.getInfo&oauth_consumer_key=someconsumerkey&oauth_nonce=somenonce&oauth_signature=somesignature&oauth_signature_method=HMAC-SHA1&oauth_timestamp=sometimestamp6&video_id=1234343`

Is this correct?

# Answer
> 1 votes
I figured it out. It seems like the fix for the API issue occurs entirely in the js, so my js file was not updated correctly due to a configuration variable pointing to the wrong directory.

---
Tags: devdemon, channel-videos
---


# Question
Title: PHP/AJAX Error from DevDemon Campaigns When Posting to Facebook
I'm getting the following error when I try to post to one of my Facebook pages from Campaigns:

> A PHP Error was encountered
>
> Severity: Notice
>
> Message: Trying to get property of non-object
>
> Filename: services/service.isgd.php
>
> Line Number: 53
>
> {"success":true,"errorMsg":"","errors":\> \[{"box\_id":2,"campaign\_order":1,"error":"shortenUrl(): "},\> {"box\_id":2,"campaign\_order":1,"error":"shortenUrl(): "}\],"campaignId":""}

Does anyone know of a way to resolve this? I am running EE 2.11.2, and Campaigns 2.2.0

# Answer
This is due to Facebook API changes. The patch supplied by Vector Media for this is as follows

system/expressionengine/third\_party/campaigns/services/service.facebook.php, line 90. Replace:

```
$html .= '<a href="'.$res->link.'" target="_blank">View Profile</a>';

```

With this:

```
$html .= '<a href="'.@$res->link.'" target="_blank">View Profile</a>';

```

And system/expressionengine/third\_party/campaigns/views/status/facebook.php, lines 19 and 20. Replace:

```
        <strong>From Account: </strong> <a href="https://www.facebook.com/<?=$fbData->from->id?>" target="_blank"><?=$fbData->from->name?></a><br>
        <strong>Link: </strong> <a href="https://www.facebook.com/<?=$fbData->id?>" target="_blank">https://www.facebook.com/<?=$fbData->id?></a><br>

```

With this:

```
        <strong>From Account: </strong> <a href="https://www.facebook.com/<?=@$fbData->from->id?>" target="_blank"><?=@$fbData->from->name?></a><br>
        <strong>Link: </strong> <a href="https://www.facebook.com/<?=@$fbData->id?>" target="_blank">https://www.facebook.com/<?=@$fbData->id?></a><br>

```
> 1 votes

---
Tags: ajax, php-errors, devdemon-campaigns
---


title: switchee syntax error: {exp:switchee}

text:
# Question
Title: switchee syntax error: {exp:switchee}
I am getting a syntax error when trying to set-up switchee on a new ee site. I am in 3.5.10 and I am using switchee v. 3.0. This is the first time using it in 3.x have used it several time on two ee 2.x site with out a problem. Not sure what is going on. Here is the code:

```
{exp:switchee variable="{segment_2}" parse="inward"}
{case value=""}
    {embed="includes/.page-content-landing"}
{/case}

{case default="yes"}
    {embed="includes/.page-content-detail"}
{/case}
{/exp:switchee}

```

Thanks...

# Answer
> 0 votes
If you are only choosing between two values, I'd replace `{switchee}` with a simple `{if}` statement - and perhaps save on an addon. `{switchee}` was a particular solution to a weakness in pre-2.9 versions of EE, and now really only useful if you value the syntax options it provides.

So I'd try something like this:

```
{if segment_2 == ""}
    {embed="includes/.page-content-landing"}
{if:else}
    {embed="includes/.page-content-detail"}
{/if}

```

Also, if your use of `embed` is simply to drop in template code (which seems likely as you are not passing any embed variables) you might also want to consider replacing them with layout variables.

HTH

# Answer
> 0 votes
I did not have it installed correctly.

---
Tags: switchee
---


# Question
Title: Problems with Visitor 3.01 and The update form tag
On a simple page with no embeds, the registration tag works well and the form is displayed on the webpage:

```
  {exp:visitor:registration_form error_handling="inline" return='conta'}

                Email*: <input id="email" name="email" type="text" value="" />
                {error:email}

                Password*: <input id="password" name="membro_senha" type="password" value="" />
                {error:password}

                Confirm password*: <input id="password_confirm" name="membro_senha" type="password" value="" />

                Member firstname: <input id="mbr_membro_nome" name="mbr_membro_nome" type="text" value="" />
                {error:mbr_membro_nome}

                Member lastname: <input id="mbr_membro_sobrenome" name="mbr_membro_sobrenome" type="text" value="" />
                {error:mbr_membro_sobrenome}

                Gender (radiobuttons): {options:membro_sexo} <input id="membro_sexo" name="membro_sexo" type="radio" value="{option_value}" />{option_value} {/options:membro_sexo}

                Birthday (datepicker): <input id="membro_aniversario" maxlength="23" name="membro_aniversario" size="25" type="date" value="" />

                <input class="form-submit" type="submit" value="Register" />

    {/exp:visitor:registration_form}

```

But there is a problem with the **update form tag**, **nothings is displayed**, **a blank page** is displayed with absolutely no code, it seems EE doesn't recognise this tag:

```
{exp:visitor:update_form return='account/update_profile/success'}
        Member firstname: <input id="member_firstname" name="member_firstname" type="text" value="" />
        Member lastname: <input id="member_lastname" name="member_lastname" type="text" value="" />
        Gender (radiobuttons): {options:member_gender} <input id="member_gender" name="member_gender" type="radio" value="{option_value}" />{option_value} {/options:member_gender}
        Birthday (datepicker): <input id="member_birthday" maxlength="23" name="member_birthday" size="25" type="text" value="" />
        <input class="form-submit" type="submit" value="Update profile" />
{/exp:visitor:update_form}

```

Did-someone has already encountered this problem? I tried under PHP 5.6, PHP 7.0, 7.1, the problem still the same. I tested on Wamp 3.0.9 on Windows 10, and on and on a physical Apache server. On local with wamp and in the Apache server, the exp:visitor:update\_form doesn't work at all. I tried with EE 3.5.10 and EE 3.5.7.

What could be the problem ??? My Visitor 3.0.1 installation is ok.

If Someone encountered the same problem, I will relate it to DevDemon.

# Answer
Thanks to the Romans-8---31-39 comment's, I discovered when i am logged as admin, exp:visitor:update\_form is not processed, logged as member it is processed, so the the problem is solved!
> 2 votes

---
Tags: forms, update, visitor
---


title: Stash Index and Low Replace

text:
# Question
Title: Stash Index and Low Replace
I am trying to put a multiple choice filter into a stash index and running into some issues. From the debug output it would appear that its a parse order issue as the debug match statement shows my low replace text instead of the filtered text. How can I set a stash list and use low replace on one of the variable inside the list? Low replace seems to work in a stash list when setting the variable but not in the index. Help is appreciated.

**edit, premature comment below. This isn't fixed.** EE 2.52 and here is my set list and index

`{exp:stash:set_list name="event_result_list" parse_tags="yes" parse_depth="3" parse_conditionals="yes"}
 {exp:calendar:cal enable="custom_fields" calendar_name="events" pad_short_weeks="n" parse="inward" date_range_start="{exp:stash:get name='event-from' parse='inward' dynamic='yes'}" date_range_end="{exp:stash:get name='event-from' parse='inward' dynamic='yes'}" paginate="bottom"}{display_each_day}{events}` `{event_parent disable="" var_prefix="loc"}
 {exp:channel:entries entry_id="{loc:entry_id}" channel="events" sort="asc" orderby="event_start" dynamic="off" parse="inward"}` `{stash:index}{loc:event_eat_type}/,{loc:event_destination},/@{loc:categories show="not 205|213|225"}{category_name}@{/loc:categories}{/stash:index}`

and here is my get list

`{exp:stash:get_list name="event_result_list" match="#^({embed:search_type})/.*,{embed:search_destination},/.*@{embed:search_cat}@#" against="index" paginate="bottom" limit="10" parse="inward" orderby="item_title"}`

the embed:search\_destination is what I am having a problem with. If I put the .\* in front I get matches where there is a single entry in the set list or a match if the secondary option matches ex if I was searching for 'option1' it would get a match if my index is set with ,option1, or if its set with ,option2,option1, But it won't match for ,option1,option2,

If I remove the .\* it matches for the first option only. Clearly I am missing something. This was my secondary option to trying to use low\_replace. The low replace option looked like this

`{stash:index}{loc:event_eat_type}/@{exp:low_replace find="," replace="@" multiple="yes"}{loc:event_destination}{/exp:low_replace}@/@{loc:categories show="not 205|213|225"}{category_name}@{/loc:categories}{/stash:index}`

With that low replace seemed to be falling behind in the parse order and that is literally what would end up in the index.

Help is appreciated and apologies for the confusion. Any more information I can provide let me know.

**secondary edit, stash seems to not want to let me use 2 categories index fields. If I remove either embed:event\_destination or embed:event\_search\_cat it works. Still need help and thanks.**

**edit 3** I appreciate you looking at this. stash sets the list, then I build the list using expressionengine calendar from solspace. In that channel there is a playa field that I then loop through to get other fields prefixed with loc:

Basically I have 2 channels and I have them linked together using playa. I need to apply filters dynamically to both the channels. For that reason I am building it out and pumping to stash and then filtering my stash dataset. Thanks again for the help.

# Answer
> 0 votes
It's a complicated scenario... Without refactoring everything, I would take a step back and test the output the individual variables you're setting in set\_list within the index tag and making sure it's what's expected. Either output to page, or save the list and check the db or Mustash if you're using it.

Then test the get\_list by hardcoding the regex match parameter with some of those index test results.

---
Tags: stash, low-replace, index
---


# Question
Title: Solspace Reset Password Error 'The code number you submitted was not found in the database'
I am using Solpaces User module (v4.0.9) on a recent EE build (v3.5.10) and the reset password feature is throwing up the following error:

**The code number you submitted was not found in the database.**

This message appears on a system message page and I'm struggling to figure out why this is happening. Everything works quite smoothly up until that point. The reset email comes through and the link takes me to the right place. Its only when I type in my new password and confirm it do I get this error.

Can anybody shed any light on why it might be doing this?

Thanks

# Answer
> 0 votes
What you should do is install and check out the Demo Templates that come included with User. Doing so will let you see a correct usage of the User template tags and possibly help you track down where there might be an issue with your own templates. We would otherwise need to see your template code and get more information before we're able to help. :)

---
Tags: error, solspace-user, forgot-password
---


title: Plugin function not working

text:
# Question
Title: Plugin function not working
I've created a plugin for a client that has two methods, the first of which is called from within the home template:

```
{exp:kapitex:get_products_carousel products="111, 113, 38"}

```

... which creates a carousel based on 3 entries, one of Google's structured data types, which you'll see if you visit the website, view source, and do a search for: "ItemList".

while the second *should* create a breadcrumb element, and is placed in the products template:

```
{exp:kapitex:get_products_breadcrumb product="{entry_id}"}

```

During testing, the `{entry_id}` sent the correct value, as did sending a raw value (which is to be expected). However, because I'm having problems with the ".htaccess" file with the local development machine, I wasn't able to test the method within the products template, and instead had to use the home template.

We've published the plugin on the client website and the `get_products_breadcrumb` appears not to get called.

I replaced the code with:

```
public function get_products_breadcrumb () {
    echo "XXXXXXXX";
}

```

... cleared the caches and still nothing, so it's not the code in the method.

Any ideas what I've done wrong?

# Answer
> 0 votes
Have you tried `return "XXXXXXX";` Instead of "echo"?

---
Tags: plugin, tags
---


# Question
Title: Does Expresso Store 2.5.1 work with PHP7?
I see another question like this was asked but really no answer was given for the 2.5.1 version. Will it work with PHP 7? I know there is a new Store 3 version, but I can't upgrade to EE3 due to several other missing add-ons for v3 compatibility.

# Answer
> 1 votes
(I'm with Vector; we own Expresso Store)

Official support for PHP 7 in Store was launched with Expresso Store 3. Store 2 could probably work with PHP 7 but that might require some changes to its code and isn't something we're planning on checking for. You can make those changes yourself, or commissions us to do it if it's critical for you and you're unable to upgrade ExpressionEngine for other reasons!

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


# Question
Title: Deleted Template Variables (created via Low Variables) keep reappearing
http://recordit.co/R8eImfvLyP

EE3 with Low Variables installed. I created a bunch of variables in both EE and Low Variables only to try to remove them. They are showing in the Template Variable area and Low Variables. When I delete them via the CP, or files they reappear and the files are recreated.

I've tried uninstalling the plugin and removing files, to removing files and uninstalling the plugin. Turning off LV save as files and sync options.

# Answer
> 1 votes
Low Variables extends the native Template Variables, so for every LV, there is a TV. Just leave 'em and if you need to delete them, do so via LV.

---
Tags: ee3, low-variables, global-variables
---


title: Low Search filter by get parameters

text:
# Question
Title: Low Search filter by get parameters
I have a strange problem for a new template. I'm trying to retrieve some data from database based on query params.

My query looks like:

```
{exp:low_search:results channel="channel_name" status="active" disable="categories|member_data|pagination|trackbacks" dynamic="no"
  {if '{get:trip_group}' != ''}
    child:trips_race_trip_group='{get:trip_group}'
  {if:elseif '{get:trip_type}' != ''}
    child:trips_trip_type='{get:trip_type}'
  {/if}
}

```

My problem is that every times the both conditions are added to query and I get an error result for each iteration result. For example if *{get:trip\_group}* is empty

> child:trips\_race\_trip\_group='' } child:trips\_race\_trip\_group='' } child:trips\_race\_trip\_group='' child:trips\_trip\_type='tbt-camps' }

But it works perfectly if I do it without if conditions, the results are correct; something like:

```
{exp:low_search:results channel="channel_name" status="active" disable="categories|member_data|pagination|trackbacks" dynamic="no"
  child:trips_race_trip_group='{get:trip_group}'
}

```

or

```
{exp:low_search:results channel="channel_name" status="active" disable="categories|member_data|pagination|trackbacks" dynamic="no"
  child:trips_trip_type='{get:trip_type}'
}

```

Do you have any ideas what is happening here ?

# Answer
If you're using the Low Search form and GET vars, then you don't need to add those parameters to the Results tag -- they'll get picked up and are applied automatically, as long as the name is correct in your input elements, ie:

```
<select name="child:trips_trip_type">

```

and not

```
<select name="trip_type">

```
> 1 votes

---
Tags: low-search, get, filtering
---


# Question
Title: Auto submitting Freeform form not working
As a replacement for MX Notify Control, which is not available for EE3, I thought I would try passing a Visitor registration form's data to a Freeform Pro form, so I could use Freeform's notifications to notify site admins of registrations.

I'm submitting the registration form to a template that has a Freeform form surrounded by channel entry tags, which fills the form data. It all works great if I manually submit the form, but I want this to be a hidden form that auto submits to the registration thank you page. I'm using the same auto submit code that I've used elsewhere, but it does not seem to work with Freeform.

I tried removing the surrounding channel entry tags, and made a standard Freeform form, but that didn't auto submit either. I've also tried moving the script to the bottom of the page.

I've tested other auto submit scripts as well, and can't get one to work here.

Could someone take a look at my code and see what the problem is? or what would be an alternative method that would work.

My full template code is:

```
<!doctype html>
<html lang="en">
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script>
$(document).ready(function(){
     $("#admin_form").submit();
});
</script>
</head>
<body>
{exp:channel:entries
  channel="zoo_visitor"
  entry_id="{visitor_id}"
  status="not closed"
  }
    {exp:freeform:form form_name="new_admin" return="/admins/admin-pending"}
        <input type="hidden" name="first_name" value="{member_firstname} {member_lastname}"/>
        <input type="hidden" name="admin_district" value="{district:label}"/>
        <input type="hidden" name="school" value="{school}"/>
        <input type="hidden" name="admin_adult_type" value="{zv_adult_type}"/>
        <input type="hidden" name="email" value="{email}"/>
        <input type="hidden" name="phone" value="{phone_number}"/>
        <input type="hidden" name="review_bylaws" value="{review_bylaws}"/>

    {/exp:freeform:form}
{/exp:channel:entries}

</body>
</html>

```

Thank you.

# Answer
I figured it out. I needed to add form:ATTRIBUTE\_NAME= parameters to my Freeform form. I added both form:name="new\_admin" form:id="new\_admin". The hidden form is now auto submitting and registration notifications are being sent out.
> 0 votes

---
Tags: solspace-freeform
---


# Question
Title: Method to add multiple fields to a channel entry
I'm building a website on ExpressionEngine 3.5.10. One of the channels, `training`, is for Training courses.

It's possible that each training course has multiple: date, time, location, price. In other words it's the same course but that runs on different dates, in different locations, and costs a different amount.

My plan so far has been to add multiple channel fields to my `training` channel, e.g.

```
date_1
time_1
location_1
price_1

date_2
time_2
location_2
price_2

date_3
time_3
location_3
price_3

...

```

Obviously this isn't ideal as I'm having to pre-determine what the maximum number of options is for the client who will be populating this content.

My strategy in the template is equally bad. For example a course must have a price to be bookable so I was going to do things like this:

```
{if price_1}
    // Show details and booking button for first course...
{/if}

```

The idea of the above code is that if there are, for example, only details for 2 options it will output those, but `{foo_3}` will be omitted from the output as it's inside an `{if}` statement that would evaluate as `false`.

Is there a better way of doing this, or an EE 3.x plugin which allows the user to assign multiple options with different fields (date, time, location, price) against an individual channel entry?

Any help would be appreciated.

Please note - I *don't* want to have to create separate channel entries to do what I'm trying to achieve. This is because each course also has other channel fields (e.g. description, downloadable PDF) and I don't want the administrator to have to re-enter or copy/paste that every time. I want **individual entries**, with **multiple** date/time, location and price options.

The way the data is structured, **conceptually**, is like this:

* Course ABC

+ Description
    + Downloadable file
    + Date 1
    + Time 1
    + Location 1
    + Price 1
    + Date 2
    + Time 2
    + Location 2
    + Price 2
* Course DEF

+ Description
    + Downloadable file
    + Date 1
    + Time 1
    + Location 1
    + Price 1
    + Date 2
    + Time 2
    + Location 2
    + Price 2
    + Date 3
    + Time 3
    + Location 3
    + Price 3

...
* Course XYZ

+ Description
    + Downloadable file
    + Date 1
    + Time 1
    + Location 1
    + Price 1

So as you can see, all courses have a Description and Downloadable file. ABC, DEF, and XYZ are individual channel entries. But each one has a variable number of date, time, location and price data.

# Answer
> 3 votes
Easy, I'd create a grid field with Date | Time | Location | Price.

For ease of management I'd create a separate channel for locations (manage all locations separately to stop typos and misspellings etc) and have them as relationships in the grids 'location' column. This will allow you to have detailed info for locations if required.

Looping through grid data is straight forward and your template logic would be super simple.

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


title: Creating automatic subscriber function

text:
# Question
Title: Creating automatic subscriber function
I currently have a subscribe section on the website I manage. If I want to access my this information I have to go through campign monitor, manually transfer the emails and manually send out content. Is there a way, if people have subscribed, that they will can automatically receive an email when any new content is published?

# Answer
IF CampaignMonitor is your preferred system to deliver new 'alerts' then you can setup an RSS feed on your site, point CM to that feed and then in CM set up a new template to send 'alerts' (daily, weekly... etc) to your mailing list.

It's described in CM docs
> 0 votes

---
Tags: subscriptions
---


# Question
Title: Wygwam/CKEditor stripping out empty <i> tags (Font Awesome)
There was an earlier post related to this, but its solution was outdated. So I'm creating a new one.

I am using *ExpressionEngine 2.9.2* with *Wygwam 3.3.2*. Our site incorporates icons using *FontAwesome 4.2*. *FontAwesome* icons are called by inserting an `<i>` tag like `<i class="fa fa-caret-down"></i>`.

*Wygwam*, via *CKEditor*, strips out empty `<i>` tags by default. In the past, we have suppressed this default behavior by adding `CKEDITOR.dtd.$removeEmpty['i'] = false;` to CKEditor's `config.js` file.

However, after updating *ExpressionEngine* to 2.9.2 and *Wygwam* to 3.3.2, this approach no longer works (Yes, I added `CKEDITOR.dtd.$removeEmpty['i'] = false;` to the new config.js file). Empty `<i>` tags added in source mode are saved, but the next time the editor is initialized on that entry, all empty `<i>` tags are stripped again. Saving the entry again results in saving the "stripped" version, without the icons. The only way to get the icons back is to re-enter them every time an entry is edited. Not exactly a workable solution.

Any thoughts on how we can get back to preventing CKEditor from stripping those `<i>` tags?

If it matters, I am editing in Chrome 39.0.2171.27.

EDIT: Apparently it does matter. It appears to work correctly in Safari, Firefox and IE. It's broken only in Chrome. It work in IE, but is broken in Chrome? What is the world coming to? Anyway, I still appreciate any insight into this problem. Thanks.

# Answer
We also had this issue, solution we used is:

The content editor removes empty icons when it loads. As a result, the icon needs to have some type of content inside it for the editor to leave it be. We can do this by adding a non-breaking space to the icon: \<i class="fa fa-search fa-lg"\> \</i\>
> 1 votes

# Answer
This is most likely a dead issue by now, however, the solution may be applicable to another CKEditor installation you may have. Adding a non-breaking space can cause spacing problems -- the tag must be empty. the solution is to write the JS in your config file in a slightly different way:

```
CKEDITOR.dtd.$removeEmpty.i = 0;

```
> 0 votes

---
Tags: wygwam, wysiwyg, ckeditor
---


# Question
Title: How to get entry's categories, of a specific Category Group
I've followed How to Display an Entry's Category? to show the categories assigned to a particular channel entry.

Is there a way to specify a certain Category Group?

For example, my code looks like this:

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

    {categories}
        {category_name}<br>
    {/categories}

    {title}

{/exp:channel:entries}

```

So I have a channel called `training`. This contains a list of training courses, each of which is a channel entry. The above template lists the courses.

I then have **two separate** Category Groups assigned to my `training` channel. These are called *Training course category*  (ID == 1) and *Course type*  (ID == 2).

All I want to do in my `{categories} {/categories}` loop is work out whether the entry belongs to a specific *Course type*.

However, because each course has been assigned **multiple** categories (ID 1 and ID 2 Category Groups) it just outputs a list of any category that's been assigned. I understand this is expected behaviour. How can I alter the code so that it only looks for categories in Category Group 2?

ExpressionEngine version is 3.5.10

# Answer
You can specify which group the categories tag looks at.

```
{categories show_group="2"}

```

https://docs.expressionengine.com/v2/add-ons/channel/channel\_entries.html#show-group
> 3 votes

---
Tags: categories
---


# Question
Title: Channel Form page doesn't load for guests
I'm trying to figure out how to allow guests to fill out a channel form and add entries. Based off docs I went into channel settings and clicked on "Allow Guest Submissions" and I chose a default author (super admin email).... however when i turn those on the entire page doesn't even load for guests.

based off this post, it seems like it could be permission based... However I don't have enough reputation to comment on that post and ask where specficially am I checking for those permissions?

# Answer
I finally narrowed it down to the form itself… for some reason the channel form wouldn’t show entire page if I had {field:comments} which was a basic textarea. not sure if that’s a bug or not. If I manually changed that to then the form works for guests and it still saves to that textarea field at least. weird
> 0 votes

# Answer
did you set the "logged\_out\_member\_id" parameter? https://docs.expressionengine.com/v2/add-ons/channel/channel\_form/index.html#logged-out-member-id
> 0 votes

---
Tags: channel-entries, safecracker, ee3, forms, entries
---


# Question
Title: Keeping a sub site running after switching the main site off
I have 2 websites, I'll call them website mainsite.com & website subsite.com to help illustrate what I'm trying to do.

subsite.com is a subsite of mainsite.com (durr), and mainsite.com is currently being rebuilt in a completely separate CMS but subsite.com needs to stay as it is.

Currently, the only way to edit subsite.com is through mainsite.com/system.

What I'm trying to work out, is when the new mainsite.com site goes live, what can I do about keeping subsite.com running and while keeping access to editing it etc.

The site is running Expression Engine 2.5.2 (an old legacy site I was handed over).

Any pointers would be appreciated, thanks!

# Answer
I would suggest looking at merging your bootstrap `index.php` file and working on a solution there. Something simple like this:

```
if ($_SERVER['SERVER_NAME'] == "mainsite.com") {

    /* Paste the contents of your new CMS index.php file here */

}

if ($_SERVER['SERVER_NAME'] == "subsite.com") {

    /* Paste the contents of your old EE index.php file here */

}

```

It also may not be necessary... if your EE MSM `subsite.com` is in it's own child folder, than requests for `subsite.com` are getting routed to the `index.php` file in that sub-folder via the `.htaccess` file. You would just need to leave your `system` folder in place. Then in your webroot, use the `index.php` file for your new CMS. No reason everything can't run side by side.
> 0 votes

---
Tags: ee2, multi-site-manager
---


# Question
Title: Database error on creating new Low Search Collection
I have an instance of Low Search 4.4.3 running on an MSM enabled instance of EE 2.11.8.

It runs many Collections happily across 3 sites.

But with a new site recently added, when I go to **Save** any newly configured Collection, it returns a database error:

`Error Number: 1048
Column 'modifier' cannot be null
INSERT INTO exp_low_search_collections (site_id, channel_id, collection_name, collection_label, language, modifier, excerpt, settings, edit_date) VALUES (10, '84', 'about', 'About', 'en', NULL, '523', '{\"0\":\"3\",\"523\":\"2\",\"524\":\"2\",\"536\":\"3\"}', 1503055683)
Filename: third_party/low_search/model.low_search.php
Line Number: 209`

The relevant line in `model.low_search.php` is:

`ee()->db->insert($this->_table, $data);`

Any suggestions for fixing?

# Answer
The error says it's trying to fill in a `NULL` value for the Modifier, but that isn't allowed. Looking at the code for version 4.4.3, there's no way a `NULL` value could be added. Even when I remove the whole modifier field before submitting the form, I'm not getting that error.

Maybe update to the latest legacy version (v4.4.5), make sure the modifier column in the exp\_low\_search\_collections table has a default value of `1.0`, and try again. Oh, and maybe try with extensions disabled, too.

If the problem persists, open a thread over at GetSat, which is better suited than EESE for going back and forth with questions.
> 0 votes

---
Tags: low-search, database-error
---


# Question
Title: Create list of users who made first purchase between two dates
I need to make a custom report of all customers who made their first purchase between 2 dates in expresso-store. I'm having aloof trouble working out the best way to achieve this.

Does anyone have any suggestions on how to achieve this?

# Answer
> 2 votes
Store \> Reports \> Order Details. Set the range and export.

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


title: Channel Entry link to external URL

text:
# Question
Title: Channel Entry link to external URL
I have a need for a "blog/news" section that has some entries that go from the index to a standard entry blog template, and some that just link to an outside site from the index template. Does EE have a simple way to do this?

# Answer
> 3 votes
What I'd do is set up a field (eg `blog_offsite_url`) to store an optional offsite URL.

Then in your link from the blog index page, use a conditional like this.

```
{if blog_offsite_url}
    <a href="{blog_offsite_url}">More</a>
{if:else}
    <a href="/blog/post/{url_title}">More</a>
{/if}

```

To be thorough, you should put a conditional in the detail template (in this case `blog/post`) to redirect the user to the offsite blog URL when that has been provided.

I like using rsan's HTTP Header plugin for that.

```
{if blog_offsite_url}
    {exp:http_header status="301" location="{offssite_blog_url}" terminate="yes"}
{/if}

```

---
Tags: channel-entries
---


title: A PHP Error was encountered

text:
# Question
Title: A PHP Error was encountered
I am receiving `'A PHP Error was encountered'` error messages when signing into expression engine. Nexcess support sent me the following information. What do I do to get this corrected? I am a novice user and do not know what version I am using. Can you tell me how I find out what version I have as well?

FROM NEXCESS SUPPORT:

> Thank you for reaching out regarding this. It seems that the same scripting error is being thrown into your PHP error log:
>
> ```
> [14-Aug-2017 13:20:28 America/Detroit] PHP Fatal error:  Call to a member function generate_json() on a non-object in  /chroot/home/kansasko/kansas-kofc.org/html/kskofc/expressionengine/libraries/Functions.php on line 374
> [14-Aug-2017 21:50:50 America/Detroit] PHP Fatal error:  Call to a member function generate_json() on a non-object in /chroot/home/kansasko/kansas-kofc.org/html/kskofc/expressionengine/libraries/Functions.php on line 374
>
> ```
>
> I was able to find an issue on the ExpressionEngine bug tracker regarding this error indicating that the Javascript library may not always be loaded on this line.
>
> However, we would not be able to confirm that this is the issue or apply the above patch. I would suggest that you forward these errors to your developers so they can properly debug the scripting issue and implement a fix.
>
> The server is a shared environment so we can't reboot it. I'm not seeing any hanging processes. You may need to reach out to the Expression Engine support since you don't have a developer on staff. This might be a cache issue in the application. Can you clear the cache from the admin panel to see if that clears this?

# Answer
> 0 votes
Yes you can clear the cache easily.

For EE3 : https://docs.expressionengine.com/latest/cp/utilities/cache.html

For EE2: https://docs.expressionengine.com/v2/cp/tools/data/clear\_cached\_data\_files.html

---
Tags: php, error
---


title: Stash Entry Page Titles

text:
# Question
Title: Stash Entry Page Titles
I'm using stash to fuel many parts of a site I am building. I successfully have it working to print certain parts of the page title to the tag of the page, but I want to include entry titles on pages where that is applicable. Here is my code setup for a given scenario:
This is my "main" template

```
    {embed="_layout/events"}
{preload_replace:the_channel="events"}
{exp:stash:set_value name="title" value="Events"}

<!-- ???USE STASH APPEND FOR ENTRY PAGE TITLE???? -->

{exp:stash:set name="listing-content"}
<h1>Events</h1>
<p class="events-desc">{exp:low_variables:single var="lv_events_summary"}</p>

<div class="w-row">
    {exp:channel:entries
        channel="{the_channel}"
        disable="categories|category_fields|member_data|pagination"
        limit="3"
        show_future_entries="yes"
        sort="desc"
        status="Open|Home"
        }
    <div class="w-col w-col-4 w-col-medium-4">
        <a class="_97 card w-inline-block" href="/events/{url_title}">
            <h4>{title}</h4>
            {exp:channel_images:images entry_id="{entry_id}"}
            <img class="event-cover" src="{image:url:card}" alt="{site_name} {seo}">
            {/exp:channel_images:images}
            {exp:chopper}{summary}{/exp:chopper}
        </a>
    </div>
    {/exp:channel:entries}
</div>
{/exp:stash:set}

{exp:stash:set name="entry-content" parse_tags="yes"}
{exp:channel:entries
    channel="{the_channel}"
    disable="categories|category_fields|member_data|pagination"
    limit="1"
    show_future_entries="yes"
    status="Open|Home"
    url_title="{last_segment}"
    }
{exp:stash:set_value name="page_title" parse_tags="yes" parse_depth="2" name="page_title"}
<h1>{title}</h1>

<div class="w-row">
        <div class="w-col w-col-9 w-col-stack">
            <blockquote>{summary}</blockquote>
        </div>

    </div>

    <!-- /content -->

    <div class="content-col-2 w-col w-col-3 w-col-stack">

<!-- sidebar -->

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

{/exp:stash:set}

```

This is my {embed="\_layout/events"} template

```
{p_head}
<div class='content'>

    {exp:switchee variable='{segment_1}/{segment_2}' parse='inward'}

    {case value='{segment_1}/'}
    {exp:stash:get name='listing-content'}
    {/case}

    {case default='Yes'}
    {exp:stash:get name='entry-content'}
    {exp:stash:get name='sidebar'}
    {/case}

    {/exp:switchee}

</div>

{p_footer}

```

And finally, here is my {p\_head} file which is trying to reference the stashed element called "page\_title" which is in the entry section of the main template:

```
    <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>{exp:stash:get name="title"}{exp:stash:get name="page_title" proces="end"} | {site_name}</title>

```

The stash:get for title works just fine, but the stash:get for page\_title comes up blank. Any suggestions? Thanks!!!

# Answer
There is a lot of noise in your examples, but it looks like you are simply not including a value in the `set_value` entry (and you have `name=...` twice).

You probably want something like this...

`{exp:stash:set_value name="page_title" value="{title}" parse="inward"}`

The `parse='inward'` needed to make sure the tag in `value=` is parsed before it gets used to set the value.

HTH
> 0 votes

# Answer
The first solution is working on my end. (by jcogs.eecms) I still can't comment, so.. i'm just leaving this here :)

* EE3.5.7
* Stash 3.0.5
* switchee 3.0.0
> 0 votes

# Answer
Here's what works for us, I'm showing the important bits. We're using MVVM so it may not be entirely applicable to you, but hopefully there's some useful in this.

In the Layout:

```
{stash:embed:global_template_chunks:global_html_head process="start"}

```

In global\_template\_chunks/global\_html\_head:

```
<title>{stash:page_title} | {site_name}</title>

```

In your template:

```
{!-- Set page Meta Data --}
{exp:stash:context name="{segment_1}-{segment_2}"} {!-- Sets the Stash @ symbol --}
{exp:stash:set_value name="url_title" value="{segment_1}-{segment_2}"}
{stash:embed:global_template_chunks:set_meta}
{!-- Set basic page details --}
{stash:embed:global_template_chunks:page_intro process="inline"}

```

In global\_template\_chunks/set\_meta:

```
{!-- GENERAL --}
{!-- To override just a few values like page_title set them after calling this file --}
{exp:stash:set name="page_title" trim="yes"}
{if "{exp:surgeeo:title url_title='{stash:url_title}'}" != ""}
{exp:surgeeo:title url_title='{stash:url_title}'}
{if:else}{exp:stash:get_list name="page:{stash:url_title}" scope="site" trim="yes"}{title}{/exp:stash:get_list}{/if}
{/exp:stash:set}

```

In global\_template\_chunks/page\_standard:

```
{exp:stash:set_list name="page" parse_tags="yes" context="@"}
{exp:channel:entries channel="standard_pages" dynamic="no" url_title="{stash:url_title}" disable="categories|member_data|pagination" limit="1"}
    {stash:title}{title}{/stash:title}
    {stash:entry_id}{entry_id}{/stash:entry_id}
    {stash:body}{standard_body}{/stash:body}
    {stash:sharing_image}{/stash:sharing_image}
    {!-- Call to Action --}
    {standard_call_to_action limit="1"}
        {stash:cta_link}{standard_call_to_action:link}{/stash:cta_link}
        {stash:cta_text}{standard_call_to_action:text}{/stash:cta_text}
    {/standard_call_to_action}

    {if no_results}{redirect="404"}{/if}

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

```
> 0 votes

---
Tags: stash, title, template-partials
---


# Question
Title: How to make EE ignore database table prefix when writing your own queries
I'm working on an ExpressionEngine 3.5.10 website. All my tables are prefixed with `exp_`

I've added 3 tables to my database to store some data relating to a custom written PHP ecommerce module. These tables do *not* use the prefix, and are called: `ecom_orders`, `ecom_attendees` and `ecom_products`.

In one of my EE templates - with PHP set on output - I've written the following to try and insert data in one of my tables:

```
 ee()->db->insert(
        'ecom_orders',
        array(
            'billing_title'  => $_SESSION['basket']['billing']['title'],
            'billing_firstName' => $_SESSION['basket']['billing']['firstName'],
            'billing_surname' => $_SESSION['basket']['billing']['surname'],
    // ...
    ) );

```

The trouble with this is that I get an SQL error because instead of using the table name `ecom_orders`, it's changing it to `exp_ecom_orders`.

How can I reference the table by the name I want (`ecom_orders`) and get it to ignore the prefix?

I checked the database class docs https://docs.expressionengine.com/latest/development/legacy/libraries/database.html but there's nothing in it about that.

# Answer
You should never use any table in EE without prefix. Its totally not recommended. Now you have only 1 possibility. Instead of using EE (CI) query, use sql.

```
ee()->db->query( "INSERT INTO `ecom_orders` (`billing_title`, `billing_firstName`, `billing_surname`) VALUES ('".$_SESSION['basket']['billing']['title']."', '".$_SESSION['basket']['billing']['firstName']."', '".$_SESSION['basket']['billing']['surname']."')");

```
> 1 votes

---
Tags: php, database, queries
---


# Question
Title: User Categories, User:Edit Expected Behavior
I'm using categories in a user:edit tag and also in a user:profile tag on separate templates. In the user:profile template the categories that the user is assigned to appear, however in the user:edit template the checkbox for the assigned category is not selected. Should it be? All other member data is populating as expected.

I'm using this code from the example as a test:

```
{categories}
    {category_selected}selected="selected"{/category_selected}
    {category_body}
        <input type="checkbox" name="category[]"
        value="{category_id}" {selected} /> {category_name}
    {/category_body}
{/categories}

```

# Answer
> 0 votes
Because this is a checkbox, you should be using `checked` instead, so something like this:

```
{categories}
    {category_selected}checked="checked"{/category_selected}
    {category_body}
        <input type="checkbox" name="category[]"
        value="{category_id}" {selected} /> {category_name}
    {/category_body}
{/categories}

```

---
Tags: solspace-user
---


# Question
Title: Profile Edit form using Solspace User is submitting without going to 'return' parameter template
I have a Solspace User v4.0.9 form setup to edit Member Custom Fields, in EE 3.5.10

However, when editing the fields and submitting, all the form fields empty and the 'return' template isn't loaded. It feels like the form is being submitted by jQuery or something weird, but I have no idea how, as I haven't set it up like that.

> {exp:user:edit return="account/billing/updated" form:class="rd-mailform text-left"}

Yet, if I edit the Member in EE, all the correct data has been saved to the Custom Fields.

If I then manually refresh the frontend form, all the data appears correctly in the form fields.

I don't get it. What am I missing?

# Answer
I've found the reason this is happening, but I don't understand why.

I had the following CartThrob code in the form, but when I comment this out, the Solspace User form works normally.

> {exp:cartthrob:customer\_info}
> {exp:cartthrob:country\_select id="country\_code" name="country\_code" selected="{country\_code}" extra='required'}
> {/exp:cartthrob:customer\_info}

Any ideas?
> 0 votes

---
Tags: solspace-user
---


# Question
Title: EE3 'Error: The URL contains too many segments'
I am getting an 'Error: The URL contains too many segments' from the following code:

```
{exp:channel:categories channel="performances" show_group="3" dynamic="no" style="linear"}
<li><a href="performances/category/{category_url_title}">{category_name}</a></li>
{/exp:channel:categories}

```

Not sure what to do. Every time I click on the link it ‘appends’ another segment until I get the error message.

# Answer
As I said on Slack: put a slash before the URL so it's not relative to the current page like so `/performances/category/{category_url_title}`
> 3 votes

---
Tags: error, url
---


title: Having A Category Sort Problem. EE3

text:
# Question
Title: Having A Category Sort Problem. EE3
I need to sort across all categories based on performance start date. Its all one category group with three categories. It sorts but it will sort one category by date and the second category by date. I want it to span across all three categories and base on star\_date display a view of events by date. I am a bit lost can use some help.

```
  {exp:channel:entries channel="performances" dynamic="no"   category_group="3" sort="asc" orderby="performance_date_one" }
  <div class="title-event">
  <h2>{title}</h2>
  </div>

  {description_of_event}
  {performance_date_one format="%l, %F %j, %Y"}

   {/exp:channel:entries}

```

# Answer
I was using a Bloqs field to orderby. I needed to create a new field out side of Bloqs and it now sorts correctly.
> 1 votes

---
Tags: categories
---


# Question
Title: Fatal Error cannot use 'Bool' in Lexer.php
We recently migrated one of our websites using EE to a new server running php7. We're getting the following error:

**Fatal error:** Cannot use EllisLab\ExpressionEngine\Library\Parser\Conditional\Token\Bool as Bool because 'Bool' is a special class name in /home/.../public\_html/system/EllisLab/ExpressionEngine/Library/Parser/Conditional/Lexer.php on line 9

Here is line 9 from Lexer.php :

```
use EllisLab\ExpressionEngine\Library\Parser\Conditional\Token\Bool;

```

I tried setting 'allow\_extensions' to 'n' and nothing changed. Also, I am able to log into the back-end.

Running EE version 2.10.2

It seems that using 'Bool' is no longer supported in php7. Does anyone know of a solution? Is there a fix for this in EE3?

Thanks.

# Answer
For anyone that may come across this error in the future, we were able to resolve it by changing all instances of 'Bool' and 'String' that were inside the system\>EllisLab folder to 'Boolean' and 'StringLiteral' respectively. Bool and String are reserved terms in PHP 7 and their usage in these 4 files (Lexer.php, Parser.php, Bool.php, String.php) was causing errors, so changing them to the updated terms resolved it.

We were using a bit of an older version of EE (2.10.2). I believe these terms are updated in the latest versions though.
> 1 votes

---
Tags: php-errors, error-500
---


title: EE cuts the content of a big field

text:
# Question
Title: EE cuts the content of a big field
We have a text field were we want to put quite big HTML content (955 lines). We were able to do it without problem a few weeks ago, but now it's cutting the content, apparently always at the same point (around 65.000 characters).

EE let's you copy all the content, but when you save the page, it cuts it.

We haven't changed anything in our EE installation lately, but we made some changes to our PHP configuration for other reasons (so I guess it could be PHP related, but we are not sure and don't know how to fix it).

We've tried "pasting into the field and selecting another field", as suggested in https://expressionengine.com/forums/archive/topic/229708/problems-cutting-pasting-to-textarea-channel-fields, without luck. I haven't found more articles regarding this problem.

We are using version 2.10.1 - Build Date: 20150501.

Any clues?

# Answer
> 1 votes
you may want to check your field settings for any character limits. Specifically check that the field Maxlength, Default Text Formatting, and Field Content settings are appropriate to what you need. I've had several cases where I incorrectly set integer content or number content and then found my data was getting truncated.

If those are set correctly, you may need to open phpmyadmin or your database admin tool and check directly that your table/field settings are not limiting how many characters can be placed into the field in question.

And if those above items are correct, then I'd start looking for field input restrictions in modules/extensions (if you are using one for this input) that may be present. I suspect that since you have a very large amount of content to place into a single field, you may be running into a system level restriction on how much content can be written into a single field.

Finally, since you mentioned a recent change to php - have you looked at your php.ini file to check the upload settings? Check your post\_max\_size settings in php.ini

---
Tags: custom-fields, html
---


# Question
Title: Setting Cartthrob Price Modifiers Across Many/All Products
We're working on a project where we need to capture some text information for each item in the cart. We've set this up using the cartthrob\_price\_modifiers\_configurator field type on the appropriate field group.

Is there a way to create these particular modifiers globally without doing so for each of the \>800 Entries?

Is there a better way to do this?

Thanks!

Greg

# Answer
> 1 votes
I think the way to do this is by hard coding the modifiers and adding them to your product pages via the `item_options` tag. I would most likely go with an include template that could be dropped into the product add to cart template to do this quickly. Furthermore, by adding some if/else logic to the embed, you can setup item\_options per category or item type.

For reference, here is the CT manual page that discusses hard coding the modifiers.

# Answer
> 0 votes
There is also a useful addon for creating "Global Item Options". See https://www.cartthrob.com/site/product\_detail/global-item-options

---
Tags: cartthrob
---


# Question
Title: Viewing member in CMS gives fatal error: Allowed Memory Size Exhausted
when trying to view specific members in the CMS, I'm getting this error all of a sudden with my new dreamhost server. Anyone know how to fix this? doesn't happen with all members just some it seems.

Fatal error: Allowed memory size of 94371840 bytes exhausted (tried to allocate 20480 bytes) in /home/user/domain/admin\_folder/ee/EllisLab/ExpressionEngine/Service/Model/Model.php on line 610

# Answer
solved by having my hosting company help increasing php memory to 164mb.
> 0 votes

---
Tags: error, fatal, memory
---


# Question
Title: require_entry problems with more than 2 segment
```
www.cooking/recipes/apple_pie

```

The first Expression Engine segment (recipes) represent the recipes channel, and the second segment represent an entry (here apple\_pie)

If an entry doesn't exist or is misspelled, i use this code to redirect to the 404 page, and it works fine:

```
{exp:channel:entries channel="recipes" limit="1" require_entry="yes"}
          {exp:ifelse parse="inward"}
                {if no_results}
                        {redirect="error/404"}
                {/if}
           {/exp:ifelse}
{/exp:channel:entries}

```

But if I add a segment (dessert), always have redirect to the 404 page, even if the entry exist. Without the redirect code the entries pages like (www.cooking/recipes/dessert/apple\_pie) works fine, but i lose the redirect function.

```
www.cooking/recipes/dessert/apple_pie

```

What am I doing wrong here?

# Answer
https://ellislab.com/expressionengine/user-guide/urls/template\_routes.html

Template routes! These things are your friend. On your template, you want to set a template route that looks like this:

```
/recipes/{section:category}/{section:alpha_dash}

```

Set that template to require all routes. Then bam:

```
{exp:channel:entries channel="{segment_1}" category="{segment_2}" url_title="{segment_3}" limit="1" require_entry="yes"}
      {exp:ifelse parse="inward"}
            {if no_results}
                    {redirect="error/404"}
            {/if}
       {/exp:ifelse}
{/exp:channel:entries}

```

This should do the trick, no?
> 1 votes

# Answer
Based on my understanding of the issue...

Try this:

> {exp:channel:entries channel="recipes" url\_title="**{if segment\_2 != 'dessert'}{segment\_2}{if:else}{segment\_3}{/if}**" limit="1" require\_entry="yes" **dynamic="no"**}

If there's only dessert category then I think this should work, unless you have other categories, then you'll have to update the if statement.
> 1 votes

---
Tags: channel-entries, channel, entries, redirects, segments
---


title: ExpressionEngine 3.5.7 Forum CSS

text:
# Question
Title: ExpressionEngine 3.5.7 Forum CSS
I have installed the forum and created a custom child forum that I could modify. I got it all setup when someone is logged in but if a user logs out everything in the tags goes away. While logged in everything is fine, I couldn't find any if statements where the user needed to be logged on to show the CSS. Is it calling a different theme when the user logs out?

# Answer
I am currently working on EE3.5.7 with discussion forum installed. I also created a custom theme for the forum and I didn't have an issue like this. Whether logged in or logged out, the CSS is okay.

Can you provide more details as to what tags are not being parsed if user is logged out? and at what page does it happen?

PS: Sorry, I wanted to leave a comment, but my reputation is low.
> 0 votes

---
Tags: forum, css
---


title: Solspace Calendar - Sticky Entry

text:
# Question
Title: Solspace Calendar - Sticky Entry
I can't seem to figure out how to make an entry sticky using Solspace Calendar (particularly the exp:calendar:cal tag). Is this possible?

Thanks!

# Answer
Calendar does not support the "Sticky" feature unfortunately.
> 0 votes

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


title: Stash Get List match against

text:
# Question
Title: Stash Get List match against
I'm having trouble with a stash list that should be filtered.

My list itself looks like this:

```
{exp:stash:get_list name="stores_list" parse_tags="yes" parse_depth="3" parse="inward" match="{exp:stash:get name='applicable_countries_list'}" against="country"}
   <tr>
       <td>{store_name}</td>
       <td>{address_1}, {postal_code} {city}</td>
       <td>{country}</td>
       <td>{phone}</td>
       <td>{fax}</td>
   </tr>
{/exp:stash:get_list}

```

The value in match against returns exactly this: #(FRANCE|REUNION)#

When I just use this exact variable in the match parameter, it works perfectly, and only stores in France and Reunion are shown. When using the stash variable though, nothing show up.

I've tried wrapping the list with a stash:parse tag, and also tried {stash:applicable\_countries} as a variable. No luck yet though.

# Answer
> 0 votes
When you set the variable `applicable_countries_list` you need to ensure that you are not capturing the whitespace around each value. Close up the space manually and/or use the `trim="yes"` parameter when setting the variable.

---
Tags: ee2, stash, list, mustash
---


title: parse="inward" question

text:
# Question
Title: parse="inward" question
I have the following tag that creates a simple search form:

```
{exp:search:simple_form channel="{exp:stash:get name='listing_channel'}" result_page="blog/search" no_result_page="blog/search" results="20" form_class="search" search_in="everywhere"}

```

I am trying to pass in the channel using the stash variable listing\_channel from my template file - it is set to "blog". This tag only works if I add parse="inward". My understanding is that without parse="inward", the stash get tag would be parsed before the outer tag, which would result in the search form tag seeing channel="blog". I would think that this is what I would want, but yet it only works with parse="inward".

With parse="inward", wouldn't the stash variable be parsed after the search form tag? I would expect this to not work.

If someone with a better understanding could explain why parse="inward" is making this work, I'd really appreciate it!

Thanks!

# Answer
Tags inside parameters aren't parsed at all unless you use `parse="inward"`. That's because once parsed a tags' parameters are removed from the template (replaced with the output of the tag). Thus tags in parameters are never parsed.

The `parse="inward"` parameter tells EE to parse the other parameters passed to the parent tag before they are received by the tag's module code. Each parameter is parsed in turn (whether or not it has tags in it) so using it adds a small overhead to parsing.
> 2 votes

# Answer
Here's another example that I hope will help others with similar confusion (as I was until about 15 minutes ago).

I was recently trying to get the following template to work:

```
{exp:app:voucher hash="{segment_3}"}
    {exp:pdf_press:parse_pdf filename="{product_url_title}-voucher.pdf"}
    <html>
        <body>
...
        </body>
    </html>
    {/exp:pdf_press:parse_pdf}
{/exp:app:voucher}

```

This code uses `{exp:app:voucher}` to parse the template and make a whole bunch of variables available including `product_url_title`. `{exp:pdf_press:parse_pdf}` then converts all the content inside to a PDF for download. I wanted to use `product_url_title` as part of the filename... unfortunately the out of the box behaviour produced this file name:

```
{product_url_title}-voucher.pdf.

```

So I tried `parse="inward"`:

```
{exp:pdf_press:parse_pdf filename="{product_url_title}-voucher.pdf" parse="inward"}

```

Didn't help. Perhaps its "inwards":

```
{exp:pdf_press:parse_pdf filename="{product_url_title}-voucher.pdf" parse="inwards"}

```

Still didn't help... ( it is actually supposed to be `parse="inward"` btw)

I tried `parse="outward"` \- nothing worked.

Finally I stumbled upon adding `parse="inward"` to the *enclosing* tag `{exp:app:voucher}`:

```
{exp:app:voucher hash="{segment_3}" parse="inward"}
    {exp:pdf_press:parse_pdf filename="{product_url_title}-voucher.pdf"}
    <html>
        <body>
...
        </body>
    </html>
    {/exp:pdf_press:parse_pdf}
{/exp:app:voucher}

```

So if you want to pass a *variable* to a tag add `parse="inward"` to the *enclosing* tag.

BUT, if you want to pass the result of another tag add `parse="inward"` to tag itself.

This is quite confusing, but looking at jws690's scenario `{exp:search:simple_form}` is an *enclosing* tag with respect to `{exp:stash:get name='listing_channel'}`.

Hope that helps someone...
> 1 votes

---
Tags: templates, stash, template-partials
---


title: Clearing the cache via API

text:
# Question
Title: Clearing the cache via API
The Expression Engine documentation for caching explains that the caches are automatically cleared upon:

> Submission, updating or deleting of an Entry through API

I need to clear the caches via my own extension. Is it possible to tap into a function to clear the caches?

# Answer
> 4 votes
ref: https://docs.expressionengine.com/latest/development/legacy/libraries/cache.html#class-methods

ee()-\>cache-\>delete('/myaddon/');

---
Tags: add-on-development, extension, cache, caching, channel-entries-api
---


# Question
Title: Email submissions getting through with blank required fields
We have a Contact Form for a client that is somehow allowing users to submit it with blank fields that are set to be required. Submissions appear to be from valid sources...aka not spam. When we attempt to test it on multiple devices, operating systems, and browsers, **ALL** validation works as expected.

ExpressionEngine Version: 2.9.2 Freeform Version: 4.2.2

Here is an example of the form showing errors for blank fields.

Here is the backend of Freeform showing a couple of submissions that have gotten through with blank fields.

If we could recreate the situation we believe we could fix it. Unfortunately, everything we tried, the system works as expected.

Has anyone had a similar experience? If yes, did you find a solution solution?

# Answer
Sorry, don't have enough rep points to comment, but I also just had this issue. It's a multi-page Composer Form and has been working for over a year. Yesterday a submission came through where most of the required fields were blank. Did you figure out what was going on by any chance?
> 0 votes

---
Tags: solspace-freeform
---


# Question
Title: Exp:resso Store v3 won't update to 3.0.1
I'm in the process of moving my clients site from Expression Engine 2 to the latest build of Expression Engine 3. This obviously includes updating all the Add ons.

I have successfully installed Exp:resso Store 3.0.0, but now wish to install the 3.0.1 update. All the files are on the server, but when clicking the 'update to 3.0.1' button on the add on list, or visiting the Store Dashboard the updates don't run and no errors are shown.

I'm not sure if this is a specific Store issue, or if this can be a known issue with updating Add-ons. Any advice much appreciated.

# Answer
> 1 votes
I've heard back from Exp:resso support. The addon is updating even though the button isn't showing so. It seems it is just a display issue which will be resolved in the next build.

Thanks to Romans-8--31-39 for the comments suggesting as much above.

---
Tags: expresso-store, add-on, update
---


# Question
Title: Errors after migration of ee 2.9.3 to new host
I have imported the database and all website files to my inmotionhosting.com VPS hosting environment via FTP.

I have followed steps #7 and #8 as seen in the migration guide: http://216.243.142.229/rick/user\_guide/operations/moving.html

but run into the following error:

> The following tag has a syntax error:
>
> {exp:strip\_html}
>
> Please correct the syntax in your template.

when I attempt to view the new website environment here: http://198.46.84.39/~steame6/

I'm unsure how to proceed. Can anyone advise?

# Answer
`{exp:strip_html}` is a tag from an EE2 add-on that is now discontinued.

I'm guessing you haven't migrated the addon to the new host.

When EE reaches a tag associated with `{exp:strip_html}` it looks for an add-on but doesn't find one, and throws the error...

So to complete the migration you will need to remove the calls to this tag, or install the copy from the old host.

Depends what you are trying to do in the template, but you can strip HTML from text quite well / flexibly with other current / not discontinued addons. My preference is streeng by there are others.

HTH
> 0 votes

---
Tags: migration, server-migration
---


title: Splitting a string into a Stash list?

text:
# Question
Title: Splitting a string into a Stash list?
For an EE3 site, I'd like to split a CSV or pipe delimited string (i.e. `avi,david,sam` or maybe `avi|david|sam`) and have each segment added to a Stash list.

I've looked at BBD Stringer ($6) on Devot-ee thinking I might be able to use it to break up the string and then stash each value in a list but it seems to be a bit more basic: that it just breaks the string apart but not as tags which could be passed into an `{exp:stash:set_list}` tag pair.

Any thoughts?

# Answer
Haven't used BBD Stringer, but have used Low List to help with this. You can do something like:

```
{exp:stash:set_list
    name="XXX"
    parse_tags="yes"
}
    {exp:low_list:each items="north|east|south|west" as="individual_direction"}
        {stash:direction}{individual_direction}{/stash:direction}
    {/exp:low_list:each}
{/exp:stash:set_list}

```

*By the way, MANY thanks to Croxton & Low (attorneys?) for both add-ons.*
> 1 votes

---
Tags: stash, csv
---


# Question
Title: Using an IF ELSE statement to find user option & redirect appropriately
Very inexperienced with EE 2.4, but im experienced with PHP & HTML. I am attempting to use the following code to get variables from URL & then run an IF/IF ELSE statement:

```
<?php $firstname=$_GET[“firstname”]; $zipcode=$_GET[“zipcode”]; $option=$_GET[“option”];
  if ($option==”Instant Medigap Prices”) { header(‘Location: 1’); }
  elseif ($option==”2”) { header(‘Location: location2test’); }
  elseif ($option==”3”){ header(‘Location: location3test’); }
  elseif ($option==”4”){ header(“Location: location4test”); }
?>

```

Obviously the above wont work in EE with php enabled. How can i change it to allow it to work within EE 2.4? I’ve also tried using Mo Variables for aid but still unsure on implementation. i.e. how do i set a var

{get:option}

Help & Clarification much appreciated !!

# Answer
Not positive the following will work on 2.4, but try it:

With a url `mysite.com/news/latest?option=abcd` and Mo Variables you should be able to get query string variables within an if/else conditional like:

```
{if "{get:option}" == "abcd"}
    {redirect="TEMPLATE_GROUP/TEMPLATE"}
{if:elseif "{get:option}" == "1"}
    {redirect="TEMPLATE_GROUP/TEMPLATE"}
{if:elseif "{get:option}" == "2"}
    {redirect="TEMPLATE_GROUP/TEMPLATE"}
{/if}

```

and then redirect. Change the TEMPLATE\_GROUP/TEMPLATE text to the template group and template you're wanting to route to (i.e.: news/index).

In mo variables "Add GET: {get:your\_key}" needs to be enabled in settings (Add-Ons \> Extensions \> Mo' Variables \> Settings).

*Also, note ee 2.4 is pretty old at this point and many changes have been made in subsequent 2.x updates.*
> 1 votes

---
Tags: php, html
---


# Question
Title: How do you stop the "category path" being put in URL's generated by {path=}
ExpressionEngine 3.5.10.

I am outputting a specific list of categories (`category_group="1"`) from a channel of training courses (`channel="training"`). Followed by the list of courses assigned to that category. I have then used the Grid type field to store some details of when particular courses run, their price, etc. For example:

```
{exp:channel:categories category_group="1" style="linear" channel="training" show_empty="no"}

    {exp:channel:entries category="{category_id}"}

        <!-- Output name of course -->

        {training_booking_options}
            <!-- Output options for this course, e.g. price -->
            <a href="{path='contact-us'}">contact us</a>
        {/training_booking_options}

    {/exp:channel:entries}

{/exp:channel:entries}

```

Wherever I use `{path=""}` it is outputting the category URL path in the URL. For example: `<a href="{path='contact-us'}">contact us</a>` gives URL's such as:

I want the URL to be what I've put, i.e. http://dev.domain/contact-us regardless of the category it's within at the time the link is output.

Is this possible, or should I just abandon using `path=` and hardcode it like `<a href="/contact-us">contact us</a>`?

I don't want to use any of the "category name in URL" features for this particular section of the website. But there are other sections where I do want to use it. So I don't want a solution which disables it for the entire site!

# Answer
> -1 votes
The only way to do it I think will be to construct the URL from components. (as is clear from answer above) I'm not so clear on what your setup is, but something like this might work:

```
{exp:channel:categories category_group="1" style="linear" channel="training" show_empty="no"}

    {exp:channel:entries category="{category_id}"}

        <!-- Output name of course -->

        {training_booking_options}
            <!-- Output options for this course, e.g. price -->
            <a href="{path='SITE_INDEX'}/contact-us/{category_url_title}">contact us</a>
        {/training_booking_options}

    {/exp:channel:entries}

{/exp:channel:entries}

```

HTH

---
Tags: categories, templates, ee3
---


# Question
Title: Installation hacked - rogue link inserted onto page
I've got a very old installation v2 that I think has been hacked. I've found a URL that is a clone of a template on the system, and has a rogue link inserted. I know that I need to update the whole install, but is there an obvious place to search for the hacked code and remove it as a temporary fix?

# Answer
The only timeI've encountered something like this is when the site was on a shared hosting. It turned out this happened because of a leaky joomla install on that same server. You can safely delete the file. It's always best to update EE anyway. Just make sure to check if there aren't any more suspicious files on the server, or that files like admin.php/index.php/common.php (so files with common names) don't have alterations. Also check the htacces
> 1 votes

---
Tags: upgrade, security, install
---