title: Assets won't upload large file?

text:
# Question
Title: Assets won't upload large file?
I'm running into an issue where Assets doesn't upload a file over ~10MB. I've used EE's file manager and that could upload two different files, one ~18MB and one ~23MB.

I have this in .htaccess (which is what was needed to get EE's file manager to upload the larger files):

```
php_value upload_max_filesize 32M
php_value post_max_size 32M

```

When trying to use Assets' File Manager, the progress bar loads up, then fades away, but the file never shows up anywhere. There is no error given, not even in the console.

I'm running EE 2.5.5 and Assets 2.0.5.

**Edit:** I have also changed php.ini on the server to match the above PHP values in .htaccess just in case. Still no go.

Any ideas?

# Answer
> 1 votes
It's possible you need to adjust additional php settings to get the large files to upload. These are the suggested **settings to adjust for large file uploads**.

```
upload_max_filesize
max_input_time
memory_limit
max_execution_time
post_max_size

```

# Answer
> 1 votes
Apache: Keep-Alive Timeout should be more than 5 and turned on (2GB files is around 100)

PHP: check open\_base

Server: your /tmp partition needs to be more than the to uploading file. Most /tmp partitions are 512M if your file is larger it won't work. If your /tmp is almost full you get the same problem. (uploads will be uploaded to the /tmp first before moved to your folder)

I guess that your problem lies -\> /tmp

# Answer
> -1 votes
Any update on this issue? We started experiencing the same problem for any files \> 2M (using a macMini with MAMP Pro 2.1.1, any version of PHP, w/ or w/o cache). Apache returns the following error: \[notice\] child pid 31439 exit signal Segmentation fault (11)

Same symptom, the progress bar appears briefly then disappears immediately…And the image is not uploaded

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


title: Get full URL to entry

text:
# Question
Title: Get full URL to entry
I am trying to list upcoming events in Expression Engine. I have the following code:

```
{exp:calendar:events sort="asc" dynamic="no" status="current" event_limit="2"}
<p><a href="{url}">{title}</a></p>
{/exp:calendar:events}

```

I am unable to retrieve the full path (www.domain.con/etc/etc). I have tried url\_title in the href but it is just the name of the entry.

These entries belong to a channel called Calendar: Events if that matters.

What is the tag to get the full path to an Entry?

FYI based on the current data, the first entry should be: http://www.domain.com/index.php/events/test-speaker-series/#john-smith

# Answer
You need to compose the URL for the entry yourself depending on template group and template you want to use.

Looking at the sample URL you posted, I assume it will be something like

> {path=events/test-speaker-series}#{url\_title}
> 2 votes

---
Tags: calendar, events
---


# Question
Title: Best Practices for Large Number of Entries
I have a database of 30,000+ government agencies and want to create a Channel Entry for each. My initial thought would be to create a Channel Field for all the data, then use an import extension to populate the Channel Fields.

I've never had to deal with large numbers of Channel Entries so I wonder if this is a sound approach or may there be another way. Regards

# Answer
Yes, that is a sound approach. Create a Channel for your your government agencies with the necessary Custom Fields to hold data. Then use a data import module to map the data to appropriate Channel Fields and import the records as Channel entries. There are two good add-ons for this: DataGrab and Importer.

If you run into issues with running out of PHP memory and timing out you *may* need to break the import up into batches.
> 1 votes

---
Tags: channel-entries, import
---


title: exp:query relationship field

text:
# Question
Title: exp:query relationship field
I have looked through the documentation for ee https://ellislab.com/expressionengine/user-guide/add-ons/query/

There is no mention of exp:query sql select for a relationship field. I need some help with the syntax.

I am looking to get a total\_results value from a select by channel and value in multi select relationship field.

Any help would be awesome. I am very new to the exp:query mod.

# Answer
If you really need to use the Query module for this then this should do the trick to get all the related entries (children) of a given entry:

```
{exp:query sql="SELECT count(*) as total FROM exp_relationships
WHERE parent_id = {entry_id}"}
    {total}
{/exp:query}

```

This example assumes you are inside a `channel:entries` loop where the `{entry_id}` variable can be passed to the `WHERE parent_id` clause. You may need to tweak the WHERE clause to better suit what you are looking for.

I'm not entirely sure what data you're after, so it's hard to say. But you may want to consider instead just using :total\_results on your relationship custom field tag.

```
{my_relationship_field_name:total_results}

```
> 1 votes

---
Tags: relationships
---


title: Load ExpressionEngine model in Module

text:
# Question
Title: Load ExpressionEngine model in Module
I am trying to pull a listing of custom channel fields in my module and am refactoring to use EE models.

I tried

```
$this->EE->load->model('field_model');

```

but that didn't set $this-\>EE-\>field\_model... as expected.

Any idea on how to use EE models in my module?

# Answer
Another approach might be to turn your module into a package. You could put this in in your module's constructor (or a superclass to subclass it from for use in more than one class):

```
$this->EE->load->add_package_path(PATH_THIRD.'mymodulename');

```

Now mymodulename/models will be added as a path for your model files. and mymodulename/helpers for your helper files. You can then load the model.

```
$this->EE->load->model("mymodelname");

```
> 2 votes

# Answer
Looks like it works inside of my module's models BUT in a "Controller (mcp)" $this-\>EE-\>field\_model doesn't seem to be accessible.

Simply use the following in the model instead:

```
$this->load->model('field_model');
$this->field_model...

```
> 1 votes

# Answer
For anyone else expiriencing same issue, make sure the model's file name is lowercase.
> 0 votes

---
Tags: add-on-development
---


title: ExpressionEngine database redundency

text:
# Question
Title: ExpressionEngine database redundency
I've been looking to see if it was possible to use ExpressionEngine with an Percona XtraDB cluster, I have yet to find a verdict, the closest thing was the post below but there does not seem to be consensus as to whether or not it worked. Does anyone have experience using EE with any galera based replication tools. Further Does anyone have experience setting up EE in a redundant DB environment? We are deploying on AWS and would like to have a copy of the database in each availability zone. Thank you!

ExpressionEngine with Percona Cluster?

# Answer
A few things to make note of when switching to Percona, MyISAM replication is experimental and disabled by default. I would be surprised if it ever becomes fully supported.

MyISAM replication is done at the statement level and as such, causes data inconsistencies when you have a query that utilizes a non deterministic function.

The CI MySQL drivers included in EE are capable of handling InnoDB, and I have not seen any issues with converting the engine across the board. EE isn't set up with connection pools in mind, so if you intend to be clustering your database you will need some sort of Master-Master replication. Also with the connection pools in mind, if you want to utilize all of your databases make sure you put them behind a load balancer to make it easy for EE to understand.

We had a slightly painful release process as a result of Percona due to the fact that some extensions decide MyISAM should be the storage engine rather than just falling to the default. I hooked in to the database classes to log DDL statements to later inspect and see if they created a MyISAM table rather than InnoDB.

I've used EE on a Percona cluster for over a year now. I went down the avenue of writing a database driver implementation for split connection pools, but it wasn't worth my time then when we could just throw a load balancer in front of it. I recently switched to AWS and now use RDS as the database, but we still use Percona for development and testing. All of our automated testing (acceptance, behavioral, and functional) that utilize a database connection hit Percona through a custom database driver to allow nested transactions via InnoDB SAVEPOINTs. With that I can't give much feedback on 2.9 other than it still works.

When you are load balancing your Percona Cluster you want to make sure the health check is doing a query to check the replication health, e.g. `SHOW STATUS LIKE 'wsrep\_local\_state';`

Additionally, ensure your connection lifetime for your load balancer equal to the session length configured in MySQL. You may want to consider setting up server affinity on for your databases as well if you have multiple web servers. Not at all a necessity as the gains you may have from it can be addressed other ways.
> 2 votes

---
Tags: ee2, database
---


# Question
Title: $db['expressionengine']['cachedir'] - what does it do?
I have searched Ellis Labs docs, but I can't find any details about the $db\['expressionengine'\]\['cachedir'\] setting in the database.php config file.

I recently 'fixed' this value (it was pointing to a non-existent directory) as an EE 2.8 site was running very slowly, but this caused problems for a custom plugin that inserts new channel entries by duplicating an existing entry and adding some new field values to the new entry, I'd like to understand how correcting this value caused this.

Also what effects will it actually have on a site if this value is incorrect?

Presumably it's related to $db\['expressionengine'\]\['cache\_on'\] (also in the database.php config file)?

Is it related to $config\['enable\_db\_caching'\] in config.php?

# Answer
> 1 votes
It is used by the CodeIgniter database drivers. `$db['expressionengine']['cache_on']` is exactly what it is related to. The `$db['expressionengine']` settings are passed to CodeIgniter and read based on the active record group set `$active_group = 'expressionengine';`.

CodeIgniter 2.x Database Configuration

# Answer
> 1 votes
As far as I can tell it's not actually used for anything. Tried searching the source for 'cachedir' and I see it is set numerous places but never used.

In DB\_Driver.php there is this function, which is never actually called from anywhere:

```
/**
 * Set Cache Directory Path
 *
 * @access  public
 * @param   string  the path to the cache directory
 * @return  void
 */
function cache_set_path($path = '')
{
    // Query caching now uses caching drivers
    ee()->load->library('logger');
    ee()->logger->deprecated('2.8');

    $this->cachedir = $path;
}

```

Notice the logger-\>deprecated('2.8') call there. So my guess is that this is some legacy code from the good old days.

---
Tags: database, cache
---


# Question
Title: Error: Undefined property: EE::$view in Filename: libraries/File_field.php (Line 618) EE v2.5.5
I have recently started to get the following error on a SafeCracker form in an ExpressionEngine v2.5.5 website.

```
A PHP Error was encountered
Severity: Notice
Message: Undefined property: EE::$view
Filename: libraries/File_field.php
Line Number: 618

Fatal error: Call to a member function head_link() on a non-object in /path/to/website/system/expressionengine/libraries/File_field.php on line 618

```

The other than standard text inputs, this form also references WYGWAM, P&T Checkboxes, P&T Dropdown, VZ URL and Safecracker File. The form has worked fine in the past, so not really sure what the heck is triggering this error now.

# Answer
That error is telling you that you don't have the `view` library loaded and you need it to make that call. Removing `error_handling="inline"` would prevent the errors from manipulating the view.

I'm assuming line 618 is loading css in a `_browser_css` method based on my version. That method is called by a `browser` method. Place `ee()->load->library('view');` inside the `browser` method anywhere before the calls to the methods that require view.
> 1 votes

---
Tags: safecracker, zoo-visitor, php-errors, safecracker-file
---


title: Store: one click checkout?

text:
# Question
Title: Store: one click checkout?
Is there a way to configure Store so that it redirects the customer to the checkout page upon adding an item to a shopping cart?

# Answer
You can set a return parameter on the product tag to redirect the user to whatever page you want. If your checkout url was `example.com/checkout` you would have something along the lines of

```
{exp:store:product return="checkout" entry_id="{entry_id}"}

```

From the docs

> **return="path"**
>
> This parameter is optional. It will redirect the user to the specified page after the form is submitted - such as the Checkout page. If no redirect is specified, the form will display the current page (useful if you just wish to update a sidebar cart)
> 2 votes

---
Tags: expresso-store
---


# Question
Title: ‘layout’ template missing content, but only sometimes
This is really foxing me. I've got a single 'layout' template that is called as a wrapper by all my other 'content' templates (i.e. {layout="layouts/\_general\_layout"}). Part of the layout template provides the main navigation; three items in that navigation have sub-menus (which are just unordered lists). The list items inside those ULs are generated dynamically, from channel entry data. It all works fine for every 'content' template… except three.

When these three templates (let's call them The Problems) call the layout, one or more of the navigation sub-menus in the layout do not get generated. The \<ul\>s are left empty. Exactly which of the three \<ul\>s get missed is different for each of the Problems.

What is perplexing me is that I can only think of two ways in which the content template can affect the output of the layout template: layout variables (either as a parameter or via the {layout:set} tag, or by having conditionals in the layout that vary things according to the URL segments.

I do have some layout variables artwork in my content templates, but they only act to set meta tags for SEO. And there are no segment-checking conditionals around the missing dynamically-generated submenus.

The missing content is actually missing, not just hidden with CSS. Turning javascript off makes no difference. I've even commented out EVERYTHING inside the ‘Problem’ content templates except for the {layout="layouts/\_general\_layout"} tag (and removed the layout variable parameters for good measure) and the issue persists. So presumably the issue lies in the layout itself, but I absolutely cannot see the problem, since it works perfectly for every other content template.

As additional info, let me say that all three Problems are part of the same template group: news/year, news/month, and news/article. However, news/index does not trigger the problem — that one works just fine.

So: Can anybody suggest what other factors (other than segment-based conditionals and layout variables) might cause a layout to miss out/not parse chunks only when called by specific content templates?

(I'l post template code if required, but that might mean quite a bit of code, so I thought I'd ask without it first).

# Answer
Ugh. It's solved, courtesy of Mr Boyink over on the Ellis Labs forum. And the solution was nothing more complex (and, for me, shaming) than our old friend dynamic="no".

The fact that the layout was working fine for 75% of the site's templates had made me look for something more complex, thinking that if the problem lay in the channel:entry tags then the problem would manifest for all pages of the site. Once Mike guessed what the problem might be, I realised what it is that sets the problem templates apart from all the others: they are the only ones in the site that are not the index templates of their respective template groups. So they are the only ones that would require the benefit of dynamic="no".

Still, I hate being caught out by that parameter. Thought I was past that.
> 0 votes

---
Tags: template-layouts
---


# Question
Title: Low Search: search parameter conditional
**Situation**: I have a Low Search outputting my search results using the "search:field" parameter. This works. In the publish form a user can add a Video EITER by submitting a youtube/vimeo link or pasting an embed code from another video service.

**Problem**: I would like to use the search param to only display entries that have either one of these fields set.

Something like: `search:my_field_video="not IS_EMPTY" OR search:my_field_embed="not IS_EMPTY"`

If I use conditionals in the output to check for the existence of there field values, the search results aren't correct (it'll say: 103 items when there are only 100 because 3 are counted but not shown).

# Answer
Combining tag parameters with OR is something that is not easily done in EE, as the whole paradigm for this is cumulative. Everywhere, parameters are combined with AND.

So, you'd have to work around it, for example by creating a custom filter. Or, if you're OK with hardcoding the parameter, you could use a SQL Parameter. Something like this:

```
entry_id="SELECT entry_id FROM exp_channel_data WHERE channel_id = 1 AND (field_id_X != '' OR field_id_Y != '');-1"

```

Where you'd have to replace X and Y with the appropriate field IDs, and make sure the `channel_id` is correct.
> 1 votes

---
Tags: low-search
---


# Question
Title: Content element gallery messing up everything
We are using content element module version(1.6.4) along with EE Version(2.9.2),and when using gallery tag in the template the output is simply showing other tags instead of information, please check the output

And we used the expression in template like this

```
{exp:channel:entries channel="nieuws"}
      {title}
      {nieuws_description}
            {editor}
                {value}
            {/editor}
            {gallery}
            {if images}
                {images}
                    Thumbnail: <img src="{thumb}" /><br />
                    Original: <img src="{image}" /><br />
                    Image type: {extension}<br />
                    Image size: {size}<br />
                    Caption: {caption}<br />
                {/images}
            {/if}
        {/gallery}
        {/nieuws_description}
{/exp:channel:entries}

```

So basically there is a something wrong in gallery tag because if we remove it from template it works fine.

Please help!

Regards Nisar

# Answer
> 1 votes
Check if custom field with short\_name "nieuws\_description" already exists in custom fields settings.

---
Tags: templates, content-elements
---


# Question
Title: Expresso Store Fatal error trying to install
I'm getting a fatal error installing Store 2.4.1 on a fresh install of ee2.9.2

Anyone have any ideas the cause / solution?

```
Fatal error: Uncaught exception 'InvalidArgumentException' with message 'Unknown CI database driver 'mysqli'' in

/home/eedemo1/system/expressionengine/third_party/store/vendor/expressodev/laravel-codeigniter-db/src/CodeIgniterConnection.php:39 Stack trace: #0 /home//eedemo1/system/expressionengine/third_party/store/vendor/illuminate/database/Illuminate/Database/Connection.php(160): Illuminate\CodeIgniter\CodeIgniterConnection->getDefaultQueryGrammar()
#1 /home/eedemo1/system/expressionengine/third_party/store/vendor/expressodev/laravel-codeigniter-db/src/CodeIgniterConnection.php(22): Illuminate\Database\Connection->useDefaultQueryGrammar()
#2 /home/eedemo1/system/expressionengine/third_party/store/vendor/expressodev/laravel-codeigniter-db/src/CodeIgniterConnectionResolver.php(24): Illuminate\CodeIgniter\CodeIgniterConnection->__construct(Object(Addons))
#3 /home/eedemo1/system/expressionengine/third_party/store/src/Container.php(30): Illuminate\CodeIgniter\CodeIgniterConnection in /home/eedemo1/system/expressionengine/third_party/store/vendor/expressodev/laravel-codeigniter-db/src/CodeIgniterConnection.php on line 39

```

# Answer
Store relies on a library called `expressodev/laravel-codeigniter-db`. The latest version of this library *does* support `mysqli`, but the version that comes packaged with Store is older and does not contain `mysqli` support.

Replace your `system/expressionengine/third_party/store/vendor/expressodev/laravel-codeigniter-db` folder with the latest version found here: https://github.com/expressodev/laravel-codeigniter-db
> 2 votes

# Answer
The quick fix I found was just to change the dbdriver to 'mysql' not mysqli in the database config, however this is not so much a fix as a work around.
> 2 votes

---
Tags: expresso-store, expresso, white-screen-of-death
---


# Question
Title: What does the “Word Separator for URL Titles” setting alter
I would like future entries on my site to automatically create the URL titles with dashes-as-separators instead\_of\_the\_default\_underscores. I found the setting in Admin \> Channel Administration \> Global Preferences \> Word Separator for URL Titles. There’s a simple switch that you can toggle between underscores and dashes.

Now before I change this, I’m wondering about what this will affect. Will it only alter auto-generated URL titles for entries created within the control panel? Will it alter any behaviour of file paths on the server?

I found this article on EllisLab’s docs that says:

> When creating an entry in the PUBLISH page, if you do not manually enter a “URL Title” then the system will automatically create one based on the entry Title. This preference determines whether underscore characters (\_) or dashes (-) should be used when automatically creating the URL Title.

Basically what I’m wondering, is, how can I confirm (prove) that nothing else will be altered before changing this setting?

# Answer
Only new entries will use the new separator.

Old entries will be left using the "original" separator they were created with.

If you delete the url title and submit the entry. EE will then re-make the url title field using the separator chosen in the setting. I have found no other place anywhere that relies upon the url titles setting.

I tested this on EE 2.9.0
> 3 votes

# Answer
Its perfectly safe to alter it without affecting anything else than new entries.

All it basically sets is if you add an entry with a title of "my new entry" it converts the spaces to what you set it to, either `- or _`.
> 0 votes

---
Tags: path, site-preferences
---


# Question
Title: Expression Engine, get full URL to entry
I am trying to list upcoming events in Expression Engine. I have the following code:

```
{exp:calendar:events sort="asc" dynamic="no" status="current" event_limit="2"}
  <p><a href="{url}">{title}</a></p>
{/exp:calendar:events}

```

I am unable to retrieve the full path (www.domain.con/etc/etc). I have tried url\_title in the href but it is just the name of the entry.

These entries belong to a channel called Calendar: Events if that matters.

What is the tag to get the full path to an Entry?

# Answer
The simplest thing you can do is install the Demo Templates that come with Calendar. You can do this by going to the Calendar module CP area, and then click on Demo Templates tab. Proceed with the installation there. You'll then be able to see how an average site using Calendar could/should be constructed, how the template tags interact with each other, and what each template tag does. :)

Referencing the Calendar:Events documentation, you can see a proper way to develop your template code, or in your case, generate a list (?) of entries:

```
<ul>
    {exp:calendar:events
        orderby="title"
        sort="asc"
        date_range_start="today"
        show_months="3"
    }
    <li>
        <a href="{path='calendar/event'}/{event_id}/">
            {event_title}
        </a>
        {event_start_date format="%l, %F %j, %Y"}
    </li>
    {if calendar_no_results}
        <li>No Results</li>
    {/if}
    {/exp:calendar:events}
</ul>

```

All that said, I have a feeling you *MAY* be more interested in generating a list of events in chronological order (specifically in the case where you have recurring events). Calendar:Events just displays each event group as 1 result (no matter how many recurrences you have of it), while Calendar:Cal will display ALL of the occurrences, and put them in the right order. If you haven't already, I strongly suggest you check out this documentation page for more information (it explains the differences between these 2 template tags). :)

If you do wish to display a chronological list of occurrences (instead of just event "groupings"), then the code you'd want to use is:

```
<ul>
{exp:calendar:cal
        date_range_start="today"
        show_months="6"
        pad_short_weeks="n"
}
    <li>
        <a href="{path='calender/event'}/{event_id}/">
            {event_title}
        </a>
        ({event_start_date format="%F %j, %Y"})
    </li>

    {if no_results}
    <li>No Results</li>
    {/if}
{/exp:calendar:cal}
</ul>

```

And then finally, being that you're linking to the event located at "calendar/event", in your template located at "calendar/event", be sure to have code like the following:

```
{exp:calendar:events
    orderby="title"
    sort="asc"
    event_id="{segment_3}"
    date_range_start="today"
    show_months="3"
}

    {if calendar_no_results}
        No Results
    {/if}
    <div class="event">
        <h2>{event_title}</h2>
        <p>From Calendar:
            <a href="{path='calendar/calendars'}/{event_calendar_id}/">
                {event_calendar_title}
            </a>
        </p>
        <p>Details:{event_summary}</p>
        <p>Location: {event_location}</p>
        <h3>Upcoming Occurrences in the next 3 months:</h3>
        <ul>
            {occurrences}
            <li>
                <a href="{path='calendar/day'}/{occurrence_start_date format="%Y/%m/%d"}/">
                {occurrence_start_date format="%l, %F %j, %Y at %g:%i%a"}
                </a> - {occurrence_end_date format="%l, %F %j, %Y at %g:%i%a"}
            </li>
            {/occurrences}
        </ul>
    </div>
    <hr />
{/exp:calendar:events}

```
> 1 votes

# Answer
You need to use include the name of your template group and template. Take a look at the path variable:

```
<a href="{path='channel/archives'}">My Archives Page</a>

```

You can read more about it here: https://ellislab.com/expressionengine/user-guide/templates/globals/path.html
> 0 votes

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


# Question
Title: Display Entries by URL Title to a Category?
Let's say I have the following page.

www.mysite.com/about/video/

I have the following links on it.

www.mysite.com/about/video/examples

www.mysite.com/about/video/tutorials

I also have a channel where the user can add a category of either examples or tutorials as the category name which is matched to the URL. Is there a way to display a list of entries that match the third segment of the url string to a category assigned?

# Answer
> 1 votes
You can use the extension Low Seg2Cat and then write channel entry tag like:

```
{exp:channel:entries channel="CHANNEL_NAME" category="{last_segment_category_id}"}
#####
#####
#####
{/exp:channel:entries}

```

# Answer
> 1 votes
Are your URLs set in stone? EE can return entries based on category natively/dynamically - but it has to be a proper EE category URL: mysite.com/about/video/category/examples. A standard channel:entries tag at that URL would return entries in that category with no addons or special code needed.

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


title: Pagination with Template Routes

text:
# Question
Title: Pagination with Template Routes
I have this page for showing articles, and I want to have links below the article to paginate to the next and previous.

This is my code:

```
{exp:channel:entries channel="articles" dynamic="yes" url_title="{segment:article}" status="open|featured" paginate="bottom"}
  <section class="block block--intro">
   <div class="panel">
    <header class="panel__heading">
     <h1>{title}</h1>
    </header>
    <div class="panel__body">
     <figure>
      {exp:ce_img:pair src="{article_featured_image}"}
       <img src="{made}" alt="" width="{width}" height="{height}" />
      {/exp:ce_img:pair}
     </figure>

    </div>
    <footer class="panel__footer">
     <ul class="list-unstyled list-inline meta">
      <li><i class="fa fa-user fa-fw"></i>Written by {author}</li>
      <li><i class="fa fa-calendar fa-fw"></i><time>{entry_date format="%F %j%S %Y"}</time></li>
      <li><i class="fa fa-folder-o fa-fw"></i>{categories}{category_name}, {/categories}</li>
     </ul>
    </footer>

   </div>
  </section>

  <main>
   <article class="article">
    <div class="wrapper">

          {article_content}

    </div>
   </article>

   {paginate}
    {if previous_page}
     <a href="{auto_path}">Previous Page</a>
    {/if}
    {if next_page}
     <a href="{auto_path}">Next Page</a>
    {/if}
   {/paginate}

  </main>

  {/exp:channel:entries}

```

For my Template Route for this template I have:

articles/{article:alpha\_dash} and set Segments Required to Yes.

What am I doing wrong? No code is being displayed for the pagination.

# Answer
The `{paginate}` tag is used to paginate multiple results on list pages. Since you are on a detail page and you are trying to link to next / previous entries in the articles channel, have you tried using the next / previous entry links instead?

Also, since you are using routes and url\_title, you don't need EE to look at the URL structure. I would use `dynamic="no"`. I would also use `limit="1"` in there.
> 1 votes

---
Tags: pagination
---


# Question
Title: Workflows for developing with a team regarding the database
**Short story:**
What are some of workflows regarding the database teams are using to develop locally and then push to a central dev site. When each dev is creating their own templates and variables (not to mention content), how is that database being merged with others without erasing the work one or the other has done? I've seen at least one attempt at a mysql-query recorder, that I could then use to insert into the parent database instead of trying to merge it. I've used those for WordPress and know those aren't always 100%. Are there any other workflows?

**Long story:**
I'm new to developing with a team. The team I'm working with is new to best practices and really working together. In the past it's been pretty much every for themselves, a lot of cowboy coding through FTP on live sites, and more. However they brought me on because we are now getting larger projects. Great.

First I introduce them to git. Everything is great. They understand the benefits, they get use to develop locally, push to staging, then push to master. We use dploy.io to actually make the deployments from our git branches. Again, great.

Now we have a few sites that several devs are working on. Git merges, pull requests, conflicts, no problem. However seeing that ExpressionEngine's core is the database, we start to see issues. Dev A has a copy of the database and so does Dev B. Both are making content changes as well as creating new templates and variables. Both databases can't make it to the staging deployment. We tried some database merging (I come from a back-end world and have no problem getting dirty with databases), however that can be so time intensive.

So we have a (almost) great current solution, using an online IDE. Through Cloud9 (c9.io) we are connecting via ssh to a VPS we have set up for Dev work. This way we are collaboratively working on the same files at the same time, as well as sharing the same database. There are no more git conflicts with each other, no more separate branches for each dev, no more database conflicts, etc. Life is grand. Until Cloud9 goes out for an hour one day. Then we see the error of our ways. What would we do if there was a serious deadline to meet tomorrow and we are left twiddling our thumbs because we can't connect? We could go back to an FTP workflow, but would seriously slow things down.

So this leads to my question: What are some of workflows regarding the database teams are using to develop locally and then push to a central dev site. When each dev is creating their own templates and variables (not to mention content), how is that database being merged with others without erasing the work one or the other has done? I've seen at least one attempt at a mysql-query recorder, that I could then use to insert into the parent database instead of trying to merge it. I've used those for WordPress and know those aren't always 100%. Are there any other workflows?

# Answer
What we in my current team are trying to do is to have as much data in files as possible. That included not just the system add-ons, but templates, snippets and ExpressioEngine config.

We then keep all of those data synchronized with Git.

There are some things which are still stored in database of course and cannot be pulled to files - the data stucture, channel entries, settings for some add-ons etc. Those are saved in 'master' database that we all are connecting too. Everyone is free to set up a local copy for that of course.

We also make database backups on periodical basis and those backups are stored in Git. So we should be able to get a recent copy of data even if the main server is down.

I'm also eager to hear what other approaches people are using. Thank you for bringing this up!
> 1 votes

---
Tags: database
---


# Question
Title: Can user edit a freeform entry but save as new response?
I saw a similar question about Channel Form, but I am wondering if there is a way to save a new form response each time a user edits a previous form response with Freeform.

A second related question to this: if I were to duplicate a form, can the form be prepopulated with a user's answers to the first version of the form, then the response be saved as a response to the new form. (The form is a survey that users will be asked to complete annually; we need to save their responses for each year, but we don't want the users to have to fill out the form from scratch each time as the it is lengthy).

# Answer
I would like to expand on Jim Wyse's advice, and explain what else I have solved so far and what I am still looking for advice on.

First of all, here is the beginning and end code example to do what Jim suggested (where the entry\_id is passed through the url):

```
{exp:freeform:entries
  form_name="my_survey_name"
  entry_id="{segment_3}"
  }
{exp:freeform:form
  form_name="my_survey_name"
  multipage="yes"
  }

<!-- survey questions here -->

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

```

Within this setup, I can easily pre-populate the values from the original entry like this:

**For regular text field:**

```
  <input id="field_name" name="field_name"
        value="{freeform:field:field_name}" type="text">

```

**For radio buttons:**

```
  <input id="field_name" name="field_name" value="Yes" type="radio"
        {if '{freeform:field:field_name}' == "Yes"}
              checked="checked"
        {/if}>

```

**For select menu:**

```
  <select id="field_name" name="field_name">
        <option value="field_value"
              {if '{freeform:field:field_name}' == "field_value"}
                    selected="selected"
              {/if}>Field Value
        </option>
  </select>

```

These all work correctly, but by this logic I would expect the following to work for checkboxes (same as radio buttons, but replacing the "==" with "\*=" to change "equal to" to "contains"). This, however, causes the page to break and nothing will display.

```
  <input id="field_name" name="field_name" value="field_value" type="checkbox"
        {if '{freeform:field:field_name}' *= "field_value"}
              checked="checked"
        {/if}>

```

I am hoping someone else might be able to expand on this to solve the checkbox value problem? Thank you in advance!
> 0 votes

# Answer
Sure, wrap the freeform:form tag inside freeform:entries and populate the form with the existing data, then when the form is submitted, it will be a new entry. make sure you pass the entry\_id in the url and use that to pull the entry in.
> 0 votes

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


title: Channel Images - order by image ID?

text:
# Question
Title: Channel Images - order by image ID?
I am an expressionengine novice, so apologies if my question reflects that. I'm looking for a way to display images in a specified order (i.e. not by date, size, etc.), such as by ID. I've searched high and low but can't find this functionality. Is it possible??

UPDATE: user "Cheyney" helped to tease out my actual question, which was not specifying order of images within an entry (which can be done with the Move icon in the Actions column, as Cheyney describes), but rather specifying order of entries to display images on the homepage. The solution was to order the entries using "orderby" within the Channel Entries tag, as opposed to ordering images within the Channel Images tag. Thanks to Cheyney for "sorting" this out for me!

# Answer
You can use the "orderby" parameter.

```
{exp:channel_images:images entry_id='{entry_id}' orderby='image:id' sort='asc'}

```

See: http://www.devdemon.com/documentation/tag/images/

**UPDATE 1**: If you want images in a specific order then you need to move them inside the entry into the order you want using the Move icon in the Actions column.

NOTE: The cover image with always come first if your field is set that way.

**UPDATE 2**: Based on further OP comments below here is the code to sort ENTRIES by order and then display the single COVER IMAGE for that entry.

```
{exp:channel:entries channel='XYZ' dynamic='yes' orderby='9|1|4|2' category='###'}
    {exp:channel_images:images entry_id='{entry_id}' cover_only='yes'}
        <img src='{image:url}' />
    {/exp:channel_images:images}
{/exp:channel:entries}

```
> 1 votes

---
Tags: channel-images, orderby, sort
---


# Question
Title: Possible in Editor (DevDemon) to place image without p-tags around it?
I don't want the default p-tags added to my images when adding them in Editor.

The HTML should look like this:

```
<p>
    text
</p>
<img src="#" />
<img scr="#" />
<p>
    text
</p>
<img src="#" />

```

etc.

If I add pictures now it adds paragraph-tags around the images automatically.

PS. I can save it the right way one time (in code-mode), but it changes back when I edit the post (even if I don't change anything).

# Answer
> 0 votes
You could try using an add-on such as Hacksaw: http://devot-ee.com/add-ons/hacksaw to strip out any unwanted paragraph tags.

# Answer
> 0 votes
This is something the WYSIWYG editor should solve. You could for instance wrap them in a div (which by default has no css styling and margins etc.). The WYSIWYG usually has a formatting or block-level select menu for changing and/or setting the element.

Seems DevDemon-editor is based on redactor, Wygwam is based on CKeditor

---
Tags: devdemon, editor
---


# Question
Title: PHP error when using Low Variables with Grid and Assets
I created a Low Variable, using a Grid field. One of the Grid columns is an Assets field. It actually all works as supposed to. Except that I get an annoying PHP notice:

```
Severity: Notice
Message: Array to string conversion
Filename: assets/ft.assets.php
Line Number: 1778

```

Is there a way to resolve this?

Some example code

```
{exp:low_variables:pair var="low_var_grid"}
    {low_var_grid:grid_assets_col}
        <img src="{low_var_grid:grid_assets_col:url}">
    {/low_var_grid:grid_assets_col}
{/exp:low_variables:pair}

```

Setup

```
EE 2.9.2
Low Variables 2.5
Assets 2.5

```

# Answer
Okay, this definitely is an Assets issue, but here's a temporary fix.

Open up ft.assets.php and look up the `grid_replace_tag` method, around line 1771. In there, you can see this line of code:

```
$field_name = ee()->db->select('field_name')->from('channel_fields')->where(array('field_id' => $this->field_id))->get()->row('field_name');

```

Below that, add this:

```
if ( ! $field_name)
{
    $field_name = ee()->db->select('variable_name')->from('global_variables')->where('variable_id', $this->field_id)->get()->row('variable_name');
}

```

...which should fix the issue.
> 5 votes

---
Tags: assets, grid, low-variables, php-errors
---


# Question
Title: Ordering Entries using Reegion Select field
I have a channel containing entries with a custom country field that uses Reegion Select.

I need to output the entries in alphabetical order based on this field.

The problem is that Reegion Select stores the 2 character ISO country code for each country and maps it to the English name. So when you list the names alphabetically countries like Germany (DE) and Spain (ES) don't sit in the correct place in the list. I need a way to get the English name to use in the orderby parameter of my entries tag.

Reegion Select has a number of methods to get different versions of the country name/code out by using {field:alpha2} or {field:country} but this won't work in the entries tag parameter.

So, I'm looking for ideas on how to crack this one. Help!

# Answer
Basically there is no way to do this without altering the countries array and probably breaking other areas of the add-on.

For my requirements I just changed my fieldtype to a standard select list and threw in a list of countries (generated from the array used in this add-on).

I'll add this isn't really a shortcoming of the add-on as in order to list them alphabetically (in English) the country names would need to be in the native language of that country (bearing in mind some countries have more than one official language). The requirement itself is fundamentally flawed.
> 0 votes

---
Tags: add-on
---


title: Matrix Multi Upload JS Issue

text:
# Question
Title: Matrix Multi Upload JS Issue
So I've looked at this post:

When trying to update indexes a get a JS error and it never finished

I added `$config['assets_site_url'] = '/index.php';` to my config file but I'm still getting this error `Uncaught SyntaxError: Unexpected token < matrix_multi_upload.js:166`:

Does anyone have any other ideas on what could be causing this issue?

Matrix allows me to upload photos, but I REALLY like MMU!

Thanks for the help!

# Answer
> 1 votes
That setting is "mmu\_site\_url" instead of "assets\_site\_url", for Matrix Multi Upload accessory :)

Source

# Answer
> 0 votes
The console log message `SyntaxError: Unexpected token "<"` may be caused by a missing javascript file, intercepted by some 404 or HTACCESS rule. So, ...

* Is the `themes` folder for Matrix MultiUpload there, in `/themes/third_party/matrix_multi_upload`?
* Is it accessible over HTTP?

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


# Question
Title: How to redirect home page to /home in order for structure navigation to work as expected?
My site lives at something like http://example.com/subdomain/ee. Visiting that site root displays the home page just like I want it to. However, I'm using Structure to output a main navigation like so:

{exp:structure:nav css\_class="nav-main" current\_class="active" max\_depth="1" }

This works great for the most part, except I have a Home link in the main navigation that is the home page, and it's only getting the "active" class if I'm //example.com/subdomain/ee/home, not if I'm at //example.com/subdomain/ee.

I'm relatively new to EE, so I suspect there may be a simple way to fix this. Is there a good way to still use structure to output the primary navigation and have it apply the active class to the "Home" link when on the site root? Is there a better way to approach this than what I'm doing?

# Answer
> 5 votes
To make this work, in the entry for Home under the structure tab, set the Structure Page URL to "/"

---
Tags: structure, navigation
---


title: Checked first modifier

text:
# Question
Title: Checked first modifier
I'm outputting modifiers as radio field but how could I target the first modifier so that it is checked.

```
{modifier_options}
    <div class="large-6 columns">
        <label><input type="radio" name="{modifier_input_name}" checked="checked" value="{option_id}"/> {option_name} {if price_mod_val} ({price_mod}) {/if}</label>
    </div>
    {/modifier_options}

```

This selects the last modifier but would like it to be the first.

# Answer
There is an option already for this in the docs: https://www.exp-resso.com/docs/product\_tag.html#if\_option\_first

Thought I'd post the answer anyway.

```
{modifier_options}
    <div class="large-6 columns">
        <label><input type="radio" name="{modifier_input_name}" {if option_first}checked="checked"{/if} value="{option_id}"/> {option_name} {if price_mod_val} ({price_mod}) {/if}</label>
    </div>
{/modifier_options}

```
> 1 votes

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


# Question
Title: Postmaster + Zoo Visitor + custom fields
I'm using Zoo Visitor to register members and I've set up Postmaster to email based on a checkbox group (using extra conditionals in Postmaster).

Postmaster sends the email fine, but it uses Zoo Visitor's default email address instead of the one the user put in during registration. This is using a parcel, and the email code looks like this:

```
Hello! This new member is interested in joining the Marketing Committee. Here is their contact info:
<br><br>
<strong>Name:</strong> {parcel:member_firstname} {parcel:member_lastname}
<br>
<strong>Email:</strong> {member:email}
<br>
<strong>Phone:</strong> {parcel:member_phone}

```

`{member:email}` ends up getting parsed like so: `zoo_visitor@yourdomain.tld`

I read in a couple of threads over at Devot:ee that using the installed Zoo Visitor Hook in Postmaster would solve this. It does, but then I can't get the custom fields to output properly. The code for that is like so:

```
Hello! This new member is interested in joining the Marketing Committee. Here is their contact info:
<br><br>
<strong>Name:</strong> {member:member_firstname} {member_firstname}
<br>
<strong>Email:</strong> {member:email}
<br>
<strong>Phone:</strong> {member_phone}

```

`{member:email}` outputs properly, but the other tags don't, and I'm not sure what the proper syntax is for those.

I need to be able to output all the info in the Zoo Visitor channel entry.

Any ideas?

# Answer
Angie,

You need the Zoo Visitor Register End Hook in Postmaster's settings.

Check this post a bit related Variables/example for sending a new member their login details using Postmaster
> 0 votes

---
Tags: zoo-visitor, postmaster
---


# Question
Title: Can you apply shipping prior to promo codes in expresso store 2 carts?
I have a scenario where a client wants to give free shipping of orders over $50. They also give out promo codes of 50% off at times. The current workflow is:

Someone adds $60 to their cart - free shipping triggers. They use their promo code and the price of the cart is reduced to $30, but they still have free shipping since it was triggered already.

Is there any way of re-adding the shipping cost to an order total once the promo code has been applied?

# Answer
If both of these are discounts, then you should be able to check the option to disable all further discounts. Do you have this checked to prevent doubling up?
> 0 votes

---
Tags: expresso-store
---


title: Can't save large matrix field

text:
# Question
Title: Can't save large matrix field
I'm having a problem similar to this one where I can't save large matrix fields on my site. Large, in this case, is \> 200 rows with 3 fields each where 2 of those are asset fields. EE/Matrix/Assets/Fieldpack are all up-to-date and I've increased max\_input\_vars to 1500, max\_execution\_time to 600 and memory\_limit to 256; still no luck. I just get a blank screen, no error message, no error in logfile.

Should I just stop trying to use matrix for this and adopt a different design, or should this work?

# Answer
1) read server logs 2) turn debugging on in index.php

