# Question
Title: Can I have the Shipping Same as Billing default to unchecked?
I am using Expresso Store V1 and I would like the Shipping Same as Billing to default to unticked. Is this possible?

Form html:

```
<div class="control-group">
    <div class="controls">
            <label for="shipping_same_as_billing" class="checkbox">
                {field:shipping_same_as_billing} Same as Billing Details
            </label>
    </div>
</div>

```

Script:

```
<script type="text/javascript">
        $(function() {
            $('#shipping_same_as_billing').change(function() {
                if (this.checked) {
                    $('#shipping_details_drawer').slideUp();
                } else {
                    $('#shipping_details_drawer').slideDown();
                }
            });
            if ($('#shipping_same_as_billing').is(':checked')) {
                $('#shipping_details_drawer').hide();
            }
        });
</script>

```

# Answer
As example from the Docs, don't use the default tag, but the actual rendered html:

```
<div class="control-group">
  <div class="controls">
    <label for="shipping_same_as_billing" class="checkbox">
      <input type="hidden" name="shipping_same_as_billing" value="0" />
      <input type="checkbox" id="shipping_same_as_billing" name="shipping_same_as_billing" value="0" {shipping_same_as_billing_checked} />
  Same as Billing Details
    </label>
  </div>
</div>

```

You have to have the hidden one, so when the checkbox is unchecked it still sends a value with the form. So the second input (the checkbox one) has the default value of 0 so unchecked by default.
> 0 votes

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


# Question
Title: Can I create a forward for the old link?
I updated the initiatives on our website to say 2016 and now all the old links to our current initiatives that were posted or shared (web, email, social etc.) in the last year is now broken. How cab I remedy this? Can I create a forward for the old link? Thank you!

# Answer
> 0 votes
Well, there are a variety of ways to make this happen. To give you the absolute best answer, you'd really need to give more information on your EE setup in general. It would've helped if you had given an example of the URL you need redirected as well. Here is a simple solution.

You'll need to edit your `.htaccess` file. It lives in the web root of your server. **Warning:** If you are not a developer, it is recommended that you get someone more tech savvy to do this for you. One mistake in this file will render your website unavailable until it is fixed.

If you have an example URL, such as `www.example.com/initiatives/2015/`, and you want to permanently redirect it to `www.example.com/initiatives/2016/`, under most cases a RedirectMatch rule will work. Here's an example:

```
RedirectMatch 301 (?i)^/initiatives/2015/?$ http://www.example.com/initiatives/2016/

```

This will match URN's that match `/initiatives/2015/` and permanently redirect them to `http://www.example.com/initiatives/2016/` . The match will be permanent (`301`) and will be case-insensitive ( `(?i)`, so `/INITiatives/2015/` would also redirect). You can add this line at the end of your `.htaccess` file.

---
Tags: ee
---


title: Solspace Calendar occurrence_id

text:
# Question
Title: Solspace Calendar occurrence_id
I'm using Solspace Calendar 1.8.14 in ExpressionEngine 2.10.1. According to the Solspace Calendar documentation (https://solspace.com/expressionengine/calendar/docs/occurrences/#occurrence\_id) I should be able to display a unique ID for each event occurrence; however, when I try to display this ID it only shows the shared event\_id instead of a unique ID.

Example:

```
{exp:calendar:occurrences event_id='71' date_range_start='today' date_range_end='12 month' upcoming_occurrences_limit='20'}
    <p>ID: {occurrence_id}</p>
{/exp:calendar:occurrences}

```

In the above case, `{occurrence_id}` displays '71' for each occurrence. What am I doing wrong?

Thanks, Brady

# Answer
> 0 votes
I apologize for the documentation being a little vague about this, but this is ONLY available for "custom edited occurrences", which means recurrences that are not just "phantom" ones, but have been edited through the Calendar control panel to create unique field data (title, custom fields, etc) for that particular occurrence. What Calendar does is has to create another channel entry to hold that data. Only occurrences such as these will have a unique occurrence ID (which is the entry ID) that can be filtered on, etc. :)

---
Tags: solspace, calendar
---


# Question
Title: Is there any module available for Export data?
I wants to export all data from my expression engine website (2.8.1.0) and import to Wordpress site. Can you please suggest any module?

Thanks.

# Answer
> 1 votes
Generally when I want to export data from ExpressionEngine I take one of two approaches, depending how much data I need and how complex the channel structure is.

1. The easiest approach is to build templates to output the data. This is easily done to output XML, but it can also output JSON if you tinker around with the formatting in your template. You build your templates just like you'd build a normal frontend, except your wrap it in the XML or JSON formatting you need. Load it up in a browser and you have all the data you need. You can either save the output as an XML file or point your new site's import process directly to the template, depending on the situation.
2. For larger amounts of data, I've also build custom tools for exporting data. I create a new PHP file outside of ExpressionEngine and connect it to the EE database using ExpressionEngine Bootstrap. From there it's just a matter of using PHP and EE's database library to pull the needed data from the database and output it in XML or JSON. This tends to be a bit more complicated, since you have to make your queries handle all of the table relationships that a template tag would already handle for you in approach #1.

# Answer
> 0 votes
You can try this one

https://devot-ee.com/add-ons/export-it https://mithra62.com/projects/view/export-it

If you don't have a lot of data I would the make a template that output all enteries in json/xml . Perhaps edit it so the "data-model" looks the same as what wordpress expects. http://codex.wordpress.org/Importing\_Content#WordPress

```
<item>
 <pubDate>Wed, 30 Jan 2009 12:00:00 +0000</pubDate>
 <category>Kites</category>
 <category>Taiwan</category>
 <title>Fun times</title>
 <content:encoded><p>What great times we had...</p><p>And then Bob...</p></content:encoded>
</item>
<item>...

```

# Answer
> 0 votes
You can use https://devot-ee.com/add-ons/zeal-smart-export

With this module you don't need to do any code and you can also import categories, Grids, relationships as well as Relationships inside Grid. The main benefit is that this module is free. :)

---
Tags: export
---


# Question
Title: New installation of EE: Can I import entries from another installation and keep the entry_ids the same?
So I have an old, bloated installation of EE with way too many addons etc, etc. I'd like to get a clean installation up and running and import all the old entries into the new setup, keeping the entry\_ids the same (for at least one channel anyway).

What steps would I need to take to import the old channel data and keep the entry\_ids the same?

# Answer
I think it's possible but it would require some major MYSQL.

But what I'm thinking is you set up the new site, set up the fields, channels, etc you want then get to moving the data from one table to its new version.

I've done something similar with moving field data between new channels and fields, but I don't use MYSQL often so I can't help much further, unfortunatly.

