# Question
Title: Channel Entry Model Not Saving Custom Fields
EE 5.2.4

I am using the ee model class to save channel entries via AJAX.

Everything is working well except for custom fields, which don't save.

Here is the code:

```
      $entry = ee('Model')->make('ChannelEntry');
      $entry->title = $title;
      $entry->url_title = $url_title;
      $entry->site_id =  ee()->config->item('site_id');
      $entry->author_id = ee()->session->userdata('member_id');
      $entry->ip_address = ee()->session->userdata['ip_address'];
      $entry->entry_date = ee()->localize->now;
      $entry->edit_date = ee()->localize->now;
      $entry->custom_field = $custom_field_value;
      $entry->channel_id = $channel_id;
      $entry->save();

```

Everything works except for the `custom_field` part. It will create the new entry and save all of the correct data, but just not that.

Is there a step I'm missing?

# Answer
You may be using the incorrect field name. You can't access it via its short name, it has to be by it's `field_id`. Here is an example of how I do something like this:

```
// these are usually set at the top of my add-on, function, whatever,
// for reference through out this PHP file, and also in case different site
// instances (staging, dev, whatever) happen to have different field_ids
// for the same fields, so it's easier to change when pushing around
$first_name_field_id = "field_id_10";
$last_name_field_id  = "field_id_20";

// ...

// then later, after instantiating the Channel Entry model, you apply field values like so:
$entry->$first_name_field_id = "Eric";
$entry->$last_name_field_id  = "Idle";

```
> 3 votes

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


# Question
Title: Tagdata Fetch Params Not Accepting JSON String
EE 5.2.4

I'm developing a feature for custom analytics. Certain activities are saved as channel entries in order to be presented in a dashboard later.

I have the first part of the feature working. The way I've gone about it is to save the activity as a string of JSON in a channel entry field. My intention was to parse this out later, as I'm not sure what sort of technology I'll be using on the dashboard and JSON seemed like a universal/consistent format to store the data.

My issue is when I try to pass the JSON string as a tag parameter into a php class method, it doesn't like the JSON and returns nothing.

Example.

Template:

```
{exp:channel:entries channel='analytics' dynamic='no' status='not closed'}
    {exp:class:my_method json='{json}'}
{/exp:channel:entries}

```

Class:

```
  function my_method() {

    $json = ee()->TMPL->fetch_param('json');
    print_r($json);
  }

```

