# Question
Title: Number of questions about Expresso Store
I am almost done with this site, but the client has a number of requests that I don't really know how to address within this specific plugin. Most of the issues involve the form fields. Since you guys don't actually have HTML form fields in the template code, it makes it a bit difficult to apply normal parameters that would normally take care of these issues.

I haven't found the answer to my questions elsewhere in stack exchange, so I'll ask here…

1. As you know, when logged in, the checkout form changes, to no longer contain the username/password registration fields. However, it does have them refill in their contact info, and when the user uses their registered email it says that "that email is not available" - meaning it's still running the email validation check as though they are registering. Meaning a customer making a subsequent purchase would need to use a new email every time. Is there some parameter I'm not seeing? We do want people to put in their email for the order, and it is autofilling that, if they're a registered, logged in member, but how can I stop it from requiring a new email and running that registration? Seems like a bug.
2. For new users, the client wants the customers to use their email address as their username (for ease of remembering it later). Is there some way to have the field capture its contents from the email address entered above, when they tab to that field?
3. Is there some way to add a mask to fields like phone number - (000) 000-0000, and zip code? You guys don't use regular HTML form fields in your template code, so it's not really as simple as adding the mask to the form field parameters.

Thanks! Brooke

# Answer
> 2 votes
You can use normal input fields instead of using the `{field:billing_name}` convention.

So in your checkout template you can do something along the lines of.

```
{exp:store:checkout}
 <label for="billing_name">Name</label>
{!--
 -- You can add any additional parameters to the input that you need.
 -- Having a value="{field_name}" will pre-populate that field
 -- name if the user is logged in and has data stored.
 -- The name parameter should be the field name.
--}
 <input type="text" value="{billing_name}" name="billing_name" />
{/exp:store:checkout}

```

This should allow you to sort out issues 3 & 4. (More details in the docs)

1.) I usually use a logged in conditional in my templates to handle showing the register member checkbox field.

```
{exp:store:checkout}
 <input type="email" name="order_email" value="{order_email}" />
{if logged_out}
{field:register_member} <label for="register_member">Register Member Account?</label>
 <div class="toggle">
  <div>
    <label for="password">Password</label>
    {field:password}
  </div>

  <div>
    <label for="password_confirm">Confirm Password</label>
    {field:password_confirm}
  </div>
 </div>
{/if}
{/exp:store:checkout}

```

2.) When you are registering a member Store will use the `order_email` address to create a new member. If you have `username` and `screen_name` fields in your template Store will use that information, if you don't have it Store will use the `order_email` field for the users email address, username and screen name.

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


title: Expresso Store - Promo Codes

text:
# Question
Title: Expresso Store - Promo Codes
I'm using expreso store 1.6.4 , I'm setting up some promo codes and just wanted to clear something up. I understand that if I set the Per User Limit, they must be logged in to use the code. As this site does not use memberships, I've left that blank so logged out users can use it.

Am I correct in thinking then, that there is no use limit on the codes if the person is logged out? That they can use the code as often as they'd like and there is no way to prevent this?

Thanks,

# Answer
If the site is not using members then you are correct there is nothing built in that would prevent users from using the same promo code multiple times. From the docs:

> * **Limit Per User**: Limit the number of times this promo code can be used by each member. NOTE: If you enable this option, customers must be logged in before they will be able to use the promo code (otherwise there would be no way to tell which customers have already used the code).
> * **Total Use Limit**: Limit the total number of times this promo code can be used.

You could set the total use limit to 1 and generate multiple promo codes that would be sent to each user.

The other option you have would be to enable membership functionality on the site so that you can use the functionality of Limit Per User w/ promo codes. This also has the added benefit of storing the users billing/shipping details but not CC details.

You could also if you are comfortable with PHP write your own extension to check the orders table in the database with the submitted email address to see if that email has used a promo code in the past. (Extension Hook Documentation)
> 2 votes

---
Tags: expresso-store
---


# Question
Title: Problem with "Return-Path" on Solspace Freeform Pro email notification
I have an online enquiry form that was working fine until last month when I updated ExpressionEngine from 2.5.3 to 2.7.3, and Freeform Pro from 4.0.10 to 4.1.5. Now my client has complained that the email notifications from their website's enquiry form are going into their spam folder because the Reply-to address on the emails is incorrect and they can't simply hit 'reply' in their mail app because it isn't going to the right address.

Looking at the header information for the email notification I see the following:

---

Return-Path: \< test@strangeemail.net.au \>

Reply-To: "test@correctemail.com" \< test@correctemail.com \>

From: "Test Name" \< "Test Name"@strangeemail.net.au \>

X-Sender: Test Name

X-Mailer: ExpressionEngine 2.7.3d

---

In the Notification Template I have:

---

From Name: {name}

From Email: {email}

Reply To Email: {email}

---

I created {name} and {email} as text fields with Name set to 'Any' Field Content Type and Email is set to 'Email'.

How is the Return-Path generated and why is it incorrect? Occasionally my client isn't receiving the notification at all because the from email has the person's name in quotations before the domain name. The site's database is MySQL 5 and PHP 5.2. It looks like the incorrect domain name in the email address is something to do with the site host's mail, although they have said I must have entered something incorrectly in my notification template!

Any ideas/thoughts would be greatly appreciated.

Thanks Karen

# Answer
> 0 votes
As Solspace commented, it turns out there was a bug with Solspace Freeform itself. Updating to the latest version of Freeform (4.1.8 as of the date I updated it) has fixed the problem. Thanks Solspace.

# Answer
> 0 votes
Karen, make sure that your email address is set in EE; Admin \> Email configuration \> Return Email address for auto generated emails. AFAIK this is what is used to generate the 'From' header in outgoing emails. Without this emails look like spam.

I don't think that the client's notifications are getting spam-flagged because of an incorrect Reply-to address, but rather because of an incorrect From address.

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


title: How can you control the pagination URL?

text:
# Question
Title: How can you control the pagination URL?
How can you control the pagination URL and change this:

```
http://example.com/blog/P#

```

to this:

```
http://example.com/blog/page-#

```

? Any help appreciated.

# Answer
There is nothing built into the EE core that would allow you to do this.

You have a few options though. The easiest would be to use something like Better Pagination which will allow you to setup different Pagination URLS.

The other option is to build the url you want and use some template logic to grab the correct URL.
> 1 votes

---
Tags: pagination, config
---


# Question
Title: Solspace Calendar Limit Occurrence Returned
I have a list of upcoming events which I'm pulling by using {exp:calendar:cal}. Is there a way I can limit recurring events so only the first one displays? Using occurrence\_count doesn't appear to work.

# Answer
This has been discussed in this thread: Solspace Calendar: Only show next occurrence of recurring event in list of recurring and non-recurring events

Based off this thread, a tutorial on creating a chronological list with unique occurrences can be found here: http://support.solspace.com/solution/categories/115922/folders/190596/articles/4000020599-how-to-display-a-chronological-list-of-events-with-each-unique-event-appearing-only

**Summary**:

One approach is to use PHP to create an array of unique events, and display your event data only when the event is encountered for the first time in {exp:calendar:cal}. Here's an example (turn on PHP for your template and set it to Output):

```
{!-- Create the arrays --}
<?php
    $event_ids = array();
    $event_data = array();
?>

{!--
    // Check if the event was already encountered (i.e. is in the array),
    // and store your data in a separate array if this is the first time
    // encountering this event
--}
{exp:calendar:cal /* your other parameters here */}
<?php
    if( ! in_array('{event_id}', $event_ids) )
    {
        $event_ids[] = '{event_id}';
        $event_data[] = '* The data you want displayed *';
    }
?>
{/exp:calendar:cal}

{!-- Display event data, still in chronological order --}
<?php
    foreach($event_data as $data)
    {
        echo $data;
    }
?>

```

Of course there are likely other strategies, using PHP, Stash, or other means, but the main idea is to create a list/group/array of unique events within your timeframe.
> 0 votes

---
Tags: solspace-calendar
---


title: MSM Limitations

text:
# Question
Title: MSM Limitations
We have a totally 20 Websites.

Right Now, We are running 5 websites all in MSM under single database. our requirements is member can access all websites in any one of web site login.

All are portal kind of websites.

Is it Right way for 20 Websites will run under Single database. Any MSM limitation is there?

how will be a Performance?

I am eagerly waiting for suggestions

# Answer
> 1 votes
Yes this is the right way. Performance will be the same, or similar, as if you had the same amount of traffic going through one website.

To be cautious you could try scaling up to the full 20 websites a few at a time. Check performance and if it's OK then add a few more.

You may also want to talk to Ellis Labs to see if you could switch your MSM licences to full EE licences should things not work out. They've been very helpful with me in the past regarding MSM licences.

---
Tags: multi-site-manager, database, login, performance, sessions
---


title: MSM - new site displays wrong templates

text:
# Question
Title: MSM - new site displays wrong templates
I have 5 sites including the default site. Sites 1-4 are fine, but my fifth site is displaying templates from site no. 4. I have copied the admin.php and index.php from the default site and updated them where necessary. I have created new templates in site no. 5 but they are being ignored. What's going on?

# Answer
Simply recreating the site didn't fix it. Creating a differently named site, then recreating the problem site as the 6th site fixed it.
> 0 votes

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


# Question
Title: How do you get Cartthrob to send the customer's info through the Stripe Payment Gateway?
We're using the Stripe Payment Gateway with Cartthrob and the payments are going through and it's working just fine. The only problem is that in the Stripe Dashboard the customer's name, address, and more is set as null.

So as I tried to locate the cause of the problem I looked at a few of the files, and the Cartthrob\_stripe.php file seems to be where the problem is. It all lines up with the stripe.js documentation that they have, and it has the section that creates a token to see if it's cool to pass through, and then passes through that information. I think it's on the second pass after discovering that there is no error that it doesn't keep the customer's name & address info, and only sends through the essentials. But I can't test out my theories on how to fix this without making actual payments as Stripe in test mode doesn't send the information to the Stripe dashboard. So I won't know if what I did just worked or not.

I'm hoping to get either a solution to this or some tips on how I might properly test my theories. Any help is appreciated, and anyway that I can help with getting the solution together, let me know. Thank you

# Answer
> 0 votes
Looking at the code, CartThrob requires that you have the address info inside *form inputs* with *specific IDs*.