You may have to create some dummy entries to get your entry IDs up, (I can't remember how EE handled that part).

Obviously a massive task, made even bigger if you have a lot of entries.

Good luck
> 0 votes

# Answer
You can use https://devot-ee.com/add-ons/zeal-smart-export to export data from old site and datagrab module to import the data in new site. Unfortunately, Entry id will change for sure
> 0 votes

---
Tags: import, export
---


title: Low Search related child's category

text:
# Question
Title: Low Search related child's category
Is it possible to search/filter based on a related child's category?

In our results page we always list the parent channel - 'courses'.

90% of the time we search for keywords and categories assigned to the course entries.

Within a course you relate a child entry from the 'course date' channel.

A 'course date' can then be categorised by location.

So when searching I want to return 'courses' where our child 'course date' location category is X.

Is this possible, and what is the best way to achieve it?

# Answer
> 0 votes
This is not possible out of the box, but I have a (non-public) extension that can help you out. Contact me if you want to try that out.

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


title: EE3 breadcrumb solutions

text:
# Question
Title: EE3 breadcrumb solutions
Before upgrading my company's instance of EE to v3 I used Crumbly, which works extremely well for breadcrumb generation.

However it isn't compatible with v3 and I've been unable to find a replacement. How can I go about getting this functionality back, whether through an addon or programatically?

# Answer
> 0 votes
I just recently started an EE3 project. I personally like NavEE. They have a version for EE3 now here. Not only does it make navigations easier to manage and customize, but it also creates great dynamic breadcrumbs and sitemaps.

---
Tags: navigation, ee3
---


# Question
Title: Expression Engine admin page redirects to index view
I am a newbie to Expression Engine, and am trying to help a local nonprofit with an EE site that was hacked. The details of the hack are unclear.

Their admin page was at a specific URL which now no longer renders the administrative login page. Instead, it renders the site's "home" page (root path.)

Specifically, `/main`, the admin page, redirects to `/main/index.php`, which then renders the same content as '/' would have.

My question is - where would you advise me to look for the start of the redirect chain, or to figure out why `main/index.php` simply renders what `/index.php` does?

# Answer
I would start with looking at the `index.php` file in the `/main` directory.

Open it up to verify it's contents. Is it the same as the `index.php` file for the home page/root of the website? If so, you need to simply find the original `admin.php` file for that install or download another one. Next, rename the `admin.php` file from `admin.php` to `index.php` and move it into the `/main` folder.

Make sure you remap the `/system` folder relative path in the new `/main/index.php` file.
> 1 votes

---
Tags: redirects
---


# Question
Title: need some kind of {count} within category archive tags that doesn't reset or each category
I'm displaying a list of facilities by state in a sidebar using the category\_archive tags(template code below)...

* Iowa

+ facility
    + facility
    + facility
* Missouri

+ facility
    + facility
    + facility

if I add a {count}, it resets for each group of facilities (1-3, then 1-3 again). I have map pointers for each location on a google map added with the Google Maps plugin. I'm trying to do some stuff with Javascript that needs to be able to relate the facility in the list with the corresponding map point. The Google Maps plugin puts each facility pointer in an array by the index number, but the numbers go in order, so I can't relate them to the facilities listed in the sidebar, because I can't figure out how to get a running count of all locations listed. Any ideas? and please let me know if I need to clarify something...

# Answer
I had this exact same issue once before as well, I think the tag you are looking for is

```
{absolute_count}

```
> 0 votes

# Answer
Do you need your running count in javascript or PHP?

If you wanted to just be able to map the facility to the google map marker you could do something like this inJavascript (I'm assuming you want to link an anchor to a marker pointer in the JS array) :

```
<!-- Before we start, initialise a counter & relationship array in JS -->
<script type="text/javascript">
    var c = 0;
    var facility2Marker = new Array();
</script>

<!-- print out the menu and apply markers -->
{exp:channel:categories}
    {category_name}
    {exp:channel:entries channel="{catagory_url_title}"}
        <a class="showMarker" href="#" data-facility="{url_title}">{title}</a>
        <script type="text/javascript">

            //add linkage
            facility2Marker["{url_title}"] = c;

            //Code Here to add Maps Marker
            new google.maps.Marker({
                position: myLatlng,
                map: map,
                title: '{title}'
            });

            //move the counter on
            c++;

        </script>
    {/exp:channel:entries}
{/exp:channel:categories}

<!-- set up the click event -->
<script type="text/javascript">
    //assuming your using JQuery here
    $('.showMarker').click(e){
        e.preventDefault();
        //get the index from the linkage
        var MarkerIndex = facility2Marker[$(this_.data("facility")];
        //do something with the marker
        markerArray[MarkerIndex].DoSummin();
    }
</script>

```

Please do note, I just typed this into the editor, so it's not Copy Paste of working code! E & OE, Please excuse syntax or spelling mistakes, it''s just to give you the idea...
> 0 votes

# Answer
Mike,

We ran into a very similar problem and ended up utilizing the "PVL Increment" plugin: https://github.com/pvledoux/Pvl\_increment

It allows you to create custom variables that are then incremented at a point you determine. We declared our variables in the main template page and incremented them inside embeds used to display product information.

Glad you found a solution, but for people that might not have the same resources available as you do, this might be a viable solution.
> 0 votes

---
Tags: categories, javascript, google-maps-for-ee, google-maps
---


# Question
Title: How do I change the way dates are displayed in channel forms and remove the time
I need to change the way the date displays on the front end, specifically in channel form date fields.

Currently it’s

```
18-2-16 2:11 PM

```

I’d be OK with this if it just didn’t have the time displayed. It’s really unhelpful to have the time displayed here, and all of the users so far that have used the system we’ve built have been confused by this.

The field is asking for a date, but the current time is appended, unnecessarily.

Is there some way to change the field to display more like:

```
Wednesday, 3 February 2016

```

or at least just remove the time?

Just to clarify I am not trying to use the date format output tag:

```
{my_date format=""}

```

as this OUTPUTS the date only

I am trying to change the way the native date picker INSERTS the date to a channel form field.

Thanks.

# Answer
> 0 votes
The only way I know of doing this is to modify the jQuery init settings for the date-picker functionality. EE modifies their scripts to coincide with the EE date variable formatting. I guess you could open up your `/themes/ee/asset/javascript/compressed/cp/date_picker.js` file and at the end of `line 46`after the `var n=EE.date.date_format;`, you could add `n="%l, %j %F %Y";`. Keep in mind, I don't know what other ramifications this might cause. This formats the date/time object for that field though.

---
Tags: date-format
---


# Question
Title: Low Reorder not overriding the default filter settings
I'm using a Low Reorder set with a limited Statuses list in the filter settings, e.g.

but there is one page that I would like to use different statuses.

```
{exp:low_reorder:entries status="Current-Store|Store"}

```

Unfortunately, the status parameter is not overriding the default filter settings, despite not using the `force_set_params` parameter at all. Any ideas?

# Answer
> 2 votes
When you create a Low Reorder set, the entries get saved according to the set's filters. That means the entries in that set are limited to the entries that match the given filters.

If you want to override any of the parameters set in the Set's filter in the Entries tag, those filters will therefore be applied *on top of* the Set's entries. If you define a different status than the one given in the set, that won't match any of the Set's entries, because they didn't have that status in the first place.

So, if you give additional parameters, they will be applied *after* the set's filters (parameters) are applied; basically you're just *excluding* other entries from the Set, which means the order of the entries can still be applied.

If you want to define *different* parameters, new entries would apply, and Low Reorder has no way of knowing in which order those new entries should be displayed.

# Answer
> 0 votes
I found that this approach works...

```
{exp:low_reorder:entries rules:status="matches[Open|Drafts]"}

```

---
Tags: low-reorder
---


title: solspace user - Ajax submit form

text:
# Question
Title: solspace user - Ajax submit form
I was having a heck of a time trying to get the solspace user module to submit my form via ajax. I was trying to use the default EE method found here: https://docs.expressionengine.com/latest/channel/channel\_form/examples.html#ajax-driven-entry-form

It just seemed the user module was ignoring the json="yes" and any jquery that I wrote.

# Answer
By searching some other solspace forum product questions I found that **ajax="yes"** was needed. Once I added that to the user {exp:user:register} tag my jquery worked perfect.

Not sure why this isn't in the solspace user documentation. Just thought I'd post it for others having issues with ajax and user.
> 0 votes

---
Tags: solspace-user, ajax, registration
---


title: Can I show query output?

text:
# Question
Title: Can I show query output?
I'm having a difficult time trying to troubleshoot what is wrong with my page in expression engine.

I have a channel called site\_pages and I'd like to select the entry for it, but it doesn't work... I'm almost sold on just using php for everything because Expression Engine is soooooooo ridiculous to troubleshoot these issues.

Here is what I'm running as a test; this h1 doesn't even render;

```
{exp:channel:entries channel="site_pages" url_title="new"}
<h1>Hello 1</h1>
{/exp:channel:entries}

```

What I'm really looking for is this; But I'm not that advanced yet...

```
{exp:channel:entries channel="site_pages" url_title="new"}
<img src="{page_banner}" alt="header image" class="img-responsive"/>
{/exp:channel:entries}

```

**EDIT:**

I got some data to show on the site by creating a new field that matches the url\_title and can get data back by this

```
{exp:channel:entries channel="site_pages" pageId="new"}
<img src="{page_banner}" alt="header image" class="img-responsive"/>
{/exp:channel:entries}

```

Still odd, I can't easily output the query run by expression engine

# Answer
Add the parameter dynamic="no" to your first tag:

```
{exp:channel:entries channel="site_pages" url_title="new" dynamic="no"}
    <h1>Hello 1</h1>
{/exp:channel:entries}

```
> 0 votes

---
Tags: channel-entries
---


# Question
Title: Show coupon value before submitting payment with Charge
I'm using Charge to provide a payment mechanism on a website I'm working on. I'm also using the 'coupons' in Charge to provide a means for users to apply a discount to a purchase at the point of payment. However I would like to validate and display the discount on the payment page before the users submits so they can be sure that the discount has been applied.

I have a bespoke module which I am using to create and manage my basket so I'm not adverse to writing a Stripe API call if required but wondered if perhaps I was missing something that's already built into charge by default?

# Answer
In the end I just went ahead and wrote a small module to handle this...

```
function Checkout_validate_coupon_url() {

    // Construct the ACT URL
    $url = $this->site_url."?ACT=".ee()->functions->fetch_action_id( $this->package_name, 'charge_validate_coupon' );

    return $url;

}

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

function Charge_validate_coupon() {

    // Check for coupon
    $coupon = ee()->input->get('coupon');
    $price = ee()->input->get('price');

    if (is_null($coupon) OR is_null($price)) {
        return FALSE;
    }

    if (!$coupon = ee()->db->where('code', $coupon)->get('charge_coupon')->row_array()) {
        return FALSE;
    }

    // New data
    $data = array(
        'price' => $price
        );

    // Percentage_off OR Amount_off
    if ($coupon['type']=="percentage") {
        $data['price_discounted'] = $price - ($price * ($coupon['percentage_off'] / 100));
    } else {
        $data['price_discounted'] = $price - $coupon['amount_off'];
    }

    // If this is an ajax request return a JSON response
    if (ee()->input->is_ajax_request()) {
        ee()->output->send_ajax_response(array(
            'success' => TRUE,
            'data' => $data
            ));
    }

    return $data;

}

```

And then added an AJAX call to my Charge payment form which fired on keyup/blur of the coupon input. :)
> 1 votes

---
Tags: ajax, charge
---


# Question
Title: Solspace Calendar Export Single Occurrence of Repeating Event
I have a client that presents weekly webinars that are set up as recurring events within Solspace Calendar. When a user registers for the event, they receive a link to the following icalendar tempate:

```
{exp:calendar:icalendar
    event_id="{segment_3}"
    limit="1"
}
{/exp:calendar:icalendar}

```

The problem is that the ICS file contains all occurrences of the event, which then prompts Outlook to create a new calendar, and iCal and Google Calendar to create multiple events.

How can isolate a single occurrence, and only output that to the ICS file?

I've checked the documentation, and there is no mention of using occurrence\_id tags in that context.

Any help is appreciated.

# Answer
> 0 votes
Have you tried limiting the event by day? I used this addon for a client recently and found the documentation a little perplexing at times. Luckily, the support was good. However, after playing with it for a while, I was able to achieve everything I needed. It's a pretty powerful addon. The tags you display in your post are pretty simplified. Go through the docs again and review the optional tags available to use. You should be able to limit the output by start date. I had to do this for individual sale dates. You have `limit` used, but I don't even think `limit` is a parameter calendar even uses.

Something like this maybe?

```
{exp:calendar:icalendar
    event_id="{segment_3}"
    date_range_start=" (whatever the date that this event starts) "
    date_range_end=" (again, the day you want to show) "
    show_days="1"
}
{/exp:calendar:icalendar}

```

Not sure this will do it, but the docs should get you there. Depending on how you set up the ability to build the event in the fieldtype determines what parameters you can use and what results you get as well. Depending on how you have that set up, you may have to output an event and then pass that to an embed to get your desired result. You really have to sit and read through the entire documentation to get your head wrapped around this addon.

*** EDIT ***

Like I said, you may have to get creative with things to get what you are after. I don't know your setup, so I can't say what would work, but I'll show you what I ended up with to get my desired results.

Due to the way my clients wanted the ability to enter events in every possible way, I had to logically break everything out. Luckily, performance didn't drop any noticeable amounts.

I started by looping through the days and checking for events.

```
{exp:calendar:cal
    date_range_start="today"
    date_range_end="today"
    pad_short_weeks="n"
    status="open|closed"
}
    {!-- Loop through all days and check them --}
    {display_each_day}
        {!-- Ensure that there is an event on this day --}
        {if day_event_total > 0}
            {!-- Loop through all events --}
            {events}
                {!-- There was an event so we will process the information for the sale --}
                {embed="_includes/_event_details" event_id="{event_id}"}
            {/events}
        {/if}
        {!-- Ensure that there is NOT an event on this day --}
        {if day_event_total == 0}
            {!-- No events today. Display message and show upcoming sale instead --}
            {embed="_includes/_next_sale"
                dyn_title="NEXT"
            }
        {/if}
    {/display_each_day}
{/exp:calendar:cal}

```

For limiting the "Next" sales, I used the `cal` tags again with the `event_limit` to limit it to a single event.

```
{exp:calendar:cal
    event_limit="1"
    date_range_start="today"
    date_range_end="365 days"
    pad_short_weeks="n"
    status="open|closed"
}

```

Not sure if you could loop through the single days of an event and build the ical from a single day or not though... ???

For any of the details, I used an embed to process the event tags using the passed id.

```
{exp:calendar:events
    event_id="{embed:event_id}"
    dynamic="no"
    event_limit="1"
    status="open|closed"
}
{/exp:calendar:events}

```

---
Tags: solspace-calendar
---


# Question
Title: Can I view how many times a user has logged into my site in EE?
All I can see is when they registered and when they last logged in. Can I get more detail - for example, how many times they have logged in, the time they spent on the site etc. Many thanks.

# Answer
> 0 votes
The only way I can see to do this would be to catch a successful login and process a tracking cookie or session to capture the time until they logout. You would have to do something that didn't clash with EE's variables, but something like:

```
$_SESSION['loginTime'] = new DateTime(date('y-m-d h:m:s'));

```

You would need to either write an addon or enable PHP though. Once they log out, you could capture the time and log the difference.

# Answer
> 0 votes
To accomplish acquiring the metrics like your after, I wrote an extension and accessory for a client that writes, login-timestamp, sessionid & user\_id to a table, I also do logout as well, but most people don't usually logout making it tough to actually measure time on site. The accessory is a dashboard for the data.

---
Tags: add-on
---


title: Expired entry URL redirect

text:
# Question
Title: Expired entry URL redirect
Apologies... I am more end user than developer so I understand just enough coding to be dangerous! :)