When the `{json}` is the saved JSON string from the channel (I know that's working because it shows just fine in the template), the `$json` variable will return nothing, but if I replace `{json}` in `json='{json}'` with a normal string or even another entry field like `{title}` it will work just fine and I'll get a correct print.

Any ideas what's happening to this JSON string?

I *could* use php to work with this data in the template, for example

```
<? php
   $json = '{json}';
   print_r(json_decode($json, true));
?>

```

but I'd **really** rather use the EE template features if possible because I just like them so much.

Thanks for your help!

# Answer
> 1 votes
Tags in params aren't going to be parsed unless you add this parameter:

```
parse="inward"

```

The parse order stuff is... hard to grok. Try adding that to your channel entry tag.

https://docs.expressionengine.com/latest/templates/language.html#changing-parsing-order

---
Tags: templates, tags, parameters, json
---


title: how to pull the child id from a segment

text:
# Question
Title: how to pull the child id from a segment
I have a single entry page that has a child category selected only (not the parent just the child selected)

I have a Solspace Calendar event entry which has the same child category selected.

Is there a way to display the calendar events with the same child category selected on the single entry page?

**Single entry page template: domain.com/candidate/url-title**

```
{embed="events/candidates_events" calendar_id="{calendar_id}"}

```

**Embed Template:**

```
{exp:calendar:cal
   calendar_id="{embed:calendar_id}"
   event_limit="{embed:event_limit}"
   date_range_start="today"
   show_months="24"
   status="not Closed|Private"
   pad_short_weeks="n"
   dynamic="on"
   transcribe="disable"
}
   <li>
       <a href="{exp:transcribe:uri  path='events'}/{event_id}/">
           <strong>{event_title}
       </a>
       ({event_start_date format="%F %j, %Y"})
       </strong>
       <br />
       {event_summary} -
       <a href="{exp:transcribe:uri  path='events'}/{event_id}/">
            Learn More
       </a>
       <br />
       <br />
    </li>
    {if no_results}
    {/if}
{/exp:calendar:cal}

```

# Answer
> 0 votes
I'm not so familiar with Solspace Calendar, but it seems version 1 (which I guess you must be using, as the `calendar:cal` tag was dropped for version 2 and beyond) supports use of the parameter `category=`. So presumably you can grab the ID of the child category you are using and pass that value to your `calendar:cal` tag.

Also, there is a typo in your code - I think your parameter `dynamic="on"` is really meant to be `dynamic="no"`.

HTH

---
Tags: categories, solspace-calendar, low-seg2cat, child-categories
---


# Question
Title: Low search and custome group templates variable
I have a multilingual site, with one channel and multiple fields for different languages. The site has 20+ different channels. Everything works ok, except the search results page for low\_search in 2. language.

The problem is with the creation of entry urls for search results (there are several different channels in serach results)

In other templates i generate the url with code

```
{preload_replace:my_template_group="news/more/"}
....
<a
    href="{path='{my_template_group}'}/{entry_id}/{exp:create_url_title}{title-en}{/exp:create_url_title}"
    title="{title-en}"
>
    {title-en}
</a>

```

I tried to find out in wich channel the result entry is, and then store his group name in preload\_replace var. But that is not working properly. Every entry gets the group name of the first item in IF. The used code:

```
{exp:low_search:results
    collection_lang="en"
    channel="o-nama|vijesti|kontakt"
    query="{segment_2}"
    limit="10"
    paginate="bottom"
    keywords:mode="all"
    keywords:loose="right"
    status="open|uvodni"
    require_query="yes"
}
{if low_search_no_results}
    <div class="alert alert-success">
        No results found for the search term
    </div>
{/if}

{if channel_name == "kontakt"} {preload_replace:my_template_group="contact/"}{/if}
{if channel_name == "o-nama"} {preload_replace:my_template_group="about-us/"}{/if}
{if channel_name == "vijesti"} {preload_replace:my_template_group="news/more/"}{/if}

<h2 class="entry-title-index">
    <a  href="{path='{my_template_group}'}/{entry_id}/{exp:create_url_title}{title-en}{/exp:create_url_title}"
        title="{title-en}"
    >
        {title-en}
    </a>
</h2>
{/exp:low_search:results}

```

I tried the if with channel\_name ,channel\_id, channel\_short\_name...I always get the same result (my\_template\_group=contact)

It would be a good idea to store the group name in a variable, as I use the generated url in multiple places (img href, h2 title...)

# Answer
I'm not sure what the limitations of your templates are, or what version of EE you are using but a couple of suggestions:

First, a low impact way of storing interim results is to use layout variables - these are defined easily and become available for reuse in your templates when processing transfers to the next template in the sequence. So you could temporarily save your template group into a layout variable, transfer to a second layout template and use that value where ever etc. So something like this...

**First template in build**

```
{layout='next_layout_in_build'} {!-- transfers processing to this template next --}

{layout:set name="template_group"}
   ...put your code to choose template group here...
{/layout:set}

```

**Second template in build** (in this case 'next\_layout\_in\_build.html' in same template folder as first)

```
{exp:low_search_results...}
...
<a  href="{path='{layout:template_group}'}/...
...
{/exp:low_search_results}

```

Whether this helps of course depends on what actually you are doing.

Second, you can drop use of `exp:create_url_title` \- the **Variable Modifiers** feature now lets you do this via the `:url_slug` modifier.

HTH.
> 0 votes

---
Tags: low-search, custom-fields, url
---


# Question
Title: Automatically add rel="noopener" to hyperlinks set to open in a new window
Is there an easy fix that will append `rel='noopener'` to every link that’s set to open in a new window when using the hyperlink button in a text area field?

# Answer
> 0 votes
I opted for an easier approach and wrote a Javascript function instead which looks for any links with an attribute of `target="_blank"` and adds `rel="noopener"`.

```
function relnoopener() {
    const a = document.querySelectorAll('a[target="_blank"]');
    a.forEach(function(element) {
        if (!element.hasAttribute('rel')) {
            element.setAttribute('rel', 'noopener');
        }
    });
}

```

---
Tags: wygwam, fieldtype, links, ee5, textarea
---


# Question
Title: Embed YouTube Video not displaying when code is in TextArea or TextField
I am running EE 5.2.6 and have an issue with embedding YouTube videos in a TextArea or TextField. If I do it this way, it does not display the video from the channel entry field.

```
...
<div class="video" >
    {video}
</div>
...

```

If I add the code directly into the template like this it shows fine:

```
<div class="video" >
        <iframe width="560" height="315" src="https://www.youtube.com/embed/g0ev7HxaWdg" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
</div>

```

The TextArea is set to formatting **None**, but it appears that the field is still stripping out the special characters somehow, thus preventing the video from displaying properly and there is no trace of the iframe in the browser inspection window.

Does anyone know how to resolve this?

# Answer
> 1 votes
Is the value of `{video}` the entire iframe? if so it's likely because you have double quotes.

Why would you not just have `{video}` be the YouTube url and do something like this

```
{if video != ''}
<div class="video" >
    <iframe
        width="560"
        height="315"
        src="{video}"
        frameborder="0"
        allow="accelerometer;
        autoplay;
        encrypted-media;
        gyroscope;
        picture-in-picture"
        allowfullscreen>
    </iframe>
</div>
{/if}

```

This will check to see that there is a `{video}` value and if so build an iframe with the `{video}` value as the src.

---
Tags: textarea, embed-media
---


# Question
Title: First Visit Alert And Latest Updates For Non Members
EE 5.2.6

I'd like to be able to display messages to first time visitors and also show update messages to returning visitors but only show once. ***They don't have to be registered members.***

the Show Once and First Timer plugins are not up to date with EE 5 and the non-plugin option suggested here only works for members who are registered.

Is there any good way that you know to do this or a plugin that handles such things?

# Answer
To be able to do this at all EE would need to know information about past browsing behaviour of your visitors. This in turn would require you to either record information about the visit in the EE database (e.g. IP address / dates) or plant information on the visitors devices via cookies or some such. Both of these actions would be covered by GDPR and so to be able do either you would need to first get active permission from the visitor - which I am guessing would defeat your aims of responding to people without their registration or intervention.

So probably you cannot - but the limitation that prevents this is not EE related.

HTH
> 2 votes

---
Tags: sessions, messages
---


# Question
Title: How can I get EE to showing new programatically created entries immediately away after creation?
I have an EE (5.2.6) system to which I am adding new entries programmatically: the new entries are created during an AJAX call to an EE template that creates the new entries using php / EE Model via code like this:

```
$entry = ee('Model')->make('ChannelEntry');
$entry->title = '{get_post:title}';
$entry->url_title = '{get_post:url_title}';
$entry->site_id =  ee()->config->item('site_id');
$entry->author_id = ee()->session->userdata('member_id');
$entry->ip_address = ee()->session->userdata['ip_address'];
$entry->entry_date = ee()->localize->now;
$entry->edit_date = ee()->localize->now;
$entry->channel_id = 5;
$entry->status = 'open';
$entry->save();

$entry->field_id_5 = '{get_post:custom_content}';
$entry->save();

```

*BTW - `{get_post:...}` is a tag from the mo'variables add-on that simply retrieves get or post variables with the name assigned in the tag*

This creates the new entry (first save) and then loads some data into its custom fields (and then saves again).

The AJAX call uses the `.done()` method to delay subsequent processing until after the php activity is complete. Right now all that happens is a page reload (the page is generated by a template that lists out the entries in the channel concerned) - via code a bit like this:

```
function new_entry(url_title,title,custom_content) {
    return $.ajax({
        method: "GET",
        url: '/some/ee/template',
        data: {
            url_title: url_title,
            title: title,
            custom_content: custom_content
        }
    });
}

new_entry(
    $url_title,
    $title,
    $custom_content
)
.done(location.reload(true));

```

This is all good, and works (it creates new entries etc.). Trouble is when the reload happens, the newly created entry does not appear in EE template output. If I manually reload the template moments later the entry does appear.

So I put some extra code into the php to dump out the state of play to a log as the code runs - and I can see from this that the new entry is being created OK, and I can even load the newly created entry into a variable within the php code and dump out the value in the custom content field of the newly created entry to the error log, all before processing of the php ends and return is passed back to javascript...

I have checked and template / tag caching is turned off across whole of EE templates and site. The `reload(true)` call should force browser not to reload from its cache either.

I'm clearly missing something... but no idea what!

Anyone got any thoughts about what I need to do for the newly created entris to appear when the reload happens?

Thanks in advance etc.

# Answer
So it is a partial answer - it seems that the issue is managing the time it takes for EE to respond to the AJAX request. So for now I've fixed this by making the AJAX request synchronous... vis

```
function new_entry(url_title,title,custom_content) {
    return $.ajax({
        method: "GET",
        async: false,
        url: '/some/ee/template',
        data: {
            url_title: url_title,
            title: title,
            custom_content: custom_content
        }
    });
}

```

Trouble is this is a deprecated setting, but so far my attempts to work around it using the recommended methods (which appears to be the `promise / .then / .when` construct) are not working well ... :(

So hopefully this is helpful to someone, but if anyone has a suggestion about how `promise / then` might be applied to this I'd love to see it.
> 1 votes

# Answer
You might try structuring your ajax like this:

```
$.ajax( {
    url:        action,
    type:       'POST',
    dataType:   'html',
    data:       values,
    error:    function( jqXHR, textStatus, errorThrown  ) {
        alert( 'Sorry, there was an error' );
    },
    success:  function( result, html, textStatus, jqXHR ) {
        var obj = result;
        // do things with the result
        location.reload(true)
    }
});

```

I use ajax a lot with custom ee add-ons to query apis and such and this is how I do it.

Hope this helps.
> 0 votes

---
Tags: php, javascript, ee5
---


title: Using File Model to Save XML

text:
# Question
Title: Using File Model to Save XML
EE 5.2.6

I've written an add-on that takes date parameters and gets an order report from an Amazon seller account using the Amazon MWS API. The result for this operation is a nice, big XML object.

What I would like to do with this object is save it as a `.txt` file, along with a few other fields, in a channel entry.

I already have the functionality to save the result as a channel entry using the ee model class. I tried saving the object as a string in a text field but there's just too much data to do this.

What I need to know is how to take the xml object and save it as a `.txt` file with the channel entry.

I've played around with this suggestion but honestly I'm confused by it and there's no documentation that I can find that relates to this specific question.

This is what I'm currently playing around with. (`$title` has a dynamically created value)

```
    $file = ee('Model')->make('File');
    $file->title = $title;
    $file->file_name = $title . '.txt';
    $file->upload_location_id = '2';
    $file->save();

```

It doesn't save anything and isn't throwing an error so I'm not sure what I need to change. This also does nothing with the actual xml data. I need to be able to take the XML object, put it into a `.txt` file, and save that file with a channel entry.

I'm relatively sure there is a way to do this using the ee model class. If I'm wrong, please point me in the right direction.

# Answer
> 0 votes
By using **File** model you can only insert the data into table named **exp\_files**. By using **filemanager** library you can upload the file.

What you should do is first write the code to create the file onto server and writing content into the file. After that you should try to upload the file using filemanager library.

Hope this will works for you.

---
Tags: file-uploads, files, classes
---


# Question
Title: Help with ChannelEntry Model Service to get/set data directly in the database
To retrieve data from a specific *custom\_field* in a channel entry I used to do the following:

```
$data = ee()->db->select('field_id_2')
    ->from('exp_channel_data')
    ->where(array(
        'entry_id' => $entry_id
    ))
    ->get();

$field_value = $data->row('field_id_2');

```

How would I do that now ? Is there somewhere I can I find examples for getting and setting data in channel entries using the ChannelEntry model ?

(examples in the docs are for members and templates and I don't get how it relates to entries)

# Answer
> 0 votes
The documentation of the EE models is pretty sparse right now - hopefully over time that will improve.

To do what you describe this kind of approach will work - there maybe better ways (hopefully if so someone who knows will post another answer)...

This sets up a variable that links to a single entry in the EE database, from where you can either get or set specific fields etc. You can use any field in the filter - as before the core EE fields are accessed by name (e.g. `entry_id`, `url_title`) and custom variables by variable ID (e.g. `field_id_65`). The `first()` gets a single value, leave this off and you get an object with all matching entries.

```
$entry = ee('Model')->get('ChannelEntry')->filter('url_title', $your_url_title)
                    ->first();
$entry_id_of_found = $entry->entry_id; // get a value
$entry->$field_id_65 = "some text about cats liking chicken"; // set a value
$entry->save(); // write changes back to EE database

```

HTH

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


title: Upgrading EE from 2.5.5 to current

text:
# Question
Title: Upgrading EE from 2.5.5 to current
I'm upgrading my client's website from EE 2.5.5 to bring it up to current spec. I'm at the first stage, going from 2.5.5 to 2.11.9. The site has a number of modules, including CartThrob (currently 2.1.4). (It's all very old, I know.)

After running the EE upgrade, at the end of the installation wizard process I get an error message, and visiting the admin page I now get the following:

A PHP Error was encountered Severity: Notice

Message: Undefined property: Wizard::$functions

Filename: english/cartthrob\_lang.php

Line Number: 650

Fatal error: Call to a member function insert\_action\_ids() on null in /path/to/system/expressionengine/third\_party/cartthrob/language/english/cartthrob\_lang.php on line 650

(server path hidden by me!)

Is this a basic incompatibility between the current version of CT and EE 2.11.9, so I'd need to upgrade CT before upgrading EE, or is there something else going on?

Also is there any general advice about upgrading EE and modules? Should the modules be upgraded first or does EE go first? I've searched the documentation and not found a clear answer.

Any help appreciated.

Cheers,

Crac

# Answer
> 0 votes
Check directly with add-on vendors for compatibility but most addons can be converted easlily.

ExpressionEngine 3 compatible third-party add-ons should be copied into the system/user/addons/ directory **before upgrading**.

Non compatible add-ons that you will not be using in v3 must be uninstalled and refactored out of your site **before upgrading**. ExpressionEngine 3 will not be able to run incompatible code to uninstall those add-ons after upgrading.

Upgrading from ExpressionEngine 2

---
Tags: ee2, cartthrob, upgrade, ee2-upgrades
---


# Question
Title: Anyone with PHP skills interested in updating an add-on for EE 5?
Obscure, (see files on GitHub), encodes all content between the tags {exp:obscure}{/exp:obscure} similar to the way the {encode} tag for email works in ExpressionEngine. Add-on provides additional flexibility by allowing you to include other elements or images within the tag. For example:

```
<li>
  {exp:obscure}
    <a href="mailto:megan@netraising.com?subject=I can fix Obscure Add-On">
      <img src="...envelope-icon.svg" alt="Email Megan" />
    </a>
   {/exp:obscure}
</li>

```

Currently this add-on only works in EE version 2 & 3. ☹

Are there any PHP-savvy folks out there interested in updating this code so it works in ExpressionEngine 5?

# Answer
The update is waiting for you. You can take it in my fork or approved push request which I did for your repo.

p.s. I will do some extra updates this evening because I can see that some unsafe method using - like **$\_POST**
> 1 votes

---
Tags: add-on-development, email, spam, encode
---


# Question
Title: AJAX In Cart Page Returning Odd HTML Instead Of Data Object
EE 5.2.6

This is a very strange problem.

I have a class that I'm using to query the Amazon Product Advertising API and return data via AJAX.

I have category pages and product pages where the jQuery and PHP class are working just perfectly, meaning a user is able to click a button and the class processes data through the Amazon API (to update cart) and returns data that changes values on the frontend.

* click 'add to cart'
* ajax call runs php function (using ACTion id) that sets up and modifies a cart on Amazon
* json is returned pertaining to elements that need to be changed on the frontend

This is all working perfectly *EXCEPT* when you get to the cart page.

On the cart page the cart items are showing just fine, but when you attempt to modify or remove an item from the cart ON THIS PAGE ONLY, instead of processing the data and returning a json object, it is not even reaching the class and is returning html with some random table.

This code and these templates are something I copied over almost exactly from a production server, and on that site everything is working perfectly. No problems at all.

Do you have any idea why I'm getting some strange html with a table in it instead of running the class methods that my add-on is supposed to run (and does run on another site)?

I feel like it has something to do with EE but I'm not sure and wanted to check with the fine community here before trying to debug it further.

Thanks!

# Answer
This was not an issue with EE. I have since fixed the problem which had to do with action URL and SSL.
> 0 votes

---
Tags: add-on-development, ajax, shopping-cart, json, addons
---


# Question
Title: Error Number: 1052 Column 'entry_date' in where clause is ambiguous
I've recently upgraded an ee2.5.3 site build up to ee2.11.9 (ready for further EE3.5x upgrade).

The site also has an existing CartThrob 2.5 installation upgraded to 2.7.1 along with an existing custom plugin called: pi.cc\_marketplace.php.

When the plugin runs (ie. the plugin activates when a site user has products in the site basket etc) I'm getting the following database error (from the custom plugin code) ie.

```
Error Number: 1052 Column 'entry_date' in where clause is ambiguous

select sum(quantity) as quantity_available from ( select -coalesce(sum(quantity),0) as quantity from exp_channel_titles as order_titles join exp_cartthrob_order_items as order_items on sm.order_items.order_id = sm.order_titles.entry_id where status = "Processing" and channel_id = 6 and entry_date > unix_timestamp(date_sub(now(), interval 30 minute)) and sm.order_items.entry_id = 31500 union select field_id_369 as quantity from exp_channel_data where entry_id = 31500 ) as quantity

Filename: third_party/cc_marketplace/pi.cc_marketplace.php

Line Number: 93

```

For clarity I have provided the actual PHP class (with the problematic SQL query code) from the pi.cc\_marketplace.php plugin as per below:

```
public function _get_quantity_available($entry_id){
        $order_id = $this->EE->cartthrob->cart->order("order_id");
        $order_id_sql = "";
        if (isset($order_id) && $order_id != ""){
            // In case the user goes back to the checkout process after leaving for the gateway
            $order_id_sql = " and order_titles.entry_id != $order_id";
        }
        $field_ids = $this->get_channel_field_ids();
        $sql = <<<EOF
    select sum(quantity) as quantity_available
    from (
        select
            -coalesce(sum(quantity),0) as quantity
        from exp_channel_titles as order_titles
        join exp_cartthrob_order_items as order_items on order_items.order_id = order_titles.entry_id
        where
        status = "Processing"
        and channel_id = 6
        and entry_date > unix_timestamp(date_sub(now(), interval 30 minute))
        and order_items.entry_id = $entry_id
        $order_id_sql
    union
        select
            field_id_${field_ids["cc_mp_product_quantity_available"]} as quantity
        from exp_channel_data
        where entry_id = $entry_id
    ) as quantity
EOF;
        $res = $this->EE->db->query($sql);
        $res = $res->row();
        return $res->quantity_available;
    }

```

I've seen some similar posts on here regarding the '**Error Number: 1052 Column 'xxx' in where clause is ambiguous**' error but the example issues don't quite match the issue I have here.

Can anyone help with the above?

Many thanks in advance.

Regards

Karl

# Answer
> 1 votes
It is a little bit weird because only *exp\_channel\_titles* should have entry\_date column, but try to change your SQL code this way (**entry\_date** replace with **order\_titles.entry\_date**):

```
select sum(quantity) as quantity_available
from (
    select
        -coalesce(sum(quantity),0) as quantity
    from exp_channel_titles as order_titles
    join exp_cartthrob_order_items as order_items on order_items.order_id = order_titles.entry_id
    where
    status = "Processing"
    and channel_id = 6
    and order_titles.entry_date > unix_timestamp(date_sub(now(), interval 30 minute))
    and order_items.entry_id = $entry_id
    $order_id_sql
union
    select
        field_id_${field_ids["cc_mp_product_quantity_available"]} as quantity
    from exp_channel_data
    where entry_id = $entry_id
) as quantity

```

EOF;

---
Tags: cartthrob, plugin
---


title: Is There Any Way to Upgrade From 1.7.3?

text:
# Question
Title: Is There Any Way to Upgrade From 1.7.3?
So I've been a bad web master and have been using EE 1.7.3 since 1.7.3 was the new hotness. I never upgraded to 2 once it became paid, nor did I update to Core. As can be expected, this is now causing problems with PHP versions and so on. So I backed up my entire website and grabbed the latest version of EE, only to find that if you're upgrading pre-3 you need to do it manually from 2.

The problem is, I cannot find a version of EE 2 anywhere to download. My original plan was to try and go from version to version so I could do a steady upgrade, but that doesn't seem to be a viable option. Are there any instructions out there on how I should go about this upgrade? I know I can't hold off forever, but I really don't want to have to start over, either.

# Answer
> 2 votes
You can get a version of EE 2 from here:

https://github.com/ExpressionEngine/ExpressionEngine/tree/2.10.1

Although it is not the most updated version of EE2 (which is 2.11.9), you can use that to update far enough that an EE5 version can pick up from there.

How to upgrade EE from such an old version is tough; I've only done 2.x to latest release, never 1.x. I answered another question where I put down thoughts and notes on upgrading from EE2 to EE5 here, which may be useful to you:

Upgrade a site from EE2 to EE5

---
Tags: upgrade, ee1
---


title: EE Search Categories

text:
# Question
Title: EE Search Categories
EE 5.2.6

Is there any way to use the simple or advanced search forms native to EE to search categories as well as channels?

I see that there's a category parameter but I'm not really sure what is the point of it.

I'm not really looking for anything fancy, just wondering of categories can be queried in the native search functionality.

Thanks!

# Answer
You can't search categories using inbuilt search. The advanced search form uses categories so you can refine your search query, i.e. search for keyword "blue" in the "products" category.

If you specifically needed to search category data then you'll need a 3rd party addon such as https://gotolow.com/addons/low-search
> 0 votes

---
Tags: search, tags, simple-search
---


title: How to get thumbnail URL from RSS feed

text:
# Question
Title: How to get thumbnail URL from RSS feed
This script was working in Expression Engine V2 but isn't at version 5. Can someone tell me how to get the thumnail URL of this rss feed?

Other info is already working..

```
{exp:rss_parser url="https://nieuws.optima.nl/rss" limit="1" refresh="720"}
{media:thumbnail@url} (<-- this is not working)
{/exp:rss_parser}

```

# Answer
The native RSS parser plugin only has limited functionality so won't work for that. Use https://brandnewbox.co.uk/products/details/feed\_parser instead as it has support for any XML element.
> 0 votes

---
Tags: ee5, rss
---


# Question
Title: Low Title: unable to get custom field to output
I'm trying to get a custom field to output using Low Title on an EE5 site and I'm not able to get it working. I'm trying this:

```
{exp:low_title:entry entry_id="122" custom_field="{field_short_name}"}

```

Also this:

```
{exp:low_title:entry url_title="main" custom_field="{field_short_name}" channel="channel_name"}

```

...where "main" is the URL title of the entry I want. But I keep just getting the actual title of the entry instead of the custom field.

Any idea what I'm missing? When I set "show\_error" to yes, I get an error that the custom field is not found.

# Answer
> 0 votes
**custom\_field** should have a short name of the custom field to return instead of the title. Based on your code, it looks like you trying to get this short name from some variable *{field\_short\_name}*. Is it correct?

In this case, the issue could be in parsing order. Mean that when the parser executed low\_title:entry tag your variable is not processed yet and parameter don't have a correct fieldname. Needs to see a whole code for this.

p.s. if field\_short\_name is not variable but the real short name(happened) - remove **{ }**

---
Tags: custom-fields, low
---


title: How do I keep from getting logged out?

text:
# Question
Title: How do I keep from getting logged out?
I am running EE 5.2.6 and I have repeated issues with getting logged out of the control panel when I am in the middle of working on an entry.

This issue happens so frequently I filed a Bug Report https://github.com/ExpressionEngine/ExpressionEngine/issues/286.

Derek said that the problem was not reproducible, yet I can reproduce it virtually every time I create an entry. I have set the site time zone in ExpressionEngine according to my local time zone. My computer is a Mac and the time is set automatically, so technically they should be in sync.

According to Derek, the control panel should not log out until after an hour of inactivity, yet I can be in the middle of a lengthy entry and suddenly without warning get logged out, losing all changes. I have turned revisions on, but they do not save regular enough to be of any use. I had three versions of today’s entry all from 4:06 pm. I was logged out at 5:00 pm losing all edits to the very lengthy entry.

I am happy to make any changes to my configuration - see image - if I can just get this problem solved. I would love to hear from anyone that has a functioning configuration.

# Answer
> 1 votes
Set the CP session type to 'Cookies only' tick the 'remember me' checkbox on login and that should keep you logged in the CP.

Try adding these values to your config, creating a prefix can sometimes help with being booted from the CP:

```
$config['cookie_domain'] = "";
$config['cookie_path'] = "";
$config['cookie_prefix'] = "myprefix";

```

You might also find this config line useful too, especially if you have trouble logging-in

```
$config['secure_forms'] = "n";

```

Also you can try adding some timing settings to the config too:

```
$config['cp_session_ttl'] = 14400;
$config['user_session_ttl'] = 3600;

```

---
Tags: control-panel
---


title: Control Panel Login - Form has expired

text:
# Question
Title: Control Panel Login - Form has expired
I'm running the latest version of EE (v5) but when trying to login to the control panel, I keep getting a form expired message - "Error: This form has expired. Please refresh and try again."

This is happening on all computers and all browsers apart from my work computer. That's the only one I can still login on.

Any ideas on how to solve this issue would be hugely appreciated as we're putting this website live in a week's time! Cheers in advance!

# Answer
> 0 votes
Did you recently move this from a temporary or staging environment?

When I have run into this, it is down to the existing cookies from a previous login interfering with new ones.

Try setting the control panel to 'Session ID only' and see if that helps to get you logged-in.

Failing that you could try adding this to your config:

```
$config['disable_csrf_protection'] = "y";

```

But remove it once you can login again as you don't want to leave csrf\_protection switched off

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


title: No Site Url in Password Reset Email

text:
# Question
Title: No Site Url in Password Reset Email
EE 5.2.2 hosted on Digital Ocean provisioned by Forge

When requesting a password reset the email is recieved but the url is missing the domain and is not clickable.

```
To reset your password, please go to the following page:

?S=0&D=cp&C=login&M=reset_password&resetcode=PtwbN4zP

```

Default base URL is set correctly `https://domain.com/`

Please advise

# Answer
> 0 votes
In the URL and path settings page check the setting 'Control panel directory URL location of your control panel' as that controls the URL in the password reset email.

Setting it to something like {base\_url}your-admin.php should do the trick

---
Tags: forgot-password
---


# Question
Title: Channel Form / Transcribe Required Field Error
We have the following issue:

**Description of the problem** We have a channel form script that submitted correct in ee3.5.8, but upon upgrade to ee5.2.6 we now get a required field error.

Transcribe module is installed, we have tried completely disabling the module and the error persists.

**Error Messages** With JSON parameter set to 'yes' (in the channel form script and with the assigned Ajax script disabled) we get:

```

{"success":0,"errors":[],"field_errors":{"transcribe__transcribe_language":"This field is required."},"entry_id":3390,"url_title":"2stabilise-as","channel_id":4}

```

With JSON parameter set to 'no' (in the channel form script) we get:

```

The form you submitted contained the following errors

    Language Association: This field is required.

```

**Environment Details:** \- Version: 5.2.6 \- PHP Version 7.0.33 \- MySQL Version 5.6 \- OS: macOS \- Web Server: Apache

**Template Code**

The channel form code:

```

{exp:channel:form channel="directory"
    return = "members/profile/updated"
    entry_id = "3390"
    json = "no"
    id = "cform"
    class="form-horizontal"
    include_jquery="no"
    include_assets="no"
}

    <div class="form-group has-feedback">
        <label for="title" class="col-sm-2 control-label">Company</label>
        <div class="col-sm-10">
        {if "{embed:is_admin}"=="true"}
            <input type="text" name="title" id="title" value="{title}" size="50" maxlength="100" class="form-control input-lg">
        {if:else}
            <input type="text" value="{title}" class="form-control input-lg" disabled>
            <span class="text-muted glyphicon glyphicon-lock form-control-feedback" aria-hidden="true"></span>
        {/if}
        </div>
    </div>

    <div class="form-group has-feedback">
        <label for="url_title" class="col-sm-2 control-label"><a href="{path="members/details"}/{url_title}" target="_blank" title="See your directory listing…"><span class="fa fa-external-link"></span> Link</a></label>
        <div class="col-sm-10">
        {if "{embed:is_admin}"=="true"}
            <div class="input-group">
                <span class="input-group-addon" id="basic-addon3">{path="members/details"}</span>
                <input type="text" name="url_title" id="url_title" value="{url_title}" maxlength="75" size="50" class="form-control">
            </div>
        {if:else}
            <div class="input-group">
                <span class="input-group-addon" id="basic-addon3">{path="members/details"}/</span>
                <input type="text" disabled value="{url_title}" class="form-control">
                <span class="text-muted glyphicon glyphicon-lock form-control-feedback" aria-hidden="true"></span>
            </div>
        {/if}
        </div>
        <div class="col-sm-10 col-sm-offset-2">
            <p class="help-block"></p>
        </div>
    </div>

    <div class="form-group">
        <label for="member_email" class="col-sm-2 control-label">Company Website</label>
        <div class="col-sm-10">
            <input class="form-control input-lg" name="member_url" id="member_url" value="{member_url}">
        </div>
    </div>

    <div class="form-group">
        <label for="member_email" class="col-sm-2 control-label">Email</label>
        <div class="col-sm-10">
            <input class="form-control input-lg" name="member_email" id="member_email" value="{member_email}">
        </div>
    </div>

    <div class="form-group has-feedback">
        <label for="technical_authority" class="col-sm-2 control-label">Technical Authority</label>
        <div class="col-sm-10">
        {if "{embed:is_admin}"=="true"}
                <input type="text" name="technical_authority" id="technical_authority" value="{technical_authority}" class="form-control input-lg">
        {if:else}
            <div class="input-group">
                <input type="text" disabled value="{technical_authority}" class="form-control input-lg">
                <span class="text-muted glyphicon glyphicon-lock form-control-feedback" aria-hidden="true"></span>
            </div>
        {/if}
        </div>
        <div class="col-sm-10 col-sm-offset-2">
            <p class="help-block">The name of the Technical Authority</p>
        </div>
    </div>

<fieldset{if "{embed:is_admin}" == "false"} disabled{/if}>
    <legend>{exp:transcribe:translate name="address"}Address{/exp:transcribe:translate}:</legend>
    <div class="form-group has-feedback">
        <label for="member_address_1" class="col-sm-2 control-label">Line 1</label>
        <div class="col-sm-10">
        {if "{embed:is_admin}"=="true"}
            <input type="text" class="form-control" name="member_address_1" id="member_address_1" value="{member_address_1}">
        {if:else}
            <input type="text" class="form-control" diabled placeholder="{member_address_1}">
            <span class="text-muted glyphicon glyphicon-lock form-control-feedback" aria-hidden="true"></span>
        {/if}
        </div>
    </div>

    <div class="form-group has-feedback">
        <label for="member_address_2" class="col-sm-2 control-label">Line 2</label>
        <div class="col-sm-10">
        {if "{embed:is_admin}"=="true"}
            <input type="text" class="form-control" name="member_address_2" id="member_address_2" value="{member_address_2}">
        {if:else}
            <input type="text" class="form-control" diabled placeholder="{member_address_2}">
            <span class="text-muted glyphicon glyphicon-lock form-control-feedback" aria-hidden="true"></span>
        {/if}
        </div>
    </div>

    <div class="form-group has-feedback">
        <label for="member_address_3" class="col-sm-2 control-label">Line 3</label>
        <div class="col-sm-10">
        {if "{embed:is_admin}"=="true"}
            <input type="text" class="form-control" name="member_address_3" id="member_address_3" value="{member_address_3}">
        {if:else}
            <input type="text" class="form-control" diabled placeholder="{member_address_3}">
            <span class="text-muted glyphicon glyphicon-lock form-control-feedback" aria-hidden="true"></span>
        {/if}
        </div>
    </div>

    <div class="form-group has-feedback">
        <label for="member_address_4" class="col-sm-2 control-label">Line 4</label>
        <div class="col-sm-10">
        {if "{embed:is_admin}"=="true"}
            <input type="text" class="form-control" name="member_address_4" id="member_address_4" value="{member_address_4}">
        {if:else}
            <input type="text" class="form-control" diabled placeholder="{member_address_4}">
            <span class="text-muted glyphicon glyphicon-lock form-control-feedback" aria-hidden="true"></span>
        {/if}
        </div>
    </div>

    <div class="form-group has-feedback">
        <label for="member_address_city" class="col-sm-2 control-label">City</label>
        <div class="col-sm-10">
        {if "{embed:is_admin}"=="true"}
            <input type="text" class="form-control" name="member_address_city" id="member_address_city" value="{member_address_city}">
        {if:else}
            <input type="text" class="form-control" diabled placeholder="{member_address_city}">
            <span class="text-muted glyphicon glyphicon-lock form-control-feedback" aria-hidden="true"></span>
        {/if}
        </div>
    </div>

    <div class="form-group has-feedback">
        <label for="member_address_county" class="col-sm-2 control-label">County</label>
        <div class="col-sm-10">
        {if "{embed:is_admin}"=="true"}
            <input type="text" class="form-control" name="member_address_county" id="member_address_county" value="{member_address_county}">
        {if:else}
            <input type="text" class="form-control" diabled placeholder="{member_address_county}">
            <span class="text-muted glyphicon glyphicon-lock form-control-feedback" aria-hidden="true"></span>
        {/if}
        </div>
    </div>

    <div class="form-group has-feedback">
        <label for="member_country" class="col-sm-2 control-label">Country</label>
        <div class="col-sm-10">
        {if "{embed:is_admin}"=="true"}
            {exp:reegion_select:countries name="member_country" id="member_country" selected="{member_country}{region_alpha2}{/member_country}" class="form-control" type="alpha2"}
        {if:else}
            <input type="text" class="form-control" diabled placeholder="{member_country}{region_name}{/member_country}">
            <span class="text-muted glyphicon glyphicon-lock form-control-feedback" aria-hidden="true"></span>
        {/if}
        </div>
    </div>
</fieldset>

    <div class="form-group">
        <label for="member_map" class="col-sm-2 control-label">Map</label>
        <div class="col-sm-10">
            {!--field:member_map--}
            <div id="map" style="width:100%;height:16em"></div>
            <input name="member_map" id="member_map" value="{member_map}" type="hidden">
            <input id="places_search" class="form-control" placeholder="Town/City Zoom">
        </div>
    </div>

    <div class="form-group" style="padding:0 15px">
        <label for="member_description">Description</label>
        {field:member_description}
        {!--
        <div class="tinymce" name="member_description" id="member_description">{member_description}</div>
        --}
    </div>

{!--

    <div class="form-group has-feedback">
        <label for="member_image" class="col-sm-2 control-label">Logo/Image</label>

        <div class="col-sm-10">
            <p class="help-block"></p>
            <span class="glyphicon glyphicon-warning-sign hidden form-control-feedback" aria-hidden="true"></span>

{member_image}File name: {file_name}{/member_image}
<input type="file" name="member_image" class="form-control" />
<input type="hidden" name="member_image_hidden_file" value="{member_image}{file_name}{/member_image}" />
            <div class="input-group">
                <span class="input-group-btn">
                    <span class="btn btn-primary btn-file">Browse…
                        <input type="file" name="member_image" id="member_image">
                    </span>
                </span>
                <input id="member_image_hidden_file" type="text" readonly name="member_image_hidden_file" class="form-control" value="{member_image}{file_name}{/member_image}">
            </div><!-- /input-group -->

            <button id="remove-img" type="button" class="close{if !member_image} hidden{/if}" aria-label="Close">
            <span aria-hidden="true">×</span></button>

            <span id="list">
            {if !member_image}Select a file to upload
            {if:else}
                {member_image}<label for="member_image"><img class="thumb img-responsive" src="{url}" title="{file_name}"></label>{/member_image}
            {/if}
            </span>
            <input type="hidden" name="member_image_directory" value="9">
        </div>
    </div>
--}

    <div class="form-group">
        <div class="col-sm-6">
            <label class="control-label" for="categories_1" >Services</label>
            <select name="category[]" id="categories_1" multiple class="form-control selectpicker">
            {categories show_group="2"}
              <option value="{category_id}"{selected}>{category_name}</option>
            {/categories}
            </select>
        </div>
        <div class="col-sm-6">
        {if "{embed:is_admin}"=="true"}
            <label class="control-label" for="categories_2">Region</label>
            <select name="category[]" id="categories_2" multiple class="form-control selectpicker">
            {categories show_group="3"}
              <option value="{category_id}"{selected}>{category_name}</option>
            {/categories}
            </select>
        {if:else}
            <label class="control-label">Region <span class="text-muted glyphicon glyphicon-lock"></span></label>
            <input type="text" value="{categories show_group='3' backspace='6'}{if selected}{category_name}, {/if}{/categories}" class="form-control input-lg" disabled>
        {!-- DANGER. only hidden by css! --}
            <select name="category[]" multiple="multiple" class="hidden">
            {categories show_group="3"}
            <option value="{category_id}"{selected}>{!--category_name--}</option>
            {/categories}
            </select>
        {/if}
        </div>
    </div>

    {if in_group_1_6}
    <hr>
    <div class="col-sm-8 col-sm-offset-2">
        <div class="well bg-danger">
            <h4>Admin Only <span class="fa fa-lock"></span></h4>
            <div class="form-group">
                <div class="col-sm-12">
                    <label class="control-label" for="categories_3" >Type</label>
                    <select name="category[]" id="categories_3" multiple
                     class="form-control selectpicker">
                    {categories show_group="1"}
                    <option value="{category_id}"{selected}>{category_name}</option>
                    {/categories}
                    </select>

{!-- ADDS RAC CATEGORY GROUP --}
                    <label class="control-label" for="categories_3b" >RAC</label>
                    <select name="category[]" id="categories_3b" class="form-control selectpicker">
                    {categories show_group="15"}
                    <option value="{category_id}"{selected}>{category_name}</option>
                    {/categories}
                    </select>

                </div>
            </div>
        </div>
    </div>
    {if:else}
        {!-- DANGER. only hidden by css! --}
        <select name="category[]" multiple="multiple" class="hidden">
        {categories show_group="1"}
        <option value="{category_id}"{selected}>{!--category_name--}</option>
        {/categories}
        </select>
    {/if}

    <div class="form-group">
        <div class="col-sm-9">
            <div id="success" class="alert alert-success alert-dismissible hidden" role="alert" data-hide="3000">
                <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>
                <strong>Success!</strong> This directory entry has been updated. <span class="glyphicon glyphicon-ok"></span>
            </div>
            <div id="error" class="alert alert-danger alert-dismissible hidden" role="alert" data-hide="3000">
                <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>
                <span class="message"></span>
            </div>
        </div>
        <div class="col-sm-3">
            <button type="submit" class="btn btn-lg btn-primary pull-right">Update</button>
        </div>
    </div>

{/exp:channel:form}

```

Anyone have any ideas on this?

Many thanks in advance :-)

Kind Regards

Karl

# Answer
If you make a hidden field called transcribe\__transcribe\_language and set it to {transcribe:language\_abbreviation}

Or you can try to add: transcribe="disable" to your channel form tag
> 1 votes

---
Tags: safecracker, transcribe
---


title: URL title required - channel form

text:
# Question
Title: URL title required - channel form
Any idea why if i have french characters for name et first name (First letter only) i got :URL title is required error?

If name or first name start with ÉÀÖ etc.. My channel form contain .. dynamic\_title='{current\_time format="%Y%m%d%H"}-\[last\_name\]\_\[first\_name\]-\[date\_de\_naissance\]' ( at first i put last\_name and first\_name at the beginning then i tried like this (time in first position).. but still no luck!

EDIT : After few tests the problem occur with any capital letter anywhere in the word, not only the first letter..

# Answer
> 1 votes
Marked as : bug accepted on github... https://github.com/ExpressionEngine/ExpressionEngine/issues/315

---
Tags: safecracker
---


title: Wrong Domain When Resetting Password

text:
# Question
Title: Wrong Domain When Resetting Password
I moved my EE install from the test server to the live server but when I’m trying to reset the password at site.com/system/index.php the email I get has the domain for the old server under:

> To reset your password, please go to the following page: http://olddomain.com/admin.php?D=cp&C=login&M=reset\_password&id=0n6xTd0m

How do I fix this so it points to the new domain? I already replaced all instances of the old domain in the database file, so not sure where this would be changed

# Answer
Have you updated your config file?

```
$config['base_url']   = '';
$config['index_page'] = '';

```
> 0 votes

# Answer
In the URL and path settings page check the setting 'Control panel directory URL' as that controls the URL in the password reset email.
> 0 votes

---
Tags: login, password, forgot-password
---


title: SuperSearch Install Error

text:
# Question
Title: SuperSearch Install Error
EE 5.2.6

I'm trying to install the SuperSearch module and I'm getting an error.

`SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes:`

I'm not sure if this is a mysql setting or something I can change in a config file somewhere. I'm not experienced with this aspect of development at all.

In any case, if someone has an idea how to proceed on this I would really appreciate it.

Thanks.

# Answer
> 2 votes
SuperSearch has been obsolete for quite sometime (didn't make it past v2) and will not run on newer versions of EE. Try Low Search.

---
Tags: error, supersearch, mysql, ee5, database-error
---


# Question
Title: EE2 White screen on front end and not on admin after letsencrypt install attempt
I have a git repo with an expressionengine 2 site we are trying to test on newer versions of php so as to upgrade it. My colleague tried to set up letsencrypt on it last night and made some change to apache, and probably not to any code: I came in after him and restored from git so all the files are as before, but the apache config has changed, and possibly other things relating to ssl. Can anyone explain how I can step through the code to see where the error is happening, or if it's something else? I managed to step through until I got to codeigniter/core/CodeIgniter but from there I am not sure what is happening.. If you know what files are run in succession each time EE 2 loads, it'd save me a lot of time debugging and I'd be really grateful!

# Answer
> 0 votes
The first thing I would do is disable extensions in the config.php file. Then force on error reporting in the index.php . What version of php are you running? v2+ will fail on later versions pf php, primarily v7+ If the page loads with extensions disabled, then an extension is causing this. then disable each extension in the CP, remove the config variable, then turn them back on one by one until you get the WSOD, then you'll know which extension to address. To upgrade all the way to v5, you need to upgrade to v3 on a php5.3+ server, then move to a server with php7+ to finish the upgrade. It's not an easy process by any stretch.

---
Tags: ee2, white-screen-of-death
---


# Question
Title: Deprecated Error shows up in header on website running 4.0.3
Running 4.0.3

After entering a new "News" item this is displayed on the site. It remains even though I deleted the News item. ttps://prnt.sc/pe2ppt

```
Deprecated The each () function is deprecated. This message will be suppressed on further calls.
Severity: E_Deprecated
Warning
Cannot modify header information - headers already sent by (output started atee/legacy/core/Exceptions.php:111)

```

It also said there is a newer version but when I upgrade I get this Message https://prnt.sc/pe2r05

Thank you for your help.

# Answer
To solve error of `each()` function is deprecated you need to try `foreach` loop.

```
foreach($data as $key => $value) {
    //your code
}

```

This will solve your problem.
> 0 votes

---
Tags: upgrade
---


# Question
Title: Error message after upgrading to 3.5.17 (from 2.11.9)
```
You must define the following database parameters: database
ee/EllisLab/ExpressionEngine/Service/Database/DBConfig.php:157

Stack Trace:
        #0 ee/EllisLab/ExpressionEngine/Service/Database/Database.php(151): EllisLab\ExpressionEngine\Service\Database\DBConfig->getGroupConfig()
        #1 ee/EllisLab/ExpressionEngine/Service/Database/Database.php(84): EllisLab\ExpressionEngine\Service\Database\Database->newConnection()
        #2 ee/EllisLab/ExpressionEngine/Service/Database/Database.php(51): EllisLab\ExpressionEngine\Service\Database\Database->getConnection()
        #3 ee/legacy/database/DB.php(48): EllisLab\ExpressionEngine\Service\Database\Database->newQuery()
        #4 ee/legacy/core/Loader.php(381): DB('')
        #5 ee/legacy/libraries/Core.php(107): EE_Loader->database()
        #6 ee/legacy/core/Controller.php(88): EE_Core->bootstrap()
        #7 ee/legacy/core/Controller.php(119): EE_Controller->__construct()
        #8 ee/EllisLab/ExpressionEngine/Core/Core.php(187): CP_Controller->__construct()
        #9 ee/EllisLab/ExpressionEngine/Core/Core.php(94): EllisLab\ExpressionEngine\Core\Core->runController(Array)
        #10 ee/EllisLab/ExpressionEngine/Boot/boot.php(151): EllisLab\ExpressionEngine\Core\Core->run(Object(EllisLab\ExpressionEngine\Core\Request))
        #11 admin.php(143): require_once('...')

```

# Answer
Are you absolutely sure you have your DB settings correct in your `config.php` file? They should have this format in that file:

```
$config['database'] = array (
    'expressionengine' =>
        array (
            'hostname' => '',
            'username' => '',
            'password' => '',
            'database' => ''
        ),
);

```

Obviously, fill in the values with your credentials. `database` should have the name of your schema you installed EE to.
> 1 votes

---
Tags: ee3, php-errors, update, parameters
---


# Question
Title: Allow EE Code add-on: work also with email template?
https://expressionengine.com/add-ons/allow-ee-code

Besides channel entries, can this add in used also fir system email template?

# Answer
> 0 votes
The system message templates (to generate error messages and system emails) use a different approach to rendering and these do not currently behave much like normal templates - for example there are only a few built-in tags that work within them, and third-party add-ons are not supported.

Until such times as EE changes this, if you want to have more complete control over your system messages you should check out **Custom System Messages** an ad-on which might give you what you are looking for.

HTH

---
Tags: email
---


title: Account activation by non-admin user

text:
# Question
Title: Account activation by non-admin user
When it comes to Account activation type (cp/settings/members) I have opted for “Manually moderated by administrator ” Is there any way to grant this right to non-admin user?

I don’t see the possibility to list this right in Member Group policy. Any hook or add-ons that do the work?

Thanks Enrico

# Answer
> 0 votes
Yes, member groups can be allowed to edit other members and other member groups.

Edit the member group you wish to allow access to member authority; the CP URL looks like this:

```
/cp/members/groups/edit/{member_group_id}

```

In the settings for this member group, you can allow access to the members area and authority to modify member and member groups. See the attached image. If you allow a member group to `Edit members`, they should be able to activate/deactivate/whatever you need.

---
Tags: accounts
---


# Question
Title: Create new template in Discussion Forum theme
I am working on customizing the theme of EE Discussion Forum and some of pages need to add/remove sections. For which I would like to create new template and include within appropriate template like `{include:html_header}`.

But when I am including the new created template, getting the error message like "Page not available".

Can anyone please suggest me if its possible. If possible, how can I achieve it.

Thanks

# Answer
> 1 votes
Several years ago, the EllisLab staff posted something about having a replacement for the hilariously outdated forum package that EE ships with. Then EE4 came out.... then EE5 came out.... then EllisLab was acquired.... and we've not heard of it since. I suspect it is dead, and never to see the light of day. :(

# Answer
> 0 votes
You can add your custom templates in Discussion forum by customizing the core files of plugin. But it becomes very lengthy process.

---
Tags: forum
---


# Question
Title: Default language not working with email confirmation message
Even if the default language is set in portuguese in the Control Panel, when a member receives an account activation email and click on it, the success message appears in english.

The member receives in his email box the activation link:

```
https://www.mysite.com/?ACT=190&id=SZMyPGQEmG

```

**Once clicked an english message appears (normally should be in portuguese, because all the text are translated in this language):**

For this kind of email box the activation link, **the default language setting (portuguese) is not applied**. To be in portuguese i have to translate this file:

```
system\ee\legacy\language\english\member_lang.php

```

Is there a configuration in the Control Panel, or a System Configuration Overrides to insert inside config.php file, to activate the language setting about activation messages?

# Answer
Are you saying the language pack installed isn't loading that lang file and is instead defaulting to English? I think this is the file and pack you need:

https://github.com/EllisLab/EE-Language-Brazilian-Portuguese/blob/master/system/user/language/pt-br/member\_lang.php

Make sure to set the installed pack as the default language:

https://docs.expressionengine.com/latest/general/languages.html#installing-a-language-pack

https://docs.expressionengine.com/latest/general/languages.html#setting-the-default-language
> 0 votes

---
Tags: email, language, activation
---


title: Mass upload of images?

text:
# Question
Title: Mass upload of images?
I am new to EE and I am only using a free version of EE 3.3. Nevertheless, I have noticed that you can only upload one image at a time for the file manager. Is any other way to create a drag and drop with EE's file manager?

# Answer
I think a lot of people use Assets, I believe Channel Images would also work for you. If you're using EE3 this is the Channel Images link. I don't believe Assets is finished for EE3 just yet.
> 0 votes

# Answer
There are two ways to solve this:

1. The official way is to FTP files directly into your upload directory on the server, the synchronize. In your Upload Directory settings, you should see that synchronize link somewhere.

This method, however, can be unnecessarily timely if you have thousands of files in a directory, and you only want to add, say, 10.

2. My custom hack has been to create a channel, Mass Uploads, and make one field in it of the "File Grid" type (EE5). Drag and drop to mass upload, then simply close the entry. Check File Manager and you'll see that your files are there.
> 0 votes

---
Tags: ee3, file-manager
---


title: Question on cart_cartthrob_cart table

text:
# Question
Title: Question on cart_cartthrob_cart table
Can anyone explain what the cart field is on this table - looks like some sort of either serialized or encrypted field.

# Answer
The field is an encrypted copy of an array containing the non-default items in the cart.

It is created by the `update_cart` function which is defined within the `Cart_model` class.

HTH
> 0 votes

---
Tags: cartthrob
---


# Question
Title: Channel Manager - Edit Channels - Blank page
I updated to EE 5.3.0 from 2.11.9 and cannot edit existing channels anymore.

There is only a blank page without any errors in the console. I can edit layouts or export but no page is opening to edit the channel.

The url looks like this: https://www.foo.ch/admin.php?/cp/channels/edit/12

Any idea? Thanks

# Answer
> 0 votes
Please try by adding `$config['debug'] = "1";` in your *config.php*. So, you can display errors and after that try to solve them. In most of the cases these errors are belonging from modules. So, you just need to upgrade the module to solve those module errors.

You can also try below code in your index.php file.

```
ini_set("display_errors", "1");
error_reporting(E_ALL);

```

---
Tags: channel, blank-screen
---


# Question
Title: Expresso Store Order Submission Validation Error Not Defining Which Field
EE 5.3.0

I have a cart with a checkout page. When I try to submit a test order using the dummy processor I'm getting this result

```
The form you submitted contained the following errors
- This field is required.
Return to Previous Page

```

In other words it's not specifying which field has the error so I don't know how I'm supposed to know what to fix. I previously had `error_handling=”inline”` in the tag with a series of `{error:field_name}` tags at the top of the form. That resulted in nothing so I removed the parameter and now it goes to the ugly built-in EE error page.

This is the first expresso store I've set up and I'm sure I'm leaving something out, but if anyone has any advice I would really appreciate it.

Thanks!

# Answer
Great working with you via our support email. Still working on the second half with the field name, but wanted to note here that the quote marks for the error handling need to be regular quotes, `"` vs of , in case anyone else is running into the same issue.
> 1 votes

---
Tags: expresso-store, forms, expresso, payment-gateway
---


# Question
Title: Using math with a channel entries variable to work out the height/width value to pass to CE Image
I've got a field that editors can add a number to which will make sure that images are all that width or height. The images are resized with CE Image.

I also want to be able to serve up different resolution versions of the image to be handled by `srcset`.

I thought I could do something like this:

```
        srcset="{exp:ce_img:single
                src='{url}'
                width='{width}'
                url_only='yes'} 1x,
                {exp:ce_img:single
                src='{url}'
                width='{exp:math formula='{width} * 2'}'
                url_only='yes'
                parse='inward'} 2x"

```

That does output a resized image, but the values are coming out wrong.

For instance, for a series of images where the width is set to 350, I'd expect the 2x value to be 750. Instead I'm getting:

```
  data-srcset="/assets/img/sized/assets/img/content/Image1_350_262_85.jpg,
        /assets/img/sized/assets/img/content/Image1_1187_890_85.jpg 2x"

  data-srcset="/assets/img/sized/assets/img/content/Image2_350_262_85.jpg,
        /assets/img/sized/assets/img/content/Image2_1187_890_85.jpg 2x"

  data-srcset="/assets/img/sized/assets/img/content/Image3_350_233_85.jpg,
        /assets/img/sized/assets/img/content/Image3_1335_890_85.jpg 2x"

  data-srcset="/assets/img/sized/assets/img/content/Image4_350_239_85.jpg,
        /assets/img/sized/assets/img/content/Image4_1301_890_85.jpg 2x"

  data-srcset="/assets/img/sized/assets/img/content/Image5_350_233_85.jpg,
        /assets/img/sized/assets/img/content/Image5_1409_939_85.jpg 2x"

```

i.e. the width values are a bit all over the place.

Anyone have any ideas about what might be going wrong or how to get the correct output?

# Answer
I think you have a conflict with plugin in a plugin. You could surely try to use pass="inward" on both math and ce image. However, maybe you're better of with an embed where you first get all the sizes and pass them to the embed that does the image generating. You'll get something like:

```
{exp:channel:entries}
{embed="embeds/get_images" the_url="{the_file_field}" the_first_width="{editor_set_width_field}" the_second_width="{exp:math formula='{editor_set_width_field} * 2'}"}
{/exp:channel:entries}

```

And the embed would be something like

```
srcset="{exp:ce_img:single
src='{embed:the_url}'
width='{embed:the_first_width}'
url_only='yes'} 1x,
{exp:ce_img:single
src='{embed:the_url}'
width='{embed:the_second_width}'
url_only='yes'} 2x"

```
> 1 votes

---
Tags: ce-image
---


# Question
Title: List entries which have no category assigned
Anyone know how to do this?

Obviously I can pass in a category ID into the channel loop to get entries within that specific category. But I'd like to get a list of all entries that don't currently have any categories assigned to them.

This purely requried as a reference, I've done a massive import and need to generate a working list so my editoiral guys can go in and categorise those entries which aren't assigned to anything.

# Answer
Something like this maybe? {exp:channel:entries category\_group="not 1|2|3|4"}
> 2 votes

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


# Question
Title: Smart Members Pro checkbox field not parsing in view profile tag
I recently purchased Smart Members Pro because I needed the checkbox functionality in custom member fields, among other features. I have the edit and view profile working just fine except where it relates to displaying data from a checkbox field. Radio buttons and all other custom member fields work fine but not checkboxes or multi-select.

This makes me think I have syntax wrong but the documentation mentions no special syntax for these fields. My question is does anyone else use this module and, if so, can you please help me with syntax to display a checkbox field in a member profile?

Here's an example. In this tag the field {allergy\_checkbox} doesn't parse and simply renders as text. All other custom member fields in the profile parse just fine.

```
{exp:smart_members:profile
member_id = ""
}

{allergy_checkbox}

{/exp:smart_members:profile}

```

# Answer
> 1 votes
For the benefit of anyone with the same question I have the correct code for displaying a checkbox or multi-select field. This information is not in the documentation as of Oct. 2019

```
{exp:smart_members:profile
member_id = ""
}

{allergy_checkbox}
{allergy_checkbox:value}
{/allergy_checkbox}

{/exp:smart_members:profile}

```

---
Tags: ee5
---


# Question
Title: Unable to edit any existing entries on EE2 to EE5 upgrade
**Description of the problem**

I have recently upgraded an EE2 to site up to EE5.3.0 and now I am getting PHP errors when trying to open \** any \** existing entry in the EE CP. The site has no third-party modules installed. Just the standard EE install with default modules etc.

**Error Messages**

```
Exception Caught
HEX color needs to be 6 or 3 digits long
ee/Mexitek/PHPColors/Color.php:41
Stack Trace: Please include when reporting this error
    •   #0 ee/EllisLab/ExpressionEngine/Model/Status/Status.php(116): Mexitek\PHPColors\Color->__construct('blue')
    •   #1 ee/EllisLab/ExpressionEngine/Model/Channel/ChannelEntry.php(1176): EllisLab\ExpressionEngine\Model\Status\Status->getOptionComponent()
    •   #2 [internal function]: EllisLab\ExpressionEngine\Model\Channel\ChannelEntry->populateStatus(Object(EllisLab\ExpressionEngine\Model\Content\FieldFacade))
    •   #3 ee/EllisLab/ExpressionEngine/Model/Content/FieldFacade.php(105): call_user_func(Array, Object(EllisLab\ExpressionEngine\Model\Content\FieldFacade))
    •   #4 ee/EllisLab/ExpressionEngine/Model/Content/FieldFacade.php(115): EllisLab\ExpressionEngine\Model\Content\FieldFacade->ensurePopulatedDefaults()
    •   #5 ee/EllisLab/ExpressionEngine/Model/Content/ContentModel.php(363): EllisLab\ExpressionEngine\Model\Content\FieldFacade->setData('closed')
    •   #6 ee/EllisLab/ExpressionEngine/Model/Content/ContentModel.php(404): EllisLab\ExpressionEngine\Model\Content\ContentModel->setDataOnCustomFields(Array)
    •   #7 ee/EllisLab/ExpressionEngine/Model/Content/ContentModel.php(315): EllisLab\ExpressionEngine\Model\Content\ContentModel->initializeCustomFields()
    •   #8 ee/EllisLab/ExpressionEngine/Model/Content/ContentModel.php(147): EllisLab\ExpressionEngine\Model\Content\ContentModel->usesCustomFields()
    •   #9 ee/EllisLab/ExpressionEngine/Model/Channel/ChannelEntry.php(657): EllisLab\ExpressionEngine\Model\Content\ContentModel->getCustomField('title')
    •   #10 ee/EllisLab/ExpressionEngine/Controller/Publish/Edit.php(517): EllisLab\ExpressionEngine\Model\Channel\ChannelEntry->getDisplay(Object(EllisLab\ExpressionEngine\Model\Channel\Display\DefaultChannelLayout))
    •   #11 [internal function]: EllisLab\ExpressionEngine\Controller\Publish\Edit->entry('505')
    •   #12 ee/EllisLab/ExpressionEngine/Core/Core.php(241): call_user_func_array(Array, Array)
    •   #13 ee/EllisLab/ExpressionEngine/Core/Core.php(110): EllisLab\ExpressionEngine\Core\Core->runController(Array)
    •   #14 ee/EllisLab/ExpressionEngine/Boot/boot.php(151): EllisLab\ExpressionEngine\Core\Core->run(Object(EllisLab\ExpressionEngine\Core\Request))
    •   #15 index.php(152): require_once('...')
    •   #15 index.php(152): require_once('...')
```

**Environment Details:** \- Version: 5.3.0 \- PHP Version 7.2.23 \- MySQL Version 5.7.28 \- OS: macOS Catalina 10.15.1 \- Web Server: Apache

Many thanks in advance for any help on this! :-)

Regards

Karl

# Answer
Have a look in the exp\_statuses table and make sure the highlight color has 6 digits, just in case it is blank
> 2 votes

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


# Question
Title: relating testimonials to multiple products with relationship field
I have two channels, the main channel is showing a product, and on that single product page, I want to show testimonials that are related to the product. The second channel is a testimonials channel. Each entry on the testimonial channel can be related to several "products". I have a relationship field in the testimonial channel called {related\_products} where the user can associate the testimonial to several products. Can someone help me figure this out? I am not sure if testimonial or products is the parentChannel.

here is the code on the "Product" page:

```
{exp:channel:entries channel="testimonials"}
   {related_products}
     {related_products:title}
   {/related_products}
{/exp:channel:entries}

```

# Answer
> 1 votes
Testimonials would be the parent channel Products are "children".

Your syntax looks ok, are you using any custom statuses in your Products channel? If so try adding a statuses parameter to the relationship field tag:

```
{exp:channel:entries channel="testimonials"}
   {related_products status="not closed"}
     {related_products:title}
   {/related_products}
{/exp:channel:entries}

```

---
Tags: relationships, related-entries
---


# Question
Title: How to create entries w/ relationships through Models
I am having trouble saving a ChannelEntry with a relationship to another ChannelEntry using the Models Service.

The following produces no errors, but a row in exp\_relationships with no field\_id

```
$entry = ee('Model')->get('ChannelEntry')
  ->with('Children', 'Channel')
  ->filter('entry_id', 330)->first();

$child = ee('Model')->get('ChannelEntry')->filter('channel_id', 7)->filter('title', 'My title')->first();

$entry->Children[] = $child;
$entry->save();

```

In the Control Panel, this shows no relationships have been set. I can manually add the field\_id to the DB, and *poof* the relationship is created.

So how do I create the relationship with the field\_id column populated?

Also, I noticed it also creates a row in the exp\_channel\_data\_field\_23 (the id of my relationship field) with a NULL value in the field\_id\_23 column. Adding a relationship through the Control Panel does not produce a row in this table at all, however...

# Answer
Solution was to set an array with a 'data' property to the field. So from my example:

```
$entry->field_id_23 = ['data' => [$child->entry_id]];
$entry->save();

```
> 0 votes

---
Tags: relationships, ee5
---


title: DataGrab Incomplete Import

text:
# Question
Title: DataGrab Incomplete Import
EE 5.3.0 DataGrab 3.0.3

Using the DataGrab add-on, when importing to channel entries I keep getting a 500 error and then a status of `RUNNING` on my imports with a `records` percentage.

This could become a problem because I'm going to be running one of these imports daily and it'll need to be updating ***all*** of the entries.

I've reached out to support directly but it's been a few days and I still haven't heard back. Wondering if anyone had any idea about this.

Thanks!

# Answer
> 0 votes
So, a co-worker suggested I play with the `import in batches` setting in the `Other settings` section of the import configuration. I started with 300 and it did about 1500 entries before getting the 500 error, so I set it to 100 and it ran for a few minutes but got through all 4500 items completely.

I'm going to be setting my imports in batches from this point onward, and if you're having a similar problem I suggest you try batching your import as well.

---
Tags: add-on, import, datagrab, addons
---


# Question
Title: Can I reference a relationship to a relationship?
I have a channel, Events. Sometimes there's an event that's repeating, and I don't want my content authors to do that all over again. So I have another channel, Events Repeating, which has a Relationship field back to Events and a Date/Time field (Low Events), so it only takes defining those two fields (which event and when) to essentially duplicate an event.

So any time somebody looks at the Events calendar, they see both Events and Events Repeating entries. Works great.

There's just one field that I'm having trouble with: Contact, which is a Relationship field in Events to my Profiles channel. When referencing this from Events Repeating, that means a relationship to a relationship.

In Events Repeating, my Relationship field to Events is called "Event"; in Events, my Relationship field to Profiles is "Contact".

Thus, I tried: event:contact:first\_name, to no avail. Is this supported? Or should I try something else?

# Answer
It looks like I need a tag loop to do this. e.g., this doesn't work:

{event:contact:first\_name}

This works:

{event}{event:contact:first\_name}{/event}
> 1 votes

---
Tags: relationships, low-events
---


# Question
Title: How to dynamically output all products within a category on a dynamically created category page?
I'm building a site that has two main channels:

* Product (this describes a meat, cheese or milk product). The user can then create entries describing the product, then categorise this product as 'milk', 'meat' or 'cheese'
* Product category (this describes all products of a certain type, i.e. describing how great all the meat products are). This is used to create a category page for each product category the business wants to list.

I've successfully set the templates up so that a main 'products' page is pulling in an image, name and short description for each instance of the 'product category'. You can then click through to each 'product category' and see the name and a long description of the category.

The problem I'm having is how to specify: "Show all instances of 'products categorised as meat' within the 'product category' channel entry for meat" and so on, for each product category

I could create a template for each different kind of product category, but it seems like this should be simple and I'm missing something obvious!

The folder structure is something like this:

/products/product\_category/product\_name/

Realstically: /products/meat/smoked-bacon

/products/ - Lists product categories

/meat/ - Lists everything categorised with 'meat' (this is the bit I'm struggling with)

/smoked-bacon/ - A product page for smoked bacon

Any help would be appreciated!

Cheers

# Answer
> 0 votes
Are you using subcategories? I'd probably go with setting up subcategories for different types, e.g.

Meat (top level category)

-- Bacon (sub category)

-- Ham (sub category)

-- Pork (sub category)

What you can then do is show all products (i.e. the "Meat" category) or narrow down results using a subcategory (i.e. "Bacon").

# Answer
> 0 votes
Are your product entries being assigned categories in the admin panel?

If so, assuming the category `url_title` is the first segment of the url ( `domain.com/{category-name}` ), and your products channel is named `products` you should be able to pull all the entries from your categories like this:

```
{exp:channel:category_archive channel='products' style='linear}
  {categories}
    {if category_url_title == segment_1}
      {exp:channel:entries category='{category_id}'}
        {!-- your entry data and list item template --}
      {/exp:channel:entries}
    {/if}
  {/categories}
{/exp:channel:category_archive}

```

This will pull all the entries assigned to the category that is named in `segment_1` of your url. You can add other parameters to the tag to specify things like limit, offset, pagination, status, etc.

---
Tags: templates
---


title: Question re Shipping

text:
# Question
Title: Question re Shipping
Quick question re setting up shipping prices. I'm setting up a store selling books and need to calculate shipping on the basis of book size, essentially: light, normal and heavy. This is/can be set in the channel entry.

What I need then is to set prices for the US, UK, Europe and Asia taking into account these variables of light, normal and heavy. I.e. there would be these three shipping rates for each location but calculated at checkout (or before).

Is there a plugin needed for this? Or what would be the best approach?

# Answer
> 0 votes
CartThrob gives you a built-in shipping option "By location - weight".

The CT documentation is pretty poor in general and very limited on this topic, but such information as there is can be found here.

Simply put if you choose this option in CT shipping options, you are given a table into which you can put country codes and threshold weights. What you would need to do is assign either the actual weight of each book (if your shipping options are based on this) or assign each book a dummy weight to put it into the appropriate shipping option.

As far as I can tell, the table works similarly to other shipping systems in CT, simply by scanning down the table of coutnries / weight thresholds until it finds a combination that matches the item being considered, and then associates the shipping charge of that row of the table to the item. So setting up the table will require you to enter 9 rows (three for each country) with the rows in ascending weight order.

HTH

PS - you usually get better replies to questions if you note the version of EE and (in this case) CT in your question.

---
Tags: cartthrob
---


# Question
Title: Cartthrob Issue/Error - Adding to cart gives "Not in Stock"
Carthrob 4.6.2 - EE5

When I add an item to the cart I get the error "XXX is currently out of stock" This happens on my own custom inventory channel. It doesn't happen with the installed examples setup on initial CT installation. All channel fields are mapped to the CT ones.

# Answer
A good place to start is the field you have specified for "Product Inventory" which you can find in **Add-On Manager / CartThrob Pro Configuration / Products** \- it is the fifth field down in a channel definition block there. If this field is set in your custom channel, check to see what kind of field this is set to be (should be a regular text field), and what values it has. If this field is, or appears to have value 0 then you'll get stock out errors...

Another place to check is the option in **Add-On Manager / CartThrob Pro Configuration / Orders** for "Update Product Inventory When Editing Order" - if you do not want inventory warnings at all, simply de-select this option.

HTH.
> 0 votes

---
Tags: cartthrob
---


# Question
Title: Expression engine control panel theme not loading with forwarding slash
When I try to open control panel with forwarding slash, then it shows me broken login page theme, but when I try to open it without using slash then it loads properly. I guess somewhere it is not fetching css path , but i am not able to find it.

https://www.abc.com/control -- working https://www.abc.com/control/ -- not working

# Answer
> 0 votes
Updated correct redirection rules in htaccess and it works for me

```
# Enable Rewrite Engine
# ------------------------------

RewriteEngine On
RewriteBase /

# Redirect index.php Requests
# ------------------------------
RewriteCond %{THE_REQUEST} ^[^/]*/index\.php [NC]
RewriteCond %{THE_REQUEST} ^GET
RewriteRule ^index\.php(.+) $1 [R=301,L]

# Standard ExpressionEngine Rewrite
# ------------------------------
RewriteCond $1 !\.(css|js|gif|jpe?g|png) [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php/$1 [L]

```

---
Tags: expresso-store
---


title: Expresso Store Custom Field With Image

text:
# Question
Title: Expresso Store Custom Field With Image
EE 5.3.0

Expresso Store 4.2.1

I have a store for replacement parts. Since customers might not always know what part they need, I would like to require users to post an image of the product for which they need parts when they check out.

I'm familiar with the `order_custom` fields but was wondering if it was possible to use these fields as image file uploads.

Thanks!

# Answer
I developed a workaround that gets the job done.

Using a 3 page checkout process where the user must first submit a form with images and other details. That form has a hidden field with the cart id number so customer service will be sent the images, details, and cart id so they're able to compare the images to the order.

It's not ideal but considering I'm on a deadline this was the best I could come up with for the time being.
> 0 votes

---
Tags: expresso-store, file-uploads, expresso, image, files
---


# Question
Title: Add single link item to menu without user needing to log in again
I'm having trouble adding a link to CartThrob Order Manager into a control panel menu using Menu Manager.

The plugin doesn't offer a pre-ser menu option, so I need to do this with a single link, as I understand it. the problem is that the URL for the specific page seems to have a code in the URL that specifically identifies me as a user. This menu needs to work for anyone logged in with the appropriate permissions. If I remove the bit in the URl that's specific to me (&S=...) any user clikcing the menu item si required to log in again, even if they are already logged in and have permissions to view that page.

Am I missing something obvious?

Cheers,

Crac

PS. Just to clarify version numbers: EE 5.3.0, CT Pro 4.6.1, CT OM 4.6.1 ...

# Answer
> 1 votes
This is possible - I have a similar link on one of my sites that uses CT.

All you need to do is create a single link using this for the URL

`cp/addons/settings/cartthrob_order_manager`

HTH

PS - Usually helpful to include **version numbers** in questions like this, as answers will sometimes vary between versions of EE and add-on (such as CT in this case).

---
Tags: cartthrob, ee5, menu
---


# Question
Title: Structure breadcrumbs only going 2 levels deep
I'm using Structure for lots of stuff: title, nav, and breadcrumbs. Title and nav are working, but breadcrumbs only goes 2 levels deep. If I'm a page further down than that, {exp:structure:breadcrumb} produces no output. Any ideas on what might be going wrong?

EDIT: Jace from EEHarbor just told me this is a bug that they are working on. Will post an update when this is resolved.

# Answer
It looks like the other Structure tags (titletrail, nav) take entry\_id as a parameter, but it doesn't work with breadcrumb. I added code (taken from those functions) to do this, and it's working now.

Specifically, in user/addons/structure/mod.structure.php, under public function breadcrumb(), adding this in the "// get current entry id" block:

```
$entry_id = ee()->TMPL->fetch_param('entry_id', array_search($uri, $site_pages['uris']));

```
> 0 votes

---
Tags: structure, eeharbor
---


title: Where is the base_url in the database?

text:
# Question
Title: Where is the base_url in the database?
EE 5.3.0

I have a website that I built using a production domain (let's call it `production.com`) to replace an old site using the desired domain (let's call it `domain.com`).

I am concerned with the default `base_url` setting in making such a change. My experience with domains and such is low and I'm worried that if I change that `base_url` to the new domain I'll loose access to the control panel. So my thinking was to find that field in the database and I could change it directly if need be, but I can't seem to find that value anywhere.

Does anyone know where that value is saved in the database or if there's a better way to going about doing something like this?

Thanks!

# Answer
> 5 votes
Well, it doesn't particularly matter where it is stored in the database, as you can **override** that value in your config file.

https://docs.expressionengine.com/latest/general/system-configuration-overrides.html https://docs.expressionengine.com/latest/general/system-configuration-overrides.html#base\_url

So as long as you have access to the file system, you can set it how you want via SFTP/SSH. Just for some fun trivia, in the database, that setting lives in the `exp_sites` table in the `site_system_preferences` column. That column is base 64 encoded and serialized, so if you really needed to edit it in the database, you'd have to run a script like this:

```
$site_system_preferences_dump = unserialize(base64_decode('')); // string you pull from the database in whatever fashion you choose

$site_system_preferences_dump['base_url'] = 'https://my.new.site.url.dev';

$site_system_preferences_import = base64_encode(serialize($site_system_preferences_dump));

// put the $site_system_preferences_import (a string now) into your DB row

```

---
Tags: database, url, settings, domain
---


# Question
Title: WYGWAM freezes on Chrome when popping up a dialog box
When clicking the Link tool, or from the Link tool, clicking "Browse Server," or Create table, or Add Image, WYGWAM freezes for somewhere between 0-60 seconds. This just happens on the first clicks; subsequent clicks work fine.

This only happens on Chrome; FireFox is OK.

It's also only happening on EE 5.3.0 / WYGWAM 5.0.3; my EE2 site is working fine.

Any ideas on what might be going on?

# Answer
> 1 votes
I had something similar recently, it "appeared" to be lack of server memory/RAM - our server guy bumped that up and all was fine after that. Can't say that's the cause of your problem but worth a shot.

# Answer
> 0 votes
It ends up the server CPU was being pegged when a new entry was opened (maybe autosave?). Increasing CPUs (from 1 CPU to 1 CPU + 4 cores) solved this. sedispatch was hitting 20% CPU, and now it's \< 1%. I don't know if that is directly related, but it's associated to some degree.

---
Tags: wygwam
---


# Question
Title: Warning is_dir(): open_basedir restriction in effect after Upgrade to 5.1.2
> Warning is\_dir(): open\_basedir restriction in effect. File(/home/vg000web02/15/07/7010715/web/themes//ee) is not within the allowed path(s): (/var/www/vhosts/xxx.com/:/tmp/) ee/legacy/libraries/Core.php, line 196

Tried a number of possible solutions but nothing worked so far. The error prevents from making any updates to the site.

Please advice. Thanks, -Vadim

# Answer
The error looks like it is being caused by a path configuration issue - check that the settings for URL and Paths on your site are set correctly. (go to Control Panel / Settings / General Settings / URL and Paths).

HTH
> 1 votes

# Answer
Changing "URL and Paths" combined with changing open\_basedir to "none" fixed the problem. Thanks for the help.
> 1 votes

# Answer
If possible turn off the open basedir restriction.
> 0 votes

# Answer
If it doesn't work after updating the path and you have cache enabled, try to disable and enable the cache.
> 0 votes

---
Tags: php-errors, ee5
---


# Question
Title: Add-On Index Page Throwing Parse Error That Is Not Correct
EE 5.3.0

When I go to the `Add-Ons` section of my control panel I get this error:

```
Parse error: syntax error, unexpected '.', expecting ',' or ';' in /.../.../public_html/.../ee/EllisLab/Addons/rte/ext.rte.php on line 19

```

When I go to that line in the file (which I haven't touched and would never dream of messing with), I can see that the line in question has no issues. It's just a `$docs_url` with an expressionengine url as the value. There is no unexpected '.'

I have used a url path to get into two of my plugins directly, bypassing the `Add-Ons` list page, and they seemed to work fine. It's just the `Add-Ons` list.

Any ideas?

# Answer
Hrm, well that line in `ext.rte.php` in the `5.3.0` release is:

```
var $docs_url       = DOC_URL.'add-ons/rte/control_panel/index.html';

```

So based on that error, I would assume the `DOC_URL` constant is not yet defined, or isn't being type interpereted as a string.

So try this:

```
var $docs_url = '';

```

If the pages loads, this smells like it could be a bug; start by using a search tool to determine *where* that `DOC_URL` constant is defined, and make sure it is getting a valid string value. You could also try hardcoding that variable to a valid value and if it works, it's another hint that `DOC_URL` isn't being defined.
> 1 votes

---
Tags: templates, control-panel, list, addons
---


title: How do I set Dutch date language?

text:
# Question
Title: How do I set Dutch date language?
Full string date formats are shown in English, how do I format these into Dutch? We're using EE5 and Calendar 3.x for EE 4.x - 5.x. Are there any language packages or something I can use?

Thanx.

# Answer
> 0 votes
I guess you need the day/month names to be in Dutch? This depends on the installed locales on your server. If the dutch locale is installed you can use https://expressionengine.com/add-ons/hippo-datetime

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


# Question
Title: Request Timeout when saving an edited entry
We have a live site that worked ok for some time. Since a day or two we have a strange behavior: when saving some of the entries we get this error

```
Request Timeout
This request takes too long to process, it is timed out by the server. If it should not be timed out, please contact administrator of this web site to increase 'Connection Timeout'.

```

There is no error log to be found.

It's EE 5.3 with Publisher.

Is there a way we could find out what would causing the timeout?

# Answer
> 0 votes
It sounds server related, perhaps check you have enough memory/RAM and CPU.

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


# Question
Title: No ability to upload new images via rich text editor
I have a strange one, or maybe it's something new to EE 3.0

I don't see an upload new file button when I click the upload file icon in a rich text field (or Expresso (plugin) field).

It brings up the list of existing files, but no button to upload a new file.

However from a custom field with a field type of 'file' it works fine?

Any ideas

thanks

Matt

# Answer
You'll need to select which directory you're trying to add it to. By default it's setting it to All.
> 0 votes

# Answer
I do not understand the answer, I am sorry. Where do I select that? This image is taken from Expresso Editor. Only browse files is the option, not upload new image.
> 0 votes

---
Tags: file-uploads
---


# Question
Title: Channel From demanding title and URL title
I have the simplest of channel forms and I am getting this error:

```
The form you submitted contained the following errors
    Title: This field is required.
    URL title: This field is required.

```

This is the striped down form:

```
{exp:channel:form channel="scholarship_apps" return="/x-test/ENTRY_ID/" logged_out_member_id="2"}
    <label for="title">Name</label>
    <input type="text" name="title" id="title" value="{title}"  ><br>

    <input type="submit" name="submit"  value="Next" class="button">
{/exp:channel:form}

```

Guests can post entries. I've played with different parameters in the tag. I've hardcoded title and URL title fields. Always the same error.

# Answer
I've been looking for hours and figure it out shortly after I post a question, of course. We have .htaccess code to force a trailing slash. That kills the channel forms.
> 0 votes

# Answer
Channel form normally requires value for title and url\_title fields when creating new entries.

You could add them both as hidden fields to pre-populate values so long as the url\_title is unique.

Alternatively use the sample code in the docs https://docs.expressionengine.com/latest/channels/channel-form/examples.html

Normally I use this for new entries, where the URL title is hidden but gets populated by the `onkeyup` parameter in the title field:

```
<label for="title">Title</label>
<input type="text" name="title" id="title" value="{title}" size="50" maxlength="100" onkeyup="liveUrlTitle(event);">
<input type="hidden" name="url_title" id="url_title" value="{url_title}" maxlength="75">

```
> 0 votes

---
Tags: safecracker
---


title: Structure module reordering

text:
# Question
Title: Structure module reordering
I'm having issues with the Structure module. When I reorder pages from backend, it gives me error in console.

> {"success":false,"errors":"Reordering Failed\n\nYour Structure Tree appears to be out of date.\n\nSomeone else may be editing or you may have another tab with a newer Structure tree.\n\nPlease refresh and try reordering again."}

Here is the screenshots:

1. Normal pages at structure backend:

2. Alert error message by Structure module:

3. Console error of the plugin:

Please help me out with this. **My EE version is 3.5.6 and Structure version is 4.1.12**

# Answer
"**Updated**" column shouldn't be `NULL` or `empty` or `0`. It must contain a date to start reordering. Sometimes it not set at default install of structure and that cause this error.

Update the first row's "updated" column in DB with date will solve the issue.
> 2 votes

# Answer
`Updated` column in `exp_structure` table should not be `NULL`.

Use this SQL script to fix reordering issue:

`UPDATE exp_structure
SET updated = CURRENT_TIMESTAMP
WHERE entry_id = 0;`
> 1 votes

---
Tags: ee3, structure, eeharbor
---