```
address_line1: CartthrobTokenizer.val("#address"),
address_line2: CartthrobTokenizer.val("#address2"),
address_city:  CartthrobTokenizer.val("#city"),
address_state: CartthrobTokenizer.val("#state"),
address_zip: CartthrobTokenizer.val("#zip")

```

This is a little odd to me, since unless you are using a single-page checkout, by the time you get to payment, the address info will likely only be displayed as plain text on screen, as it's been entered in earlier steps.

However, the easy way to fix this without hacking the CartThrob files is to simply add hidden inputs to your checkout form.

```
<input type="hidden" name="address" id="address" value="{customer_address}" />
<input type="hidden" name="address2" id="address2" value="{customer_address2}" />
<input type="hidden" name="city" id="city" value="{customer_city}" />
<input type="hidden" name="state" id="state" value="{customer_state}" />
<input type="hidden" name="zip" id="zip" value="{customer_zip}" />

```

One thing re: Test Mode - you can certainly see these transactions in your dashboard - just flip the switch to TEST.

This switch doesn't "turn" Test Mode on or off - it merely displays Live vs Test data/transactions.

---
Tags: cartthrob, stripe
---


# Question
Title: Displaying a single entry by status but having a fallback order in place
Hopefully this will just be a quick one and it maybe staring me in the face but what I want to be able to display a related testimonial of an entry.

If the testimonial has a custom status of Featured, then this will be displayed. If no testimonials have this status set, then it will revert to the latest testimonial added, presumably with a status of Open.

Can anyone help me out on how I can do this. Below is what I thought may do the trick

```
{if page_related_testimonials}

{page_related_testimonials
 channel="testimonials"
 status="Featured"
 orderby="date"
 sort="desc"
 limit="2"}

    {if status=="Featured"}
    {title}
    {if:elseif status=="open"}
    {title}
    {/if}

{/page_related_testimonials}

 {/if}

```

# Answer
If you are only trying to display a single featured entry and if no featured then a single entry with the status of open. I'd do the this. Order your results by status and allow featured and open status entries and then sort it to to look for featured first then open. I think that might be sort="asc"

So heres what your code will look like.

```
{if page_related_testimonials}

  {page_related_testimonials
      channel="testimonials"
      status="Featured|open"
      orderby="status|date"
      sort="asc|desc"
      limit="1"
   }

      {title}

   {/page_related_testimonials}

{/if}

```

This will return 1 entry and if an entry related to that channel has the status of Featured it will be the first entry in the data returned if there isn't an entry with Featured it will fall back to an entry related with the status of Open. I hope this helps!
> 2 votes

# Answer
I've been done this sometimes, but not using relationships. I believe the process is the same.

Try to order the entries by both date and status. Each one in one direction.

```
status="featured|open" orderby="status|date" sort="asc|desc" limit="1"

```
> 1 votes

---
Tags: status, orderby
---


# Question
Title: Can Cartthrob use multiple currencies and multiple paypal accounts?
I need to know if cartthrob can be set up for the specific use I need.

The ecommerce part of the website will be worldwide, so I need to use multiple currencies on each product (basically USD, GBP and EUR) depending on where the user is connected. Each currency will be paid to its related paypal account (USD account, GBP account and EUR account).

I'm sure everything is possible with cartthrob. But will it be easy to set it up like this ? Do someone have some feedback on this ?

Thank you

# Answer
Yep, well, sort of! You need to copy the paypal payment plugin and rename it to paypal\_eu/paypal\_us etc (and change a couple of other names in the code, but srsly like just a couple) and it will see it as a separate gateway so you can give it separate paypal account settings.
> 0 votes

---
Tags: cartthrob, ecommerce
---


# Question
Title: After CartThrob install, everything under ecommerce tab leads to account not found error
It's a EE multi-site, and I suspect that has something to do with the error, but not sure. I have 'msm\_show\_all' set to true in the config file. This is the error I get when any CartThrob link is clicked in the admin area:

"The account you are attempting to access does not exist."

But under add-ons -\> modules it says it is installed successfully.

Any help would be appreciated.

# Answer
Have you installed the latest CT version? I know that there was a lot of extra work in there for MSM specifically.
> 0 votes

---
Tags: cartthrob, multi-site-manager
---


# Question
Title: CartThrob deprecated set_cookie() upon installation
I have a fresh ExpressionEngine 2.8.1 installation and a fresh CartThrob 2.5 installation. Without making any alterations, I've already received a developer log message:

> Deprecated function set\_cookie() called in system/expressionengine/third\_party/cartthrob/libraries/Cartthrob\_session.php on line 195. Deprecated since 2.8. Use EE\_Input::set\_cookie() instead.

I've read that CartThrob 2.5 doesn't work completely with EE 2.8 yet, but I need to get this installation moving. Can anyone provide guidance on how to get these two to play together? Is it as simple as doing a find-and-replace "set\_cookie()" to "EE\_Input::set\_cookie()" in that Carthrob\_session.php file?

# Answer
CT 2.5 isn't compatible with EE 2.8, go and grab CT 2.6 which is EE 2.8 compatible.
> 0 votes

---
Tags: cartthrob
---


title: Idle session "undefined" problem

text:
# Question
Title: Idle session "undefined" problem
We just upgraded to EE 2.8.1 and both my client and I are having an issue where after our cp session times out we get the idle session modal and then we enter our password, click login and a browser dialog box comes up saying "undefined" and we can't login. This is happing on chrome, safari and ff.

You can refresh to get back to the main login screen but it's kind of annoying. Has anyone else seen this?

Thanks,

Jim

# Answer
> 1 votes
I have this problem as well, it's very annoying.

There's a bug report here you might want to add to: https://support.ellislab.com/bugs/detail/20374/undefined-alert-when-logging-in-to-expired-session

---
Tags: control-panel, login
---


title: MSM defaults to login screen on Site 2

text:
# Question
Title: MSM defaults to login screen on Site 2
Have set up MSN as follows:

* spotlesslyclean.com
-- system
-- themes
-- admin.php
-- index.php
* spotlessovencleaning.co.uk
-- admin.php
-- index.php

However, when you visits spotlessovencleaning.co.uk, it defaults you to the login screen.

config file as follows:

```
    $system_path = '/var/www/vhosts/spotlesslyclean.com/dev.spotlesslyclean.com/system/';<br/>
$assign_to_config['site_name'] = 'spotless_oven_cleaning';<br/>
$assign_to_config['cp_url']    = 'http://dev.spotlessovencleaning.co.uk/admin.php';<br/>
$assign_to_config['site_url']  = 'http://dev.spotlessovencleaning.co.uk';<br/>

```

# Answer
Problem solved. I had managed to mix up my admin files.
> 1 votes

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


# Question
Title: Expresso store: Fatal error when adding payment
When I add a payment to an order ("New Payment" button), I'm getting an Fatal Error.

```
Fatal error: Call to undefined method Localize::convert_human_date_to_gmt() in /var/www/vhosts/domain/httpdocs/system/expressionengine/third_party/store/src/Store/Cp/OrdersController.php on line 342

```

What is causing this? Already update Expresso store to the latest version 2.3.1.

# Answer
> 1 votes
Exp:resso Store since 2.3.0 requires that you are running ExpressionEngine 2.8+. What version of EE are you running?

If you're using 2.6+ than Store is using a now depreciated function. On line 342, you should see something like:

```
$this->ee->localize->convert_human_date_to_gmt($var);

```

Change it to:

```
ee()->localize->string_to_timestamp($var);

```

If you're unsure what you need to modify (as I don't have access Store's source code) post the full line #342 from OrdersController.php.

# Answer
> 1 votes
I have encountered this problem as well it seems that EE (convert\_human\_date\_to\_gmt) deprecated this function in version 2.6.0 . I am not sure when the next store update will be rolling out to fix this issue but in the mean time you can change it to this (string\_to\_timestamp) instead

---
Tags: expresso-store
---


title: Showing Store fields in Zenbu

text:
# Question
Title: Showing Store fields in Zenbu
Does any one know if there is a way to display Exp-resso Store fields like Price in the Zenbu entries display? It'd be super-cooper nice for users.

# Answer
> 5 votes
Zenbu on its own will show what is stored in `exp_channel_data`. Store isn't supported per-se, but can be made more compatible by adding Zenbu support by the third-party add-on developer.

According to Store's release notes, it doesn’t look like full Zenbu support has been added (as of this writing). I recommend contacting the developers of Store and ask for Zenbu support. Developer documentation for Zenbu has been available for a while.

For completeness, here are some answers from the FAQ section on zenbustudio.com on the subject:

> **My custom field does not display as expected, why is that?**
>
> By default, Zenbu displays data as it is found in the exp\_channel\_data database table. A few common custom fields have extended support which shows an enhanced display based off the exp\_channel\_data data. Customized Zenbu display support for third-party fieldtypes can be easily added by third-party developers by adding Zenbu functions in the third-party add-on’s code. Documentation for adding third-party field support for Zenbu can be found here.
>
> **Does Zenbu support (insert third-party add-on here)?**
>
> Natively within Zenbu, likely no. Only a few custom fields have support within Zenbu (including native EE custom fields). Other custom fields will at least display the contents of exp\_channel\_data by default. Customized Zenbu display support for third-party fieldtypes can be easily added by third-party developers by adding Zenbu functions in the third-party add-on’s code. Documentation for adding third-party field support for Zenbu can be found here.

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


# Question
Title: P&T Dropdown and Checkboxes with Channel forms
I have been trying to get P&T's Dropdown as well as Checkboxes to work with Channel Forms but I do not seem to have any success as of yet. I have tried using

```
    {my_field_name}
            <option value="{option_value}"{selected}>{option_value}</option>
    {/my_field_name}

```

and

```
    {options:my_field_name}
            <option value="{option_value}"{selected}>{option_name}</option>
    {/options:my_field_name}

```

and

```
    {my_field_name:options}
            <option value="{option_value}"{selected}>{option_name}</option>
    {/my_field_name:options}

```

with no success. Does anyone know where i could be going wrong?

# Answer
> 1 votes
Kindly got an answer from the great guys over at Pixel and Tonic. You need to add this to your expressionengine config file.

```
$config['safecracker_option_fields'][] = 'fieldpack_checkboxes';
$config['safecracker_option_fields'][] = 'fieldpack_radio_buttons';
$config['safecracker_option_fields'][] = 'fieldpack_dropdown';
$config['safecracker_option_fields'][] = 'fieldpack_multiselect';
$config['safecracker_option_fields'][] = 'fieldpack_pill';

```