I found a question and answer about redirecting an expired URL to another page, and using that code worked... sort of. Navigating to an expired entry's URL did take me to the index page I wanted it to redirect me to while unexpired entries loaded normally, but my problem is with entries that have no expiration date entered because they are open indefinitely. How do I fix it so that entries with no exp. date set still load while being able to redirect expired ones?

Here's what I have...

```
{exp:channel:entries channel="{channel_name}" status="open"}

    {if expiration_date < current_time}{redirect="/resources/jobs"}{/if}

    {!-- page content --}

    ...

{/exp:channel:entries}

```

# Answer
> 2 votes
Well, you have a conditional that must be satisfied in order to achieve your redirect. In order to accommodate your requirements, you must address every condition and you are not (though you may think you are!).

You see, if you don't set an expiration date, that value should output as empty. Think empty... zero... ExpressionEngine is looking at that conditional like this (when there is no `{expiration_date}` set)..

```
{if 0 < current_time}

```

Well, this is always going to be true, so you aren't covering this condition properly. One way to cover this condition is to first make sure that `{expiration_date}` is set! This is one way to go about it:

```
{if expiration_date && expiration_date < current_time}

    {!-- Here, we first ask if `expiration_date` is set. If it is,
      -- we move on to check if the expiration date is less than our
      -- current time. If these two things are true, this gets executed!
      --}

    {redirect="/resources/jobs"}

{/if}

```

---
Tags: redirects, expire
---


# Question
Title: 404 error when editing or posting a new article
I'm having an issue with a 404 error that appears after creating a new article entry, or editing a template.

I recently upgraded my website to the latest version of ExpressionEngine, following the official guide step by step. Before the upgrade this problem was still present but instead of getting a permission denied or a 404 I got a message pop-up about disallowed characters. Except after the upgrade, the problem has changed.

I have a large article write-up I have spent some time on, and when I went to submit the article the article I used to get a disallowed character alert, despite not using any disallowed characters (as far as I was aware). After my upgrade to the latest ExpressionEngine, I now receive a 404 error (I disabled CloudFlare to get a better error).

Similarly, there have been a few changes to my template, introducing some new items and changes to the CSS theme. However, when I edit a template or even just save it without making changes, I'm redirected to my website 404 page.

Excluding the update the only change I have made of significance is a change to my .htaccess file to redirect any visitors without a subdomain to the www subdomain.

```
<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /

    # Replaces all non-subdomain connections with a www subdomain.
    RewriteCond %{HTTP_HOST} ^bowl-of-soup\.co.uk$ [NC]
    RewriteRule ^(.*)$ http://www.bowl-of-soup.co.uk/$1 [R=301,L]

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

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

```

Long story short I am getting 404 errors when I edit my template or my articles, and before that I was getting disallowed keys error. Does anyone know what could be causing this problem?

**Edit (6/12/2014)**

I opened up my normalize.css file and without changing anything submitted it and it triggered a 404. However, I ran the CSS through a CSS clean-up tool and saved it again, this time it passed through, and any saves and changes made are accepted by the system.

I've been trying to insert characters that were unique to the CSS before I cleaned it up, but none of them seem to trigger the 404. I'm not sure this is a .htaccess issue any more, as I was getting **Disallowed key characters** before. Is there a page associated with this error? I suspect during the upgrade whatever code displays that error has been corrupted. Otherwise, the disallowed key characters is causing my issues.

For reference:

Adding this unminified CSS (normalize github) will trigger a 404 (possible disallowed key characters)

I removed the comments and this version (my website cleaned version) was accepted by my system.

# Answer
> 0 votes
The problem I was experiencing turned out not be related to ExpressionEngine. The host I was using had an incorrectly configured mod\_security Apache extension which was - for reasons unknown to me - sending a 404 whenever ExpressionEngine came to submitting the post.

Since I was using shared hosting I was not allowed to configure it myself, but my understanding was the server misconfiguration was to blame for the issue. Since requesting mod\_security to be toned down for my EE site, the post functionality worked perfectly fine.

# Answer
> 1 votes
I agree that someone will need CP / FTP access to really help you, but it sounds like you're having issues with .htaccess and I would start with updating that to the following. It's a tried and true file that I have used for years on all kinds of builds:

```
# Apache configuration file
# httpd.apache.org/docs/2.2/mod/quickreference.html

# Note .htaccess files are an overhead, this logic should be in your Apache
# config if possible: httpd.apache.org/docs/2.2/howto/htaccess.html

# Techniques in here adapted from all over, including:
#   Kroc Camen: camendesign.com/.htaccess
#   perishablepress.com/press/2006/01/10/stupid-htaccess-tricks/
#   Sample .htaccess file of CMS MODx: modxcms.com

# ----------------------------------------------------------------------
# Better website experience for IE users
# ----------------------------------------------------------------------

# Force the latest IE version, in various cases when it may fall back to IE7 mode
#  github.com/rails/rails/commit/123eb25#commitcomment-118920
# Use ChromeFrame if it's installed for a better experience for the poor IE folk

<IfModule mod_headers.c>
  Header set X-UA-Compatible "IE=Edge,chrome=1"
  # mod_headers can't match by content-type, but we don't want to send this header on *everything*...
  <FilesMatch "\.(js|css|gif|png|jpe?g|pdf|xml|oga|ogg|m4a|ogv|mp4|m4v|webm|svg|svgz|eot|ttf|otf|woff|ico|webp|appcache|manifest|htc|crx|oex|xpi|safariextz|vcf)$" >
    Header unset X-UA-Compatible
  </FilesMatch>
</IfModule>

# ----------------------------------------------------------------------
# Cross-domain AJAX requests
# ----------------------------------------------------------------------

# Serve cross-domain Ajax requests, disabled by default.
# enable-cors.org
# code.google.com/p/html5security/wiki/CrossOriginRequestSecurity

#  <IfModule mod_headers.c>
#    Header set Access-Control-Allow-Origin "*"
#  </IfModule>

# ----------------------------------------------------------------------
# CORS-enabled images (@crossorigin)
# ----------------------------------------------------------------------

# Send CORS headers if browsers request them; enabled by default for images.
# developer.mozilla.org/en/CORS_Enabled_Image
# blog.chromium.org/2011/07/using-cross-domain-images-in-webgl-and.html
# hacks.mozilla.org/2011/11/using-cors-to-load-webgl-textures-from-cross-domain-images/
# wiki.mozilla.org/Security/Reviews/crossoriginAttribute

<IfModule mod_setenvif.c>
  <IfModule mod_headers.c>
    # mod_headers, y u no match by Content-Type?!
    <FilesMatch "\.(gif|png|jpe?g|svg|svgz|ico|webp)$">
      SetEnvIf Origin ":" IS_CORS
      Header set Access-Control-Allow-Origin "*" env=IS_CORS
    </FilesMatch>
  </IfModule>
</IfModule>

# ----------------------------------------------------------------------
# Webfont access
# ----------------------------------------------------------------------

# Allow access from all domains for webfonts.
# Alternatively you could only whitelist your
# subdomains like "subdomain.example.com".

<IfModule mod_headers.c>
  <FilesMatch "\.(ttf|ttc|otf|eot|woff|font.css)$">
    Header set Access-Control-Allow-Origin "*"
  </FilesMatch>
</IfModule>

# ----------------------------------------------------------------------
# Proper MIME type for all files
# ----------------------------------------------------------------------

# JavaScript
#   Normalize to standard type (it's sniffed in IE anyways)
#   tools.ietf.org/html/rfc4329#section-7.2
AddType application/javascript         js jsonp
AddType application/json               json

# Audio
AddType audio/ogg                      oga ogg
AddType audio/mp4                      m4a f4a f4b

# Video
AddType video/ogg                      ogv
AddType video/mp4                      mp4 m4v f4v f4p
AddType video/webm                     webm
AddType video/x-flv                    flv

# SVG
#   Required for svg webfonts on iPad
#   twitter.com/FontSquirrel/status/14855840545
AddType     image/svg+xml              svg svgz
AddEncoding gzip                       svgz

# Webfonts
AddType application/vnd.ms-fontobject  eot
AddType application/x-font-ttf         ttf ttc
AddType font/opentype                  otf
AddType application/x-font-woff        woff

# Assorted types
AddType image/x-icon                        ico
AddType image/webp                          webp
AddType text/cache-manifest                 appcache manifest
AddType text/x-component                    htc
AddType application/xml                     rss atom xml rdf
AddType application/x-chrome-extension      crx
AddType application/x-opera-extension       oex
AddType application/x-xpinstall             xpi
AddType application/octet-stream            safariextz
AddType application/x-web-app-manifest+json webapp
AddType text/x-vcard                        vcf
AddType application/x-shockwave-flash       swf
AddType text/vtt                            vtt

# ----------------------------------------------------------------------
# Allow concatenation from within specific js and css files
# ----------------------------------------------------------------------

# e.g. Inside of script.combined.js you could have
#   <!--#include file="libs/jquery-1.5.0.min.js" -->
#   <!--#include file="plugins/jquery.idletimer.js" -->
# and they would be included into this single file.

# This is not in use in the boilerplate as it stands. You may
# choose to use this technique if you do not have a build process.

#<FilesMatch "\.combined\.js$">
#  Options +Includes
#  AddOutputFilterByType INCLUDES application/javascript application/json
#  SetOutputFilter INCLUDES
#</FilesMatch>

#<FilesMatch "\.combined\.css$">
#  Options +Includes
#  AddOutputFilterByType INCLUDES text/css
#  SetOutputFilter INCLUDES
#</FilesMatch>

# ----------------------------------------------------------------------
# Gzip compression
# ----------------------------------------------------------------------

<IfModule mod_deflate.c>

  # Force deflate for mangled headers developer.yahoo.com/blogs/ydn/posts/2010/12/pushing-beyond-gzipping/
  <IfModule mod_setenvif.c>
    <IfModule mod_headers.c>
      SetEnvIfNoCase ^(Accept-EncodXng|X-cept-Encoding|X{15}|~{15}|-{15})$ ^((gzip|deflate)\s*,?\s*)+|[X~-]{4,13}$ HAVE_Accept-Encoding
      RequestHeader append Accept-Encoding "gzip,deflate" env=HAVE_Accept-Encoding
    </IfModule>
  </IfModule>

  # Compress all output labeled with one of the following MIME-types
  <IfModule mod_filter.c>
    AddOutputFilterByType DEFLATE application/atom+xml \
                                  application/javascript \
                                  application/json \
                                  application/rss+xml \
                                  application/vnd.ms-fontobject \
                                  application/x-font-ttf \
                                  application/xhtml+xml \
                                  application/xml \
                                  font/opentype \
                                  image/svg+xml \
                                  image/x-icon \
                                  text/css \
                                  text/html \
                                  text/plain \
                                  text/x-component \
                                  text/xml
  </IfModule>

</IfModule>

# ----------------------------------------------------------------------
# Expires headers (for better cache control)
# ----------------------------------------------------------------------

# These are pretty far-future expires headers.
# They assume you control versioning with filename-based cache busting
# Additionally, consider that outdated proxies may miscache
#   www.stevesouders.com/blog/2008/08/23/revving-filenames-dont-use-querystring/

# If you don't use filenames to version, lower the CSS and JS to something like
# "access plus 1 week".

<IfModule mod_expires.c>
  ExpiresActive on

# Perhaps better to whitelist expires rules? Perhaps.
  ExpiresDefault                          "access plus 1 month"

# cache.appcache needs re-requests in FF 3.6 (thanks Remy ~Introducing HTML5)
  ExpiresByType text/cache-manifest       "access plus 0 seconds"

# Your document html
  ExpiresByType text/html                 "access plus 0 seconds"

# Data
  ExpiresByType text/xml                  "access plus 0 seconds"
  ExpiresByType application/xml           "access plus 0 seconds"
  ExpiresByType application/json          "access plus 0 seconds"

# Feed
  ExpiresByType application/rss+xml       "access plus 1 hour"
  ExpiresByType application/atom+xml      "access plus 1 hour"

# Favicon (cannot be renamed)
  ExpiresByType image/x-icon              "access plus 1 week"

# Media: images, video, audio
  ExpiresByType image/gif                 "access plus 1 month"
  ExpiresByType image/png                 "access plus 1 month"
  ExpiresByType image/jpeg                "access plus 1 month"
  ExpiresByType video/ogg                 "access plus 1 month"
  ExpiresByType audio/ogg                 "access plus 1 month"
  ExpiresByType video/mp4                 "access plus 1 month"
  ExpiresByType video/webm                "access plus 1 month"

# HTC files  (css3pie)
  ExpiresByType text/x-component          "access plus 1 month"

# Webfonts
  ExpiresByType application/x-font-ttf    "access plus 1 month"
  ExpiresByType font/opentype             "access plus 1 month"
  ExpiresByType application/x-font-woff   "access plus 1 month"
  ExpiresByType image/svg+xml             "access plus 1 month"
  ExpiresByType application/vnd.ms-fontobject "access plus 1 month"

# CSS and JavaScript
  ExpiresByType text/css                  "access plus 1 year"
  ExpiresByType application/javascript    "access plus 1 year"

</IfModule>

# ----------------------------------------------------------------------
# Prevent mobile network providers from modifying your site
# ----------------------------------------------------------------------

# The following header prevents modification of your code over 3G on some
# European providers.
# This is the official 'bypass' suggested by O2 in the UK.

# <IfModule mod_headers.c>
# Header set Cache-Control "no-transform"
# </IfModule>

# ----------------------------------------------------------------------
# ETag removal
# ----------------------------------------------------------------------

# FileETag None is not enough for every server.
<IfModule mod_headers.c>
  Header unset ETag
</IfModule>

# Since we're sending far-future expires, we don't need ETags for
# static content.
#   developer.yahoo.com/performance/rules.html#etags
FileETag None

# ----------------------------------------------------------------------
# Stop screen flicker in IE on CSS rollovers
# ----------------------------------------------------------------------

# The following directives stop screen flicker in IE on CSS rollovers - in
# combination with the "ExpiresByType" rules for images (see above).

# BrowserMatch "MSIE" brokenvary=1
# BrowserMatch "Mozilla/4.[0-9]{2}" brokenvary=1
# BrowserMatch "Opera" !brokenvary
# SetEnvIf brokenvary 1 force-no-vary

# ----------------------------------------------------------------------
# Set Keep-Alive Header
# ----------------------------------------------------------------------

# Keep-Alive allows the server to send multiple requests through one
# TCP-connection. Be aware of possible disadvantages of this setting. Turn on
# if you serve a lot of static content.

# <IfModule mod_headers.c>
#   Header set Connection Keep-Alive
# </IfModule>

# ----------------------------------------------------------------------
# Cookie setting from iframes
# ----------------------------------------------------------------------

# Allow cookies to be set from iframes (for IE only)
# If needed, specify a path or regex in the Location directive.

# <IfModule mod_headers.c>
#   Header set P3P "policyref=\"/w3c/p3p.xml\", CP=\"IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT\""
# </IfModule>

# ----------------------------------------------------------------------
# Start rewrite engine
# ----------------------------------------------------------------------

# Turning on the rewrite engine is necessary for the following rules and
# features. FollowSymLinks must be enabled for this to work.

# Some cloud hosting services require RewriteBase to be set: goo.gl/HOcPN
# If using the h5bp in a subdirectory, use `RewriteBase /foo` instead where
# 'foo' is your directory.

# If your web host doesn't allow the FollowSymlinks option, you may need to
# comment it out and use `Options +SymLinksOfOwnerMatch`, but be aware of the
# performance impact: http://goo.gl/Mluzd

<IfModule mod_rewrite.c>
  Options +FollowSymlinks
# Options +SymLinksIfOwnerMatch
  RewriteEngine On
# RewriteBase /
</IfModule>

# ----------------------------------------------------------------------
# Suppress or force the "www." at the beginning of URLs
# ----------------------------------------------------------------------

# The same content should never be available under two different URLs -
# especially not with and without "www." at the beginning, since this can cause
# SEO problems (duplicate content). That's why you should choose one of the
# alternatives and redirect the other one.

# By default option 1 (no "www.") is activated.
# no-www.org/faq.php?q=class_b

# If you'd prefer to use option 2, just comment out all option 1 lines
# and uncomment option 2.

# IMPORTANT: NEVER USE BOTH RULES AT THE SAME TIME!

# ----------------------------------------------------------------------

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

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

# ----------------------------------------------------------------------

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

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

# ----------------------------------------------------------------------
# Built-in filename-based cache busting
# ----------------------------------------------------------------------

# If you're not using the build script to manage your filename version revving,
# you might want to consider enabling this, which will route requests for
# /css/style.20110203.css to /css/style.css

# To understand why this is important and a better idea than all.css?v1231,
# read: github.com/h5bp/html5-boilerplate/wiki/cachebusting

# <IfModule mod_rewrite.c>
#   RewriteCond %{REQUEST_FILENAME} !-f
#   RewriteCond %{REQUEST_FILENAME} !-d
#   RewriteRule ^(.+)\.(\d+)\.(js|css|png|jpg|gif)$ $1.$3 [L]
# </IfModule>

# ----------------------------------------------------------------------
# Prevent SSL cert warnings
# ----------------------------------------------------------------------

# Rewrite secure requests properly to prevent SSL cert warnings, e.g. prevent
# https://www.example.com when your cert only allows https://secure.example.com

# <IfModule mod_rewrite.c>
#   RewriteCond %{SERVER_PORT} !^443
#   RewriteRule ^ https://example-domain-please-change-me.com%{REQUEST_URI} [R=301,L]
# </IfModule>

# ----------------------------------------------------------------------
# Prevent 404 errors for non-existing redirected folders
# ----------------------------------------------------------------------

# without -MultiViews, Apache will give a 404 for a rewrite if a folder of the
# same name does not exist.
# webmasterworld.com/apache/3808792.htm

Options -MultiViews

# ----------------------------------------------------------------------
# Custom 404 page
# ----------------------------------------------------------------------

# You can add custom pages to handle 500 or 403 pretty easily, if you like.
# If you are hosting your site in subdirectory, adjust this accordingly
#    e.g. ErrorDocument 404 /subdir/404.html
ErrorDocument 404 /404

# ----------------------------------------------------------------------
# UTF-8 encoding
# ----------------------------------------------------------------------

# Use UTF-8 encoding for anything served text/plain or text/html
AddDefaultCharset utf-8

# Force UTF-8 for a number of file formats
AddCharset utf-8 .atom .css .js .json .rss .vtt .xml

# ----------------------------------------------------------------------
# A little more security
# ----------------------------------------------------------------------

# To avoid displaying the exact version number of Apache being used, add the
# following to httpd.conf (it will not work in .htaccess):
# ServerTokens Prod

# "-Indexes" will have Apache block users from browsing folders without a
# default document Usually you should leave this activated, because you
# shouldn't allow everybody to surf through every folder on your server (which
# includes rather private places like CMS system folders).
<IfModule mod_autoindex.c>
  Options -Indexes
</IfModule>

# Block access to "hidden" directories or files whose names begin with a
# period. This includes directories used by version control systems such as
# Subversion or Git.
<IfModule mod_rewrite.c>
  RewriteCond %{SCRIPT_FILENAME} -d [OR]
  RewriteCond %{SCRIPT_FILENAME} -f
  RewriteRule "(^|/)\." - [F]
</IfModule>

# Block access to backup and source files. These files may be left by some
# text/html editors and pose a great security danger, when anyone can access
# them.
<FilesMatch "(\.(bak|config|sql|fla|psd|ini|log|sh|inc|swp|dist)|~)$">
  Order allow,deny
  Deny from all
  Satisfy All
</FilesMatch>

# If your server is not already configured as such, the following directive
# should be uncommented in order to set PHP's register_globals option to OFF.
# This closes a major security hole that is abused by most XSS (cross-site
# scripting) attacks. For more information: http://php.net/register_globals
#
# IF REGISTER_GLOBALS DIRECTIVE CAUSES 500 INTERNAL SERVER ERRORS:
#
# Your server does not allow PHP directives to be set via .htaccess. In that
# case you must make this change in your php.ini file instead. If you are
# using a commercial web host, contact the administrators for assistance in
# doing this. Not all servers allow local php.ini files, and they should
# include all PHP configurations (not just this one), or you will effectively
# reset everything to PHP defaults. Consult www.php.net for more detailed
# information about setting PHP directives.

# php_flag register_globals Off

# Rename session cookie to something else, than PHPSESSID
# php_value session.name sid

# Disable magic quotes (This feature has been DEPRECATED as of PHP 5.3.0 and REMOVED as of PHP 5.4.0.)
# php_flag magic_quotes_gpc Off

# Do not show you are using PHP
# Note: Move this line to php.ini since it won't work in .htaccess
# php_flag expose_php Off

# Level of log detail - log all errors
# php_value error_reporting -1

# Write errors to log file
# php_flag log_errors On

# Do not display errors in browser (production - Off, development - On)
# php_flag display_errors Off

# Do not display startup errors (production - Off, development - On)
# php_flag display_startup_errors Off

# Format errors in plain text
# Note: Leave this setting 'On' for xdebug's var_dump() output
# php_flag html_errors Off

# Show multiple occurrence of error
# php_flag ignore_repeated_errors Off

# Show same errors from different sources
# php_flag ignore_repeated_source Off

# Size limit for error messages
# php_value log_errors_max_len 1024

# Don't precede error with string (doesn't accept empty string, use whitespace if you need)
# php_value error_prepend_string " "

# Don't prepend to error (doesn't accept empty string, use whitespace if you need)
# php_value error_append_string " "

# Increase cookie security
<IfModule php5_module>
  php_value session.cookie_httponly true
</IfModule>

# ExpressionEngine Rewrite

<IfModule mod_rewrite.c>
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond $1 !.(\.css|\.js|\.png|\.jpe?g|\.gif|\.ico)$ [NC]
  RewriteRule ^(.+)$ index.php/$1 [L]
</IfModule>

```