This should help you understand better where the problem is.

I have lots of issues like that and Usually it is a matter of server configuration but you must start reading and identifying the error from logs

Bye!
> 2 votes

# Answer
Have you tried with more memory or higher max\_execution\_time? I'm running 1024M. Also max\_input\_time:60

When I had problems with that on one site I had the max\_execution\_time lifted to 12000 & its fine but I've never used that many Matrix rows.

I think you *should* be able to get this working but may need to have the available server resources cranked up.
> 0 votes

---
Tags: matrix, assets
---


# Question
Title: How can I download ICS file for an event?
Is there any option where the .ics files gets downloaded on a click at the front-end for the selected event?

# Answer
You can download an .ics file using the `{exp:calendar:icalendar}` tag: http://www.solspace.com/docs/calendar/icalendar/

From the documentation:

> The Calendar:iCalendar tag is available for event exporting purposes. It outputs an ICS (RFC-2445) compatible file, which can then be imported into other programs such as Google Calendar, Apple Calendar, Microsoft Outlook, Lightning, etc.

Putting this tag on a template will trigger a file download of an .ics file with your calendar data.
> 1 votes

---
Tags: solspace-calendar
---


# Question
Title: How can I import a Filemaker database into EE?
I have a client who has their organization's membership info in a Filemaker database. Can anyone provide guidance as to how I can bring that database into EE? Ideally, I'd like to move the membership database functions out of Filemaker entirely and into EE.