Once that has been added to your config file, you can use P& T Dropdown with channel forms using this code

```
{options:my_field_name}
     <option value="{option_value}"{selected}>{option_value}</option>
{/options:my_field_name}

```

and you can use the P&T Checkboxes using this code.

```
{options:my_field_name}
    <label class="checkbox">
        <input type="checkbox" id="{my_field_name}" name="{my_field_name}[]" value="{option_value}"{checked}>{option_value}
    </label>
{/options:my_field_name}

```

Now I have both the dropdown and checkboxes working perfectly.

T.

# Answer
> 0 votes
You'll have to use the default `{field:my_field_name}` for this.

I ran into the same problem trying the add checkboxes to a form. Turns out the field doesn't hold any data, because it is in fact still empty. You can write your own custom plugin to get that data or use field:my\_field\_name.

---
Tags: safecracker, pixelandtonic, pt-checkboxes, pt-dropdown
---


title: Submitting a form in an https page

text:
# Question
Title: Submitting a form in an https page
I have a form in a HTTPS page. The action that was generated use the HTTPs too

```
https://foo.com/?ACT=140&...

```

However, when I tried testing submitting the form, it did not work.

I tried testing using the HTTP protocol

```
http://foo.com/?ACT=140&...

```

and it worked(albeit with a warning dialog showing me that it is unsafe).

Is this correct? Is ExpressionEngine unable to process action urls with the HTTPS protocol?

If so, how do I remedy this?

# Answer
Without knowing the details of your install and project, this questions is pretty impossible to answer in my opinion.

First make sure you change `$config['site_url'] = "http://domain.com/";` to `$config['site_url'] = "/";` in your config file.

`$config['site_url'] = "//domain.com/";` may work also.

If that doesn't do it, you'll need to identify the exact resources that are loading with http:// and track backwards in the code to see how those URLs are generated. You'll then know your options.
> 1 votes

---
Tags: forms, ssl, action
---


# Question
Title: List all channel entries in a Single Template menu?
I have a channel called stories and a menu.html that includes the stories by looping through all the entries and adding all those that have a "yes" add to menu.

It works on the main index.html template list for the channel (via embed). However in single.html (the displays only one entry) the embedded menu.html only displays the menu link associated with the entry shown - it needs to show all the stories. How do I do this?

**Code for menu.html**

```
          {exp:channel:entries
            channel='stories'
            orderby='stories_item_date'
            sort="desc" }

              <?php
                  $list_menu = 'Yes';
                  if ($list_menu == '{testimony_menu}') {

                    $current_page = '{testimony_no}';
                    $menuID = '{testimony_menu_id}';
                    if ($current_page == $menuID)
                    {
                      echo "<section class='section active'>";
                    }
                    else {
                      echo "<section class='section'>";
                    }
              ?>
                  <p class="title"><a href="{url_title_path="stories/single"}" title="{testimony_chapter_title}">{testimony_chapter_title}</a></p>
                  </section>
            <?php } ?>

          {/exp:channel:entries}

```

# Answer
> 2 votes
Try adding dynamic="no" to your channel:entries loop

---
Tags: channel-entries, templates
---


# Question
Title: Old URLs pointing to the same product name
As you know from previous posts, that I am new to EE and I thank you for your help.

Here is a little background:

You know the "URL Title" field and how that can produce part of the URL, I was told to change that.

Example:

Change www.example.com/products/generation3-product to www.example.com/products/g3-product

The way that I changed it was by changing the "URL Title" field from generation3-product to g3-product and it worked.

Great, right? No

Now that I have changed it - yes, you are able to go to www.example.com/products/g3-product and see the product that you expect, but now the old URL still exists - www.example.com/products/generation3-product - but it displays a product that has nothing to do with the previous entry.

Thanks in advance

# Answer
EE is going to try to figure out what content to serve automatically unless you specify what content to grab. So when you have a URL that has a valid URL title like www.example.com/products/g3-product EE will recognize that the last segment is a valid URL title and show that content. When you have a non-valid url\_title like www.example.com/products/generation3-product EE is going to first try to find an entry with the url title of the last segment. If it doesn't it is going to show the first entry that matches your channel entries tag (in most cases this will be the most recent entry).

James Smith wrote a great URL Schematic chart of what and how EE processes URLs so take a look at that to help you get started.

There are a couple of things that you can do.

First you will want to add a few things to your template but without seeing your template now I am going to have to guess. You probably have something like:

```
{exp:channel:entries channel="products" limit="1"}
 {title}
 ... Other tags here ...
{/exp:channel:entries}

```

You can add the `require_entry` and `url_title` fields to have better results.

```
{exp:channel:entries channel="products" limit="1" require_entry="yes" url_title="{segment_2}"}
 {title}
 ... Other tags here ...
{/exp:channel:entries}

```

Even better you can add a redirect to the 404 page if the URL title is not valid.

```
{exp:channel:entries channel="products" limit="1" require_entry="yes" url_title="{segment_2}"}
  {if no_results}
    {redirect="products/noresultsfound"}
  {/if}

  {title}
  ... Other tags here ...

{/exp:channel:entries}

```

That should prevent EE from showing you the wrong entry. The next step would be to setup some 301 Redirects in either you .htaccess file or using an add-on such as Detour Pro to direct the user from the wrong URL to the correct URL.

```
.htaccess
Redirect 301 products/generation3-product www.example.com/products/g3-product

```
> 1 votes

# Answer
With Justin pointing me in the right direction, I was able to figure out the PHP error for no object created (yet)

```
{exp:channel:entries channel="products" limit="1" require_entry="yes" url_title=" {segment_2}"}
{if no_results}
    <script type="text/javascript">location.href = "http://"+document.location.host+"/products/noresultsfound/b90b6368c787883a8c707cf36870162a/";</script>
{/if}

```

If no entries match, then javascript will redirect to the products no result template
> 1 votes

---
Tags: redirects, url-title
---


# Question
Title: How to create a password for a member logged in via Facebook? i.e. no password set
I have a scenario where I am using Solspace's Facebook Connect to allow users to become a member and login to a website.

I would like to give the user the ability to create a password on their profile page so they can login the traditional way.

I have experimented with Freemember and User and both require a current password to update/create a new password.

In my research I saw a suggestion to use free member's reset password functionality which would work but is inconvenient to the user (submit email, check email, click link, create password) so am looking for something better.

My guess is because it is part of EE's native functionality to supply current password when updating a user's password (even for a super admin), that this might be an impossibility.

Can anyone help? Any suggestions?

# Answer
> 1 votes
Yeah, you're pretty much down to writing your own add-on which accepts the new password, then manually updates it. The core of the logic would like like this (after someone submitted your custom form):

```
if(ee()->input->post('password') == ee()->input->post('password_confirm'))
{
    ee()->load->library('auth');
    ee()->auth->update_password(
        ee()->session->userdata('member_id'),
        ee()->input->post('password')
    );
    // Redirect them or whatever
}
else
{
    ee()->output->show_user_error('submission', 'Your passwords must match!');
}

```

# Answer
> 0 votes
I found a solution.

I was able to use Yuri's Social Login module to achieve what I wanted.

Upon registration via FB a password is not set by the module, and Yuri has it setup so you can optionally set a password after they're logged in.

And the extra good news is if someone is an existing EE member and their FB email matches their EE one, they can sign in with FB to that same account making things seem less, giving you the ability to have FB login and a traditional login working side by side.

---
Tags: solspace, solspace-user, freemember
---


# Question
Title: Show entries in a single category and then again in all categories except the previously excluded category
This one's got me.

I'm using Stash to capture a list of entries into a set\_list. I want to get this list in two different areas on the page with different categories. If I were simply trying to display 2 different categories, match/against would work. However, what I'm trying to do seems to be a little more complicated. Here's what I want:

1. In the first get\_list, I want to **show entries from all but one category**.
2. In the second get\_list, I want to **show entries from the the single category I excluded in the first list**

The exact scenario is that I would like one list to show **all articles**, and the other list to show **only announcements**.

Here's what I'm starting off with:

```
{!-- Articles --}
{exp:stash:set_list name="articles" parse_tags="yes"}
    {exp:channel:entries
        channel="news"
        dynamic="no"
        orderby="sticky|entry_date"
        sort="desc|desc"
        sort_type="numeric|numeric"
        disable="pagination|member_data|category_fields"
    }
        {stash:sticky}{sticky}{/stash:sticky}
        {stash:title}{title}{/stash:title}
        {stash:summary}{article_summary}{/stash:summary}
        {stash:date}{entry_date}{/stash:date}
        {stash:url}{page_url}{/stash:url}
        {stash:image}{article_featured_image}{/stash:image}

        {!-- Get the category_id so we can match against them --}
        {stash:category_id}{categories}{category_id}{/categories}{/stash:category_id}
    {/exp:channel:entries}
{/exp:stash:set_list}

```

So, that gives me my list of **all articles**. For my second list, it's as simple as using match/against to only show announcments:

```
{exp:stash:get_list name="articles" match="#^13#" against="category_id"}
    <article>
        <p><a href="{url}"><i class="ss-icon ss-newspaper"></i> <span class="meta">{date format="%M %d, %Y"}</span> {title}</a></p>
    </article>
{/exp:stash:get_list}

```

It's the first list where I'm stumped. How do I capture **all entries *except* for those in category 13** without having to make another channel entries call?

I know I could just create 2 separate set\_lists with 2 separate channel entry calls. One which has category="not 13" and another with category="13".

I also thought I could wrap 2 set\_lists in the {cateogries} tag and, again use show="13" and show="not 13", but I don't see a way to do that without repeating my stash variable setters.

How do I keep this at a single channel entry call and keep it DRY?

## Update:

romans-8-31-39 pointed out a feature I didn't know existed, which was to NOT match a pattern when filtering a list. That answer is technically correct. When I went to implement that, I realized I'm already using match/against on my first list to match against sticky entries.

Would this be a use case for the stash technique outlined here? I'm having a hard time wrapping my head around the technique.

# Answer
For the first list I think you're just looking for a regex that does NOT match the category you want to exclude. I haven't tested this, but try the regular expression

```
^(?!13$)

```

So you would end up with:

```
{exp:stash:get_list name="articles" match="#^(?!13$)#" against="category_id"}
...

```

