# Question
Title: Add an ID to radio button within Channel Form
I need to add an ID attribute to a PT Checkbox within Channel Form so I can target it with JS.

Any idea how I can do this?

The standard usage for Channel Form is '{field:my\_radio\_button}' which doesn't give me the flexibility of adding and ID.

Input appreciated!

# Answer
I don't really use channel forms atm but could this not be done using an if statement? ref docs safecracker ee 2.4

```
{if radio} {options} <label class="checkbox">{option_value}<label
class="checkbox"> <input type="radio" id="{field_name}"
name="{field_name}" value="{option_value}"{checked}> </label>
{/options} {/if}

```

Then use js on the field name
> 0 votes

# Answer
Use your existing simple method of outputting the radio buttons then copy the rendered code and manually add the buttons with whatever you need.

From memory I believe the name attribute is the primary identifier for the field/radio.

Its not perfect but it does work. Obviously if you change your values back end you'll have to ammemd accordingly.

Or, wrap the simple code in a div with an id and use that to target the contents.
> 0 votes

# Answer
PT fields give the option of {option\_value} and {option\_name} Provided you've set up your fields with the value and name.

In your field set up you put (on each line)

```
option_1 : Option 1
option_2 : Option 2
etc etc

```

you then have access to those in your templates. here's an example:

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

```

so for id you'd use:

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

```

For mine I used checkboxes but the format is the same for radio buttons
> 0 votes

---
Tags: safecracker, pixelandtonic, field-pack
---


# Question
Title: Cannot Upload PDFs with Firefox (Mimetypes)
I am having a problem specifically with uploading PDF files when using Firefox (27.0.1).

Currently, I have the following in my mimes.php file:

```
'pdf'    =>    array('application/pdf', 'application/x-download', 'application/octet-stream', 'application/binary', 'application/unknown'),

```

I have tried many variations of the above, and nothing has worked so far.

Has anyone found the proper type to add for PDFs that works with Firefox?

# Answer
> 3 votes
I've seen instances where PDF uploads won't work in Firefox if you've got ExpressionEngine XSS filtering file uploads. In Admin -\> Security and Session Preferences, set "Apply XSS Filtering to uploaded files?" to "No".

I'm not a fan of disabling security measures like this, but I've found no other solution.

# Answer
> 2 votes
try to use this one

```
'pdf'    =>    array('application/pdf', 'application/x-download', 'application/download')

```

and tell me

and you can always solve this problem by rename the mimeTypes.rdf file which you can find in

AppData\Roaming\Mozilla\Firefox\Profiles\

Regard's.

# Answer
> 0 votes
*-edited out-*

Going by http://ellislab.com/forums/viewthread/92552/ -\> https://bugzilla.mozilla.org/show\_bug.cgi?id=332690#c24

edit:

Check out your mimeTypes.rdf and let us know if there's anything funky there, all the variants there are in your mimes.php, etc.

edit 2::

woops, sorry didn't realize there was more to the original array, thought it was just 3 types in there.

# Answer
> 0 votes
Check this bolg, it seems that there are some solutions

http://mrvtech.blogspot.fr/2015/12/firefox-cant-upload-pdf-files-here-are.html

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


# Question
Title: Display fields upon dropdown selection in PUBLISH layout
Is there a way to conditionally display channel fields (not required ones at least) based on a prior selection from a dropdown field in the publish layout for any channel?

Thanks!

# Answer
> 2 votes
The way I've done this in the past is to add some custom js to the footer of the Control panel.

You shouldn't edit the core files directly but what you can do is make a Theme and then copy the core files you want to make edits to into your theme.

Don't let the word theme put you off, you dont have to recreate an entire cp layout. only make duplicates of the core files you want to make edits to and EE will fallback on the core files where your theme doesn't have the required ones.

e.g.

Inside '/themes' (not 'system/ee/third-party/themes') Create a new folder with the name of your new theme.

The file I used is footer.php inside 'system/ee/views/\_shared/footer.php'

copy this to your theme folder as /themes/yourThemeName/\_shared/footer.php'

then inside your new footer.php file you can add some js that detects the val() of your dropdown field, then hides/shows others depending on your selection.

you may need to select fields based on their wrapping divs ID's or you can use the fields name attribute.

it's a little bit tricky but it is possible.

OH and lastly make sure to select your new CP theme in 'Admin \> General Configuration \> Default Control Panel Theme'

Good luck.

---
Tags: channel, channel-fields, publish-layout
---


# Question
Title: Is there native OEmbed support (or a plugin that adds support)?
Is there a plugin available that adds support for oembed http://oembed.com/ to expression engine?

# Answer
> 0 votes
A quick check on devot:ee turns up Media Embed for EE2. There's also CE Tweet which claims to support it. Both are third-party plugins.

---
Tags: plugin
---


# Question
Title: Channel parameter error in Solspace tag cloud
I am using v. 5.0.0 of the Solspace tag module in EE3, and when I use the channel parameter in the tag cloud, I get the following errors:

```
Notice

Undefined property: Tag::$sc
user/addons/tag/mod.tag.php, line 2331

Trying to get property of non-object
user/addons/tag/mod.tag.php, line 2331

Trying to get property of non-object
user/addons/tag/mod.tag.php, line 2331

```

Here's the code I'm using:

```
{exp:tag:cloud tag_group_name="my_group" channel="my_channel1|my_channel2" orderby="tag_name" rank_by="entries" sort="asc" start="12" step="8" groups="5"}
<li><a href="{path="my_channel/my_group"}/{websafe_tag}" style="font-size: {step}px;" title="{tag}: {count} entries">{tag}</a></li>
{/exp:tag:cloud}

```

The above code worked with v. 4.2.9 & EE2. If I remove the channel="my\_channel" parameter then the errors go away. I also noticed that the channel parameter is not listed in the current documentation or the 4.2.9 documentation, but it still worked before. Has this parameter been removed?

# Answer
I can reproduce this error with Tag 5.0.0 in EE 3.0.0. This will be reported as a bug to our team. In the meantime, you can go in mod.tag.php and replace every mention of

```
$this->sc->db->channel_name

```

to

```
'channel_name'

```

There's about two places where this string is found in the file.
> 0 votes

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


# Question
Title: Expresso Store v2.1.0 can an individual product modifier be tax free?
I'm trying to find a way of allowing a client to mark specific product modifiers as tax free, can it be done somehow?

For example, a shoe at certain sizes (for children) will be tax free but other sizes will remain taxable at the normal rate.

I should also point out that they don't want to create another category for the tax free products. They would rather have a checkbox to say this size is tax free (or similar).

Thanks.

# Answer
> 1 votes
There is nothing built into Store outside of categories but even with that you can't have a modifier that is a different category then the rest of the entry.

You will need to write an extension that creates a new variation type that they could select from the drop down on the publish page. In your variation you will still was a name and price field but you would then add a tax free checkbox. From there you would have to add the logic to prevent taxi from being applied based upon your new variation column when items are add/edit in the cart. You should take a look at the available extension hooks.

---
Tags: expresso-store, modifiers, tax
---


title: Where has the EE2 documentation gone?

text:
# Question
Title: Where has the EE2 documentation gone?
I can't find the EE2 user guide on the web. Several google snippets have "Expression Engine 2 user guide" supposedly on a page on the Ellislabs site but when I click them I don't see the link.

# Answer
Mr Armitage is kindly hosting them: http://ee2docs.com/
> 1 votes

# Answer
They are still available here: https://docs.expressionengine.com/v2/
> 3 votes

---
Tags: ee2
---


# Question
Title: Displaying multiple/All channel entries on single page
When I try to set my limit to 3, 4, or anything, my page is simply displaying the same entry over and over, rather than showing all the different entries. Please help!

```
{entries_start_1}
{entries_1}
<div id="content-left">
    {exp:channel:entries orderby="date" sort="desc" limit="3" dynamic="no"}
        {entry2_image}
        {title}</br>
        {entry_date format='%F %d %Y'}
        {entry2_intro}
        {entry2_body}
    {/exp:channel:entries}
</div>
{entries_column_divider}
Recent Post
{embed="includes/.sub_nav" section_channel="{section_channel}"}
{entries_end}

```

# Answer
> 0 votes
For the most part things look ok. You should set the channel= parameter. If that doesn't help, try the channel entries loop by itself in an empty template.

---
Tags: channel-entries
---


title: How to link to entries in a channel?

text:
# Question
Title: How to link to entries in a channel?
I have the following code

```
<div id="navbar" class="collapse navbar-collapse">
    <ul class="nav navbar-nav">
        {exp:channel:entries channel="static" sort="asc" dynamic="off"}
            <li><a href="{url_title}">{title}</a></li>
        {/exp:channel:entries}
    </ul>
</div><!--/.nav-collapse -->

```

Which is looping through a channel I have for static pages on my website. Technically it is showing all the stuff it should do. This is the code it outputs:

```
<div id="navbar" class="collapse navbar-collapse">
    <ul class="nav navbar-nav">
        <li><a href="small-builders">Small Builders</a></li>
    </ul>
</div>

```

However, when I click the link it gives me a white page. I have the htaccess from the documentation set up. I'm new to ExpressionEngine. Am I missing something completely obvious? I just want to link the the entry I've created.

# Answer
> 2 votes
In ExpressionEngine, unlike in other CMS's, templates aren't assigned to channels. Templates are loaded based on template group/template name convention, and those templates display the content of whatever channel (or channels) you specify in the `channel:entries` tags that you use in those templates. (See docs on URL structure.)

Generally then, you'd link to an entry using `{url_title_path="template_group/template"}`. So if you used `{url_title_path="www/static"}`, your link would end up as `example.com/www/static/small-builders`. A `channel:entries` tag in the `static` template would then automatically load the content from the `small-builders` entry (so long as the `channel` parameter was correct).

But it sounds like you want your URL to simply be `example.com/small-builders`, in which case you're correct that using the Pages module is the way to go, as you can set an arbitrary (and absolute) URL, and assign the template you want to use no matter where it resides in your template structure.

# Answer
> 0 votes
```
<div id="navbar" class="collapse navbar-collapse">
    <ul class="nav navbar-nav">
        {exp:channel:entries channel="static" sort="asc" dynamic="off"}
            <li><a href="{url_title_path='channel/template'}">{title}</a></li>
        {/exp:channel:entries}
    </ul>
</div><!--/.nav-collapse -->

```