Thanks in advance.

# Answer
DataGrab and Solspace Importer add-ons can both import various types of data into EE, such as CSV, XML, etc that can be exported from FileMaker.

I would look at both of these add-ons and work out which one is best suited to your needs based on the complexity of your source data.
> 2 votes

---
Tags: database, import
---


# Question
Title: Expresso Store.. Checkout submit fails, no error codes from payment processors
Everything is working, quite nicely, except for the actual payment submission / conversion to an order. Payment methods are enabled but {field:payment\_method} returns nothing. {payment\_method\_options} returns the payment method options. Not checking the 'Accept terms and conditions returns an error but nothing else will cause an error, simply a failure and return to the final checkout page.

# Answer
Hard to help without seeing your template code, but since you said some errors work, I'm assuming your submit button is actually just updating the cart.

In Store, the name of your submit button affects what action it triggers. For example:

* `<input type="submit" name="empty_cart" value="Click me" />` will empty the cart
* `<input type="submit" name="next" value="Click me" />` will proceed to the URL specified in the `next` parameter in your template tag (the next step of the checkout)
* `<input type="submit" name="submit" value="Click me" />` will submit the cart (and proceed to the payment gateway)
* `<input type="submit" name="commit" value="Click me" />` will also submit the cart (sometimes `submit` can cause issues with javascript form submissions, so `commit` is provided as an alternative)
* Anything else is treated as "Update Cart", and will update the cart totals and redirect back to the current page. I assume this is what is happening in your case.