---
Tags: 404
---


title: Word separator for file names

text:
# Question
Title: Word separator for file names
The default file name separator for Expression Engine is an underscore. And this cannot be changed. But the url title word separator is.

For seo purposes, our client asked if it is possible to use dashes instead of underscores in (image) filenames. (source)

So I had a look into it. We're using assets and ce\_image for this project. And I found a lot of php code replacing special characters and spaces with underscores. Seems like it is hardcoded in many of the add-ons. And that concerns me.

So I'm wondering if anyone has tried to do the same? For example. There's a clean\_filename function in the Assets\_lib.php. Is just rewriting that function enough to replace all underscores with dashes for new uploads. Or is it more complex than that?

# Answer
The easiest workaround seems to be using CE\_Image. It offers a filename parameter.

We chose to use the url\_title of the article, in combination with a counter (or other unique string). That solved our issue.
> 1 votes

# Answer
I'm gonna say it's way more complex. It's possible that it's simply matter of replacing all filename handlers and actions with ones to suite your needs (replace with dashes instead of underscores), but it might involve some deep core modification.

Also, anytime you install a new addon that has any file functionality, you'll need to scan it in case it handles filenames internally instead of using EE methods (that Assets hooks into).

Annnd anytime you upgrade EE, you'll have to have any core modifications you've made documented so you can reimplement them after upgrade.

Unless someone out there can report going through this process, I'm going to guess you'll have to do it yourself. I would recommend launching a new development server and repo branch of your application to start the process. It may end up much simpler than expected (like I said, hopefully someone can chime in and has done this already), but the biggest part will be **very careful** testing and QA of these changes before pushing to staging or production.

Start by looking at the `File_field`, `File_integrity`, and `Filemanager` library files in EE, as well as the `Upload` library file in CI. Good luck.
> 1 votes

---
Tags: assets, ce-image, files, seo
---


title: Shortlist - showing only one item

text:
# Question
Title: Shortlist - showing only one item
I am trying to show a list of items (as bookmarked). However, the list only displays one item.

```
{exp:shortlist:view}
    {if count != ""}
    <div class="widget clearfix">
        <h4>My Bookmarked Items ({total_results})</h4>
        <ul>
            <li>{title} (<a href="{remove_url}">Remove</a>)</li>
        </ul>
    </div>
    {/if}
    <p>{if no_results}Your list is empty{/if}</p>
{/exp:shortlist:view}

```

There are two items in the list, when seen from the backend. However, only one is getting listed.

# Answer
Try changing:

```
{if count != ""}

```

to:

```
{if count==1}

```

Hopefully that sorts it out :) \- I noticed that your code was a little different to the docs...
> 0 votes

---
Tags: ee2, shortlist
---


# Question
Title: Solspace Calendar: conditional for minutes?
I'm trying to find a way in Calendar for start times that are on the hour (e.g., 8:00pm) to output as "8pm" and for times that are not on the hour (e.g., 8:15pm) to output as "8:15pm". I'm not figuring out how to write the conditional to do that. Any ideas?

EDIT: Just to make this a little more clear, I want any times that are on the hour to just be the hour (8:00pm should render as 8pm) and any times that are not on the hour should have the hour and the minutes (8:25pm should render as 8:25pm).

# Answer
> 0 votes
You should have a look at the demo templates, as this problem was solved there. :)

You actually need to use a different time variable available to you:

```
{event_start_date format="%g"}
{if event_start_minute > 0}
   :{event_start_minute}{event_start_date format="%A"}
{/if}

```

# Answer
> 0 votes
You should be able to handle this like any other conditional using the `event_start_date` variable.

So if you wanted something that wasn't a specific hour, but for ANY time, you could do something like:

```
{if "{event_start_date format='%i'}" == "00"}
    {event_start_date format='%g:%i%A'}
{if:else}
    {event_start_date format='%g:15%A'}
{/if}

```

---
Tags: solspace-calendar
---


# Question
Title: Redirect after forum log-in when site_url is protocol agnostic
I have stumbled across an issue with the forum module whereby if you have a site\_url specified in config as protocol agnostic, i.e. minus http: or https: then the redirect after forum log-in always returns you to the site home page.

My site\_url value is set as "//www.example.com" My Forum URL is set as "/forums/"

When the redirect after log-in through the forum templates occurs I get sent to:

http://www.example.com/www.example.com/forums

Any thoughts? :/

# Answer
> 0 votes
I solved this eventually by adding the following to my config:

```
if (false !== strpos($_SERVER['REQUEST_URI'], '/forums')) {
    $config['site_url'] = 'https:'.$config['site_url'];
}

```

This forces the requests for the forums module to use absolute protocol and this negates the log-in redirect issue. :)

# Answer
> 0 votes
I am having the same settings as you have except for the http:// protocol being there.

It works pretty well for me, when I log in from the forums it takes me to the forum home.

---
Tags: login, config, forum, domain
---


title: White screen of death after server move

text:
# Question
Title: White screen of death after server move
I am moving my expression engine site and database to a new server. Everything seems to be directed correctly but when I access admin.php I get a blank page. Any thoughts?

# Answer
If you are seeing a white screen there's an error happening and you need to display that error to be able to know how to proceed. (See the EE user guide about Blank Pages.)

To show that error, edit your folder's index.php file and replace `$debug = 0` with `$debug = 1`. Revisit your site and you should see the error.

If you see something like this:

```
A Database Error Occurred
Unable to connect to your database server using the provided settings.

```

Then follow this answer on another question.

If that doesn't help, try the solutions offered in this answer.
> 7 votes

# Answer
I had this problem recently after the host upgraded to PHP 5.3.27. The front of the site worked fine but when I tried to log in to the CP (after logging in) I got the white screen of death. Are you able to log in at all?

My problem was that the new version of PHP had been compiled, quite correcty, with an oAuth plugin. This caused a problem with an old Twitter add-on that used an old oAuth PHP library.