to see if that finds all items in your articles list that are not category 13. (Updated, changed regex after test run.)
> 1 votes

---
Tags: categories, stash
---


# Question
Title: CSV stream containing item name and inventory from client- wishes to display it on product pages. How?
Client has insisted that instead of giving a set quantity for the various items on the Expression Engine\Expresso ecommerce store, they would maintain it internally on their mainframe and divulge it to the webfront via CSV streams.

Here is an example of one such permutation of the stream:

BAZIK,279,BLACK,149,BREEZY,1192,BUFF,644,BUTTERCREA,931,CLEMENTINE,562,CREAM,1033,HONEYDEW,992,JAVA,21,METAL,845,PISTACHIO,954,QUARRY,1123,RED,1122,STEEL,204,WHITE,234

^ This is for one product type, not all of them. There are multiple streams which compose all of the products listed on the site itself.

So, on the webfront if the page was on this stream's category and the product specified was "Bazik" the number next to the item would be 279.

I'm at a loss on how to approach this. They won't budge on the issue, so how do I get this to work?

@ Foamcow

1. I don't know how to do that and, frankly, I don't have the time to figure it out unfortunately.
2. This makes good sense.
3. This is already being handled, however the result would not be in real time (which further muddies the entire point of this).

# Answer
> 0 votes
As @foamcow hinted you are going to need to develop something custom for this to work properly as there is nothing built into Store that would allow for this.

IF you are not comfortable with creating this in PHP, there are a couple of places that you might be able to find a developer that would be able to help you out.

1. Director-ee is a job posting board that is targeted at the EE community
2. EE Pro Network
3. You can email the Exp:resso Support team ( support@exp-resso.com ) to see if you can hire them to build this functionality for you or could recommend a developer.

# Answer
> 0 votes
I can't comment on precisely how to do it with Expresso Store but my gut feeling is you'd need to:

1. Write an add-on which would 'get' the CSV data, parse it, and update product stock levels within Expresso Store (I don't know how you would do this).
2. Set up some kind of Cron job to run that add-on periodically (so it updates the stock levels on the site based on the data from the client).
3. Get your client to give you some means to post back updated stock levels when someone purchases a product and have them arrange for their system to update.

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


title: Order entries by month and year

text:
# Question
Title: Order entries by month and year
I need to order blog posts by year and month so the output would be someting like...

```
June 2013
Blog Title 1
Blog Title 2

May 2013
Blog Title 3
Blog Title 4

December 2012
Blog Title 5

```

How can I achieve this. Any help most appreciated. Thanks

# Answer
You should use a date\_heading.

```
{exp:channel:entries [...]}
    {date_heading display="monthly"}{entry_date format="%F %Y"}{/date_heading}
    [...]
{/exp:channel:entries}

```

The value of the parameter "display" will set when the code on {date\_heading} variable pair will be repeated.

Please, forgive the simple code sample, but you don't gave more details.
> 3 votes

# Answer
Using Low Yearly Archives, you can do something like that:

```
{exp:low_yearly_archives channel="blog" status="not closed" sort="desc" monthsort="desc"}
    {months}
        {if num_entries != 0}
        <h2>{month} {year}</h2>
        <ul>
        {embed="news/archives_month" y="{year}" m="{month_num_short}"}
        </ul>
      {/if}
    {/months}
{/exp:low_yearly_archives}

```

And in your `archives_month` embed, something along those lines (we embed to get the parsing order for `{month_num_short}` right):

```
{exp:channel:entries
    channel="blog"
    disable="custom_fields|categories|category_fields|member_data|pagination|trackbacks"
    dynamic="off"
    year="{embed:y}"
    month="{embed:m}"
    sort="asc"
}
<li><a href="{url_title_path=blog}">{title}</a></li>
{/exp:channel:entries}

```
> 2 votes

# Answer
You might use "Low Yearly Archives" plugin. Find the doc from here http://gotolow.com/addons/low-yearly-archives
> 0 votes

---
Tags: orderby, sort
---


# Question
Title: Blog categories without having to use Structure?
I've read a few tutorials on how to use blog categories in conjunction with Structure. Is there a way to do this without Structure?

I've never used categories before. Any thoughts on displaying results for categories?

Typically do the following for displaying entries... Something similar for categories?

```
{exp:channel:entries channel="blog_entry|blog_link|blog_photo|blog_quote|blog_video" search:title_permalink="{segment_2}" limit="1" dynamic="yes"}

```

# Answer
It's actually easier than with Structure. There's a URL breaking word that you set in Admin-\>Channel Administration-\>Global Preferences. By default, it's set to "category", which means that when it encounters a URL with /category/ as a slug, it treats the part after category/ as a slug for a category, so /category/holiday would treat "holiday" as the category slug.

Once you have the slug, an add-on like http://gotolow.com/addons/low-seg2cat would let you get the category ID from the slug, then just put that into your channel entries loop like so:

```
    {exp:channel:entries
        channel="blog_entry|blog_link|blog_photo|blog_quote|blog_video"
        category="{segment_3_category_id}"}

```
> 3 votes

# Answer
jpea's answer here is spot on, but since you asked me for more help, Justin, here is a pared-down example of how I build my category links and then filter the entries. There are lots of other ways to do this, though.

In a template somewhere, generate your category links:

```
<ul>
    {exp:channel:categories channel="blog" disable="category_fields" show_empty="no" style="linear"}
        <li><a href="/blog/category/{category_url_title}">{category_name}</a></li>
    {/exp:channel:categories}
</ul>

```

Then in your blog listing template where you display your posts (*blog.group/index.html*), set your `channel:entries` loop up like this. You will need to have LowSeg2Cat installed and enabled.

```
<h1>Blog{if segment_2 == "category"} Category: {segment_3_category_name}{/if}</h1>

{exp:channel:entries
    channel="blog"
    disable="categories|category_fields|member_data|pagination"
    dynamic="no"
    {if segment_2 == "category"}
        category="{segment_3_category_id}"
    {/if}
}

    <h2>{title}</h2>

{/exp:channel:entries}

```

Note the simple conditional in the channel:entries parameters that checks for the presence of a category filter. If you are not filtering by categories then it will just display an unfiltered list of all blog entries.
> 0 votes

# Answer
@AlexKendrick and @ jpea - You guys really helped me figure this out. Really appreciate the help.

I just had to set some appropriate category parameters for the template group that users are routed to after select a blog hyperlink.

Works great.
> 0 votes

---
Tags: channel-entries, categories
---


# Question
Title: How to change member group from front end with Freemember
Let me know any one in Freemember how to update member group when update profile from front end.

if not possible in freemember then let me help for any other way for update member group from front end.

Thanks, piyush

# Answer
> 1 votes
Freemember automatically unsets any posted `group_id` value, as it's a security risk for permissions-based sites. But, you could do this with an extension hook in Freemember - specifically the freemember\_update\_member\_start hook.

So post the `group_id` with a form name *other* than `group_id` (say, `new_group_id`), then in your extension, you could do something like this:

```
function freemember_update_member_start($member_id, $data)
{
    // Perform whatever checks you need to make sure that it's OK to change the member group for this update
    $data['group_id'] = ee()->input->post('new_group_id');
    return $data;
}

```

# Answer
> 0 votes
As gar as I'm aware, only SA can alter the group a member belongs to.

I'll keep an eye here to see if any answers prove me incorrect.

# Answer
> 0 votes
If you fancy porting it to EE2.x then this plug-in might help with changing member group once a user already has already been registered.

```
{exp:change_member_group:change group_id="5"}

```

See: https://github.com/ninefour/change\_member\_group.pi.ee\_addon

# Answer
> 0 votes
Solspace User can allow members to change their member group. I have that setup on my site. I have two different member groups that people can register to be in - each with slightly different permissions. If they choose the wrong group when they register I provide the facility for them to switch their membership to the other group when they edit their account.

---
Tags: freemember
---


# Question
Title: Display ordered items within exp:store:orders oder exp:store:payment
Is it possible to retrieve the list of products in the orders or payment template tag, e.g. like in the checkout tag `{items}`?

After successful payment we display a summery page using the `{exp:store:orders}` or `{exp:store:payment}`, along with the orders summery we would like to display a list of the items related to that order (like in the control-panel).

We tried something like:

```
{exp:store:payment order_hash={last_segment}
    Your order ID: {order_id}
    ...
    {items}
        {exp:channel:entries entry_id="{entry_id}"}
            {title}
        {/exp:channel:entries}
    {/items}
{/exp:store}

```

But unlike within the `{exp:channel:checkout}` tag this does not work.

Do we need to use a manual query?

Thank you, Daniel

# Answer
The `{items}` tag does work with the `{exp:store:orders}` and `{exp:store:payment}` tags, but a little different than in the `{exp:store:checkout}` tag. Simply do not use a nested `{exp:channel:entries}` tags.

So this works:

```
{exp:store:payment order_hash={last_segment}
    Your order ID: {order_id}
    ...
    {items}
        {title}
    {/items}
{/exp:store:payment}

```

All variabes are available like in the checkout tag, e.g. `{item_qty}`,`{item_total}` etc.
> 1 votes

---
Tags: expresso-store
---


# Question
Title: Two playa levels deep and need to come up a playa mid loop
I have a channel with a playa entry within that playa I call a matrix and a playa level i need to come back up a level within the matrix/playa loop. Can any one help me with the correct syntax?

Thanks Here is my simplified code.

```
  {exp:playa:children field="3rd_order_under" var_prefix="thirdorder_playa"}

         <h5>{thirdorder_playa:title}</h5>

            {thirdorder_playa:discipline_3rd_order var_prefix="discipline_matrix"}
                {discipline_matrix:m_p_discipline var_prefix="mx_disipline_playa"}

                     <!-- example from the discpline channel -->
                     {mx_disipline_playa:discipline_description}

                      <!-- now here where i want to call a different playa within the "thirdorder_playa" -->
                {thirdorder_playa:exp:playa:children field="4th_order_under_3rd_order" sort="asc" var_prefix="fourthorder"}
                       {fourthorder:title}
               {/thirdorder_playa:exp:playa:children}  </p>

                {/discipline_matrix:m_p_discipline}
            {/thirdorder_playa:discipline_3rd_order}

  {/exp:playa:children}

```

# Answer
The thing about var\_prefix is that it not only prevents namespace collisions, it also define the "stage" when it's going to be parsed.

In your case, if you want the Playa loop to happen inside the Matrix, then your best bet would be to use the Matrix field's var\_prefix.

I might be wrong - would not be the first time EE's parse order got the best of me in that case.
> 0 votes

---
Tags: matrix, playa, nesting
---


# Question
Title: Membership registration limited to list of email addresses
We're building a simple site for an event. Attendees must registrate. But we want to verify if they are on the guest list.

Can we use the normal member registration? Is there an addon for this? Or is there a better way?

Thanks!

# Answer
If you have a fairly small number of members you could pre-create their accounts with random passwords then create a "registration form" which gets them to reset the password.
> 1 votes

---
Tags: member-management, guest
---


title: Template Routes and extra segments

text:
# Question
Title: Template Routes and extra segments
I often use a 'site' template group to house my base level pages. For example I may have a 'about' page, but don't require an 'about' template group so I add this to the 'site' group. I then don't want the URL to be /site/about so I have always used the plugin 'freeway' to allow me to remove the 'site' part (domain.com/about).

Now that 'Template Routes' has arrived, I have begun using this by setting '/about' as the route for the page. This works perfectly.

The problem I have is that on occasion I add a segment on a page to show additional information when a user clicks a link. For example 'about/more-content'. Now with template routes this extra segment stops the page from working and shows the 404 page.

Is there a way to have '/about' as the route, but also allow for extra segments after?

Thank you

# Answer
> 4 votes
Yup - make sure you set "require all segments" to "no", then just add another segment to the rule:

```
/about/{extra:alpha_dash}

```

`:alpha_dash` means that the segment can contain alpha-numeric characters, underscores, and dashes. There are other rules available as well.

Then in your template you can check the value of the extra segment this way:

```
{if segment:extra == 'foo'}
    // Show something different
{/if}

```

---
Tags: templates
---


# Question
Title: Multi Site, Multi admins, different contents, sharing content
I want to use ExpressionEngine to build a website for a church. The church has several campuses across the USA. The church has a site and the campuses have their own mini-sites too.

Basically the church has a type of admin (A) and the campuses have another type of admin (B). B type admins can only access their content (of the campuses they own) and **A type admins can access all contents and administrate B type admins**. Also, B type admins can ask for content of their campus site to be on the church side (so sharing some content across websites).

Do you know of a way to do this? A plugin or so ? I'm not really familiar with EE's multi-site module.

# Answer
Multi Site Manager would work well for this.

* Each member group can be assigned to one or more sites in the network
* Super Admins can access all sites and settings.
* Content from other sites can be accessed by using the `site` parameter on any Channel Entries tag
> 3 votes

---
Tags: permissions, content, multiple-sites
---


title: EE 2.8.1 & MSM Issue

text:
# Question
Title: EE 2.8.1 & MSM Issue
Just upgraded a site from 2.5.5 to 2.8.1 with the plans of adding MSM once 2.8.1 was installed. I successfully upgraded to 2.8.1 and when I go to turn on MSM it kicks me out of the CP with the following error:

```
An Error Was Encountered
Site Error: Unable to Load Site Preferences; No Preferences Found

```

When I set `$config['multiple_sites_enabled'] = "n";` I'm able to log back in with no errors. Not sure where to start troubleshooting?

# Answer
Figured it out! In my `config.php` I had dynamically set config variables with PHP variables:

```
$base_path = $_SERVER['DOCUMENT_ROOT'];
$config['tmpl_file_basepath'] = $base_path.'/assets/templates/';

```

which was causing connection issues with the database with MSM enabled. Not exactly sure how MSM works, but explicitly setting these variables for each domain fixed the issue along with uncommenting & setting the MSM `$assign_to_config` variables in `/index.php` & `/system/index.php`.
> 1 votes

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


# Question
Title: Display Data on Screen after Form Submission using Solspace Freeform Pro
With Freeform, I know that when the user submits a form entry, you can set up an email notification that sends all the data they entered to them in an email message. Is it possible to also have their information display on screen after they submit?

Email is just not as dependable as it once was, so I'm trying to have a backup "Print this page now for your records" type of option - just in case the notification email gets lost.

# Answer
> 1 votes
Yes, by using `%%entry_id%%` in your `return=""` parameter in `{exp:freeform:form}`: http://www.solspace.com/docs/freeform/form/#return

`%%entry_id%%` will be replaced by the created entry\_id when the form was submitted. After form submission, the entry\_id would be a segment in the URL (eg. `/form/thank-you/123`).

From there, you can retrieve your Freeform entry by using `{exp:freeform:entries}` and display your submitted data on screen.

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


title: Searching Within Parent Entries

text:
# Question
Title: Searching Within Parent Entries
I have some parent entries that I am looking to filter down using a date field. I know the search functions are not available in the parent or relationship fields. What other options do I have?

I was thinking of doing a separate entries tag, but have not found a way to select all entries that are related to another specific entry, like this:

{exp:channel:entries search:parent\_entry="1234"}

# Answer
> 0 votes
Here is how you can get all your parent entry ids into another channel entry tag.

1.) Create a Template with your parent channel tag and pass an embed variable to it from your main template. Here you can add any parameter you need to get the needed data.