For more info see: https://exp-resso.com/docs/store/checkout\_tag.html#submitting\_orders
> 3 votes

# Answer
I found the solution to Store not updating quantities etc when the accept\_terms is unchecked. You need to remove the accept\_terms:0 from the form post. To do this add the id dont\_accept\_terms to the hidden field that is before the aceept\_terms checkbox:

`<input type="hidden" name="accept_terms" value="0" id="dont_accept_terms">`

Then add some jquery to remove the hidden field when update is clicked:

`<input type="submit" name="update_cart" value="Update" onclick="$('#dont_accept_terms').remove();" />`
> 0 votes

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


# Question
Title: checkout return param doesn't get honoured on submit
Trying to submit an order, though I can't seem to get it to forward to the return path.

Here's my tag:

```
{exp:store:checkout require="name|address1|state|country|postcode|order_email" return="/checkout/order-complete/ORDER_HASH" form_class="form"}

```

I've seen this post, and it behaves exactly the same, though I do have a name attribute set & that doesn't make a difference :(

Order Confirmation page

Tried both a button element & an input (like the docs use) no difference...

`<button class="cta" type="submit" name="submit">Pay Now</button>`

Seems like my post request is 302ing...

Seems like the params are set twice in my post data? Maybe it's being overwritten?

I've tried this with both relative & absolute paths in the return param on the checkout tag. No difference. The order gets submitted, cart gets emptied and it reloads the page /checkout/review-and-pay.

# Answer
> 0 votes
Didn't have {error:payment\_method} on the page & it was trying to tell me something is up.

# Answer
> 0 votes
Always check for errors; turn inline error handling off first (for a quick test) then turn inline back on and ensure you have error handling on (every required field, etc). A return to a page usually indicates an unhandled form error.

---
Tags: expresso-store
---


# Question
Title: If statement based on length of Channel Field
Is it possible to create an {if} statement based on the character length of a channel field? Something along the lines of this:

Lets say I have the channel field - `{title}` and I want to add a class to the parent `<div>` if the character length of the title is larger than 10. Something along these lines...

```
{if "{title_length}" >= "10"}
    <div class="wide">{title}</div>
{if:else}
    <div>{title}</div>
{/if}

```

How would I go about doing this with EE?

I hope this is clear. Thanks in advance.

Ryan

# Answer
You can do this with PHPStringFun like so:

```
{if {exp:phpstringfun function="strlen"}{title}{/exp:phpstringfun} >= "10"}
    <div class="wide">{title}</div>
{if:else}
    <div>{title}</div>
{/if}

```

If you aren't getting the results you expect check what value is being returned by the plugin by just outputting it in your template like `{exp:phpstringfun function="strlen"}{title}{/exp:phpstringfun}`

CE String is an excellent plugin as well which you could use instead of PHPStringFun. Worth taking a look at. With CE String you'd do:

```
{if {exp:ce_str:ing strlen}{title}{/exp:ce_str:ing} >= "10"}
    {title}
{if:else}
    {title}
{/if}

```
> 0 votes

# Answer
There are several plugins with which you can determine a string length. Here is one: https://devot-ee.com/add-ons/stringlength
> 0 votes

---
Tags: conditionals, ifelse, parameters, channel-fields
---


# Question
Title: DevDemon Forms or Snaptcha outputting "Array" right before snaptcha field
I am using Forms 3.4.13 and Snaptcha 1.7.5.

I just created a single contact form in Forms, and enabled Snaptcha. When outputting my form, I am noticing the the word "Array" is getting added to my form.

It's showing up right after the `<div class="hiddenfields"></div>` and right before the `<div class="snap" ...>`

If I disable Snaptcha in my form, it goes away.

I prepended and appended some test text to the $field value in line 91 of `ext.snaptcha.php` to see if the "Array" text was part of that, but it wasn't, it came before that.

UPDATE: I dug deeper and found where the word "Array" is getting added.

On line 730 of `mod.forms.php` `$OUT_FORM_PREPEND .= $SNAP->comment_field($OUT_FORM_PREPEND);` it calls `comment_field()`. I'm not totally sure why. But in `comment_field()` in `ext.snaptcha.php`, the `$tagdata` variable is what has the text 'Array'.

I added the following to line 203 of `ext.snaptcha.php` to convert the string 'Array' to an actual array to see what was in it: `$tagdata = "<pre>".print_r($tagdata,true)."</pre>";` and it appears to contain 3 values. One is the contents of my {page\_body} field in my previous, closed channel entries loop. The other two are empty...

# Answer
Ok, this seems to be a bug in DevDemon's Forms addon.

On line 730 of `mod.forms.php` it has: `$OUT_FORM_PREPEND .= $SNAP->comment_field($OUT_FORM_PREPEND);`

Changing this to `$OUT_FORM_PREPEND .= $SNAP->snaptcha_field($OUT_FORM_PREPEND);` fixes this issue.
> 0 votes

---
Tags: devdemon-forms, snaptcha
---


# Question
Title: How to notify on register with Zoo Visitor & Postmaster
I am trying to create a notification email in Postmaster to trigger on submission of a Zoo Visitor member registration form. The registration form includes a set of checkboxes for registrants to notify availability.

Using a **Parcel** in Postmaster as follows it will spit out all of the data but only on **Edit/Update** \- not registration (new entry).

```
<h2>Performer Expression of Interest Application</h2>
<p>Date: {parcel:entry_date format="%d-%m-%Y"}</p>
<h3>{parcel:artist_group_name}</h3>
<p>{member:screen_name}</p>
<p>Email: {member:email}</p>
<p>{parcel:street_address}, {parcel:address_line_2}<br />{parcel:city} {parcel:postcode} {parcel:state}</p>
<p>Phone: {parcel:contact_phone}</p>
<p>Availability: {parcel:m_availability}</p>
<p>Website: {parcel:website_url}</p>
<p>Facebook: {parcel:facebook_profile_url}</p>
<p>Twitter: {parcel:twitter_profile_url}</p>
<p>YouTube: {parcel:youtube_channel_url}</p>
<h3>Bio / Description</h3>
{parcel:biography_act_description}

```

I've tried this with and without email self-activation turned on. I've tried this with all statuses and member groups ticked. *Note that in this example, the Availability field outputs the correct data.*

So I tried using the Zoo Visitor Register End **Hook** as follows:

```
<h2>Performer Expression of Interest Application</h2>
<p>Date: {hook:entry_date format="%d-%m-%Y"}</p>
<h3>{hook:artist_group_name}</h3>
<p>{member:screen_name}</p>
<p>Email: {member:email}</p>
<p>{hook:street_address}, {hook:address_line_2}<br />{hook:city} {hook:postcode} {hook:state}</p>
<p>Phone: {hook:contact_phone}</p>
<p>Availability: {hook:m_availability}</p>
<p>Website: {hook:website_url}</p>
<p>Facebook: {hook:facebook_profile_url}</p>
<p>Twitter: {hook:twitter_profile_url}</p>
<p>YouTube: {hook:youtube_channel_url}</p>
<h3>Bio / Description</h3>
{hook:biography_act_description}

```

But, I get a PHP error on form submission. The email notification arrives but with the Availability field just outputting:

```
Availability: Array

```

I also tried:

```
{hook:m_availability}{options}{/hook:m_availability}

```

and

```
{hook:m_availability}{option_value}{/hook:m_availability}

```

So, I guess there's an issue with parsing arrays like checkboxes etc when using the ZV hook - or I'm simply doing it wrong.

Seems I cant win either way.

If anyone can point me in the direction of either:

a) Getting Parcel to send notification on register