The solution was as simple as commenting out one method in the add-on (the method didn't even do anything) and it was all fixed. Took 8 hours to work that out.

So, do you have anything that might be using an old oAuth library?

I should add that no matter what I did I could not get ANY debug info to display.
> 1 votes

# Answer
My experience with blank home page.

Sometimes when you are migrating your page you can get blank home page.

I found the problem with the home page not displaying from the base URL. it was because there was a default.html file in the root directory. The old hosting server must had set the order to look for start files to PHP extension as the first default so it ignored the default.html file in the root directory and loaded index.php.

The new hosting server must have the default extension it looks for as an .HTM or .HTML file and was loading the blank default.html file first. Once I deleted the blank default.html file the hosting server started loading the index.php file and displayed the WordPress home page.

BR
Andrej
> 0 votes

# Answer
The new hosting server must have the default extension it looks for as an .HTM or .HTML file and was loading the blank default.html file first.
> 0 votes

# Answer
Also, try the site without any `.htaccess` files. If the server (apache) is bawking trying to read these (because the apache version/config is different on the new server) the bad `.htaccess` can casue a WSOD.
> 0 votes

# Answer
Most probably it's a server side issue or a .httaccess. As specified above try change in your config.php file `$debug = 0 with $debug = 1`
> 0 votes

# Answer
Check the PHP version. The 5.2 and below causing this issue. Also as was mentioned above run debug mode. I had same issue after moving the website to another host, where you should manually set the php version
> 0 votes

---
Tags: server, admin, white-screen-of-death
---


# Question
Title: Gmaps using stashed lat/long not working
I've got a google map (gmaps addon) that I'm adding pins to via low search results. Unfortunately I cannot seem to get the lat/long to pass through to the tag.

My template is below. You can see a testing div which successfully outputs the lat/long as expected, but if I use the same code inside the parameter for gmaps nothing is output. However if I manually add in the lat/long the map works as expected.

I suspect that this is due to parse order but am unsure how to overcome this issue. This template is already in an embed so I really don't want to have a nested embed.

```
{exp:low_search:results query="{segment_3}" limit="1" dynamic="no" disable="member_data|comments|pagination"}

    {if low_search_no_results}
    <div style="width:100%;height:500px;padding:150px 40px 40px 40px;background:pink;">
        <h4 class="text-center">no search results</h4>

    </div>
    {/if}

    {exp:stash:set name="address" parse_tags="yes" type="snippet"}
            {!--
            // stash markers to use in google map
            --}

            {if "{trip_map:marker:latlng}" !=""}
                {trip_map:marker:latlng}|
            {if:else}
                {map_points_original_site}
                    {map_points_original_site:point_location_latlng}{map_points_original_site:point_location}|
                {/map_points_original_site}
            {/if}
    {/exp:stash:set}

    {!-- here for testing only--}
    <div style="width:100%;min-height:20px;padding:{if count=='1'}125{if:else}30{/if}px 2px 10px 2px;background-color:rgba(250, 250, 131, 0.4);">
        <p class="text-center" style="margin:3px 0 0;">-- title: {title} --</p>
        <p>
        stash: {exp:stash:get name='address' type='snippet'}
        </p>
    </div>
    {!--end testing--}

{/exp:low_search:results}

    {exp:gmaps:geocoding width="100%" marker="yes" width="100%" height="750px" map_type="terrain" zoom_control_position="LEFT_BOTTOM" zoom="8" latlng="{exp:stash:get name='address' type='snippet'}"}

    {/exp:gmaps:geocoding}

```

**UPDATE**

The testing div output is here:

> stash: 39.008498,-106.243825|39.043544,-106.263701|38.9228982,-106.1695513|39.004257,-106.24123|

# Answer
> 1 votes
You need `parse="yes" trim="yes"` when you set the var (to fully parse the conditionals and remove whitespace), parse="inward" on the gmaps tag (so the parameters are parsed), and add 'random' to the 2nd use of stash get to stop EE replacing the second instance of the stash:get tag with a 'M0...' cache marker:

```
{exp:low_search:results query="{segment_3}" limit="1" dynamic="no" disable="member_data|comments|pagination"}
  {exp:stash:set name="address" parse="yes" trim="yes"}
            {if "{trip_map:marker:latlng}" !=""}
                {trip_map:marker:latlng}|
            {if:else}
                {map_points_original_site}
                    {map_points_original_site:point_location_latlng}{map_points_original_site:point_location}|
                {/map_points_original_site}
            {/if}
    {/exp:stash:set}

    {!-- here for testing only--}
    <div style="width:100%;min-height:20px;padding:{if count=='1'}125{if:else}30{/if}px 2px 10px 2px;background-color:rgba(250, 250, 131, 0.4);">
        <p class="text-center" style="margin:3px 0 0;">-- title: {title} --</p>
        <p>
        stash: {exp:stash:get name='address'}
        </p>
    </div>
    {!--end testing--}

{/exp:low_search:results}

{exp:stash:parse process="end"}
    {exp:gmaps:geocoding width="100%" marker="yes" width="100%" height="750px" map_type="terrain" zoom_control_position="LEFT_BOTTOM" zoom="8" latlng="{stash:address}"}

    {/exp:gmaps:geocoding}
{/exp:stash:parse}

```

Note that sometimes `trim="yes"` won't remove all the whitespace so you may need to close it up manually.

---
Tags: templates, stash, parse-order, google-maps
---


# Question
Title: Upgraded exp-resso Store from 1.6x to 2.5.1 Check Out Error
I upgraded exp-resso Store from 1.6 to 2.5.1. Store worked fine on 1.6 but I needed to upgrade EE to 2.10.3 Now I get the checkout error "This transaction cannot be accepted." I checked with AuthorizeNet and the API Login ID and the Transaction Key are fine. It was my understanding that I needed to change/add the payment\_method in checkout3.html file.

```
Original code in checkout3.html

<select id="payment_method" name="payment_method">
<option value=""></option>
{payment_method_options}
</select>

changed to this:
<select id="payment_method" name="payment_method">
<option value="AuthorizeNet_AIM" selected>Credit Card</option>
</select>

```

I still get the error “This transaction cannot be accepted."

I have looked through support docs and I still can’t figure out what to do. Any suggesting.

# Answer
I put in all new templates files and also generated a new transaction key (3rd time) at AuthorizeNet and it works
> 0 votes

---
Tags: expresso-store
---


# Question
Title: Low Search with LOW_options mix channel field with category
I do not know how to put it, there seem to be confusion.

```
    <div class="row small-up-2 medium-up-4 large-up-6" >
  {exp:low_options:material_content}
    {options}
        <div class="column"><input id="{option:label}" type="checkbox" name="search:material_content[]" value="{option:value}"
        {if low_search_search:material_content ~ '/(^|\|)'.option:value.'(\||$)/'} checked{/if}><label for="checkbox1">{option:label}</label></div>
      </label>
    {/options}
  {/exp:low_options:material_content}
  <button type="submit">sök material</button>
  </div>

```

show, in my form, checkboxes corresponding to field content (as expected) but **also content from a category group!**. As checkbox, yes. The form does not give any result either.

I can provide screenshots but do not know how to attach them to this question.

Any help highly appreciated, because itäs just confusion here.. Thanks.

# Answer
> 0 votes
The credits must go to Low, he suggested out that there might be a conflict that caused the problem. And there was. A name conflict between a category name and a fieldname.

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


title: Expression Engine Search - EE2

text:
# Question
Title: Expression Engine Search - EE2
I was wondering how the search engine for expression engine works. We are trying to search for some terms which we would like to have specific results. When searching for a unique term which is not used in other entries the search results seem rather generic and mostly unrelated.

What type of content does the search module crawl?

Will it filter results based on title, body, tags..?

How, if multiple filters, does the search module prioritize these item?

# Answer
You should probably read up on the Search docs for EE.

That said, EE uses substring matching to return the search results. It's a fairly simple method (using MySQL's LIKE operator) that doesn't offer any scoring mechanism to add relevance to search results. Therefore, search results are only ordered by entry date or title.

Also, the LIKE method will always match substrings, so searching for "cat" will also return "concatenation". You can tell EE to search like this either in an entry's title only, in the title and custom fields, or in the title, custom fields and comments.

So, with the native search module, there is no way to sort by relevance, prioritize or to push a given entry to the top for certain search terms. You will have to look at other search solutions like Super Search or my own Low Search.
> 1 votes

---
Tags: ee2, search
---


title: Output search parameters LOW Search

text:
# Question
Title: Output search parameters LOW Search
I know we can output 'keywords' as search parameters on the search result page. But we perform only search in custom fields (by means of checkboxes on search page) and I wonder how to output even those values on the result page to help the visitors. Many thanks for looking at this.

EDIT

2015/02/17