```
{exp:channel:entries channel="parent" entry_id="{embed:eid}" }
    <h1>Parent Data</h1>
{/exp:channel:entries

```

2.) Embed the above template in your main template. And pass the parent entry\_ids into the embeded template.

```
{exp:channel:entries channel="child"}
   {embed="template/parent-entries" eid="{parents channel="parent" backspace="1"}{entry_id}|{/parents"}
{/exp:channel:entries}

```

---
Tags: relationships
---


title: Trying to login via database

text:
# Question
Title: Trying to login via database
As you have probably seen by my somewhat regular postings, I am a newbie to EE.

The company that I work has all of their web sites using EE and some of the sites have not been updated or worked on for years.

Version 2.3.1

I have been asked to update an entry on one particular web site but the credentials for logging into the domain.com/system are not working.

I have access to the db and I have tried to duplicate the member with admin group id = 1, followed by going through the forgot password steps, except this time, it should be going to my email address.

I am not receiving any emails at all from EE to reset

I have made the duplicate entry with the exception of the email address within the table exp\_members

Is there somewhere else in the tables that I alter to make this possible?

Is there a way that I can use the salt, crypt\_key and password to retrieve the password set by the former admin?

As usual, thanks in advance

# Answer
> 1 votes
I found the answer on ellislab's forum - enter link description here

Thanks for being patient with me

# Answer
> 0 votes
There are a bunch of ways to approach this, but to continue with the method you started...

Each member has an row, not just in exp\_members, but also in exp\_member\_data and exp\_member\_homepage. The password reset email may be failing due to a the inability to complete a JOIN on these tables.

So to get your method to work I'd start by making sure you have a matching record in each of these three tables.

---
Tags: login, mysql
---


# Question
Title: What happens when an IP address isn't found in the IP to Nation database?
I have a site where a few people are reporting that all they get is a blank page when they visit it. This started happening after we put some country detection code on there that showed tweaked content depending on the country that you were viewing from. We're using the IP to Nation module in EE to handle this and have kept the database up to date.

I'm wondering whether it is possible that the blank pages could be a result of their IP address not being found in the database? Could this happen?

I'm using the MC Country plugin in conjunction with the IP to Nation module (MC Country requires this). Here's a snippet of code that I'm using on all pages:

```
{if "{exp:mc_country default='gb'}" =="gb"}Call us <i>free</i> on +44 (0)800 014 8201 from 8am to 8pm{/if}
{if "{exp:mc_country default='gb'}" !="gb"}Call our offices in Portugal on (+351) 308 800 878{/if}

```

Any insight greatly appreciated.

Jim

# Answer
> 1 votes
A blank page typically indicates a hidden error, likely a PHP error. Since you are using a tag inside quotes of a conditional, my guess is that the MC Country plugin is returning something that is causing a malformed conditional. My suggestion would be to use the native IP to Nation tag using the parameter `type="text"` to get the country code.

# Answer
> 0 votes
I upvoted Derek's suggestion as it makes sense and is most likely the way to go. But you might want to try making the condition a bit simpler.

The way you have coded it, if you first condition isn't true then the second condition will always be true. So you don't need 2 if statements. Try using if:else to simplify your conditional.

My understanding is that you want to show the Portuguese details if the visitor is not in Britain right? So try something like this to make it simpler and may reveal the error.

```
{if "{exp:mc_country default='gb'}" != "gb"}
    Call our offices in Portugal on (+351) 308 800 878
{if:else}
    Call us <i>free</i> on +44 (0)800 014 8201 from 8am to 8pm
{/if}

```

What this says is, if the country code isn't 'gb' then show the Portuguese details, fall back to 'gb' if no code is returned. If no code is returned then default to 'gb' (and so show the 'gb' details.

---
Tags: ip, iptonation
---


# Question
Title: Sorting / showing entries by author in control panel
Is there a way when you are viewing entries via the Content \> Edit section to pull back all entries by author?

Currently if I sort the entries by Author I guess it is using the ID to sort by and not the Author Name. We have over 8000 members so for the editor to try and find one is going to be a lengthy exercise.

# Answer
> 2 votes
Sadly the default EE Edit screen does not allow you to easily sort by authors but this is a great use case for Zenbu. Zenbu allows the admin to filter the content easily by author or even custom field data.

---
Tags: control-panel, author
---


# Question
Title: Dropdown menu using child structure pages
I have the following code and I'm trying to make it so that the children page titles populate in the dropdown listing and then link to that page. Any

```
                                        {exp:structure:entries dynamic="off"}
                                        {machine_support_category}
                                        <div style="padding: 0 20px 32px;text-align: center;width: 263px; float:left;">

                                            <div class="product-img-box">
                                                <a class="product-image" href="#"><img width="173" height="117" alt="Image description" src="{image}"></a>
                                            </div>
                                            <h3 class="product-name"><a href="#">{title}</a></h3>
                                            <select>
                                                {structure:child_listing:channel_id}
                                                <option>{title}</option>
                                                {structure:child_listing:channel_id}
                                            </select>

                                        </div>
                                        {/machine_support_category}
                                        {/exp:structure:entries}

```

Backend Pages Structure:

Frontend:

# Answer
> 1 votes
looks like you are mixing up a few things - Structure can render your menu with a variety of tags, as listed on their documentation page. You will find that there are limited options for a dropdown menu, but with some css tinkering you will be able to build a basic version.