b) Outputting the Availability data when using a Hook

# Answer
I would try to not use the native parsing of Postmaster and use the Zoo Visitor tags. This should work for you. There are no known issues with parsing zoo visitor tags and Postmaster.

```
{exp:zoo_visitor:details member_entry_id="{parcel:entry_id}"}

    // your template here and parse the variables without the "parcel:" prefix
    // just like a normal EE template

{/exp:zoo_visitor:details}

```

And as to whether you use the parcel or the hook really just depends on how you are using Zoo Visitor. Parcels work fine in most cases, but there are instances where the parcel isn't triggered properly, which is why the hooks exist. You guys will just have to decide which works best for your implementation.
> 0 votes

---
Tags: zoo-visitor, postmaster
---


# Question
Title: Playa with large number of entries +20,000
I'm using a Channel Form to enable members to create/edit entries. One of the requirements is to select Relationships between entries. I have a channel containing over 20,000 government agencies and I want to related a few of these agencies (entries) to the entry being edited.

With 20,000+ entries, the standard EE relationship field is unmanageable when it has to be populated with this many entries.

Can Playa be configured to show no entries in the relationship until a member submits a search?

# Answer
Yes. Playa has a useful setting to limit the number of entries that are loaded initially. This helps performance. The user can then search to find additional entries to choose from.
> 2 votes