Thanks to the help from Low I finally got it. (Why not earlier, my search was in checkboxes (channel 'work' field 'material') based on values in channel 'material' field 'material\_content'. In my search result I mixed the two up. Hence no results showed. The same form searched also in two categories, that I got working after reading **again** the manual and Low's answer.

Working code:

```
    {exp:low_search:results
  query="{segment_2}"
  status="not closed"
  disable="member_data|category_fields"
  require_all="material"
}
{if count == 1}
    <p>
      Resultat för <strong>{material}</strong> och <strong>{exp:channel:categories show="{low_search_category}" style="linear"}
   {category_name}
{/exp:channel:categories}</strong>

      Antal resultat: <strong>{absolute_results}</strong>
    </p>
  {/if}

{/exp:low_search:results}

```

My thanks is big, very big.

# Answer
> 0 votes
As per these rules, any Low Search parameter value can be displayed in your templates by using the {low\_search\_*param\_name*} syntax. For multi-valued parameters, this will result in a pipe-separated list of values. You could use Low List to iterate through each of those values, or you could use the variable as input for another tag to achieve the same.

For example, if you're using checkboxes to filter results by category, then the parameter value will be a pipe-separated list of category IDs:

```
{low_search_category} => 1|2|3

```

You can then use that var as input for the channel:categories tag, thusly:

```
{exp:channel:categories show="{low_search_category}" style="linear"}
    ...
{/exp:channel:categories}

```

Note that this requires the tag to be inside the Form, Filters or Results tag, so the `{low_search_param_name}` can be resolved.

Similarly, you can use the Param tag to output a parameter value *outside* of the Form, Filters or Results tag.

---
Tags: low-search
---


title: img tag being stripped out of front end

text:
# Question
Title: img tag being stripped out of front end
I place an image on a page using the file manager. I can see it in the editor, but when the image is displayed in the front end, all I see is the image path and not the image. When I look at the source code, I see that the image tag is removed. I am using Wygwam but I have disabled "Restrict Allowed HTML" ExpressionEngine v2.10.1 - Build Date: 20150501 -

# Answer
Look at Admin -\> Channel Administration -\> Channels, then select Edit Preferences for the Channel you're using to output the entry mentioned. Search down the preferences for "Channel Posting Preferences" and you'll see "Allow image URLs in channel entries?". Ensure this is set to Yes.
> 1 votes

---
Tags: wygwam
---


title: Assets for ExpressionEngine 3.x

text:
# Question
Title: Assets for ExpressionEngine 3.x
Will Assets be updated to work with EE 3.x?

We're developing a website for a client that will be load balanced and using S3 for files and would like to use Assets for the S3 integration, however, the site will be using EE 3.1 and assets only suports 2.x currently.

What is the timeframe for a 3.x Assets compatible update?

# Answer
No ETA has been announced, more info: https://pixelandtonic.com/blog/ee3-plans.

Or follow/tweet Pixel & Tonic on Twitter
> 0 votes

---
Tags: assets, pixelandtonic
---


# Question
Title: Commet Form Error: You are not allowed to post comments
Thanks For Taking The Time To Read!

This has me a bit stumped: Error generates upon form submit.

* Live Site
* Checked several times for allowing comments in both System Settings & Channel
* First Site with EE 3 (Core)
* Used different emails/comment tests

Page Link: http://www.stevenseppinni.com/index.php/site/article\_detail\_video/this-is-a-video-example

```
<section id="comments">
          <h6 class="section-title">3 Comments</h6>
          <p>Comments are optional and I am editable! Whoop!</p>
          <ol class="comments-list">
{exp:comment:entries sort="desc" orderby="date" limit="20" dynamic="no"}
            <li class="comment">
              <article> {if avatar} <img src="{avatar_url}" width="{avatar_image_width}" height="{avatar_image_height}" class="avatar" alt="{author}'s avatar" /> {/if}
                <div class="comment-meta">
                  <h5 class="author">By: {name} On: {comment_date format="%Y %m %d"} <a href="#" class="comment-reply-link">Reply</a></h5>
                </div>
                <!-- end .comment-meta -->

                <div class="comment-body">
                  <p>{comment}</p>
                </div>
                <!-- end .comment-body -->
              </article>
            </li>
{/exp:comment:entries}
          </ol>
        </section>
        <section id="respond">
        <div class="row">
          <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 blogleft contact">
{exp:comment:form channel="article_wistia_video"}
              <h3 class="contactTitle">Leave a Comment</h3>
              <div class="row">
                <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 form-group form-row">
                  <input type="text" class="normal" id="name" placeholder="Name" name="name" value="{name}">
                </div>
              </div>
              <div class="row">
                <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 form-group form-row">
                  <input type="email" class="normal" id="email" placeholder="Email Address" name="email" value="{email}">
                </div>
              </div>
              <div class="row">
                <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 form-group form-row">
                  <textarea name="comment" placeholder="Comment" rows="4" class="normal">{comment}</textarea>
                </div>
              </div>
              <!--<div class="row">
                <label><input type="checkbox" name="save_info" value="yes" {save_info} /> Remember my personal information</label><br />
                <label><input type="checkbox" name="notify_me" value="yes" {notify_me} /> Notify me of follow-up comments?</label><br />
        {if captcha}
                <label for="captcha">Please enter the word you see in the image below:</label><br />
                <p>{captcha}<br />
                <input type="text" name="captcha" value="{captcha_word}" maxlength="20" /></p>
        {/if}
              </div> -->
              <div class="row">
                <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
                  <input type="submit" id="submit" name="sumbit" value="Submit" class="button">
                </div>
              </div>
{/exp:comment:form}
          </div>
          </section>
          </article>
        </div>
      </div>`

```

# Answer
> 1 votes
One likely possibility to check first:

Make sure the Guests member group (which is essentially any non-logged-in users) have permission to post comments.

In EE2 you'd go to ***Admin \> Member Groups \> Guests*** and look for **Comment Posting Privileges**

Not positive, but in EE3 I believe this member group setting is called **Submit Comments** https://docs.expressionengine.com/latest/cp/members/groups/form.html#submit-comments

---
Tags: comments, comment-form
---


title: P&T Asset and Google Cloud Storage

text:
# Question
Title: P&T Asset and Google Cloud Storage
I've created a Google Cloud Storage Bucket and enabled what I believe to be the right place for the Secret and Access ID - however, I'm getting the following error whenever I try to save and the location doesn't appear in my assets folder for view:

`A PHP Error was encountered
Severity: Notice
Message: Undefined property: stdClass::$body
Filename: lib/Assets_GC.php
Line Number: 1993`

I can't actually find any instructions on how to configure/setup google cloud hosting, so I'm a little stuck as to whether I've done the right thing or not.

# Answer
> 0 votes
I'm not sure what the error is being caused by. P&T may have some more info for you.

In the meantime, you might try using the config overrides for Assets to see if that works instead. This if you're using a master config of some sort. If no master config then disregard this answer.

You can setup Google Cloud Storage via a System Configuration Override using assets\_source\_settings. This is similar to EE's file upload\_preference (v3)(v2). So, if you had two locations to setup, for Focus Lab Master Config on EE2, it would look something like this:

```
$env_config['assets_source_settings'] = array(
    1 => array(
        'access_key_id'     => 'your_id',
        'secret_access_key' => 'your_access_key',
        'bucket'            => 'your_bucket',
        'url_prefix'        => 'your_url_prefix',
        'subfolder'         => 'your_subfolder',
    ),
    2 => array(
        'access_key_id'     => 'your_id',
        'secret_access_key' => 'your_access_key',
        'bucket'            => 'your_bucket',
        'url_prefix'        => 'your_url_prefix',
        'subfolder'         => 'your_subfolder',
    )
);

```

Note: I'm not sure you can setup a source without doing it in the CP first, however, could be worth a try.

---
Tags: assets, pixelandtonic, google
---


# Question
Title: How to use the Channel Images' "images static"?
I have a channel that has a text field and a Channel Images field; I want the images to accompany the text.

I'm keeping the image information (the CSS, etc) in a snippet and using Hop Inject to place the snippet following certain paragraphs. That's working so far with one image. But I'm trying to figure out how to place the same snippet in various parts of the text and have it bring up the different images in order that are in the Channel Images field.

I was thinking the way to do this would be to use the `{exp:channel_images:images_static}` tag. But I cannot wrap my brain around the documentation and example provided. For example, the sample is like this:

```
{exp:channel:entries channel="about" url_title="{segment_3}"}
    <h2>{title}</h2>
    {exp:channel_images:images_static entry_id="{entry_id}"}
        {body}
        {extended}
    {/exp:channel_images:images_static}
{/exp:channel:entries}

```

...but I don't see what's calling the image, and I don't understand what the 'body' and 'extended' tags are supposed to be.

Anyone have any ideas about this?

**EDIT: ADDING MORE EXPLANATION FOR CLARITY**

Not sure if I'm explaining this properly, but what I'm trying to do is have a snippet that displays the first image in a Channel Images field, and then another snippet that will display the second image in that Channel Images field.

# Answer
> 0 votes
Okay, I was completely wrong about using "images static" -- not really sure what that is or how to use it, but whatever. But I am able to achieve my goal with just regular Channel Images tags, where my first snippet will be like:

```
  {exp:channel:entries channel="about" limit="1" dynamic="no" disable="categories|member_data|pagination"}
    {exp:channel_images:images entry_id="{entry_id}" limit="1"}
      <img src="{image:url:medium}" alt="{image:alt}">
      <div class="caption">{image:description}</div>
    {/exp:channel_images:images}
  {/exp:channel:entries}

```

and my second snippet will add `offset="1"` like this:

```
{exp:channel_images:images entry_id="{entry_id}" limit="1" offset="1"}

```

Problem solved.

# Answer
> 0 votes
Ok, so lets brake down the example a little. First thing I'd like to point out is that the `{extended}` tag in the example has no point being there, it is simply there to say "in our example, our 'about' channel has 2 fileds, one called `body` and one called `extended`". The rest of the example deals exclusively with the `body` field (and the channel entries field which is of course implied).

Lets say the `body` field is a plain textbox, in this text box we enter the text, for our example we'll consider the title of the entry to be "Test Title" :

> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque in lacinia purus.
>
> {image:1}
>
> {image:1:description}
>
> Quisque molestie tempus mauris eu lobortis. Sed id nunc eu diam dapibus mollis non id ligula.

That is literally, the braced content is just braces and characters in the text field.

So, now if we create a channel entries loop like below, we will see this text displayed on the page as so (for this example `segment_3` obviously targets the entry in question):

```
{exp:channel:entries channel="about" url_title="{segment_3}"}
  <h2>{title}</h2>
  <p>{body}</p>
{/exp:channel:entries}

```

This gives us (in HTML, assuming the text boxes carriage returns are parsed into br's) :

```
<h2>Test Title</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque
in lacinia purus.<br /><br />{image:1}<br /><br />
{image:1:description}<br /><br />Quisque molestie tempus mauris
eu lobortis. Sed id nunc eu diam dapibus mollis non id ligula.</p>

```

Obviously, we don't want this as its displaying the literan `{image:1}` in the output!! Enter Channel Images' Static Images. For this example, lets say you've uploaded 1 image of some cheeseburgers to the Channel Images field of the entry, changed its title to "Cheeseburgers" and given it a description in Channel Images of "What I had for lunch today!"

So, we factor in the channel images tags into our example, as so :

```
{exp:channel:entries channel="about" url_title="{segment_3}"}
  <h2>{title}</h2>
  {exp:channel_images:images_static entry_id="{entry_id}"}
    <p>{body}</p>
  {/exp:channel_images:images_static}
{/exp:channel:entries}

```

So, no the cu-de-gras. The `exp:channel_images:images_static` tag has an entry ID, the same entry ID from the outer Channel Entries loop, so it can find the right Channel Images field.

What Channel Images \> Images Static does is search the output from the inner variables (in our example just the body) and replaces `{image:[ID][:[part]]}` text with images.

So as we have `{image:1}` in our text in our textbox, this is replaced with `<img src="/url/to/cheeseburgers5.jpg" alt="Cheeseburgers">`, which is the URL and title for Image 1 in the Channel Entries field.

Further, we have `{image:1:description}` in out text, so this is replaced with the description attribute of image 1 in the channel entries field, ie "What I had for lunch today!"

So, with the static images tag our final markup in HTML is :

```
<h2>Test Title</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque
in lacinia purus.<br /><br />
<img src="/url/to/cheeseburgers5.jpg" alt="Cheeseburgers"><br /><br />
What I had for lunch today!<br /><br />Quisque molestie tempus mauris
eu lobortis. Sed id nunc eu diam dapibus mollis non id ligula.</p>

```

Voila! We have inserted a Channel Entries image from the Channel Images field into the "static" content from the textbox called `body`.

Incidentally, it doesn't have to be in a channel entries tag, you could wrap static content with the tags, so for example if we had this as out template code (assuming we have a channel of "image of the day" or shortcode IOTD, and each entry has a date as its title.) :

```
{!-- The URL title is calculated using todays date --}
{exp:channel_images:images_static url_title="{todays_date}"}
  <h1>Image of the day</h1>
  <p>Todays image is called {image:1:title} : </p>
  {image:1}
  <p><sup>{image:1:description}</sup></p>
  <p>Looks good doesn't it!! By the way its file name was {image:1:filename}</p>
{/exp:channel_images:images_static}

```

it would be parsed and the first image in the channel entries field for the entry specified by `{todays_date}` would be used to replace the tags `{image:1:title}`, `{image:1}`, {image:1:description}`and`{image:1:filename}\`

Does that help you make sence of this??

### In response to comment 1

You're not wrong in your comment, but this is in the context of being inside a channel entries loop. Channel Images is a field type so I am assuming your Channel Images field is on an entry of some description?? Lets say for examples sake your entry ID is "10".

so, in your template you might have this :

```
{exp:channel:entries dynamic="no" entry_id="10"}
  <h1>{title}</h1>
  {snippet_1}
  {snippet_2}
{/exp:channel:entries}

```

in your snippet (snippet\_1), you can use this code , using your syntax (According to The Docs there is no 'alt' property, just a description)

```
{exp:channel_images:images_static entry_id="{entry_id}"}
  <img src="{image:1:url:medium}" alt="{image:1:description}" />
{/exp:channel_images:images_static}

```

You see the entry ID being passed into the static images tag?? thats what tells channel Images what entry to get the Channel Images field from.

The main difference between the basic image tag and image\_static seems to be that while the former is for iterating through the collection (or gettingthe cover image) the latter (static) allows you to pick the row ID from the list of images in the field.

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


# Question
Title: Assets in Grid In Low Variables - multiple files
EE 2.10.1 Lv 2.6.1 Assets 2.6

I've got a Low Variables grid with a once cell Assets and in the assets you can upload multiple images.

Using this thread I was able to successfully display a single image, but there is no way to loop through the assets to pull up all files.

My current partially working code looks like this where title, image, and copy or cells in the grid.:

```
        {exp:low_variables:pair var="lv-deal-sidebar-widget"}
            <aside>
                <h3>{lv-deal-sidebar-widget:title}</h3>

                {exp:ce_img:single src="{lv-deal-sidebar-widget:image:url}" width="300" height="240" crop="yes" attributes="class='img-responsive'"}

                <div class="widget-copy">
                    {lv-deal-sidebar-widget:copy}
                </div><!-- /.widget-copy -->
            </aside>
        {/exp:low_variables:pair}

```

If I try to get more than one image using this thread as a guide and this simplified code:

```
        {exp:low_variables:pair var="lv-deal-sidebar-widget" var_prefix="assets"}
            <aside>

                <p>{lv-deal-sidebar-widget:image:url}</p>

                {assets:image}
                    {assets:url} <br />
                {/assets:image}

            </aside>
        {/exp:low_variables:pair}

```

the assets pair doesn't render it just outputs the code as is. Any ideas on how to fix this?

# Answer
> 2 votes
I reported this bug to Pixel & Tonic, and they right away got working on a "duct-tape" type fix. It seems, to get this working, in Assets 2.6, you can change line `1810` of `system/expressionengine/third_party/assets/ft.assets.php` from

```
if (! $field_name)

```

to

```
$tagparts = ee()->TMPL->tagparts;
if (! $field_name || (isset($tagparts[0]) && $tagparts[0] == 'low_variables'))

```

and then in your template, you need to use the `var_prefix` parameter, and then put that prefix BEFORE everything else in your variable, and it should look something like this:

```
{homepage_slider:images var_prefix="image"}
    <img src="{image:homepage_slider:images:url}" />
{/homepage_slider:images}

```

Hope this helps someone!

# Answer
> 1 votes
When using the Parse or Pair tag to output a Grid field, the tag will act the same as a regular Channel Grid field would. That means you can use the same template tags and parameters. That means the `var_prefix` parameter won't do anything, because it's not a valid Grid parameter.

It also means you need to prefix all Grid columns with the field/var name. So rather than using `{assets:image}{/assets:image}`, you should use what you're already using with the `title` column: `{lv-deal-sidebar-widget:image}{/lv-deal-sidebar-widget:image}` (assuming `image` is the name of the Assets column in Grid).

That, in turn, will act the same as a regular Assets field, so you should be able to use any of its template tags.

**Edit:** To illustrate:

```
{!-- a LV Grid with Assets column --}
{exp:low_variables:pair var="my_grid_var"}
    {my_grid_var:assets_column_name var_prefix="foo"}
        {foo:my_grid_var:assets_column_name:url}
    {/my_grid_var:assets_column_name}
{/exp:low_variables:pair}

{!-- an Assets var --}
{exp:low_variables:pair var="my_assets_var"}
    {url}
{/exp:low_variables:pair}

```

---
Tags: assets, pixelandtonic, grid, low-variables, low
---


# Question
Title: Solspace Calendar always shows full week
I'm using solspace calendar to output events. Everything works well, the only issue is that for some reason, no matter what parameters I supply for date\_range\_start, date\_range\_end, and show\_days, the tag always outputs an entire week. Here is the tag I'm using:

> {exp:calendar:cal event\_limit="4" paginate="bottom" category="public" date\_range\_start="2016-02-25" show\_days="1" }

This always gives back a full week of events. So, in this example, since the 25th is in the middle of the week, the cal tag outputs all events from 2/21 - 2/27 (sunday-saturday).

Any help is appreciated!

# Answer
By default, the Calendar:Cal tag in Calendar 1.x assumes you want to display a full week or full month view, and automatically pads extra days to make it a full week. You'll need to simply just specify the pad\_short\_weeks="n" parameter to stop this from happening. :)
> 0 votes

---
Tags: solspace-calendar
---


# Question
Title: WebHook: How to POST form data to a URL?
I'm using an external service - Unbounce.com - to manage my landing pages. Unbounce gives me the option to post to an external URL using their Webhook Integration.

I'm using Freeform to manage my forms. Can anyone give me some advice on how to hook this up? I suspect it's going to be a URL with "ACT" in it, but I'm not really sure where to start? Do I create a receiver form in Freeform?

# Answer
If you have to use Freeform, you'll need to write an extension to take the form data sent to Freeform and send a copy elsewhere. The hook you want to use is probably freeform\_module\_insert\_end, as this will have validated the form data and only includes what is valid for the form (not all post data). This means the data is saved in Freeform (with Freeform handling all the validation and heavy lifting), then sent via your extension to Unbounce.
> 0 votes

---
Tags: solspace-freeform, forms, hook
---


# Question
Title: Channel Images Uncaught TypeError: $.base64Decode is not a function
I'm trying to use Channel Images in a front-end Channel Form situation. I have the channel images appearing, but the Upload Images button does not respond to clicking, and when I use the developer tools in Chrome, it spits out

Uncaught TypeError: $.base64Decode is not a function

and then a series of this information:

ChannelImages.ActivateUploadHandlers @ channel\_images\_pbf.js?v=5.4.19:112

(anonymous function) @ channel\_images\_pbf.js?v=5.4.19:68 n.extend.each @ jquery-1.11.0.min.js:2 n.fn.n.each @ jquery-1.11.0.min.js:2 ChannelImages.InitFields @ channel\_images\_pbf.js?v=5.4.19:64 ChannelImages.Init @ channel\_images\_pbf.js?v=5.4.19:18 (anonymous function) @ channel\_images\_pbf.js?v=5.4.19:1822 H.Callbacks.d @ ?ACT=10&ui=core,widget,mouse,position,draggable,resizable,sortable,button,dialog,tabs,datepicker&pl…:16 H.Callbacks.p.fireWith @ ?ACT=10&ui=core,widget,mouse,position,draggable,resizable,sortable,button,dialog,tabs,datepicker&pl…:16 s.extend.ready @ ?ACT=10&ui=core,widget,mouse,position,draggable,resizable,sortable,button,dialog,tabs,datepicker&pl…:16 F.addEventListener.a @ ?ACT=10&ui=core,widget,mouse,position

If I can't use channel images to upload via Channel Form, does anyone else have a suggestion for a clean, multiple file upload option for Channel Form?

# Answer
Late to answer this, but when I expirienced same problem it appeared to originate from fact that jQuery was also included second time in the footer. I removed jQuery inclusion from the footer and all started working.
> 0 votes

---
Tags: safecracker, channel-images
---


# Question
Title: EE3 DevDemon Channel Images fatal error when trying to render template
ExpressionEngine 3.1.2

Channel Images 6.0.1

The addon installed ok. I have tried uninstalling and re-installing and had no change. The field was created ok. The location check passed. However, when I try to view the template, I just get 2 warnings and a fatal error.

I understand that it says

> Even if all tests PASS, uploading can still fail due Apache/htaccess misconfiguration

but I don't see anything wrong with either.

I am able to create an entry and upload the photos. I can see the images on the server. When I try to render a template, I get the following warnings and then fatal error:

Warning 1:

> Warning
>
> require(/home/stkhomes/system/user/addons/channel\_images/locations//.php): failed to open stream: No such file or directory
>
> user/addons/channel\_images/models/channel\_images\_model.php, line 701 hide details
>
> Severity: E\_WARNING

Warning 2:

> Warning
>
> require(/home/stkhomes/system/user/addons/channel\_images/locations//.php): failed to open stream: No such file or directory
>
> user/addons/channel\_images/models/channel\_images\_model.php, line 701 hide details
>
> Severity: E\_WARNING

Fatal Error:

> Fatal error: require(): Failed opening required '/home/stkhomes/system/user/addons/channel\_images/locations//.php' (include\_path='.:/usr/local/php56/pear') in /home/stkhomes/system/user/addons/channel\_images/models/channel\_images\_model.php on line 701

I stepped through things and it appeared that the cache was not being written and returned inside the CI model.php file.

Does anyone have any insight on this? I am on a deadline and this is a huge snag for me right now as I planned the site around this field.

# Answer
> 2 votes
OK,

Here is the last email to Himanshu with DevDemon support...

> Hi Brian
>
> Ok I have found the problem from your side . You have not set Caching driver disable but to work with Channel Images, you must set it to the "FIle". Now I have set it to file and it working perfectly. I have set dummy Channel , Field Group and Field to test on your server.
>
> I have attached image to display the setting
>
> thanks,
>
> Himanshu
>
> ---
>
> Himanshu,
>
> Thank you for finding this. I have two quick questions.
>
> 1) I didn’t change anything on the cache settings. This was a blank install and then started loading things in. Is this a default setting for EE3 or could an addon have made that setting?
>
> 2) If this is a setting that has to be set proper for CI to work, should the addon either inform or lock this setting in EE’s CP? If not, should this be in the docs or at least issue a better error message?
>
> Thanks,
>
> Brian

Here is the image he attached...

---
Tags: devdemon, channel-images, ee3, fatal
---


title: Cartthrob DB size

text:
# Question
Title: Cartthrob DB size
My EE+carttrob DB size is over 100MB, mostly because of the exp\_cartthrob\_cart and exp\_cartthrob\_sessions tables. Can these be flushed/cleaned up at some point or better not to touch these? (sorry, I'm a total CB noob).

# Answer
> 1 votes
As you state, all sessions and carts will be cleared if you clean those tables.

Depending on how long your sessions run, some visitors will lose their cart content.

Both tables have timestamp columns so you could choose to only clear the old ones.

Bart

---
Tags: cartthrob
---


# Question
Title: EE 3.0 $.ee_filebrowser.add_trigger console errors
I’m converting an add-on from EE 2 to EE 3. It uses $.ee\_filebrowser.add\_trigger. As far as I can that still exists but I get a console error:

`Uncaught TypeError: Cannot read property 'dialog' of undefined`

I can’t quite figure out what to do. I’ve tried to dicipher it in the minified code but I can’t quote figure it out. Can anyone point me in the right direction?

# Answer
Had time to circle back around to this and finish up my add-on. I don’t think the FilePicker service was documented when I started the question, but it certainly is now:

https://docs.expressionengine.com/latest/development/services/filepicker.html

But I needed to make specific links in my add-on open with a specific directory but I would not necessarily know before hand. I needed to make the FilePicker links available to my template so I could select them based on the upload directory. So I did this:

```
// Load the FilePicker
$filePicker = ee('CP/FilePicker')->make();

// Class that gets EE's upload directories
$uploadDirectories = new UploadDirectories();

// Add each directories upload link to array
$modalLinks = array();
foreach ($uploadDirectories as $dir) {
    $modalLinks[$dir['id']] = array(
        'link' => $filePicker->setDirectories($dir['id'])
            ->getLink(lang('field_type_add_image'))
            ->setAttribute('class', 'btn action js-ansel-add-image')
            ->asThumbs()
            ->enableFilters()
            ->enableUploads()
            ->render(),
        'hiddenLink' => $filePicker->setDirectories($dir['id'])
            ->getLink(lang('field_type_add_image'))
            ->setAttribute('class', 'btn action js-ansel-add-image js-hide')
            ->asThumbs()
            ->enableFilters()
            ->enableUploads()
            ->render()
    );
}

```

I make that available to my template. Now I can select the correct button from the array based on the directory ID.

Then on the Javascript side:

```
$(.js-ansel-add-image).FilePicker({
    callback: function(file, references) {
        // Close the modal
        references.modal.find('.m-close').click();

        // Do stuff
    }
});

```
> 1 votes

---
Tags: file-uploads, javascript
---