This will output

```
<div id="navbar" class="collapse navbar-collapse">
    <ul class="nav navbar-nav">
        <li><a href="http://yoursite.com/index.php/channel/template/small-builders">Small Builders</a></li>
    </ul>
</div><!--/.nav-collapse -->

```

Hope it helps!

Ref: https://docs.expressionengine.com/v2/add-ons/channel/channel\_entries.html#url-title-path

---
Tags: links, entrylinks
---


# Question
Title: Error when loading textarea fields in CP after upgrade Undefined index: field_fmt_options
Only happens on a couple textarea fields, not all. I can still edit the fields but only after scrolling past all these error messages...

```
A PHP Error was encountered
Severity: Notice
Message: Undefined index: field_fmt_options
Filename: fieldtypes/EE_Fieldtype.php
Line Number: 562

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: 562

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: 562

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: 562

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: 562

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: 562

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

```

I have re-uploaded all the files for EE and Addons in use. I am running EE 2.10.1 and all the latest versions of FreeformPro, Playa, Matrix and Wygwam.

# Answer
> 1 votes
Just uploading the new files for modules doesn't complete the modules upgrade. You need to hit the "Run Module Updates" button on the Modules page.

I like to delete an addon's folder and upload the new files fresh without overwriting an existing folder as this can sometimes cause inconsistancies and obsolete files linger behind.

# Answer
> 0 votes
Thanks. I did do those things, run module update and delete old addon folders before uploading new and no luck.

I did find the issue though, I noticed that the Default Text Formatting for the texteara field had no Field Formatting options in the drop down, I had to click Edit Options and check Yes to enable options like Auto BR/ and XHTML.

Strange that those would all be disabled. Thank you.

---
Tags: error, textarea
---


title: Solspace Calendar Day Template Tags

text:
# Question
Title: Solspace Calendar Day Template Tags
I'm working on a template for displaying the events for a particular day. Is there a way to control the start hour and end hour? This is an office that starts their day no earlier than 7am and ends their day no later than 7pm. So to have it showing "No events for this hour" at 1am seems silly.

# Answer
I suggest having a look at the Calendar documentation for date/time formatting: https://solspace.com/docs/calendar/date\_formatting/

You should be able to use date and time expressions such as (example):

```
date_range_start="yesterday @ noon" date_range_end="today @ 5:00 pm"

```

or in your case:

```
date_range_start="today @ 7:00 am" date_range_end="today @ 7:00 pm"

```

...to filter events based on date and time.

**Important note**: use this with the `{exp:calendar:cal}` tag (not `{exp:calendar:events}` or `{exp:calendar:occurrences}`). It's the only tag that will follow date/time ranges based on the chronological flow of events.

Additional useful info about these tags can be found here: https://solspace.com/docs/calendar/getting\_started/
> 0 votes

---
Tags: solspace-calendar
---


# Question
Title: exp:channel:categories not displaying all categories in a group
So I have a channel (dog) with multiple category groups assigned to it. I'm trying to build a navigation and have the following code for the DOG dropdown list:

`{exp:channel:categories channel="dog" style="linear" show_empty="yes" category_group="6"}`

- `{category_name}`
`{/exp:channel:categories}`

Out of 10 categories (all have entries), only 5 show up.

I'm using the following code to show categories under BUNNY and all categories show up.

`{exp:channel:categories channel="bunny" style="linear" show_empty="yes" category_group="1"}`

- `{category_name}`
`{/exp:channel:categories}`

The only difference that I have noted between the two channels is that DOG has multiple category groups assigned (6|7|8) while BUNNY only has one (1).

I have taken the code out of the full template, and placed it into a separate template with no other code to make sure nothing else was interfering and the results are the same.

Thanks for any help/tips/suggestions you can provide.

EE v2.7.2

# Answer
There are other parameters that effect whether a category has entries and therefore should be shown.

1. show\_expired
2. show\_future\_entries
3. status

From the docs

Could one of those be the problem?
> 1 votes

# Answer
Try Gwcode categories and check if you get the results you are expecting.
> 1 votes

---
Tags: categories
---


# Question
Title: How to show all pagination pages, not just next two pages
I'm using the native EE pagination and it's only showing the next two pages (i.e. 1, 2 & 3) when there's actually 4 pages. Once you go to page two it then shows all numbers (1,2,3 & 4) but I'd like it to show all pages all the time.

Any ideas on how to do this?

Here's my code:

```
{paginate}
    <div class="top-strip subtle pagination actual_pagination">
        {pagination_links}
            <h3><span class="page-label">Page:</span>
                {page}
                    <a href="{pagination_url}" class="page-{pagination_page_number} {if current_page}current{/if} pagination-button">{pagination_page_number}</a>
                {/page}
            </h3>
            <h3 class="right">
                {first_page}
                    <a href="{pagination_url}" class="page-first pagination-button">First</a>
                {/first_page}
                {previous_page}
                    <a href="{pagination_url}" class="page-previous pagination-button">Previous</a>
                {/previous_page}
                {next_page}
                    <a href="{pagination_url}" class="page-next pagination-button">Next</a>
                {/next_page}
                {last_page}
                    <a href="{pagination_url}" class="page-last pagination-button">Last</a>
                {/last_page}
            </h3>
        {/pagination_links}
    </div><!-- /end #top-strip -->
{/paginate}

```

Thanks in advance,

Tom

# Answer
> 4 votes
You want to mosey on over to `page_padding` land.

https://docs.expressionengine.com/v2/templates/pagination.html#id3

```
{pagination_links page_padding="10"}

{/pagination_links}

```

This will show up to 10 page numbers on either side of the current page in the pagination links.

---
Tags: pagination
---


# Question
Title: Wrap <ul> around every x number of <li> in category_archive entry loop
I'd like to use something similar to a `switch` or plugin like Grouper with `category_archive`, to wrap a `<ul>` around every 6 `<li>`, but I don't see anything that works. Is jQuery the best way to go or is the another solution I can use that doesn't need js/jQuery?

```
<ul class="list-unstyled">
    {exp:channel:category_archive channel="speakers" style="linear" backspace="7"}
        <li>
            {categories}
                <a href="#">{category_name}</a>
            {/categories}
            {entry_titles}
            <ul class="list-unstyled">
                <li><a href="{url_title_path='site/speaker'}">{title}</a></li>
            </ul>
            {/entry_titles}
        </li>
    {/exp:channel:category_archive}
</ul>

```

# Answer
Take a look at the conditionals available. https://ellislab.com/expressionengine/user-guide/templates/conditionals.html#mathematic-operators Particularly the modulus operator.
> 0 votes

# Answer
i've done something similar to this before, though a bit different, test something like this using the Switchee plugin.

```
{exp:channel:category_archive channel="speakers" style="linear" backspace="7"}
{switch="<ul class='list-unstyled'>|||||"}{!-- open a new <ul> at intervals of 6 entries --}
<li>
{categories}<a href="#">{category_name}</a>{/categories}
{entry_titles}
<ul class="list-unstyled">
<li><a href="{url_title_path='site/speaker'}">{title}</a></li>
</ul>
{/entry_titles}
</li>
{if count != total_results}{switch="|||||</ul>"}{/if} {!-- close the </ul> at intervals of 6 as long as the current entry is not the last in the loop --}
{if count == total_results}</ul>{/if} {!-- always close the open </ul> after the last entry --}
{/exp:channel:category_archive}

```

Hope that helps?
> 0 votes

---
Tags: categories, jquery, javascript, html, category-archive
---


title: Expression Engine Custom Controller