---
Tags: playa
---


title: How do I save an unfinished blog?

text:
# Question
Title: How do I save an unfinished blog?
I am adding a blog, but I have to attend a meeting. How do I save the blog without actually publishing it to my website. I click on submit and it automatically is published. Thx

# Answer
Change the status to "closed".
> 1 votes

# Answer
As you've tagged the question with `safecracker` I'm assuming that you are creating your blog entry through a safecracker form on the front end of the site rather than using the control panel.

If this is the case, you will need to expose the `status` of the entry in the `safecracker` form template (or `channel form` from EE 2.7 onwards). Details of how to do can be found in the channel form docs.

If you have access to the control panel, then, as Jim says above, you need to set the status of the entry to closed. The Status can be found in the Options tab on the Publish page.
> 1 votes

---
Tags: safecracker
---


# Question
Title: Is it possible to have "Stickiness" expire after a certain time limit, or is there any workaround for this?
I have a client who would like to mark new entries as Sticky, but have the Stickiness only last for 90 days, to give new entries a push and get them promoted initially.

They could un-sticky the entry after 90 days manually, but they have thousands of entries which will make this hard to maintain.

In the same way that you can set an Expiry Date, is it possible to set a Sticky Expiry Date, or can you think of any clean way to make this work?

Thanks!

# Answer
How about just using the Expiry Date?

In the featured articles section of the site, use the following tag:

```
{exp:channel:entries show_expired="no"}

```

which will only show articles which haven't expired.

Then in the archive section (where all articles are shown) use this:

```
{exp:channel:entries show_expired="yes"}

```

which will included expired entries in the list too as well as unexpired ones.

You could get them to set the expiration date to be 3 months after the publish date when they publish an article.

Alternatively, you could write an extension that uses the `entry_submission_start` hook to add an expiration date based on a globally set time period.

Looking on Devot-ee, there appears to be an abandoned extension, Auto Expire, that does this but it would need probably updating for the latest version of EE.
> 2 votes

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


# Question
Title: How to create custom PHP/Mysql page in ExpressionEngine?
I'm currently assigned to create custom page in ExpressionEngine (because that's the old code). I'm not getting used to ExpressionEngine and CodeIgniter either. I do inspecting the structure of current code then I decide to put my script to the template so I just choose the template when I create new page in ExpressionEngine admin page.

The question is: How to put my custom PHP script to that template because I could not find one PHP script in other template before? or If my way is wrong, How to create custom PHP page in ExpressionEngine?

FYI: custom script is want to connect to other server DB and google map API.

# Answer
> 0 votes
Each template has it's own set of preferences. Go to your list of templates in the control panel. For the template where you wish to enable PHP click on "Edit Preferences" and under "Allow PHP" select "Yes".

You can then choose to have PHP parsed before or after EE tags, depending on whether you are passing data from PHP to EE or vice versa.

Note that enabling PHP has security implications and adds a little overhead to the processing of the page.

---
Tags: php
---


title: Playa field in SAEF

text:
# Question
Title: Playa field in SAEF
We want to have a playa field in a front end standalone entry form (SAEF).

However we want the related entry to be automatically be selected based on the entry ID in a segment.

If an entry ID is not present then we would have the usual playa field selection so that hete user could manually select a related entry.

Is this possible?

# Answer
You can do that like this:

```
{if segment_3}
    <input type="hidden" name="playa_field_name[selections][]" value="{segment_3}">
{if:else}
    {field:playa_field_name}
{/if}

```

Replace `3` with whatever URL segment the entry ID will actually be in, and `playa_field_name` with your actual Playa field short name.
> 1 votes

---
Tags: playa, saef
---


# Question
Title: ExpressionEngine CustomCSS | Generating an empty style tag
Cutting right to the chase: I'm needing to enable Custom CSS on a particular entry.

Whenever I load the page and inspect in Dev Tools, The style tag that Expression Engine promises to "automatically generate" is completely empty. It looks like this:

What do I need to do to get ExpressionEngine to push my class definitions into that darn style tag?

# Answer
> 0 votes
Based on your response above, it sounds like this custom field hasn't been implemented in your templates. Go to Admin \> Channel Administration \> Channel Fields to find the variable name for this field. Then go to Design \> Template Manager and type the variable's name into the search field. That will show you which templates, if any, it's on, which should let you drill down further.

What you will likely be looking for, depending on how the person who built the site implemented it, is something like this (assuming the variable name `custom_css`):

```
{if custom_css != ''}
    <style type="text/css">{custom_css}</style>
{/if}

```

Keep in mind that this is might be a different location from the site's main style tag, which is probably defined in a layout or embedded template that is used site-wide for the `<head>` section of your HTML.

---
Tags: css
---


title: New items since last visit

text:
# Question
Title: New items since last visit
I'm in the process of setting up a new member based site. I'm avoiding the Forum module as the templating system is difficult at best to style and many of the functions are overkill for our requirements.

I've found many add-ons that help with PM, user settings, SAEF WYSIWYG, nice dates etc but the one thing I haven't found is just how to show each user the new entries AND new comments since their last visit.

Spitting out a list of entries by last-comment date and by entry-date is fine but I'm really trying to highlight to each user, new info (comments or entries) since their last visit - think of it as "un-read".

Does anyone have any ideas or have done something similar have any pointers on how I can go about achieving this?

# Answer
> 0 votes
I ended up tapping into Solspace Favorites (was already using it for actual favourites). I then created a new module/extension that tapped into Solspace Favorites hooks and DB – on either a new entry/comment the module/extension would:

1. Delete all entries in the Favorite collection where the entry\_id = entry\_id and the collection = 'read/unread' collection
2. Create array of members active in the last X weeks
3. Loop through active members array and add entries for the members into Favorites Collection = 'read/unread'

With that I can spit out a list of entries using normal `exp:channel:entries` tag and using the Solspace Favorites tags `{exp:favorites:info collection="Read-Unread" entry_id="{entry_id}"}class="u-not-read"{/exp:favorites:info}`see if any entry is 'Favorited' OR effectively 'unread'.

When a user visits an entry - there is a module tag that simply passes the entries ID to the module and it deletes the members entry from the Solspace Favorites table where entry\_id, member\_id and collection are all equal.

Thanks to the EE community, special thanks to @iain, @mjingo \+ @low

# Answer
> 3 votes
**Since Last Visit**

"Attempts to point out various actions that have happened since a visitor's last visit to your site." http://devot-ee.com/add-ons/since-last-visit

Otherwise you'd need to roll your own plugin that taps into the Session Class: http://ellislab.com/expressionengine/user-guide/development/usage/session.html Specifically looking at this variable: last\_visit and then returning it to the template. You could then use it to display channel:entries by utilising the "start\_on" parameter.

Alas Comment tag outputs aren't as powerful :( the best I could find is using the exp:comment:entries tag: http://ellislab.com/expressionengine/user-guide/modules/comment/#displaying-recent-comments

An alternative would be again to create your own plugin that output a list of entry\_id's or comment\_id's (separated by |).

# Answer
> 1 votes
You question isn't much clear to me but I think you should read this article http://www.sidd3.com/calculating-member-since-time-in-expressionengine/.

Which can give a little pointer how to get last visit via SQL. I hope, it would help. Please share your further finding over it.

---
Tags: module, extension, how-to
---


title: Hooks for custom module

text:
# Question
Title: Hooks for custom module
I'm using Solspace favorites module and am looking to automatically add new entries+comments to the DB in a separate Favorites Collection to mark entries as either read or unread (fav or not fav).

**Basic thinking:** A “new entry” gets added by user (channel form) and after it’s all submitted, write to the Favorties table in the DB :

* Get all members active in the last X weeks (don’t want all or guests)
* Grab the submitted entry\_id
* Grab the Favorites collection\_id (read\_unread)
* Recursively write to the favourites table in the DB (member\_id, collection\_y, entry\_id, time\_z)

Now on the front (using Favorites tag) when returning a list of entries – I can check for the existence of the entry\_id and member\_id - if there is a match I can visually mark that entry for that user as UNREAD (fav) or READ (not fav).

Continuing on, someone adds a comment to an entry. Need to mark it as UNREAD (new) so delete all instances and replace:

* Delete all DB entries where the collection = Y and the entry\_id = X
* Get all members active in the last X weeks (don’t want all or guests)
* Grab the submitted entry\_id
* Grab the Favorites collection\_id (read\_unread)
* Recursively write to the favourites table in the DB (member\_id, collection\_y, entry\_id, time\_z)

*A member is deleted:*

* Delete all favourites where member\_id = member being deleted and collection = Y.

*Members visit an entry:*

* Grab the entry\_id
* If entry\_id, member\_id + collection\_y exists then delete it effectively marking it as READ.

---

This is all invisible to the user, I don’t need anything returned simply fired after add/deleting/viewing – hence I’m informed I need to build a module/Extension combo.

---

Am I correct in my assumptions below that these are the primary Hooks needed to get this functioning?

ADD COMMENT: `comment_form_end($res)`

DELETE COMMENT: `delete_comment_additional($comment_ids)`

ADD ENTRY: `channel_form_submit_entry_end()`

DELETE MEMBER: `member_delete($member_ids)`

VIEW ENTRY: `template_post_parse($final_template, $is_partial, $site_id)`

# Answer
Ended up using the following hooks in a custom module/extension that requires Solspace Favorites:

**Custom Module: markasread**

```
{exp:readunread:markasread entryID="{entry_id}"}

```

*Deletes the entry from Solspace Favorites table where entry\_id, member\_id and Collection = true.*

**channel\_form\_submit\_entry\_end()**

*Gathers active members in the last X days array, grabs entry\_id + writes to Solspace Favorites module/DB for active members array.*

**insert\_comment\_end()**

*Same as above but DELETES all related entries in the Favourites table prior to inserting.*

When members are deleted or entries deleted, Solspace Favorites takes over with its in-built routines.
> 0 votes

# Answer
It looks like your on the right lines here. A single extension should be sufficient. The other option is to trigger standard Solspace Fav tags using AJAX requests but your proposed approach would be much more robust. :)
> 0 votes

---
Tags: solspace, module, hook
---


# Question
Title: Slow loading, multiple conditionals from multiple channels + sorting solution?
so i have a page that is slow to load. I have tried various alterations to this code but nothing has seemed to work for me. I read that 'Switchee' may be a solution, but i am not so sure.