If this doesn't meet your requirements you might need to resort to Peter Lewis's Structure Entries Addon.

If all if this is something you have already tried then I would suggest you ask for Structure's support \- they are good and very matter of fact.

---
Tags: ee2, structure, children
---


title: Tracking user's behaviour

text:
# Question
Title: Tracking user's behaviour
I have a site which has audio files to listen to and optionally download. Restrictions to accessing the file is to become a site member. Is it possible to track that the member has listened (clicked) to the file? This site has Devdemons Store installed, which perhaps could provide a solution?

# Answer
If you want to use ExpressionEngine you could use something like Channel Files, which if you use obfuscated links runs it through ExpressionEngine and documents the download in the database. http://www.devdemon.com/expressionengine-addons/channel-files

Otherwise you could use JS event tracking. Google event tracking documentation is here: https://developers.google.com/analytics/devguides/collection/gajs/eventTrackerGuide

Good Luck!
> 1 votes

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


# Question
Title: Channel Files upload button console error
I have an issue in Channel Files 5.2.9 in ExpressionEngine 2.8.1. Please follow my attached screenshot with dev console log which has error. This issue was found in template in new entry form. In this case the “upload” button in upload form is not active.

Do you have any ideas? Thank you for help.

# Answer
When I experienced similar issues, the solution boiled down to jQuery conflicts.

If you are using `include_jquery="yes"` in your Channel Form tags, make sure you haven't included jQuery via a `<script>` tag anywhere else on the page.

If you use `include_jquery="no"`, make sure that you *have* defined jQuery, and make sure you're using the 1.8 branch. (1.9 removed a deprecated "msie" property that Channel Form uses.)
> 1 votes

# Answer
If you are using Channel Files in Channel Form on a template you have to be careful in setup. The control panel uses an older version of jQuery and attaches several libraries so certain functions occur. I recommend on your Channel Form page you load the included CP libraries, otherwise you will need to match the same options with compatible libraries.

Start by removing on this template any of your own jQuery stuff and use the default Channel Forms libraries. If everything works, you can try swapping items out and see what breaks it. However, like I said before, using the build in libraries will just be easier.
> 0 votes

---
Tags: devdemon, channel-files
---


title: Dynamic Title & Return in Channel Form

text:
# Question
Title: Dynamic Title & Return in Channel Form
In my `{exp:channel:form}`, I'd like my users to create channel entries with the possibility of having identical titles (this is for a forum). Since EE"s `{title}` has to be unique, I created a `forum_title` field so that duplicate titles would be allowed in the forum.

However, now I need to set the title dynamically. I can use `forum_title` as part of the title, but I need something else to ensure it's unique. I was hoping I could add the entry id as a suffix, but this didn't work:

`dynamic_title="[forum_title]-ENTRY_ID"`

**How can I ensure that my dynamic\_titles are unique?**

**Also, is it possible to pass the value of a channel field to the `return` parameter?** This didn't work for me:

`return="/forums/ENTRY_ID/[forum_title]/"`

# Answer
> 1 votes
From my understanding, the `title` does not need to be unique, only the `url_title`. If you create two entries with the same `title` ExpressionEngine will append `-1` to the second `url_title` for you.

As for redirecting, I would return to a simple template `return="/forums/submit"` and on this template run a channel entries loop, grab the latest post, and create the redirect link manually `{redirect="/forums/{entry_id}/{url_title}"}`

---
Tags: templates, safecracker
---


# Question
Title: Database error 1118 - Row size too large
The error occurs when I try to add a new custom field of any kind. The install contains 210 custom fields but will not accept any more. Any advice to troubleshoot would be great. Further details below:

**EE 2.7.2** Fieldtype addons: Matrix, Playa, Wygam

**Database error:**

A Database Error Occurred Error Number: 1118 Row size too large (\> 8126). Changing some columns to TEXT or BLOB or using ROW\_FORMAT=DYNAMIC or ROW\_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline. UPDATE `exp_channel_data` SET `field_ft_233` = 'none' Filename: libraries/api/Api\_channel\_fields.php Line Number: 1454

**PHP error:**

A PHP Error was encountered Severity: Notice Message: Undefined index: field\_fmt\_options Filename: fieldtypes/EE\_Fieldtype.php Line Number: 572

A PHP Error was encountered Severity: Warning Message: Invalid argument supplied for foreach() Filename: helpers/form\_helper.php Line Number: 324

A PHP Error was encountered Severity: Notice Message: Undefined index: field\_fmt\_options Filename: fieldtypes/EE\_Fieldtype.php Line Number: 572

A PHP Error was encountered Severity: Warning Message: Invalid argument supplied for foreach() Filename: helpers/form\_helper.php Line Number: 324

A PHP Error was encountered Severity: Notice Message: Undefined index: field\_fmt\_options Filename: fieldtypes/EE\_Fieldtype.php Line Number: 572

A PHP Error was encountered Severity: Warning Message: Invalid argument supplied for foreach() Filename: helpers/form\_helper.php Line Number: 324

A PHP Error was encountered Severity: Notice Message: Undefined index: field\_fmt\_options Filename: fieldtypes/EE\_Fieldtype.php Line Number: 572

A PHP Error was encountered Severity: Warning Message: Invalid argument supplied for foreach() Filename: helpers/form\_helper.php Line Number: 324

A PHP Error was encountered Severity: Notice Message: Undefined index: field\_fmt\_options Filename: fieldtypes/EE\_Fieldtype.php Line Number: 572

A PHP Error was encountered Severity: Warning Message: Invalid argument supplied for foreach() Filename: helpers/form\_helper.php Line Number: 324

A PHP Error was encountered Severity: Notice Message: Undefined index: field\_fmt\_options Filename: fieldtypes/EE\_Fieldtype.php Line Number: 572

A PHP Error was encountered Severity: Warning Message: Invalid argument supplied for foreach() Filename: helpers/form\_helper.php Line Number: 324

# Answer
> 5 votes
You are hitting the limits of InnoDB. It might work to change your table to the MyISAM engine (backup before changing this), as the limits of MyISAM are larger compared to InnoDB.

Note that this can cause an performance hit as table locking acts different on MyISAM.

You can also replace all VARCHAR fields (with more than 10 characters) with a TEXT field. They are using less bytes and thus reducing the total row size.

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


# Question
Title: If statement parentheses not working correctly
I've got a weird issue with parentheses in an if statement. If I have the if statement on it's own then no content is shown. If, however, I place two if statements in front of it then everything works fine. See examples below:

Works

```
{if downloads:total_rows >= '1'}{/if}
{if section_1:total_rows == '1'}{/if}
{if (downloads:total_rows >= '1' || section_2:total_rows == '1') && section_1:total_rows == '1'}
    Content ...
{/if}

```

Does not work

```
{if (downloads:total_rows >= '1' || section_2:total_rows == '1') && section_1:total_rows == '1'}
    Content ...
{/if}

```

Does anyone know why this strange behaviour is occurring?

Thank you.

# Answer
It seems as though the conditions inside the parentheses don't need the curly braces. At least this has fixed it for me.

```
{if (downloads:total_rows > 0 || section_2:total_rows == 1) && {section_1:total_rows} == 1}
    Content...
{/if}

```
> 1 votes

# Answer
I would try putting your variables in curly braces:

```
{if ({downloads:total_rows} > 0 || {section_2:total_rows} == 1) && {section_1:total_rows} == 1}
    Content ...
{/if}

```

You are making this an advanced conditional so you can't access your variables correctly in the conditional without the braces. I tested the code above and it works for me.

https://expressionengine.stackexchange.com/a/13946/1188
> 1 votes

---
Tags: ifelse
---


title: Zoo Visitor Member Fields Not Updating

text:
# Question
Title: Zoo Visitor Member Fields Not Updating
I am currently using ex-presso store and have mapped it to the zoo visitor fields. When i complete an order, the user shipping and billing details are not saved or updated at all.

I am using the `{exp:zoo_visitor:details {global:disable_categories}}` tag to surround the member info form and using the `{visitor:global:mbr_user_shipping_phone}` formatted tags for the values of the text boxes.

Is there anything I can look at to solve this? I don't know what I am missing?

# Answer
If you are updating the users member data stored in Zoo Visitor outside of the normal checkout process of Store you should be using the `{exp:zoo_visitor:update_form}` tag pair instead of the `{exp:zoo_visitor:details}` tag pair. The update tags allows for:

> The update form tag can be used to update native member fields like password, username, screen\_name, email & all custom fields you have defined in the member channel.

Full docs on the update tag.

Something along the lines of:

```
{exp:zoo_visitor:update_form}
 Billing City: <input name="mbr_billing_city" type="text" value="" />
{/exp:zoo_visitor:update_form}

```

If you are trying to update the members data during the checkout process you can simply use Store's native checkout functionality to update the member data. Something along the lines of:

```
{exp:store:checkout}
 <label for="billing_city">Billing City</label>
 {field:billing_city}
{/exp:store:checkout}

```

Or if you want to create a custom input you could do:

```
{exp:store:checkout}
 <label for="billing_city">Billing City</label>
 <input type="text" name="billing_city" value="{billing_city}" class="whatever" />
{/exp:store:checkout}

```
> 2 votes

---
Tags: expresso-store, ee2, zoo-visitor
---


# Question
Title: is it healthy to built a web services or a web app using EE?
we are growing company and we support and use EE for more than 4 years and continues, because we believe in it, and it is our choice ever.

Any ways, I was in interesting discussion with a developer about how healthy & good enough is it to use ExpressionEngine for web services, web apps, cloud services, dating website or CRM for public such as paid services etc... and that will be our development methodology in our business so every one has the same level experience to make faster development.

But his opinions about using EE are

1. It works only for small projects such as blog or website.
2. custom development in EE is wasting of time.
3. We will get bad performance with database Inflation.
4. it uses MYSIM mysql engine.
5. it dose not support other data bases.
6. it is better to built application with custom development using php framework such as laravel, or zend because it is faster and more solid.
7. it has no powerful permission system.
8. you should keep it as CMS nothing else.
9. Don't put all the eggs at one basket. EllisLab won't be here for every

My opinions are:

1. it is better way to develop custom forms and fast way to implement design.
2. I think Custom development with EE is easy because the learn is short with Grate documentation.
3. it is easy to develop and custom your work online using (control panel).
4. you can use built your backend for your end users as backend using Channel:forms.
5. it has many many tools and embedded features starting from login and **security** ends to Word Censoring, so you wont need to reinvent the wheel.
6. it may wont safe time but it is a solid framework and has allot of add-ons to extend.
7. ExpressionEngine will work will with the good hardware and well configured servers.
8. accountability for the project ( if I lose my programmer I will find someone to help), ellislab support.
9. I have experience with 2 web services both are walking without a limping .

After all, we did not come out with any result So I thought about asking the experts. am i overestimate of expressionEngine value? or just he is right. your honest will help us to set some rules :) thanks for advance in helping

# Answer
> 2 votes
It's really a matter of "it depends"

There are a lot of factors that can help you determine whether EE is good as a long-term platform for a site, so there's no clear answer.

You have to look at what you expect your architecture to be like and determine how much bending of EE it will take to make it work. In some cases, it works just perfectly, in others, it's much easier to build on a framework instead. So I would suggest you look into how much customization it really needs.

# Answer
> 2 votes
The real value/power of EE is in the control panel, and how quickly you can pull together complex data-driven sites by not having to build an admin interface. I'm currently building a mobile app that uses a combination of Meteor and EE, and the real reason I opted for EE as a back-end solution is because it would save weeks of work using what EE does natively. With some caching you can output JSON data lightning fast.

Also, you can now operate a pretty decent CRUD API from EE: http://putyourlightson.net/open-api.

It's not a perfect solution for every scenario, but if you're already using it I've found you can achieve things much faster than by building admin interfaces from scratch.

---
Tags: add-on-development, database, advanced-conditionals, development, cloudfront
---


# Question
Title: Loop through Channel Entries to display multiple static maps
How can I loop through entries to successfully show static google maps for each entry?

My google maps field is `{event_location}`

Here is my template code:

```
{preload_replace:module="low_events"}

{exp:{module}:entries channel="events" unit="passed" show_active="no" limit="6" status="open" paginate="bottom" orderby="low_events:end" sort="desc"}
<figure class="archive-event">
{exp:gmap:static_map markers="{event_location"}
</figure>

{/exp:{module}:entries}

```

At the moment it shows the default Google map and the entire geocode data.

Appreciate any help or guidance.

# Answer
The reason this isn't working is because the data that is stored in that database column is a JSON string. This isn't the desired behavior you are seeking. Here are some things to consider, which I think will help you get it working properly.

1. You don't need brackets surrounding your markers string. There is no reason for brackets unless you are parsing a variables containing an address string or lat/lng coordinates.
2. You can use the FT to output the formatted address string or the latitude and longitude into the markers parameter.

```
{exp:gmap:static_map markers="{event_location:formatted_address}" width="400" height="300"}

```

https://objectivehtml.com/google-maps/fieldtype#formatted\_address
3. The FT also comes with Static Map outputs baked into the FT tag itself, so it's even easier than above. This will convert markers, routes, and regions into the a static map, so it's real dynamic yet easy to implement.

```
{event_location:static_map width="400" height="300"}

```

https://objectivehtml.com/google-maps/fieldtype#static\_map
> 1 votes

---
Tags: channel-entries, google-maps-for-ee
---


# Question
Title: Freeform: Custom field value not showing up in subject
I've read a lot about this online and I'm not sure what I'm doing wrong.

* I have created a custom field.
* In my form I set that custom field to a variable. I've confirmed in the Chrome Dev Console that the field (a hidden text box) is showing up and has a value of the variable.
* The notifications panel says that I can use custom variables for the subject. However, it doesn't seem to matter it continues to display the variable tags and name e.g. {my\_custom\_variable}.

Any idea what I could be doing wrong?

# Answer
> 0 votes
Make sure that you have the custom field in your composer template as well as your custom template. Otherwise, Freeform doesn't bring that field into the notification context.

---
Tags: solspace-freeform
---


# Question
Title: How to make Codeigniter's db->get() query return relationship data
I'm trying to fetch a channel entry's data from within a plugin. I was surprised that ExpressionEngine's Channel Entries API includes functions for creating, updating, deleting, and checking whether an entry exists, but no function to *get* a channel entry. So I'm trying to use Codeigniter's `db->get()` function to fetch this data.

First, I tried just fetching the channel data:

```
$query = $EE->db
  ->select('*')
  ->from('exp_channel_titles')
  ->join('exp_channel_data',
    'exp_channel_data.entry_id = exp_channel_titles.entry_id')
  ->where('exp_channel_titles.entry_id' => 1)
  ->get();
$result = $query->result_array();
var_dump($result[0]);

```

This returns all of the channel entry's data *except relationship data*, unfortunately. My custom channel field with an ID of 106 is a relationship field, and I can set and update it through the ExpressionEngine CMS just fine, but when fetching the `channel_data` in this way the field is blank and its field type is (strangely) set to "xhtml":

```
["field_id_106"]=> string(0) "" ["field_ft_106"]=> string(5) "xhtml"

```

Next I considered that maybe I need to join the `exp_relationships` table to this query by adding a second join:

```
->join('exp_relationships',
  'exp_relationships.parent_id = exp_channel_titles.entry_id',
  'left outer')

```

But this still returns a blank string of fieldtype "xhtml" for my relationship `field_id_106` in the channel data returned. So, any thoughts on how to fetch relationship data along with the rest of the channel data using Codeigniter in ExpressionEngine?

# Answer
> 0 votes
The best way to get that data is in two separate queries. Because of the way the data is stored in the database, it can not be joined in the way I think you are thinking about it.

Say in our title table we have something like:

```
    entry_id    title
    1           entry 1
    2           entry 2
    3           entry 3
    4           entry 4
    5           entry 5

```

In our relationships table

```
    parent_id   child_id
    1           2
    3           4
    3           5

```

If you try and do a join, it will not work due to entry\_id 3 having two matches.

```
entry_id    title       child_id
1           entry 1     2
2           entry 2
3           entry 3     4 and 5 (you can't join two rows on a single row)
4           entry 4
5           entry 5

```

If you are proficient with mysql you might could get away with using mysql's group\_concat function (although this has a default limit of 1024 characters).

All that being said, I think the best way to do this is to get your channel data like normal, then run a separate query on the relationships table.

p.s. If you absolutely must do it in a single query, you are going to have to do regular php and mysql see this link

---
Tags: relationships, codeigniter
---


# Question
Title: Admin Group editing entries in CP - complex permissions issue
What I need to achieve is the following - not sure the best way to go about it, hoping someone knows of an add-on or other solution:

1) User submits an entry via Channel-Form front end. All sorted.

2) Entry gets posted in one of 10 categories with status 'pending' - each of which has a specific Admin/Editor who is notified by email. Again sorted.

3) On getting the email the Admin/Editor logs in to the CP and either approves or denies the entry.

The issue is at #3 where each of the 10 editors should see ONLY the entries posted to their own category that they are the Admin for.

So, when two entries are placed in UK and USA categories respectively, the UK and USA admin each can login and see/approve only the entries with their country categories and not in any other country cat.

Obviously it's possible to restrict by channel - but is finer-grained control possible? Any suggestions?

# Answer
There are two solutions that me and my company came up with when face with a problem like yours.

1.) You can set the author of the entry to be the id of the admin from the channel form and enable the "Can view channel entries authored by others" in the member group settings

2.) You can create a module and extension.

We ended up making a module because we had a very specific case where we couldn't change the author.
> 1 votes

# Answer
Admins can filter entries by category in the CP, but I suspect that what you want is a secure way of allowing admins to only see their own categories.

I don't know of any native way to do this in the CP, and I am unaware of any addons that will do this. Have you done a search on devot-ee?

You may want to consider approaching this via the front end where you can use the channel tag in combination with the logged\_in\_user\_id conditional, to only list entry titles filtered by that user ID and the user's assigned category or categories. Next to each listed title, a link to a channel edit form with the link passing the entry ID. The admin can then edit the entry status, or whatever else.

EDIT STARTS HERE

I will assume that you are using the channel form for the original entries, and either the author gets to set the category or you force the category via a hidden field and conditional depending on the author ID

For this to work, each target admin member group's settings must look like this:

Include Members in PUBLISH page multi-author list? = "yes";

Can access the control panel? = "yes";

Can access CONTENT section = "yes";

Can access CONTENT: Edit = "yes";

Can edit entries authored by others = "yes".

With that many (30) admins, your template code is going to be rather verbose, but let's see if you can live with that. You need at least two templates. One to list an admin's entries to be authorised and one for the channel form where the status can be changed:

Via whatever means, (access security is up to you) you will send your admins via the front end to a template as follows:

{if logged\_in\_group\_id == admin\_id\_1}

```
{exp:channel_entries channel="whatever" status="pending" category= admin_id_1_category_id|another_admin_id_1_category_id}

    {entry_title}<a href="{path='template_group/channel_form_template}/{channel_name}/{entry_id}">Authorize This</a>

{/exp:channel_entries}

```

{/if}

This is where it gets verbose - you need one of the above for each admin, plus a default to catch any non-admins that may turn up. Or you could use PHP in your template and set the category parameter dynamically according to the logged-in admin ID

Your channel form template looks something like this:

{exp:channel:form

```
channel="{segment_3}"

return="template_group/template/ENTRY_ID"

entry_id = "{segment_4}"

```

}

Content Label

Authorize Label

Submit

{/exp:channel\_form}

I hesitate to mention this because it is overkill for what you want to do, but my HooBlong module has a feature that will allow you to filter inputs by category and member group, so you would not need a verbose entry listing template, and you would not need to keep updating the template if you ever needed to add/update member groups. See here.

Post your code if you need help debugging.
> 1 votes

---
Tags: control-panel
---


# Question
Title: How to get category last child url for an entry
I'm trying to use GWcode Categories to output category last child url for an entry. Code looks like:

```
    {exp:channel:entries channel="products" category="{segment_2_category_id}" orderby="title" sort="asc" limit="8" status="open" paginate="bottom" dynamic="no"}

    <div class="col-md-3 col-sm-6 category-item">
        {exp:gwcode_categories group_id="1" url_title="{last_segment}" last_only="yes"}
        <a href="{site_url}{segment_1}/{segment_2}/{cat_url_title}/{url_title}">
            {product_image limit="1"}<img src="{product_image:image}" alt="{product_image:title}" class="img-responsive">{/product_image}
            <h3>{title}</h3>
        </a>
        {/exp:gwcode_categories}

    </div>
    {switch='|||</div><div class="row row-category">'}

    {/exp:channel:entries}

```