text:
# Question
Title: Expression Engine Custom Controller
My plan is to use EE as an admin portal for users so they can update my CI application. The way I need it to work is, EE template Login -\> give them access by using an external source API for the login Validation. Once they have access they will hit a search Template-\> on typing a search query they will get results from an external database not exp\_database (I'll be using a custom search module here.)

Like CodeIgniter I would like to connect my login template in EE to a custom controller in EE. Would I need to make a custom module for this functionality?

I did look up something on https://stackoverflow.com/questions/6588954/expression-engine-controllers and followed their ideas but it doesn't seem to work. I get errors like

> "The following errors were encountered This form has expired. Please refresh and try again. Return to Previous Page"

Below is the index login page, I created: url is localhost/login/index.php

```
<title>Login Screen </title>
<link>bootstarp file</link>
</head>
<body>
  <div class="container">
    <div class="row">
                <div class="col-md-2">
                        <form class="form-horizontal" action='controllers/LoginController.php' method="POST">
                          <fieldset>
                            <div id="legend">
                              <legend class="">Login</legend>
                            </div>
                            <div class="form-group">
                              <!-- Username -->
                              <label c for="username">Username</label>
                              <div class="controls">
                                <input type="text" id="username" name="username" placeholder="" class="form-control input-xlarge ">
                              </div>
                            </div>
                            <div class="form-group">
                              <!-- Password-->
                              <label for="password">Password</label>
                              <div class="controls">
                                <input type="password" id="password" name="password" placeholder="" class="form-control input-xlarge">
                              </div>
                            </div>
                            <div class="form-group">
                              <!-- Button -->
                              <div class="controls">
                                <input name="submit" class="btn btn-success" type="submit" value=" Login ">

                              </div>
                            </div>
                          </fieldset>
                        </form>
                </div>
        </div>
</div>

</body>

</html>

```

here is the controller url (which is a template is the same login.group): login/CheckLogin -CheckLogin has Allow PHP enabled -php Parsing Stage - input and Output (tried both still gives me the same error)

```
<?php
    class CheckLogin extends CI_Controller {

            public function index() {
login_name     = $_POST['username'];
login_password = $_POST['password'];
            //Login Validation
        }
    }
?>

```

I have also disabled/commented out the routes in config.php as well

```
$route['default_controller'] = "ee/index";
$route['404_override'] = "ee/index";

```

It still doesn't work ... I'm hoping it will be something very very stupid (most of the time it is). Any kind of suggestion or example code structure would help.

# Answer
CodeIgniter controllers and ExpressionEngine template groups are analogous in function but not in implementation. In this case, your template `CheckLogin` is being called without having to write a controller in between (EE does that for you).

In this case, you wouldn't need to write a class structure at all.

Here is an example of how you'd grab those data points from a POST submission to your `CheckLogin` template:

```
<?php

$login_name = ee()->input->post("username");
$login_pass = ee()->input->post("password");

?>

```

In your `login/index` file, do note that you need to add a `{csrf_token}` to your form, otherwise EE's core security class will bounce the POST request with the exact error you're getting; the form is stale because either it has no token or an old token.

https://docs.expressionengine.com/latest/development/guidelines/security.html#csrf-tokens-in-templates

Now at this point, it begs a serious question: Why aren't you using ExpressionEngine's native member utilities for users/sessions/login/logout... do you need to integrate with a separate service?

As Yuri said, if you expand on what you're trying to accomplish, our community can help you much better.
> 1 votes

# Answer
I have changed the a few things this is what I have so far

my login template

```
<!DOCTYPE html>
<html>
<head>
<title>Login Screen </title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">

</head>
<body>
  <div class="container">
    <div class="row">
                <div class="col-md-2">
                        <form class="form-horizontal" action='controllers/Login' method="POST">
                            <input type="hidden" name="csrf_token" value="{csrf_token}">
                          <fieldset>
                            <div id="legend">
                              <legend class="">Login</legend>
                            </div>
                            <div class="form-group">
                              <!-- Username -->
                              <label c for="username">Username</label>
                              <div class="controls">
                                <input type="text" id="username" name="username" placeholder="" class="form-control input-xlarge ">
                              </div>
                            </div>
                            <div class="form-group">
                              <!-- Password-->
                              <label for="password">Password</label>
                              <div class="controls">
                                <input type="password" id="password" name="password" placeholder="" class="form-control input-xlarge">
                              </div>
                            </div>
                            <div class="form-group">
                              <!-- Button -->
                              <div class="controls">
                                <input name="submit" class="btn btn-success" type="submit" value=" Login ">

                              </div>
                            </div>
                          </fieldset>
                        </form>
                </div>
        </div>
</div>

</body>

</html>

```

My admin controller -- is a default controller as well

```
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
include('ee.php');

class AdminController extends EE_Controller {

    function __construct()
    {
         // parent::Controller();
         // parent::CI_Controller();
         parent::__construct();

         // Initialize ExpressionEngine objects
            $this->EE = $this->core->EE;
            // get EE's template library
            $this->EE->TMPL = $this->EE->load->library('template');
    }

    function index()
    {
        // echo 'hi there';

        $this->EE->TMPL = new EE_Template();

        //pick our template
        $this->EE->TMPL->run_template_engine('login', 'index');
    }

}

```

a login controller which extends admin controller - basically this will get the input from the ee-\> login template and send them to this controller where I can send it to the API.

```
class Login extends AdminController {

    function Login(){
        $loginVar = new LoginFunctions;
        $loginInfo = $loginfun-> ConvioAPICall($loginVar->name = ee()->input->post("username");, $loginVar-> password = ee()->input->post("password"), 'SRConsAPI_login');
        $groupInfo = $loginfun-> ConvioAPICall($loginVar->name = ee()->input->post("username"), $loginVar-> password = ee()->input->post("password"), 'SRConsAPI_getUserGroups');

        print_r($loginInfo);

        if ($loginfun-> validateUser( $loginInfo, $groupInfo))
        {

            echo 'good';
        }else{
            echo 'bad';

        }

    //  $loginfun-> decodestring($loginfun-> jsonString = $userInfo);
    }
}

```

However I still unable to send the username and password to login controller. Error message

> The requested URL /login/controllers/Login was not found on this server.

I'm I doing this right? Or should I create a module which will collect the login info and send an API call function?
> 0 votes

# Answer
It look to me that you are trying to perform some actions (call to your API) when user logs in to EE.

You should not re-write EE controllers if you want to perform custom actions. While in theory you can do it, you'll spend a lot more time with much less profit then if you go EE way, which is writing an extension.

If I understand you correctly, you need an extension based on one of these hooks: https://docs.expressionengine.com/v2/development/extension\_hooks/module/member\_auth/index.html
> 0 votes

---
Tags: ee2, codeigniter
---


# Question
Title: PHP interfering with entry field embed rendering?
## **(See my 'solution' at bottom of this question.)**

---

Disclaimer: I'm new to EE; I inherited a system and am looking to be able to extract entries.

I'm trying to create a template to extract entries in JSON format. This is what I've got so far:

```
<?php
  $entries = array();

  {exp:channel:entries channel="blog" limit="1" dynamic="no"}
    $entries[] = array('title' => '{title}', 'author' => '{author}', 'body'=>'{exp:allow_eecode embed="y"}{blog_body}{/exp:allow_eecode}');
  {/exp:channel:entries}

  header('Content-type: application/json');
  echo json_encode($entries);
  exit;
?>

```

I've enabled PHP, set the PHP parsing stage to Output. This mostly works, except one field doesn't render correctly; it has `embed` EE tags in the field data on output:

```
[
  {
    "title": "9 Gorgeous Wedding Color Palettes for Autumn",
    "author": "WeddingExpert",
    "body": "{embed=\"photos\/_embedded\" entry_id=\"50808\" context_channel=\"blog\" }\n<p>\n\tIn keeping with our ..."
  }
]

```

If I do not use the `allow_eecode` tag, then the output shows the html entity codes for braces, etc. If I turn off PHP, I can get the output for the problematic field to render 'correctly', but then I get the PHP code rendered as HTML - ie it doesn't render the JSON I need, obviously.

Is there a reason why PHP is preventing this from working? Is there another approach I should take?

**Note: This is on an old version of EE: v2.1.3. I don't have the luxury of upgrading; I'm basically retiring this system once the data is extracted.**

---

**EDIT:** I made two changes: I removed the PHP `exit()` call and changed the Template Type to 'Javascript' from 'Web Page'. Here's the template now:

```
<?php
  $entries = array();

  {exp:channel:entries channel="blog" limit="1" dynamic="no"}
    $entries[] = array('title' => '{title}', 'author' => '{author}', 'body'=>'{exp:allow_eecode embed="y"}{blog_body}{/exp:allow_eecode}');
  {/exp:channel:entries}

  header('Content-type: application/json');
  echo json_encode($entries);
?>

```

and here is the output, which is slightly different (no `embed` tag visible, but it also didn't render the `embed` tag!):

```
[
  {
    "title": "9 Gorgeous Wedding Color Palettes for Autumn",
    "author": "Azure",
    "body": "\n<p>\n\tIn keeping with our ..."
  }
]

```

Of course, now I'm even more confused.

---

**Solution: As pointed out by Derek Hogue, there is no JSON solution due to the order of the EE rendering pipeline.**

That having been said, as I need to migrate the data out and in my case it doesn't need to be in JSON format, I can simply change my template to have a consistent layout per entry and then I can parse it using any language I desire. For example with this template, I can get Entry data in a parseable format:

```
{exp:channel:entries channel="blog" limit="5" dynamic="no"}
ONEWEDMIGRATION-TITLE:{title}
ONEWEDMIGRATION-AUTHOR:{author}
ONEWEDMIGRATION-BODY:{exp:allow_eecode embed="y"}{blog_body}{/exp:allow_eecode}
<======================>
{/exp:channel:entries}

```

I can split the data on `<======================>` to get a list of Entries, and then parse each Entry based on the tokens at the beginning of lines.

This is simplistic and would need to be further developed for multiline fields, etc. But the idea is sound.

# Answer
You're not doing anything wrong here - you've just encountered a limitation of the template engine. If you read through the parse order in that link, you'll see that embedded templates are processed *after* PHP on output it processed - meaning that you cannot include the parsed contents of an embedded template inside of PHP output.

If there are a lot of these embeds inside of the content then that's an issue - but if they're rare maybe you could excise and deal with them separately in the migration?
> 1 votes

---
Tags: ee2, export, json, allow-eecode
---


# Question
Title: Buy X Get Y for different products in a category
I have an expresso store that we've set up with a "Buy x get y discount". But it's not working as expected as it only works if you buy multiples of the same product. This is not really useful, it needs to apply to all the products selected for that promo code.

# Answer
> 1 votes
This is the intended behavior of how that discount type works. If you go to the Discount Settings you will see a field called Matched On with the options of either Entry ID or SKU. This is what Store uses to match the particular product to apply the discounts on. Think of it as buy 2 shovels get 50% off a 3rd shovel. This assumes you have set the Step Quantity at 2, Discount Quantity at 1 and Percent Discount at 50. If a user adds 6 of that item to the cart they will receive a discount on the 3rd and 6th of that item since the Discount Quantity is set to 1.

You will need to develop your own discount type or extend the current discount type for your use case. You can browse through the current discount logic in `/store/src/Adjuster/DiscountAdjuster.php` to get a starting point. Developing your own extension would probably be the best option as it gives you the most control and prevents Store updates from overwriting your changes. The adjustments hook would probably be the best option for you.

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


title: Expresso Store Dynamic Price

text:
# Question
Title: Expresso Store Dynamic Price
I am trying to set up the dynamic price feature in Expresso Store. I have set the dynamic price setting to 'yes' for my channel field but the product form in my template does not display unless I set a price for the product.

Any help is appreciated.

# Answer
> 0 votes
I am not sure if this is a bug or not but you can enter `.` or `0` into the price field then in your template you would need to do something along the lines of:

```
{if price_val == 0}
  Price: <input type="text" name="price" value="" >
  <input type="hidden" id="item_qty" name="item_qty" value="1" />
{if:else}
  {price}
  <input type="text" id="item_qty" name="item_qty" value="{min_order_qty}" />
{/if}

```

Ideally you would have any item where a user can enter their own price in a particulate channel since it could allow technically savvy users to adjust the price of items where you have set the price. In that case you could then use a conditional on the channel instead of relying on the price for the conditional.

```
{if channel == "donations"}
  Price: <input type="text" name="price" value="" >
  <input type="hidden" id="item_qty" name="item_qty" value="1" />
{if:else}
  Your normal markup
{/if}

```

---
Tags: expresso-store
---


# Question
Title: How to add a new database column in third party module?
I've created a module for ExpressionEngine and since it's initial installation I need to add a new column to the database. I've managed to create the update funtion in the upd.modulename.php file and it's working. The problem is the code contained to add the new column doesn't seem to be doing what I need it to.

```
public function update( $current = '' ) {
    ee()->load->dbforge();

    if ( $current == $this->version ) {
        return FALSE;
    }

    if ( $current < '1.1.0' && ! ee()->db->field_exists( 'new_field', 'module_table' ) ) {
        $updates = array(
            'new_field' => array(
                'type' => 'varchar',
                'constraint' => '250'
            )
        );
        ee()->dbforge->add_column( $updates );
    }

    return TRUE;
}

```

This conditional is working as I've managed to print out a message when running the module updates but it doesn't appear to be adding the new column to the table. I don't suppose anyone has any ideas?

# Answer
The add column function requires the database name, something that I had missed out in my function.

```
ee()->dbforge->add_column( 'module_table', $updates );

```

Full code:

```
public function update( $current = '' ) {
    ee()->load->dbforge();

    if ( $current == $this->version ) {
        return FALSE;
    }

    if ( $current < '1.1.0' && ! ee()->db->field_exists( 'new_field', 'module_table' ) ) {
        $updates = array(
            'new_field' => array(
                'type' => 'varchar',
                'constraint' => '250'
            )
        );
        ee()->dbforge->add_column( 'module_table', $updates ); //Added table name here
    }

    return TRUE;
}

```
> 2 votes

# Answer
add\_column just defines the column specs. After which you need to run create\_table

https://codeigniter.com/userguide2/database/forge.html#add\_field

"After the fields have been defined, they can be added using $this-\>dbforge-\>add\_field($fields); followed by a call to the create\_table() function."
> 2 votes

---
Tags: add-on-development, module, activerecord
---


title: Loop Next/Prev Entry Linking

text:
# Question
Title: Loop Next/Prev Entry Linking
Is there any way to loop the next/prev entry links?

Currently the next link is hidden when you get to the last entry and the prev link is hidden on the first entry.

Thanks.

# Answer
> 0 votes
Unfortunately no such built-in functionality exists, to the best of my knowledge. There is a third-party app that claims to do just that, however, Advanced Prev Next Entry:

* Cycle through entries when the end of list is reached.

---
Tags: next-prev
---


# Question
Title: How get the particular part for a string?
How to get a particular part of a string? e.g after some special characters or some words.

# Answer
Use the PHPStringFun add-on and use regX either with substr or str\_replace. Alternatively you could use Low Replace or MX Jumper. Or you could even activate PHP on the template and post parse. All depends on your exact requirement.
> 2 votes

---
Tags: custom-fields, string
---


title: Freeform: select input required

text:
# Question
Title: Freeform: select input required
I've never been able to get the required parameter to work with a select input. Any ideas why?

```
            {exp:freeform:form
                ...
             required="full_name|email|organization|telephone|country"
                ...
                }

```

Then the input code as follows:

```
<select id="countries" name="country[]"  required>
<option value="">Please select</option>
...

```

# Answer
Use the "required=" parameter. https://solspace.com/docs/freeform/form/#required
> 0 votes

---
Tags: solspace-freeform
---


# Question
Title: SuperSearch Module Install Creates 1044 Error
I've just attempted to install SuperSearch 2.2.3 on EE 2.9.2 and receive a a database 1044 error:

Access denied for user 'db######'@'%' to database 'db202322\_##########' It then goes on to list the Levenschtein function where it errored in the SuperSearch install code in upd.super\_search.php.

I've attempted to grant all privileges to the user but cannot string together a query that works. Perhaps because I'm not a root admin or superuser? But I am a Super Admin in the CP...

Please advise if you can. I've also curious as to why the username and database are the same...specific version of the database for that user?

# Answer
> 0 votes
Your database user does not have the required permissions to install a function into the database. Try increasing the permissions of that user. Particularly, you need to make sure the CREATE ROUTINE permission is granted.

---
Tags: database, supersearch, mysql, database-error, super-admin
---


# Question
Title: template_group and template_name not matching segment_1 and segment_2
Using EE 3.0.5

http://example.com/documentation/style\_guide

template\_group: documentation template\_name: index

segment\_1: documentation segment\_2: style\_guide

The style\_guide template is not displaying.. it's reverting to the index template.

I can't figure out what would cause segment\_2 to not be the template\_name

Only index and 1 other template in the template\_group displays correctly. All others revert to index.

Haven't modified template routes.

.htaccess removes index.php per documentation.

# Answer
There was a recent bug for template permissions. Newly created templates couldn't be viewed by anyone, and while this has been fixed in recent versions it's still true for duplicated templates. Go into your template manager and check access permissions for your groups. Temporarily working as Superadmin should work, too.
> 1 votes

---
Tags: templates, segments, ee3
---


title: How to use Solspace Importer for files

text:
# Question
Title: How to use Solspace Importer for files
How can I use Solspace Importer to recognize uploaded files (that are already available in the file manager)?

Possible ways:

* Use the filename?
* Use some file ID?
* Use the files entry name?

I couldn't find anything about in the documentation.

# Answer
If you look at the data stored in `exp_channel_data` for regular EE **File Upload** fields, you'll see files stored this way, eg: `{filedir_1}myfile.jpg`, where `1` is your upload field ID (this changes depending on your upload directory), and `myfile.jpg` is your filename.

To import **File Upload** field data, you would therefore need the filename, prefixed with `{filedir_X}` (replace `X` with your file upload directory ID) in your source file (eg. your CSV file).
> 1 votes

---
Tags: file-uploads, file-manager, solspace-importer
---


title: EE 2 Multi site with one theme

text:
# Question
Title: EE 2 Multi site with one theme
I have a network of 3 sites that have the exact same channels and design - just different entries. Is there a way to use the same theme for all three sites rather than having to duplicate the theme and maintain 3 different sets of files?

# Answer
Yes, it can be done. One way would be to turn on `Save Templates as Files` as in your `Global Template Preferences`, so your templates get saved to `/system/expressionengine/templates/` and you can share between sites. You'll also need to update the `Server path to site's templates` accordingly.

Or, even more simple, you could maintain one set of "master" templates and in your secondary sites simply use `{embed=site_a:group/template}` as appropriate.

That said, if you have "different entries", won't the content of templates be different as well, if only because you need to specify a different channel= parameter? The second method has the advantage of allowing you to only replicate certain templates and not others, of course, maintaining full control over your setup.
> 1 votes

---
Tags: ee2, multi-site-manager, themes, multiple-sites
---


# Question
Title: Is it possible to display number of comments pending moderation?
This is the first time in a while that I'm developing a site in EE2 that will use a moderated comment system. I'd like to make it really clear for the moderators when there are comments pending, but I'm struggling with how to do so.

The only place I can find in EE2 that indicates the number of pending comments is the CP Home dashboard, on the fourth line under "Modify or delete." That's not really as clear as I'd hoped. Plus, I was planning to show Structure on login for moderators, rather than the dashboard.

I'd love to be able to have a badge in the top nav of the CP that would show how many comments are pending. Or an accessory in the footer. But I can't find a supported add-on that serves this function. (Two possibilities in devot-ee — Comment Badge or Mini CP — are defunct.)

Any suggestions?

# Answer
> 0 votes
I am afraid you'd need a custom SQL query for that. Try this:

```
{exp:query
    sql=" SELECT COUNT(*) AS pending FROM `exp_comments` WHERE status = 'p' "}
    There are {pending} comments pending.
{/exp:query}

```

---
Tags: comments, moderation
---


# Question
Title: EE 2.5.5 how to use snippet in if statement
I have a multi site EE set up and I have set up a snippet to use in my template. The snippet syntax is `{current_site_name}` and the content that the snippet outputs is `{site_name}`

I am trying to use this snippet in the following if statement:

```
{if current_site_name == "Site 1"}
    <a href="tel:{site1_phone}">{site1_phone}</a>
{if:elseif current_site_name == "Site 2"}
    <a href="tel:{site2_phone}">{site2_phone}</a>
{if:elseif current_site_name == "Site 3"}
    <a href="tel:{site3_phone}">{site3_phone}</a>
{if:else}
    <h1>{current_site_name}</h1>
{/if}

```

The if statement doesn't seem to work, the else condition just gets run every time even though the value that it outputs matches one of the site names like Site 1, Site 2, Site 3

# Answer
> 1 votes
If you look at the parse order of the template engine, you'll see that although snippets do get parsed before conditionals, standard global variables (which includes `{site_name}`) don't get parsed until *after* conditionals are evaluated. This means that you are literally using `"{site_name}"` in your string comparison, which of course never matches any of your conditions.

The good news is that MSM variables (`{site_id}`, `{site_label}`, and `{site_shortname}`) are parsed right after snippets and well-before conditionals, so you can use one of those in your conditional block instead.

---
Tags: ee2, ifelse, snippets
---


title: Duplicate Category URL Title - Problem

text:
# Question
Title: Duplicate Category URL Title - Problem
Using EE v2.9.0. and Latest MSM

I created a new category group and created a category called miscellaneous.

I already have a seperate category group with a category called miscellaneous.

This caused a web page to stop pulling through entries when the category in the url was 'miscellaneous'.

As soon as i changed the category\_url\_title to something else the entries on the web page started to pull through once again.

I searched online and someone said it was a bug? But also said it should be been fixed in v2.4.0 or there abouts.

I saw a post from someone with an even newer version to me claiming they had the same problem.

Does anyone have a fix or a solution other than chaning url\_title?

Cheers,

Wes.

# Answer
> 0 votes
I think url\_title needs to be unique, otherwise how is EE going to know which category to show? I don't really see a way around that requirement.

# Answer
> 0 votes
Use category\_id instead of category\_url\_title to pull entries. The category url title can be changed manually from category edit page.

---
Tags: categories
---


# Question
Title: Redirecting requests for SVG thumbnails?
When working with SVGs in the control panel, thumbnails are broken because the system (understandably) can't generate thumbnails for SVGs.

In practice this is mostly fine because the SVGs still work properly elsewhere, but it's annoying to look at a broken thumbnails and to not be able to preview the image you selected.

My thought would be to use htaccess to redirect any request that looks like this:

```
/assets_content/_thumbs/logo.svg

```

to this:

```
/assets_content/logo.svg

```

What would that redirect look like?

It would require a little extra CSS to make sure the SVGs don't bust out of their containers, but that should be pretty straightforward.

Edit:

For the record, here's the first draft of the CSS I'm adding for SVG thumbnails. It tries to manage the width and adds a checkerboard background (so you can see all-white images):

```
.publish_field .filename img[src$=".svg"] {
   width: 100px;
   max-width: 100%;
   padding: 12px;
   background-color: rgba(0,0,0,.05);
   background-image: linear-gradient(45deg, rgba(0,0,0,.05) 25%, transparent 25%, transparent 75%, rgba(0,0,0,.05) 75%, rgba(0,0,0,.05)),
   linear-gradient(45deg, rgba(0,0,0,.05) 25%, transparent 25%, transparent 75%, rgba(0,0,0,.05) 75%, rgba(0,0,0,.05));
   background-size: 40px 40px;
   background-position: 0 0, 20px 20px;
}

```

# Answer
A RewriteRule with a regex should do the trick.

```
RewriteRule ^/assets_content/_thumbs/?\.svg$ /assets_content/$1.svg [NC,L]

```
> 4 votes

---
Tags: control-panel, image
---


title: Glitch with taxes and shipping

text:
# Question
Title: Glitch with taxes and shipping
we have an issue with our store and tax rates. We've created a taxable category for products that need sales tax, and this works well. However, when a non-taxable product is added to the cart, it is still charging tax on the shipping on these non-taxable items, which is incorrect. Is there a fix for this?

# Answer
First you should make sure that you don't have the apply taxes to shipping box checked unless you need to charge taxes on shipping.

Store will apply a tax on the shipping of all the items based upon your rules for both shipping and taxes. I could be wrong but I don't think the tax calculator for shipping can separate the items based on taxable or not. I know for the clients where I have enabled taxes on shipping in the past that they were required to collect shipping tax on both taxed and non-taxed items when sent together. This of course varies from tax locale to tax locale.

You could probably try to create a new Tax Rate for the non taxable item categories with a value of 0% and make sure to check Apply to shipping box and that it is enabled.

Then after you have submitted the new tax rules you will want to grab the little pancake on the left of the main tax settings page to move your new rule above all your other rules but I am not sure if that works.
> 0 votes

---
Tags: expresso-store
---


# Question
Title: Is there a way to have AB Pagination display P1, P2, P3 instead of P10, P20, P30?
I am using AB Pagination to paginate news stories. When I click the numbered (and the next and previous) links, the URI segment is /P10, /P20, /P30. I would like the URI segment to be /P1, /P2, /P3. Does anyone know if this is possible? If so, how could I implement this?

Here is the channel entry tag I am using:

```
{exp:channel:entries
    channel="news"
    disable="member_data|trackbacks"
    limit="10"
    sort="desc"
    status="open|featured"
}

```

and here is the pagination code I am using:

```
{paginate}
    <ol class="page-list group__title">
        {if abp_has_previous}
            <li><a href="{abp_previous_link}"><</a></li>
        {/if}
        {abp_pages}
            {if abp_is_current}
                <li><a class="is-active">{abp_num}</a></li>
            {if:else}
                <li><a href="{abp_link}">{abp_num}</a></li>
            {/if}
        {/abp_pages}
        {if abp_has_next}
            <li><a href="{abp_next_link}">></a></li>
        {/if}
    </ol>
{/paginate}

```

# Answer
ExpressionEngine uses the data from the pagination segment as an offset, not a "page number", per se. So even if you could change the values to P1, P2, etc, they would then yield incorrect results (if you wish to use EE's built-in dynamic pagination that is).
> 1 votes

# Answer
Code Igniter framework actually enables such option:

$config\['use\_page\_numbers'\] = TRUE;

and it works, but I don't know whether it's compatible with AB Pagination. If not, then well, shame on'em.
> 0 votes

---
Tags: add-on, pagination, ab-pagination
---


# Question
Title: Pagination showing no entries after first page
We have a blog section on our website that displays 10 entries per page however, when you click next page or '2' it returns an empty page.

From what I can see the code is the same as for our news page and that's working fine. I've looked through similar issues on the forums but can't find a fix that works.

The code for the entries is:

```
{exp:channel:entries channel="blog" orderby="date" paginate="bottom" limit="10" {if segment_2}author_id="{segment_2}"{/if}  dynamic="no"}

```

And the code for the pagination is:

```
{paginate}

<p class="pagination">Showing page {current_page} of {total_pages} <span>{pagination_links}</span></p>
{/paginate}

```

Can anyone see what would be causing the issue?

Let me know if there's any more info you'd need.

# Answer
> 1 votes
```
{if segment_2}author_id="{segment_2}"{/if}

```

There's your problem. After you click on a pagination link, `{segment_2}` becomes `P10`, `P20`, etc. So you're looking for all entries by the member with the ID of `P10`.

You're better off making an `author` template to filter entries by author, where you can have a more predictable segment to hold the member ID and still use pagination.

---
Tags: channel-entries, pagination
---


# Question
Title: Wygwam + CKeditor + Browse server not showing up after adding image2 plugin
I have updated CKeditor and Added the image2 plugin for image caption to work. Now image caption is working fine but the "Browse Server" button to add images from the server is missing.

To manage the images, I am using the Assets plugin and before the update it was setting the path for browse server automatically, but now it's not showing up at all.

Does anyone in here have any idea about this issue? Did anyone get Image caption and Browse image functionality working together? Is there a manual setting that I need to do for this to work?

# Answer
> 0 votes
I found a solution here and its worked for me: https://github.com/Natetronn/wygwam-enhanced-image

---
Tags: wygwam, file-uploads, image, ckeditor
---


# Question
Title: How to use angular js inside expression engine
How to use angular js inside expression engine. Is there any article or tutorial is available for this. Thanks in advance.

# Answer
> 1 votes
I'm just now learning angular and plan to us it inside EE. I've tested it out on my local machine running ee3.05 and I didn't have any problems.

Here's the simple test page I used that worked:

```
<div ng-app=""> <p>Name: <input type="text" ng-model="name"></p> <p>You wrote: {{ name }}</p> </div>

```

Of course you'll need to use the angularJS script somewhere...here's their CDN link: https://ajax.googleapis.com/ajax/libs/angularjs/1.5.0-rc.0/angular.min.js

---
Tags: javascript
---


# Question
Title: "User" add-on not showing up in EE add-on list
I've attempted to install the "User" add-on to a EE3.0.5 site. I have the latest version of User. I've followed these instruction:

1. Within the /system/user/addons/ directory, copy the user folder into your sites ./system/user/addons/ directory.
2. Within the /themes/user/ directory, copy the user folder into your sites ./themes/user/ directory.
3. Go to the Add-On Manager area in the ExpressionEngine control panel, scroll to down to the Third Party Add-Ons section, and find User in the list, and click Install.

But the User add on doesn't show up in the list. I refreshed my CP page, but still no luck. I double checked the user theme and addons folder locations and we're good. I refreshed the page again but still no User in the list. The permissions for both user folders is 755 (which I assume is correct). What do I do now?

# Answer
> 0 votes
We have been in discussion through a support ticket...

The item you purchased does in fact work with EE3. Inside of the download package is an EXTRA copy of User (v 3.5.3) that is there in case you wish to use User on EE2. In your case, just ignore that User 3.5.3 folder and follow the installation instructions here:

https://solspace.com/expressionengine/user/docs/install\_update/

---
Tags: solspace-user, install
---


title: How can I add the form using channels?

text:
# Question
Title: How can I add the form using channels?
How can I add the multi-step forms using channels and uploading the data to database? And then perform searching on the same data. Also please suggest me that how booking process works for expression-engine ?

Thanks.

# Answer
I'd strongly suggest you look at purchasing Solspace Freeform Pro which can do something very similar but will be far easier to implement. It can handle multi-page forms, it stores the data to the database and has tags to retrieve. As an alternative there is also DevDemon Forms covering much the same thing.

Your second question: "Also please suggest me that how booking process works for expression-engine" - is too far ranging to be able to answer. There is no booking process in ExpressionEngine, EE is so flexible you can do whatever you need - it's a blank canvas. Your best approach would be to ask a new question providing much more specific detail on your requirements if you want to get a specific answer. If you want people to spend time and effort helping you with an answer, put some effort into the question.
> 1 votes

---
Tags: channel-entries, safecracker
---


# Question
Title: SuperSearch with Keywords and Pagination
Alright, trying to get SuperSearch with Keywords working with pagination. Having a bit of trouble, as the "autopath" variable isn't turning in to a useful URL.

```
{exp:super_search:results channel="products" limit="12" sort="desc" paginate="bottom"}
...
{paginate}
{if next_page}<a href="{auto_path}">Next</a>{/if}
{/paginate}
{/exp:super_search:results}

```

This works fine without search terms:

```
<a href="http://example.com/index.php/search/P12">Next</a>

```

However, a soon as I search:

```
<a href="http://example.com/index.php/search&keywords=searchthing/P12">Next</a>

```

Which doesn't work as a URL, or to get the next page of keyword limited things.

# Answer
Found a work around.

With a template route of:

```
/search/{search:regex[(search\&.+)]}/{page:pagination}

```

And PHP-Output turned on, this solved my problem:

```
<?php
function FixPath($toFix)
{
    if (strpos($toFix, 'search/search') === FALSE && strpos($toFix, '&') !== FALSE) { $toFix = str_replace('search', 'search/search', $toFix); }
    return $toFix;
}
?>
{if previous_page}<a href="<?php echo FixPath('{auto_path}'); ?>">Previous</a>{/if}
{if next_page}<a href="<?php echo FixPath('{auto_path}'); ?>">Next</a>{/if}

```

Essentially, this simply looks for the undesired state, and fixes it. I had a combination of links sharing templates, so had to be careful how I fixed it.
> 0 votes

---
Tags: solspace, pagination, supersearch
---


title: Date Input Field in CP View

text:
# Question
Title: Date Input Field in CP View
Is it possible to have a date input field in a control panel view page?

Is there any kind of build in javascript library for the date calendar etc?

Thank you.

# Answer
Take a look at the `display_field()` method of the first party Date fieldtype. The key thing is to use a text input with a `rel="date-picker"` attribute, but there are a few other things that need to be loaded, depending on where in the CP you are displaying it (some language strings, for example).
> 0 votes

---
Tags: control-panel, add-on-development, module, development
---


title: Can't parse RSS feed with EE 3

text:
# Question
Title: Can't parse RSS feed with EE 3
I am using EE 3.0.5 and I am trying to get the first-party feed parser to work. I have installed the module with no problems via the add-on manager. I am using the sample code provided in the docs. I have a template consisting of nothing but

```
{exp:rss_parser url="https://ellislab.com/blog/rss-feed" limit="10"}
<ul>
    {feed_items}
        <li><a href="{item_link}">{item_title}</a></li>
    {/feed_items}
</ul>
{/exp:rss_parser}

```

The feed is valid, but EE returns an empty page, i.e. nothing at all. Any bright ideas? Any logs I could check? Has anybody managed to get the plugin to work with EE 3?

# Answer
After some more digging, I found the reason: the parser can’t handle http**s** feeds, including EllisLab’s own and fails silently.

**Update:** This might be my own fault. Putting `{if feed_error}{feed_error}{/if}`in my template, I get

```
RSS Parser Error: cURL error 60:
SSL certificate problem: unable to get local issuer certificate

```

so there might be a problem with my setup. Certainly worth investigating.

**Update 2**: Got it to work. My server didn't have the necessary public keys installed. Following this advice, I was able to get it to work.
> 1 votes

---
Tags: rss, ee3, feedparser
---


# Question
Title: ExpressionEngine - Zoo Visitor Plugin Questions
This is more of a question before I buy as I can't find any answers online and would like feedback from people who use it.

A client wants to create a member's only section where they can download files and also only access a secure "news" section that's just for members to view. Is this possible with this plugin?

I see that the documentation speaks about member profiles etc but I couldn't find any info about using it to create custom systems?

Thanks for any info/advice, Andy

# Answer
What you describe is perfectly possible to do without using Zoo Visitor.

To create a "members only" section of your website you only need to specify that the template(s) is/are only accessible to a particular member group. Or you could use some conditional logic with a template to show/hide content based on member groups.

The advantage that Zoo Visitor gives is that it will create an entry for each member account. This entry can have additional field types that it's not possible to add to a normal member account.
> 1 votes

---
Tags: zoo-visitor
---


# Question
Title: Expresso Store add quantity to product modifiers
Expresso Store add quantity to product modifiers

I have a product with 2 modifiers. ie: an event with adult and child prices.

I need to create a product so you can add to the cart and say I want # of adults and # of children click add to cart.

I do not want to have 2 separate products for children and adults. Is this possible to add a qty to each modifier?

# Answer
> 0 votes
There are a couple ways that you could do this.

The first would be to create 2 different modifiers One called Adult and one called Child using the variation modifier. Then you will want to create 0-10 or however many tickets you want with \`price * quantity in the field. This would allow a user to add say 5 adult tickets and 3 child tickets all in a single action. This is not how I would do it personally because it doesnt allow you to use the built in limit stock variables and logic and lumps the total tickets prices to the main product which I find confusing to the end user.

Your second option would be to create a single variation modifier with Child & Adult types and set the price for each. Then in your template you would have the user select the ticket type, enter the quantity and then submit to add the product to the cart. In this case I would do this via AJAX so that the user could easily then select the other option and add any of that ticket type to the cart as well. This allows for use of Stores built in limit stock functionality which is usually important when you are selling tickets. I have seen this taken a bit further where the developer duplicated the channel entries tag and wrapped it in the product\_form\_tag then in his template he had the same product with the modifiers already selected (based on different conditionals in his duplicated channel entries tag) so it allowed the user to add both ticket types to the cart in the same submit.

---
Tags: expresso-store, devdemon, ecommerce
---


title: 500 Internal Server Error with Freeform

text:
# Question
Title: 500 Internal Server Error with Freeform
I just started getting an internal server error on a site that has been running fine for weeks.

Now when I try to access a page that has a Freeform form on it, I get a server error & I am also no longer able to login to the control panel at all.

I switched debug to 2 in my config file and this is the error I get:

Error Number: 1205

Lock wait timeout exceeded; try restarting transaction

DELETE FROM `exp_freeform_params` WHERE `entry_date` \< 1450727583

Filename: third\_party/freeform/models/freeform\_model.php

Line Number: 538

What is going on here? Any help is appreciated.

# Answer
> 0 votes
It seems this was just a temporary server issue that worked itself out.

---
Tags: solspace-freeform
---


title: Archiving entire EE site

text:
# Question
Title: Archiving entire EE site
I have a client who would like an entire EE site to be archived and delivered to them in it's current state. What would be the appropriate steps to complete this?

# Answer
Under most conditions, you only need a few things.

1. A complete dump of the database.
2. A complete archive of the EE site's web root.
3. Any important environment configuration files. This would usually include (on linux):

```
/etc/apache2/httpd.conf
/etc/apache2/sites-enabled/my-site.conf
/etc/php5/php.ini

```

As well as some others. Under the most common setups, you usually just need the first two. It really depends on the setup of the site. Some people host their php agent with Nginx or IIS. For most it's a LAMP stack.

If your client isn't a techie or doesn't have a developer or engineer on staff, you should warn them it might be difficult for them to redeploy the site on their own.
> 1 votes

# Answer
Everything should be in the database, so a copy of that would be good start. You'll also want to backup the files, particularly images and other uploads.

Or do you mean a static (spidered) version? That's not easy, since EE by definition is a dynamic system.
> 0 votes

---
Tags: ee2
---


# Question
Title: jQuery does not work in channel form, get 'syntax error: Unexpected token
I'm using Channel Form to post entries from the front end. It works fine locally, but on the development and production server it isn't working at times: Channel images, WYGWAM, Tagger, and Grid. All but WYGWAM look right (the WYGWAM field shows as a basic text box, not the WYWAMY look) but don't work. If you click on a suggested tag it does not get added, if you click an "add row" icon for a Grid it just takes you to the top of the page.

In console I see the following error whenever it breaks (not when it works):

> \[Error\] SyntaxError: Unexpected token '\<' (www.example.com, line 40)

Strange part is it is very inconsistent. It will work fine, then break. Then won't work on any browser (Mac, PC, Chrome/Safari), then will start working again.

I've set up a test account:

username: test@rcdevotee.com

password: eecms

http://www.rcdevotee.com/contribute/model

Feel free to see if it works, doesn't work, and if you see any issues that can help figure it out when it isn't working.

The template does not have jQuery, the form includes it (include\_jquery=="yes"). So no double jQuery issues in this case.

If I remove the form altogether I don't get the error I listed above. If I have just the form tags, but no fields it will give the error when it isn't working. So it has something to do with the Channel Form tag and not any of the fields it would seem.

Any help or ideas where to look for help much appreciated.

# Answer
> 1 votes
My guess would be that you're including jQuery twice (once in your standard template, once automatically via Channel Form)? Adding the `include_jquery="no"` parameter would fix it if that is indeed the problem.

http://ellislab.com/expressionengine/user-guide/add-ons/channel/channel\_form/index.html#include-jquery

# Answer
> 0 votes
For what it's worth, I am not able to duplicate your error in FireFox or Chrome on Windows 7.

While looking at the source code, I noticed a couple of issues that will not pass html validation. It's possible one of those is getting in the way. I'd start by validating the html and fixing the issues that it identifies. Might just do the trick!

# Answer
> 0 votes
I had this same issue and discovered that having Output Profiler and Template Debugging set to 'On' created additional elements that caused the syntax errors that broke my Grid.

The good news is that no public or non-Super Admin account would see this.

---
Tags: safecracker, jquery
---


title: Removing index.php & 301 redirects

text:
# Question
Title: Removing index.php & 301 redirects
I am using the following in my .htaccess file to remove index.php:

```
<IfModule mod_rewrite.c>
RewriteEngine On
# Removes index.php
RewriteCond $1 !\.(gif|jpe?g|png)$ [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php?/$1 [L]

# Redirect non-www to www
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
</IfModule>

```

I need to redirect an old page to a new, existing page but I am getting strange results.

I added the following to the .htaccess:

```
Redirect 301 /Payment.aspx /clients/login

```

But the url it redirects to looks like this:

```
http://www.myurl.com/clients/login?/Payment.aspx

```

It is adding that extra query string to the end of the URL.

Is there any way around this?

# Answer
> 0 votes
When people hit your `/Payment.aspx` path, will they sometimes be linked with a query string?

Also, for best results, try this:

```
RedirectMatch 301 (?i)^/Payment.aspx https://www.full-domain.com/clients/login

```

... which I'm 99% sure won't work if you **do** have query strings when you hit that payment path.

What you really want is a `RewriteRule` and then just drop query strings.

```
RewriteRule ^payment\.aspx$ /clients/login? [L,R=301,NC]

```

The trailing question mark should strip off any original query strings. The flags set it for 301, Last, and NoCase (ignore upper vs lower case `payment.aspx` variations. If the question mark doesn't do it, add a `QSD` flag (query string drop). That flag (QSD), I think, was introduced somewhat recently in mod\_rewrite, so it may not be available in older versions and less maintenanced servers.

Also, this is dangerously close to not being EE related, but since you posted your EE related rewrites, I figured it was just close enough :p

---
Tags: htaccess
---


title: Wygwam and ExpressionEngine 3

text:
# Question
Title: Wygwam and ExpressionEngine 3
Are there any plans to upgrade Wygwam to be compatible with ExpressionEngine 3?

If not, any recommendations or issues on upgrading to EE3 and changing editors?

Thanks, Carol

# Answer
> 1 votes
According to Brandon Kelly, it is supposed to be on its way.

https://twitter.com/pixelandtonic/status/654257322189950976

I don't think they have a published road map for EE3 add-ons yet. Personally, I wouldn't start any new site with EE3 just yet, and every license you buy is active for EE2.10.1 for the time being. Anytime there is a left-of-the-dot change, there is a long period of uptake. They dropped CI as a core engine for EE, so it's possible there are a lot of little changes that make it harder to upgrade add-ons. Also, P&T (Brandon Kelly) is pretty busy with Craft CMS.

Check this list for EE3 compatible add-ons.

https://devot-ee.com/add-ons/filter?&f=ee3

Also, Expresso is planing on an early 2016 release of Expresso, a competing CKEditor based editor, for EE3.

https://www.putyourlightson.net/roadmap

---
Tags: wygwam, ee3
---


# Question
Title: ee 2.9.2 can't login to cpanel infitive loop
Hi I am sick and tired of stupid mistakes of ee after every upgrade! my problem is that I can't login to cpanel I put my username and password and it keep refreshing the page. this is my config.php

```
$config['app_version'] = "292";
$config['install_lock'] = "";
$config['debug'] = "1";
$config['cp_url'] = "http://createjewelry.gr/system/index.php";
$config['doc_url'] = "http://ellislab.com/expressionengine/user-guide/";
$config['is_system_on'] = "y";

$config['allow_extensions'] = "y";

$config['disable_csrf_protection'] = "y";
$config['cookie_domain'] = "";
$config['cookie_path'] = "";
$config['cookie_prefix'] = "";
$config['admin_session_type'] = "c";
$config['user_session_type'] = "c";
$config['require_ip_for_login'] = "n";
$config['require_ip_for_posting'] = "n";
$config['secure_forms'] = "n";
$config['cookie_secure'] = "n";
$config['expire_session_on_browser_close']  = "y";

```

I have tried everything disabling the extensions from config or phpmyadmin every single on of them clearing cache trying from another browser enabling debugging changing files deleted htaccess nothing at all.

does anybody has any suggestion?

# Answer
> 2 votes
Just wanted to comment that adding

```
$config['cp_session_type'] = 's';

```

worked for me too.

# Answer
> 0 votes
If you have the Structure add-on installed and have the "Redirect to Structure on login" preference set to "yes," you may need to update to the latest version of Structure.

---
Tags: login, cpanel
---


# Question
Title: I get PHP error when I try to upload some pdf files when other work great
I tried to disable XSS filter but it does not help. I use file manager to upload files. Errors I get:

```
A PHP Error was encountered

Severity: Notice

Message: Undefined index: file_id

Filename: cp/content_files_modal.php

Line Number: 199

A PHP Error was encountered

Severity: Notice

Message: Undefined index: mime_type

Filename: cp/content_files_modal.php

Line Number: 388

A PHP Error was encountered

Severity: Notice

Message: Undefined index: file_name

Filename: cp/content_files_modal.php

Line Number: 392

A PHP Error was encountered

Severity: Notice

Message: Undefined index: upload_location_id

Filename: cp/content_files_modal.php

Line Number: 393

A PHP Error was encountered

Severity: Notice

Message: Undefined index: file_name

Filename: cp/content_files_modal.php

Line Number: 398

A PHP Error was encountered

Severity: Notice

Message: Undefined index: file_size

Filename: cp/content_files_modal.php

Line Number: 408

A PHP Error was encountered

Severity: Notice

Message: Undefined index: upload_location_id

Filename: cp/content_files_modal.php

Line Number: 413

A PHP Error was encountered

Severity: Notice

Message: Undefined index: modified_date

Filename: cp/content_files_modal.php

Line Number: 202

A PHP Error was encountered

Severity: Notice

Message: Undefined index: replace

Filename: cp/content_files_modal.php

Line Number: 205

File Already Exists:
A PHP Error was encountered

Severity: Notice

Message: Undefined variable: original_name

Filename: core/Loader.php(727) : eval()'d code

Line Number: 4

A file with that filename already exists. You can either choose a new name and the file will be renamed, or you can use the same name and the existing file will be overwritten.

A PHP Error was encountered

Severity: Notice

Message: Undefined variable: hidden

Filename: core/Loader.php(727) : eval()'d code

Line Number: 7

A PHP Error was encountered

Severity: Notice

Message: Undefined variable: original_name

Filename: core/Loader.php(727) : eval()'d code

Line Number: 8

" class="text" />.
A PHP Error was encountered

Severity: Notice

Message: Undefined variable: file_extension

Filename: core/Loader.php(727) : eval()'d code

Line Number: 8

```

Any help appreciated,

Thank you,

Wojtek

# Answer
> 0 votes
This issue can happen if you have P&T Assets module and you try to upload & replace the file in EE file manager. This bug was reported to P&T at Sep 10, confirmed for fixing in next release.

As a solution - disable assets hook for `files_after_delete`.

---
Tags: file-uploads
---


# Question
Title: Solspace Importer: "The following field is required:, The following field is required:"
I try to import a CSV with Solspace Importer, but I am unable to do so, because of an unhelpful error message:

> The following field is required:, The following field is required:

Of course i checked the CSV for missing entries for required fields, but I don't seem to have any.

In the required fields of the **channel** I am importing to, there are multiple checkboxes. The data in the CSV for the checkboxes are TRUE or FALSE.

Maybe the error comes from these fields? How should I import for checkbox values?

# Answer
I set the checkboxes to "non required" and I had to make sure the checkboxes can include the values for TRUE and FALSE.
> 0 votes

---
Tags: channel-entries, solspace-importer, csv
---


# Question
Title: Conditional Error when saving an entry in the CP cause by status
I'm experiencing a confusing problem that I've narrowed down to a custom status.

I have a status for a channel with the following options:

1. Open
2. Close
3. Spec
4. Sold

I can save an entry in this channel just fine for all statuses except for "Sold". When I save an entry with a status of Sold I get this error in the CP:

```
Error

You have an invalid conditional in your template. Please review your conditionals for an unclosed string, invalid operators, a missing }, or a missing {/if}.

Parser State: Invalid Condition: Not enough operands for operator ” != “.

In on line 68

```

Notice how the error doesn't tell me which template contains the problem.

Further, if I change the status of Sold to a lower case S as in "sold", then it works correctly and I can save the entry without getting the error.

I should also say, even though I get the error, the entry is in fact saved. I don't get any PHP errors.

To make this even stranger, I'm using MSM and I only get this error on the default site, not the other two which use the same templates and statuses. This makes me suspect the error message isn't accurate.

I'm using EE2.10.1. Thanks for you help in advance.

# Answer
I didn't get a complete fix for this problem, but I figured out a work around. Basically, I changed my status to a lower case "sold" and then changed this in the database for all entries with this status. Doing this eliminated the error.

I doesn't answer the question of why an uppercase S was causing this error, but I at least got it working again.
> 0 votes

---
Tags: control-panel, error, status, entry, saving
---


title: Template Routes

text:
# Question
Title: Template Routes
I'm using EE 3.0.5.

I have a template: store/location

If there's a third segment, additional information is displayed via a conditional: store/location/coupon

The template route is set to: /location/{coupon:alpha\_dash} Require all Segments? = NO

But when I try to access /location, I get a 404 Error.

With the additional segment, /location/coupon, everything works fine.

How do I display the template without the last segment, /location? Shouldn't Require all Segments? = NO allow the url without the last segment?

Thanks for your help.

# Answer
> 0 votes
It might be related not to Routes, but to template/URL rules in general.

If in your template preferences you have enabled 'Strict URLs' then at least 2 URL segments are required.

You can try overriding this by adding special route for /location

---
Tags: template-routes
---


# Question
Title: How do I manipulate the value of a tag prior to final output?
I need to have PHP on "input" instead of "output" (to feed some tags) so I can't use PHP to change the value of a tag. Is there either a built in function to handle this, or a way to make my own tag that can take another tag's value as input?

What I have now:

```
{exp:channel:entries channel="test"}
    {image}
        <picture>
            <source srcset="{path}/_mobile/{filename}.{extension}" media="..." />
            <source srcset="{path}{filename}.{extension}" media="..." />
        <picture>
    {/image}
{exp:channel:entries channel="test"}

```

But the `{path}` is absolute and I want it to be relative (to handle https vs http). How would I do this?

# Answer
Well, of course there is a way. It depends on why you are going about it this way.

First, I assume the `{path}` variable can go to different domains (possibly a channel you'll duplicate over many MSM sites?) and is user entered, and isn't necessarily the domain of the application. If it were, you could just use `{site_url}` or hard-code the path to your folder with those files.

One way to handle it is to tell people **not** to enter any protocol; the responding server will handle the protocol and redirect to HTTPS if that is the only protocol it wants to serve. You can put instructions to that field in your field settings.

Are you intending on letting your app serve both HTTP and HTTPS? It isn't good practice these days to do that at all. You should just be behind a certificate with a modern encryption-suite.

BUT... anyways, to do this, use a plugin. Sure, you could craft your own, but no need. Use CE String or Low Replace:

http://www.causingeffect.com/software/expressionengine/ce-string

http://gotolow.com/addons/low-replace

Both fine candidates. Look at their documentation, and it will allow you to do string manipulations on that `{path}` variable. An example might be:

```
{replace:plugin find="http://|https://" replace=""}{path}{/replace:plugin}

```
> 1 votes

---
Tags: channel-entries, tags, formatting, image-manipulations
---


# Question
Title: Can't find a list of possible date options
I have searched for two hours, probably 200 different pages trying to find a list of other date variable options. I know "entry\_date" and "current\_time" and want to find some kind of "modification\_date" or SOMETHING like that...to display that instead of "entry\_date". Does this exist? I don't know what to call it, nor do I know how to search for it...I found the ExpressionEngine "Date Variable Formatting" but that's for the *format* of the variable. Not a list of the variables themselves. Someone please help me. I'm going nuts! :-)

# Answer
> 0 votes
The `exp:channel:entries` tag has an `edit_date` variable. Here are the docs.

---
Tags: date
---


title: managing multi language site

text:
# Question
Title: managing multi language site
**scenario**

I want to manage a multi language site without using any add-ons. I’m successful in managing all content from single channel, single field set & single template by using conditional statements. I’m able to switch between two languages (English & Arabic).

Now i want URL structure like http://example.com/language\_parameter/channel\_name/module\_name/param1/param2/param3

I failed to place language variable before channel name. I tried to alter htaccess file and few other hacks in core files but i couldn’t make the URL structure. Please guide me to achieve the desired URL structure

I’ve used stash to share variables (current language chosen) across templates and write conditional statements to decide what to show.

my .htaccess is

```
<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 ^(.*)$ /ee_file/index.php/en|ar/$1 [L]

</IfModule>

```

**Now**

http://localhost:81/ee\_file/index.php/about is able to retrieve `{home_video}`

```
{exp:channel:entries channel="home" limit="1"}
            <iframe  src="{home_video}" allowfullscreen></iframe>
 {/exp:channel:entries}

```

where as http://localhost:81/ee\_file/index.php/en/about is not able to retrieve home's variable

I couldn't figure out how to use template routes in placing language variable before channel name in url.

# Answer
On setting Template Routes

Though i couldn't apply any rules successfully, timely solution I found was to write conditionals like below in each template

```
{exp:channel:entries channel="prize_categories" }
     {if "{segment_1}" == "en"}  {prize_en}
     {if:elseif "{segment_1}" == "ar"}  {prize_ar}
     {/if}
{/exp:channel:entries}

```

I wrote a common template for header links like

```
<a href="/ee_file/index.php/{segment_1}/home"> Home </a> | <a href="/ee_file/index.php/{segment_1}/about"> About </a>

```

Please suggest me any other better solution
> 0 votes

---
Tags: multi-language, routing, template-routes
---


# Question
Title: Inconsistent ExpressionEngine installation version
I have a ExpressionEngine installation SVN'ed in one site that I would like to clone to another site.

Here is the process that I did

1. Extracted EE 2.7.2 version(used 2.7.2 because that is the version used in my site.)
2. SVN checkout my files using the `--force` flag to overwrite some files. **Take note that I only version control the files that I have edited(templates, configs, etc) and did not bother to include the core files**
3. Exported and imported the database from the original site to the new one.
4. Set some permissions(cache, config, etc)

Everything seems well, except I see this in the control panel homepage

`Your ExpressionEngine installation’s version (..) is not consistent with the reported version (2.7.2).`

How do I fix this?

# Answer
> 1 votes
I had the same problem upgrading from 2.7.2 to 2.9.0. My upgrade was pretty basic, and I followed the instructions on the EE website to a "T" (not to mention this is my um-teenth upgrade and have been using EE for years).

I added the v2.9.0 "installer" directory back (the one I had just deleted after the upgrade) and re-visited admin.php. I just clicked the "next" button and went through the process again. The message went away. Hope that helps.

# Answer
> 0 votes
1. Take a backup of your data including your database.
2. Don't delete the installer folder (system/installer)
3. Visit admin.php and follow the steps. It will upgrade the database.
4. Delete the installer folder after the upgrade and you should be good!

---
Tags: upgrade, versioning
---


title: Channel Images ver 6 upload error

text:
# Question
Title: Channel Images ver 6 upload error
When I attempt to upload an image using Channel Images v. 6.0 with EE v. 3.0.6 I get the following error:

"The Local Temp dir is either not writable or does not exist"

Both the upload dir and the cache dir are set to 777. I reviewed some old posts and saw that safe\_mode might be an issue, but safe\_mode isn't even set in the php.ini at all.

Thanks!

# Answer
You may have done this already, but have you checked your Channel Images setting in the channel field to make sure the correct directory is selected? You can also test the location from there as well.
> 0 votes

---
Tags: channel-images, ee3
---


# Question
Title: EE2 Channel Form: How to keep value in checkbox category?
I am (again) struggling with how to keep the value in a Channel Form when showing category as checkboxes. There are quite a few posts here but I seem not to find the answer. Please, who can help me here with a piece of code that really works. This is my code, this does NOT keep the value.

```
{categories show_group="5"}

    <label class="checkbox">{category_name}
    <input type="checkbox" id="{category_id}" name="{category_id}[]" value="{category_id}"{checked}>
    </label>

  {/categories}

```

Thanks, and a Happy New Year

# Answer
> 0 votes
Finally got it right.

```
<legend>Välj en grupp</legend>
      {categories group_id="5"}
        <label class="checkbox" for="{category_name}">{category_name}
        <input type="checkbox" name="category[]" id="{category_name}" value="{category_id}"{checked}>
        </label>
      {/categories}

```

# Answer
> 0 votes
I am not sure what you mean with "keep the value" - The input type checkbox can have the attribute "checked" (resulting in a tick being displayed in the checkbox) - the value property does not set the tick.

When you run the above code of yours and look at the output - what does EE put there? Where does "{checked}" come from?

If you want to have the checkbox in checked status you will have to include some sort of IF statement:

```
<input type="checkbox" id="{category_id}" name="{category_id}[]" value="{category_id}" {if condition}checked{/if} />

```

===(Updated after comment)====

If you want to allow the user to edit the Channel Entry \<--\> Category relation without giving them full access to the Control Panel there are two approaches:

1.) Use the Channel Form (ex SafeCracker) https://docs.expressionengine.com/latest/channel/channel\_form/#categories

2.) Customize the CP for your users: https://devot-ee.com/add-ons/zoo-flexible-admin

# Answer
> 0 votes
Now that I understand what you are trying to achieve - Did you look at this Q&A?

Outputting categories as checkboxes - exp:channel:form / safecracker

---
Tags: categories, safecracker, channel, checkbox
---


# Question
Title: CK Finder Upload Plugin not loading in Opera
Just back to work from the Christmas break and for some reason when I try to upload images in the CK Finder File Manager I get a message saying "Couldn't load plugin", this only seems to be in Opera though, when I try in Firefox it works fine. Has Opera stopped being supported or something like that?

# Answer
> 0 votes
Actually, I've realised it was an issue with the Adobe Flash plugin, I've updated it from here https://get.adobe.com/flashplayer/ and it all seems to be working normally now.

---
Tags: plugin, file-manager
---


title: Channel images and Expressionengine MSM

text:
# Question
Title: Channel images and Expressionengine MSM
I am using the latest version of EE2 and DevDemons channel images.

When i duplicate a site, any channel entry with channel images or channel videos have lost the images & videos.

I assumed when i duplicate a channel and its entries that the images and video links would be copied over also? Or have i missunderstood?

Thank you.

# Answer
> 0 votes
Third party add-on's data does not get duplicated when you duplicate current channel entries into a new MSM site. EE also doesn't have hooks for this, so it isn't easy for any third party add-on to automate this at all. As far as I know, very few or none even provide a tool for accomplishing this.

You'll need to write a script to port data from one site to another. You'll need to take a look at the database tables Channel Images uses and work out how to duplicate your data associations from your old `field_id`, `entry_id`, `channel_id`, and `site_id`, to your new ones (the new, duplicated channel entries).

I've done this with other add-ons but not Channel Images. You'll have to work it out yourself; you may want to contact the Channel Images author if you run in to trouble understanding their data structures.

---
Tags: ee2, multi-site-manager, devdemon, channel-images
---


# Question
Title: EE control panel pages take 10min to load
We have an EE v2.5 site that has been running fine for years. Now over the past few months accessing the control panel has gotten slower and slower. The site still works fine it is only the control panel that is slow. It can take up to 10min for the control panel to respond to logging in or any other page on the control panel site. I have tried disabling all extensions by setting `$config['allow_extensions'] = 'n';` in the expressionengine/config/config.php file, but this did not seem to make a difference. I also optimized the MySQL databases. The servers get very little traffic (few hundred page loads a day). The web and database servers each have plenty of hardware resources (4 cores/4GB ram) and plenty of disk space. Any idea what the issue might be? Thx!

# Answer
Have you tried turning off New Version Auto Check under General Configuration?
> 1 votes

# Answer
This is clearly an issue with your server. Have you contacted your host? They should be able to shed some light on the issue. There has to be a bottleneck somewhere, and an experienced db admin should be able to get to the bottom of this by checking logs and configs.

Also, here's a related thread that might include a few useful pointers: Slow control panel js and css loads
> 0 votes

---
Tags: ee2
---


# Question
Title: Select an option value with multiple options
I need to have a single option in a dropdown list that produces results from more than one value, like this:

```
<select name="length">
    <option value="">Any Length</option>
    <option value="3+4+5">3-5 Days</option>
    <option value="6+7+8+9">6-9 Days</option>
    <option value="10+11+12+13+14">10-14 Days</option>
</select>

```

For example, the first option works for 3, 4 and 5 days, but it also includes 13, 14 and 15.

I have tried numerous variations without success. Any suggestions?

# Answer
> 0 votes
I'm not sure you can accomplish what you're looking to with a select field and SuperSearch. One solution would be to use two fields and the `from` and `to` modifiers:

https://solspace.com/expressionengine/super-search/docs/form/#customfield-from

https://solspace.com/expressionengine/super-search/docs/form/#customfield-to

If you really want to run with a select, you can work some front-end magic with jQuery. Stop the propagation of the form submittal, and get the value of the `length` select. Then set two hidden `input` fields with the `customefield-from` and `customefield-to` value you'd like (3-5, 6-9, etc..), and continue with the form submit.

It might still be possible; the documentation is your friend, dig in, I may have missed something.

---
Tags: supersearch
---


title: cartthrob make shipping optional

text:
# Question
Title: cartthrob make shipping optional
Has anyone ever seen the ability to make shipping optional in Cart Throb? What I am looking for is an option to have an order shipped or pick it up in store and not pay the shipping cost?

# Answer
> 0 votes
I'm sure this would be possible, but it would likely involve creating a shipping plugin.

You could save custom order or item data when adding a product to the cart. And your shipping plugin would check if that data exists and return 0 if it does.

https://www.cartthrob.com/docs/developers/shipping\_plugins/index.html

# Answer
> 0 votes
As long as the alternative method of shipping is simple enough, we usually use the **Customer Selectable Flat Rates** shipping method to allow for this option.

One of our clients has the default set to Standard with a flat shipping fee, but also an additional option for Pick Up in Store at no cost. You could also add in other options for Ground, Express, 2-day, etc.

If the alternative method of shipping is more complicated such as live rates or By Location/Weight, we then create a custom plugin based on their preferred shipping plugin but simply adding in Pick Up in Store to the array of options manually.

---
Tags: cartthrob, shipping
---


title: {exp:low_search:form}

text:
# Question
Title: {exp:low_search:form}
Probably a obvious answer, apologies in advance!

We're running EE v2.8.1 and LOW Search 3.4.0.

In some instances we want to be able to search entries but ONLY return results where a particular field is NOT empty...

Is there a way to do this within the {exp:low\_search:form} param\_value OR with a hidden field?

For example I assumed these would work but do not appear to, first using a hidden field:

```
{exp:low_search:form}
    <input type="hidden" name="search:my_field" value="not IS_EMPTY" >
{/exp:low_search:form}

```

or as a param\_value:

```
{exp:low_search:form search:my_field="not IS_EMPTY"}
{/exp:low_search:form}

```

# Answer
> 0 votes
```
<input type="hidden" name="search:my_field" value="not IS_EMPTY" >

```

This actually works, I'm sure I tested this?!

More. Coffee. Required.

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