So I have six 'product' channels, and within each there is one field that asks 'is this a new product?' It is a dropdown field, with 'NO' being the default. If a new entry in any channel is created, and the user selects 'YES' for this field, the product will appear on the 'What's New' page.

{exp:channel:entries channel="fprod" disable="category\_fields|member\_data|pagination|trackbacks" dynamic="no"}
{if f\_wn == "YES"}
Product title, thumbnail, category (brand), etc.
{/if}
{/exp:channel:entries}

{exp:channel:entries channel="bprod" disable="category\_fields|member\_data|pagination|trackbacks"}
{if b\_wn == "YES"}
Product title, thumbnail, category (brand), etc.
{/if}
{/exp:channel:entries}

{exp:channel:entries channel="nprod" disable="category\_fields|member\_data|pagination|trackbacks"}
{if n\_wn == "YES"}
Product title, thumbnail, category (brand), etc.
{/if}
{/exp:channel:entries}

{exp:channel:entries channel="hprod" disable="category\_fields|member\_data|pagination|trackbacks"}
{if h\_wn == "YES"}
Product title, thumbnail, category (brand), etc.
{/if}
{/exp:channel:entries}

{exp:channel:entries channel="eprod" disable="category\_fields|member\_data|pagination|trackbacks"}
{if e\_wn == "YES"}
Product title, thumbnail, category (brand), etc.
{/if}
{/exp:channel:entries}

{exp:channel:entries channel="aprod" disable="category\_fields|member\_data|pagination|trackbacks"}
{if a\_wn == "YES"}
Product title, thumbnail, category (brand), etc.
{/if}
{/exp:channel:entries}