but what I'm getting is a list of all last child categories urls from the group 1.

Any clue how to get last child category url per listed entry?

Thanks

# Answer
> 0 votes
Well, user error - fix was very easy - use entry\_id instead of title\_url:

```
    {exp:channel:entries channel="products" category="{segment_2_category_id}" orderby="title" sort="asc" limit="8" status="open" paginate="bottom" dynamic="no"}

    <div class="col-md-3 col-sm-6 category-item">
        {exp:gwcode_categories group_id="1" entry_id="{entry_id}" last_only="yes"}
        <a href="{site_url}{segment_1}/{segment_2}/{cat_url_title}/{url_title}">
            {product_image limit="1"}<img src="{product_image:image}" alt="{product_image:title}" class="img-responsive">{/product_image}
            <h3>{title}</h3>
        </a>
        {/exp:gwcode_categories}

    </div>
    {switch='|||</div><div class="row row-category">'}

    {/exp:channel:entries}

```

---
Tags: categories, entry, gwcode-categories
---


title: Solspace's Favorites Module

text:
# Question
Title: Solspace's Favorites Module
Has anyone used this module to mark a post as read or unread using aJax? Can you share your code?

I am using favorites to mark the post as a favorite (read) and the opposite if they unmark it.

# Answer
> 0 votes
There's a pretty complete tutorial here.

---
Tags: solspace
---


# Question
Title: Unable to import .CSV files with Solspace Importer Module
Am working with Solspace Importer for the first time in EE2 and I find that I am unable to import .CSV files as entries.

The erorr that get is:

> The source data file contained either no data or invalid data.

I've tried a number of increasingly simple .csv files and none of them are working.

I am running EE 2.8.1 (latest) and Solspace Importer 2.2.4 (also latest).

Viewing the expressionengine/cache/importer directory I can see that the files are successfully uploaded.

I am able to import via .XML, but NOT .CSV

# Answer
This error had to do with line endings in my CSV file.

Our workflow is to create the entries in Excel 2011 on the Mac and Save As .CSV.

Exporting Excel 2011 to .csv results in a file that is encoded "Western (MacOS Roman)" with line endings "Classic Mac (CR)". Changing line endings to either Unix or Windows style makes it work in Importer. The default encoding is problematic too.

I'd say this is a bug in Importer except for the fact that the RFC specifies CRLF.

I've added a fix for this as a feature request with Solspace.
> 3 votes

---
Tags: solspace-importer
---


# Question
Title: Why have Chase Paymentech orders started failing in CartThrob
We are having all orders fail since around the middle of June 2014. We are using an unofficial payment gateway plugin for Chase Paymentech. I'm not seeing why it has suddenly stopped working and no one is aware of any changes made on the site or in CartThrob. Is this possibly related to the 'heartbleed' updates that everyone was doing for SSL certificates?

# Answer
In mid-June 2014 Chase Orbital changed how to connect to their payment gateway. Basically you will need a "host" parameter in the header of your xml connection document. I've updated our version of the php gateway file in CartThrob for Chase Orbital Paymentech so that it's now working. Hopefully the changes can be integrated into future versions of CartThrob but I'm not sure how to contact the developer(s), or if they already have the needed information.
> 0 votes

---
Tags: cartthrob
---


# Question
Title: How do I link to an anchor within a Structure Page?
**(Edit 7/17/2014) Forgot to mention earlier:** I am using ExpressionEngine, Wygwam, and Structure together.

I can set link type to "link to anchor in text"... but that's only for the current document...

Alternately I can set link type to "structure page"...

But how can I set link type to "anchor within structure page"? It's not an option, but is there a way to do it?

I know I can hardcode the link in by setting link type to "URL" and just typing it in with the #anchor at the end... but I am trying to avoid this so that the link will work in the future if I change the page name/location within structure.

# Answer
> 1 votes
It's not possible without writing your own (wysiwyg or EE) plugin.

# Answer
> 0 votes
You could append #whatever to {page\_url} so that's it always dynamic. The anchor itself could even be drawn from a custom field within entries.

---
Tags: structure
---


# Question
Title: Remove question mark in URL with "Force URL query strings" enabled
in one of my sites I had to enable "Force URL query strings" because my hosting provider doesn't have "URL Segment Support" enabled.

I don't have the permissions to change Apache configuration file directly.

To remove index.php I have this .htaccess

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

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

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

```

Now the pages are something like

www.example.com/?/page

Is there a way to remove the question mark through .htaccess or should I ask to my hosting provider to enable URL Segment Support?

Thanks

# Answer
> 1 votes
I had a similar issue to this previously. Removing the "?" in the last RewriteRule solved the issue.

Change in your .htaccess file:

```
RewriteRule ^(.*)$ /index.php?/$1 [L]

```

To:

```
RewriteRule ^(.*)$ /index.php/$1 [L]

```

Hope this helps you as much as it did me.

---
Tags: url, htaccess, segments, .htaccess, querystring
---


# Question
Title: Channel Ratings: PHP Errors in Control Panel
I'm getting these PHP errors when I visit Channel Ratings in the control panel:

Ratings, Likes, and Fields Tabs:

> A PHP Error was encountered Severity: Notice Message: Array to string conversion Filename: libraries/Ratings\_helper.php Line Number: 164

Settings Tab:

> A PHP Error was encountered Severity: Notice Message: Array to string conversion Filename: libraries/Ratings\_helper.php Line Number: 164
>
> A PHP Error was encountered Severity: Notice Message: Array to string conversion Filename: libraries/Ratings\_helper.php Line Number: 164
>
> A PHP Error was encountered Severity: Notice Message: Array to string conversion Filename: libraries/Ratings\_helper.php Line Number: 164

* EE 2.9
* Channel Ratings 4.0.8

# Answer
Can you check if the channel\_ratings\_router is present in exp\_actions?

If not, run these SQL queries to insert them

```
INSERT INTO exp_actions (method, class) values('channel_ratings_router', 'Channel_ratings');
INSERT INTO exp_actions (method, class) values('insert_rating', 'Channel_ratings');
INSERT INTO exp_actions (method, class) values('insert_like', 'Channel_ratings');
INSERT INTO exp_actions (method, class) values('bayesian', 'Channel_ratings');

```
> 1 votes

---
Tags: devdemon, channel-ratings
---


# Question
Title: Customizing Google Maps by Objective HTML
I am using the Google Maps plugin by Objective HTML for a site I'm working on and am curious to know if it's possible to change the styling of the map it generates?

I have been able to change the styling of a map before using Google's API, but that was just for a static marker on a map. This appears to be slightly different as a plugin so I'm unsure whether a) its possible b) where specific styling code slots in.

There's nothing special about the map, just a standard marker for a channel entry. But it'd be great to know how I can adjust the styles of different elements of the map i.e the water and land colours and how much detailed text is displayed.

# Answer
The easiest way to customize the map tiles is to follow this example:

https://objectivehtml.com/google-maps/examples/custom-map-styles
> 3 votes

# Answer
So this site http://snazzymaps.com/ has a bunch of pre-made styles and the JS that goes with them, you might be able to drop their JS into the gmap-styles.js file to get some different custom looks. Just a thought.
> 2 votes

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


# Question
Title: With Mountee gone, what simple and efficient workflow is there to replace it?
The unexpected **discontinuation of Mountee** (as of EE 2.8) has caught many ExpressionEngine users on the wrong foot, and left them holding back with updates or struggling to adapt to new workflows.

Instantly, various commenters came forward, calling Mountee's approach broken and touting that **Using Git** and **Saving templates as files** were superior. Albeit, there are valid reasons to believe that the Mountee wasn't all bad.

So,

1. What **simple and efficient workflow** – or which set of tools – are fit **to replace Mountee** in building, deploying and maintaining EECMS-powered websites?
2. Are there **step-by-step tutorials** to support users coming from Mountee that convey the herefore required knowledge?
3. What is the **role of Git** in said solution, and what are its advantages and drawbacks?

(Git may well be part of the ideal solution, but for an unexperienced user, it involves a steep learning curve; and it might be overkill for non-distributed developer environments.)

# Answer
> 5 votes
I don't think it's left that many short to be honest.

Most developers I'm aware of save their templates as files.

Whilst I'd always recommend having version control in place, you don't need it, you can still save templates as files without Git.

As for tutorials, the Ellislab docs are pretty explicit about how it's done.

The learning curve for Git isn't that steep in my humble opinion. There are a number of Git GUI apps out there that install Git for you and make committing changes very simple.

Granted if you wanted to take the workflow a little further, there's some additional setup involved.

Mountee assumes that you're also working on the live site and I don't know why any developer would ever do that - it's a recipe for disaster.

# Answer
> 1 votes
Mountee shutting down forced me to change my workflow as well. Here's what's working for me:

1. Save templates as files.
2. Buy Coda 2 (panic.com)
3. Setup a site in Coda with a local git repository, and the web server as the remote location.

When I start implementing a new feature, I edit templates on the remote server. When it's all working, I sync everything back to local, and do a Git Commit. Then I sync templates on the server.

The Git repository on my local machine is in Dropbox, so that stuff is backed up as well, and is available on my other machines as well.

The only thing this doesn't work for (that Mountee did) is Global Variables and Snippets, but I've been using "In" from Causing Effect more in place of snippets anyway.

I hope that makes sense.

# Answer
> 1 votes
Run a local dev server on your machine. To make life easy use MAMP, XAMPP, or similar. Maybe try Virtual Box/Vagrant if you're feeling saucy. I'm on a Mac so I use MAMP Pro and SequelPro to manage server and database.

Install Git on your local machine.

Set up a remote **private** Git repo at Bitbucket/Github. Bitbucket is free, even for private repos.

Set up your EE project with Focus Labs Config. Save templates as files (at least for dev).

Work on your project in your favourite editor/IDE (I like Sublime Text). Push your work to the remote Git Repo.

Use DeployHQ to deploy to a remote staging server or client preview server.

Use DeployHQ to deploy to the production server.

Because you're using Focus Labs Config, you can have different settings based on the environment so, for instance, you might opt to have templates served from the database on production.

---
Tags: templates, git, workflow, deployment, versioning
---