This works fine but apart from the slow load time, the client wants the most recently added 'new' product to appear at the top of the page (not just at the top of its related channel results.

Could someone please help in improving this, if possible? Would be much appreciated!

# Answer
> 1 votes
Without going to a custom query you could try one master `exp:channel:entries` tag like:

```
{exp:channel:entries channel="fprod|brod|drod|etc" disable="category_fields|member_data|pagination|trackbacks" dynamic="no"
orderby="entry_date"}
{if f_wn == "YES"}
Product title, thumbnail, category (brand), etc.
{/if}
{if p_wn == "YES"}
Product title, thumbnail, category (brand), etc.
{/if}
{if d_wn == "YES"}
Product title, thumbnail, category (brand), etc.
{/if}
{/exp:channel:entries}

```

Basically we're doing away with multiple channel calls and rolling them into one call. As well as ordering the results by "entry\_date". You can set mutlipe sort and order values as per the docs

If you wish to retain separate channel calls then a custom query would be quicker – assuming you're not wanting to retrieve every single field in an entry.

It does however not group your entries by any channel associated data.

# Answer
> 1 votes
You could achieve this with Low Search, the Field Search filter and enabling `smart_field_search`. That will apply the `search:field` parameters *only* to the channels the field is assigned to.

```
{exp:low_search:results
    channel="aprod|bprod|cprod"
    search:a_wn="=YES"
    search:b_wn="=YES"
    search:c_wn="=YES"
    smart_field_search="yes"
}

```

---
Tags: switchee, sort, loading-time
---


# Question
Title: What happens if I delete a member, does it delete their entries?
I have a couple of members of a site that have recently left the company. If I delete the members will this also remove all entries that were created/edited by them? I want to keep anything they would have entered into the system.

Using an older version of EE v2.5.2 with Multiple Site Manager

Thanks

# Answer
When you delete a member, ExpressionEngine presents you with the option to either delete all of their entries, or reassign them all to a different member.
> 1 votes

---
Tags: members
---


title: How to feature entries on homepage

text:
# Question
Title: How to feature entries on homepage
I have several channels of content and wish to flag selected entries to display on a section in the homepage. I know Joomla has this built into each article, and wondered how I would achieve this with EE?

# Answer
> 1 votes
Create a channel field that marks the entry as being eligible for "featured" (a simple Yes/No dropdown should do). Then in your template, simply grab the entries with a channel entries tag that have the featured field set to Yes. You can also use additional parameters such as orderby="random" and placing limits to how many items get returned (and set dynamic="no" as well).

# Answer
> 2 votes
Another option would be to use the status parameter on the channel entries tag. If you were to add a status of featured you could then do something along the lines of

```
{exp:channen:entries channel="channrl1|channel2" status="featured"}

```

On the homepage. You would just need to make sure that you declare both open and featured on any entry tags you wanted both types to appear in because the entry tag only displays open by default.

```
{exp:channen:entries channel="channel1" status="open|featured"}

```

Depending on the amount of entires that you have in your EE install using the search parameter (as some of the other commenters have suggested) on the channel entries tag can cause a performance issue.

# Answer
> 1 votes
You can make entries sticky to make the stick on top.

And follow answers in this thread to display only sticky entries on your homepage (or whereever)

While this is native, I would personally just add a custom checkbox field 'display\_on\_homepage' and fetch entries with

> {exp:channel:entries search:display\_on\_homepage="y"}

---
Tags: channel-entries
---


# Question
Title: Issue with comments - "You are not authorized to perform this action"
What could cause commenting to suddenly not work for a particular channel if no changes to the configuration has been made? The person trying to comment gets the message "You are not authorized to perform this action". The EE version is 2.9.0 and there's been no upgrade between now and the last successful comment.

# Answer
> 1 votes
If you are developing locally (e.g. using the “localhost” domain) you may get this security error on comments submission. To test commenting during local development, try to set "Require IP Address and User Agent for Posting" to "No" in Admin -\> Security and Privacy -\> Security and Sessions.

# Answer
> 0 votes
The "You are not authorized to perform this action" error can occur under these two situations (in addition to other situations too):

1. When EE determines that a posted comment is a duplicate. So if you keep posting a comment with "test" as the copy, EE will trigger the error.
2. When a person submits a comment and then uses their back button to post a second comment.

---
Tags: comments
---


# Question
Title: 2.9.2 CP Session Timeout - Is there no solution?
I’ve found many threads both here and elsewhere on session timeout in the CP, however I’ve yet to see a solution that works.

One of my clients is complaining that the timeout is too short, and so far I haven’t been able to extend (preferably indefinitely) it.

I’ve also tried with both session and cookies, session only, cookies only.

Any help with this issue on 2.9.2?

Thanks!

# Answer
> 1 votes
Well, have you tried the terrible idea of modifying core files? In 2.9.2 you can try modifying system/expressionengine/libraries/Session.php and edit line 74:

```
public $cpan_session_len    = 3600;  // Admin sessions expire in one hour

```

# Answer
> 1 votes
I believe the session time variable may have been deprecated in recent EE updates, since it is no longer listed in the EE knowledge base for config variables:

```
$config['cp_session_ttl'] = 'insert number value here';

```

Default is/was 3600 seconds for that value.

Have you tried as an alternative setting the cp\_session\_type variable in your config.php:

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

```

When set to cookies only (value of c), rather than using sessions (s or cs for sessions + cookies), you should then see an option on the cpanel screen next time you login to 'Auto login on future visits?'

the login will remain valid for up to 2 weeks I believe, so even on closing the CPanel, navigating back to the page later should log back in automagically.

Not a direct answer I know, but hope it helps.

---
Tags: control-panel
---


# Question
Title: Control Panel base url not updating... how to fix?
We recently changed the URL for an EE site currently in development. We changed the URL entries on the General Configuration page.

We found that we could not change these entries on the General Configuration page, but could do so via the Edit Config page.

These changes are now being reflected in the General Configuration page, but the Control Panel is still trying to open pages on the old URL. This is OK after a fashion (the old URL is aliased to the new one), but is causing EE to throw CORS errors for some plug-ins (in particular Assets).

Anyone know how I can coerce EE into recognising the new URL to the Control Panel index page?

We're using a simple installation of EE 2.9.2 (not MSM).

Thanks in advance for whatever help you can provide.

# Answer
> 0 votes
Check both the /index.php and /admin.php files... also /system/index.php.

Also, it sounds like there might possibly be an actual config file somewhere if you weren't able to edit under General Configurations. It might be here /system/expressionengine/config/config.php.

NOTE: The file structure for EE can be set up in different ways so if you don't have a "system" directory in root, you're going to have to find it... It might not be named "system".

---
Tags: control-panel
---


# Question
Title: Pixelandtonic Assets: Set Content-disposition?
Long story short: in Chrome, some PDF files stored in our S3 bucket (uploaded via Assets) hang up on download. Chrome just sits there, never downloading the file. (However, right-clicking the link directly seems to work)

Numerous tutorials exist recommending a Content-disposition Meta parameter be set on the file.

Does anyone know if this is something that should occur during the PUT command when the file is added to the s3 bucket?

Is this something that can be set in Assets?

# Answer
There's no hook for this in Assets, so you'd have to hack the add-on to add it.

Look at line 821 of `sources/s3/source.s3.php` ... right after this line:

```
$headers = array();

```

You can add something like:

```
$ext = strtolower(pathinfo($file_path, PATHINFO_EXTENSION));
if($ext == 'pdf')
{
    $headers['Content-Disposition'] = 'attachment';
}

```

Of course, this isn't upgrade-safe, but it should work.
> 1 votes

---
Tags: assets, pixelandtonic, s3
---


title: Simple Search Form Tag over SSL

text:
# Question
Title: Simple Search Form Tag over SSL
The simple search form tag is breaking SSL. How do I go about making the simple search form tag secure over SSL.

# Answer
> 0 votes
Didn't change site URL in config... that fixed it.

# Answer
> 0 votes
To clarify the above answer, you need to update the "site\_url" variable that is hard-wired in /system/expressionengine/config/config.php. And if using MSM, in the index.php file of the secondary domain.

Change the URL to begin with either "https://", or simply "//" if you have your site otherwise set up to load either over http or https.

---
Tags: search, ssl
---


title: Pagination URL encoding

text:
# Question
Title: Pagination URL encoding
I have some modules on a site that basically functions as ORMs and one as a search engine for those ORMs. The problem I'm currently running into is that when a search term is submitted, it gets double urlencoded, and looks like this:

```
submitted term: "Boston +New"
encoded url: "site.com/search/Boston%2B%252BNew"

```

and this is correct, and allows me to safely pass these terms through a giant search module. It also allows me to decode one step safely in the module and do searches in BOOLEAN MODE so users can use a few specials affect characters (the + in front of New puts extra weight on that word being in the match-against).

This is all fine. However, using EE's standard pagination tool, it outputs the url links in this manner:

```
pagination_url: "site.com/search/Boston+%2BNew/P20"

```

so when you go to any other page, the search term isn't what you searched for. I'm looking for a simpler solution than using regex to pull apart the pagination\_url, mangle it, and put it back together. Is there a way to get just the pagination top segment (ie, P10, P20)? Then I can just put the url together with the segment var, ie

```
site.com/search/{segment_2}/{page_path}

```

Or any other suggestions?

# Answer
> 0 votes
I really couldn't find a good answer anywhere, so I'm putting this here for anyone else who runs into this problem. First, you need to make sure your template has PHP allowed on Output. Next, dump this little function somewhere in your template:

```
<?php
// fun, thanks expression engine!
function pager($in)
{
    $a = array();
    preg_match('/(P\d+)/', $in, $a);
    if(isset($a[0]))
    {
        return $a[0];
    }
}
?>

```

Then, instead of just dumping {pagination\_url} into an anchor link, my pagination links looked like this:

```
{previous_page}
    <a href="{site_index}/search/<?=urlencode('{segment_2}')?>/<?=pager('{pagination_url}')?>" class="page-previous">
        ←
    </a>
{/previous_page}

```

But yeah, that's how I went about it. It's not clean perfect, but it works for anyone who has to paginate a MySQL query using keywords and match-against.

---
Tags: pagination, encode
---


title: Quicker way to edit modifiers

text:
# Question
Title: Quicker way to edit modifiers
Wondering if there was quicker way to update Product Modifiers.

We have a lot of products which are the same price but bit of a pain having to update every price modifier 1 by 1.

Anyone used Zenbu to maybe mass edit these. Don't think it's supported.

# Answer
> 0 votes
Sorry to say, but in a word: nope.

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


# Question
Title: Server response was malformated error with Mega Upload
recently all of a sudden I've just started getting the following error messages with Mega Upload. As far as I'm aware nothing has changed, but obviously something has!

> Server response was malformated, probally a PHP error

I'm running the latest version of Mega Upload and EE.

Thanks, Dan

# Answer
It could be a couple things. First check if you can upload the file in file manager. If you can, then I would look to make sure Flash is installed and then make sure the domain logged in is the exact same url setup for EE, www and all.

If the file manager login doesn't work, then you need to diagnose EE/PHP issues.

If none of this works, make a ticket at DevDemon.com.
> 2 votes

---
Tags: devdemon
---


title: Restricted Area for EE2

text:
# Question
Title: Restricted Area for EE2
Does anyone know if there is a way to do what Restricted Area for EE1 does but for EE2?

https://devot-ee.com/add-ons/restricted-area

This is a hugely important feature that would allow members to be given specific permissions not only based on which group they belong to, but also on a member specific level as well.

So for example, the user belongs to Group A which has only access to Channel A. Another user belongs to Group B which has access to Channel A, Channel B and Channel C. This feature would allow another user from Group A to also have access to Channel B only (alongside their Group A permission of Channel A).

Thanks!

# Answer
> 1 votes
SPO far as I can tell, the only comprehensive multiple membership capability for EE is HooBlong Multiple Memberships

# Answer
> 0 votes
I believe you can restrict channel access on per-group basis natively in member group preferences.

To restrict access to individual entries, or on per-member basis, consider Entry Access.

Member Categories might also be helpful if you need to restrict access on category basis.

---
Tags: members, member-management, permissions, restricted-area
---


# Question
Title: search:field_name parameter combined numeric matching doesn't work
I want to use the numeric matching possibility of EE with 2 conditions to only show entries that are in a certain range of values.

I tried these two but none of them works (it just shows nothing) :

```
search:cost=">={embed:the_cost-from}" search:cost="<={embed:the_cost-to}"

search:cost=">={embed:the_cost-from}|<={embed:the_cost-to}"

```

If I ask just for one search:cost numeric matching (`search:cost=">={embed:the_cost-from}"` or `search:cost=">={embed:the_cost-to}"`) it displays something but not what I want because I want something from a range.

Is this a EE bug or simply not intended or I just do it wrong?

EE 2.9.2

# Answer
EE doesn't support that range syntax out of the box. It expects a *single numeric value* after the operator.

You'd need either the Query module or an add-on like Solspace Super Search or Low Search, by yours truly. With the latter, you *can* use this syntax:

```
{exp:low_search:results search:cost=">=10|<=20"}

```

Or use the Ranges filter, like so:

```
{exp:low_search:results range:cost="10|20"}

```

...or split up into two parameters:

```
{exp:low_search:results range-from:cost="10" range-to:cost="20"}

```

Note that the `{exp:low_search:results}` tag is interchangeable with the `{exp:channel:entries}` tag.
> 1 votes

---
Tags: channel-entries, bug, parameters
---


# Question
Title: What might prevent a channel from retaining submitted content?
I've just created a new channel; after populating it with content, I went to view it in the front end to find the channel:entries tag outputting zero content. On checking the channel's entries in the back end I discovered that none of the data I'd entered had been retained. I've tried re-entering data several times but it's never retained.

There's nothing weird about this channel; it consists of a single Grid field that is basically a near-exact copy of a Grid used in another channel -- which works fine. (The only difference, other than a different field name, is the removal of one column).

I've looked through the channel preferences (which, in any case, I created by duplicating the other Grid channel's prefs at the time I created the problematic channel) but can't see anything that might prevent a channel from storing data.

Can anyone suggest anything that might be causing this refusal to retain data?

\[Additional info: when I originally created the channel I set it to make use of the 'Single Entries' add-on. I've removed it from that add-on so that it's now a 'normal' channel again, but it makes no difference; data is still not retained\].

# Answer
Figured it out. The problem arose from the fact that when I created the channel (channel B) I opted to duplicate the preferences of a channel (channel A) that had its 'Title' and 'URL Title' fields hidden via Publishing Layouts and the 'Hidden Tab' add-on. Channel A was set as a 'Single Entry' channel via that particular add-on, so its title and URL title were no longer needed in the editing page and could safely be hidden, reducing clutter).

By choosing to use the preferences of Channel A in creating Channel B, I also gave it the same Publishing Layout. So I was entering data into the channel but not giving it a Title or a URL Title (because those fields were hidden, out of sight and out of mind).

Temporarily making those fields visible again meant that I could populate them with data and thus have the entry retained. Having done so I could once again make the channel a 'Single Entry' type and safely re-hide the fields, since all further changes to that channel would be edits, not publishing new entries.

Anyway, I thought I'd post the cause and the solution here in case anyone else runs into the same problem, which is really just a consequence of duplicating the preferences of a visually-decluttered channel. Logical, but not necessarily immediately-obvious.
> 1 votes

---
Tags: channel
---


# Question
Title: Use of undefined constant Error in Low No Spam
I'm updating a client site to EE 2.9.2 from 2.5.1. Along the way I'm also updating the build of Low's NoSpam extension. Once installed it's throwing the following CP error:

> A PHP Error was encountered Severity: Notice Message: Use of undefined constant LOW\_NOSPAM\_CLASS\_NAME - assumed 'LOW\_NOSPAM\_CLASS\_NAME' Filename: libraries/Accessories.php Line Number: 106

I've re-downloaded/installed the files and uninstalled/reinstalled a couple times to no avail...

Any ideas?

# Answer
> 0 votes
The latest version of Low NoSpam doesn't have an accessory. Make sure the acc.low\_nospam.php file is not present in the add-on package.

---
Tags: low, low-no-spam
---


# Question
Title: Dynamically filter Playa field based on children of current selection in another Playa field
I want to publish a channel entry that enables members to select entries that are related through a Playa relations. For example I have a channel that members will use to create a entry (let's call this a REPORT). In that entry, I'm using Playa so members to select related entries from another channel (let's call this DEPARTMENTS). This all works fined. I can create a REPORT and relate to it specific DEPARTMENTS.

I also have another channel (let's call this EMPLOYEES) that is also Playa related to DEPARTMENTS.

Is it possible through Playa to select specific EMPLOYEES from the DEPARTMENTS selected.

So I'm trying to relate specific EMPLOYEES to my REPORT.

# Answer
Not in the way you are thinking, no.

You can add another Playa field to your Reports channel which lists Employees, but there's no way to have it dynamically filter to only display the employees which are selected in the Departments entry you've selected on the same entry screen.
> 0 votes

---
Tags: playa
---


title: Custom Fields in DevDemon Subscriptions

text:
# Question
Title: Custom Fields in DevDemon Subscriptions
Has anyone been able to get Custom Fields to work with the DevDemon Subscriptions add-on?

At the very bottom of this page (http://www.devdemon.com/documentation/tag/subs-subscribe/) there are two Note's relating to this:

* Note 1: Custom Member Fields are supported. Use the following format for form names m\_field\_id\_XX. Example:
* Note 2: The setting "Is field visible in registration page?" on each Custom Member Field has to be set to "Yes".

I've tried this and can't get it to work. Anyone had luck with this?

# Answer
> 1 votes
You need Subscriptions 1.5.3 for custom member fields to be detected.

See: http://www.devdemon.com/expressionengine-addons/subscriptions

---
Tags: custom-fields, devdemon, subscriptions
---


title: How to remove trailing slash from URLs?

text:
# Question
Title: How to remove trailing slash from URLs?
I would like to remove duplicate URLs by removing the trailing slash from URLs. If someone enters a URL like `http://example.com/something/` it should 301 redirect to `http://example.com/something`.

Obviously the query string must be preserved when present.

Here is my `.htaccess` file at the moment (for localhost):

```
Options +FollowSymlinks

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

```

Also, please feel free to comment if the above can be improved in any way.

# Answer
> 4 votes
For your .htacces you can use

```
# remove trailing slash
RewriteRule ^(.*)\/(\?.*)?$ $1$2 [R=301,L]

```

To improve the urls on your page you can use my little plugin called 'remove\_trailing\_slash'. It is not yet aproved by devot-ee, but i can send you the plugin right away.

The usage is simple:

`{exp:remove_trailing_slash url="www.google.nl/"}` or `{exp:remove_trailing_slash}www.google.nl/{/remove_trailing_slash}`

http://reinos.nl/add-ons/remove-trailing-slash/

Please pm me your email so i can send it to you.

# Answer
> 0 votes
I used the following in my htaccess to redirect the urls with a trailing slash:

```
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{HTTP_HOST} !^\.localhost$ [NC]
RewriteRule ^(.+[^/])/$ http://%{HTTP_HOST}/$1 [R=301,L]

```

---
Tags: url, htaccess
---