# Question
Title: error when non Super Admin tries to create new member with front end registration form
We would like to have one non SuperAdmin member group be able to add new members using the User registration form. While it’s not completely clear, it appears from the documentation that this is doable by giving permissions to the member group, and including admin\_register=“yes” as a parameter in the form. I am using EE 3.4.5 and User 4.0.8.

The form is allowing SuperAdmin to create the new members, but not the alternate member group that has the permissions to Create, Edit and Delete members. Instead, when the form is submitted, I get the following message: 'The form you submitted contained the following errors You are already registered and logged in.'

I am able to view the form, but it won't submit due to the error.

The documentation states: admin\_register="yes" This parameter allows users of member groups that are allowed to administrate members to view the Register form, and submit new user registrations on behalf of others. Using this parameter will prevent the auto-login feature after registration from working (so the admin doesn't become logged in as the member they just created).

The following is my registration form, and I am testing it logged in as the non Super Admin member group that has the added member permissions to Create, Edit and Delete members:

```
{exp:user:register admin_register="yes" group_id="5" return="/membership/add-new-members/success" error_page="/membership/error"}
   <p>
    <label for="first_name" class="form-label" >First Name <span class="text-danger">*</span></label>
    <input type="text" name="first_name" id="first_name" class="form-control" required value="{if first_name}{first_name}{/if}"/>
 </p>
  <p>
    <label for="last_name" class="form-label">Last Name <span class="text-danger">*</span></label>
    <input type="text" name="last_name" id="last_name" class="form-control" required value="{if last_name}{last_name}{/if}"/>
 </p>
 <p>
    <label for="email" class="form-label">Email <span class="text-danger">*</span></label>
    <input type="username" name="username" id="username" placeholder="name@domain.com" class="form-control">
  </p>
   <p>
      <label for="password" class="form-label form-label">Password  <span class="text-danger">*</span></label>
     <input type="password" name="password" id="password" class="form-control" value="{if password}{password}{/if}"/>
   </p>
  <p>
    <label for="password" class="form-label form-label">Confirm Password  <span class="text-danger">*</span></label>
    <input type="password" name="password_confirm" id="password_confirm" class="form-control" value="{if password_confirm}{password_confirm}{/if}"/>
<p>
    {if captcha}
    <p>
        <label for="captcha">{lang:captcha}*</label>
        {captcha}<br/>
        <input type="text" id="captcha" name="captcha" value="" size="20" maxlength="20" style="width:140px;"/>
    </p>
    {/if}

<p>
    <input type="submit" value="Create Account" class="btn btn-primary"/>
</p>
{/exp:user:register}

```

Am I missing a step? Thank you.

# Answer
Solspace User throws this error because of the following:

```
1) admin_register is not set to yes.
2) Member Group is not Super admin & can_admin_members is not set to 'y'.

```

So,It might be a possible solspace user bug because `can_admin_members` field is available in the `EE2` but was replaced by `can_create_members`,`can_edit_members`,`can_delete_members` in `EE3`.
> 5 votes

---
Tags: solspace-user
---


# Question
Title: Representing relationships between members of an EE site?
Curious to know if there is a good / best way to capture relationships between members of an EE site - for example parents / children where both could be members of the same site?

I can see it would be possible to do this via a channel entry system - where you create a channel entry for each member and then use stock relationship fields to capture inter-member relationships, but this requires effectively duplicating the EE member data in a field - with lots of scope for messing things up (and involves considerable redundancy of effort).

But since you cannot add a relationship type field to a member in EE - so at the moment this seems the only way.

Thanks in advance for whatever thoughts / guidance is available.

For record - this is for a new build EE3 site (currently on 3.4.6).

# Answer
> 1 votes
Gavin,

I would recommend that you use Zoo Visitor to accomplish. Once installed it will convert your existing members to entries in a channel where you can easily add a relationship or any other field type that you want to use.

I've used Zoo Visitor a few times and it's dead easy to use.

woops just noticed that it's only available for EE2. Assuming you're using EE3 look at Solspace User. Haven't used it but pretty sure it will allow you to do what you want.

---
Tags: members, relationships, ee3
---


# Question
Title: Page Reloads to Home Page After Opening Browser
This is the strangest thing I've ever seen. If I load my homepage (jonssite.com), then click on a sub link, (jonssite.com/about), it shows "jonssite.com/about" for a second, and then redirects to "jonssite.com/index.php". If I try the link another time, it works. This only happens when I first open the browser (any browser: IE, Firefox, Chrome). If I reload home without restarting the browswer, it works every time.

# Answer
> 0 votes
The problem was the mobile detect plugin. I removed it from the template and it worked correctly

---
Tags: templates
---


# Question
Title: Can I assign members to subscription packages without payment transactions?
Can I assign members to subscription packages without payment transactions? So maybe a visitor to the site would buy a package through my own separate shopping cart, which would send an email to an admin. That admin would then log into the EE control panel and assign that member to the subscription package he asked for. But this would bypass the payment gateways built into the Subscriptions add-on.

Possible?

# Answer
> 0 votes
Nope, there's no manual configuration for Subscriptions as of now.

---
Tags: devdemon, subscriptions
---


# Question
Title: How do I include a Relationship field inside a Grid?
In an EE 3 site I have a Grid field with four Grid fields, one of which is a relationship field. Content from the first three Grid Fields display properly, the relationship field does not display at all.

Here is my code:

```
  {content}
    <div class="hub-box col-sm-6 col-md-4 col-xs-12 col-lg-3">
      <img src="{content:thumbnail}" alt="{content:title}" />
      <h3>{content:title}</h3>
        <p>{content:summary}</p>
        <p>{content:links_to}{content:links_to:title}{/content:links_to}</p>
    </div>
   {/content}

```

In the output. The thumbnail, title and summary all display fine, but the relationship field content is blank.

I have confirmed that the relationship field in the grid has content selected.

Any suggestions?

# Answer
I recall if you're inside a relationship inside a matrix you revert to standard tags, so this

```
<p>{content:links_to}{content:links_to:title}{/content:links_to}</p>

```

Changed to this

```
<p>{content:links_to}{links_to:title}{/content:links_to}</p>

```

Or

```
<p>{content:links_to}{title}{/content:links_to}</p>

```

**UPDATE** Check this answer out.
> 1 votes

---
Tags: relationships, grid
---


# Question
Title: Create A Javascript Array from a Channel
Basically I need a javascript array built from a channel, but as we all know curly braces can be an issue, I was just wondering if there is a way to make a javascript array in an EE template. Something like this:

```
var locationArray = [

{ xpos : 0.08, ypos : 0.07, title : "Location No. 1", image: "location1.jpg", text: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus ac pharetra est, vel efficitur orci. Mauris euismod, sapien eget pretium viverra, lacus erat gravida sapien, at tempus ante nisi sed odio."},

{ xpos : 0.50, ypos : 0.50, title : "Location No. 2", image: "location2.jpg", text: "Mauris sodales lectus eu sem congue, eu malesuada est accumsan. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Pellentesque dui ligula, sodales porta libero in, tincidunt posuere odio."},

{ xpos : 0.65, ypos : 0.32, title : "Location No. 3", image: "location3.jpg", text: "Nunc dignissim porttitor leo in aliquam. Morbi malesuada mauris in velit cursus ornare. In hac habitasse platea dictumst. Praesent non congue sapien."}

]

```

# Answer
Haven't tried it, but you might get away with constructing your output within an EE template replacing the curly brackets with `{` and `}`, and then putting all the output within a streeng tag pair to decode it ...

```
{exp:streeng decode="yes"}
... javascript array written using html entities rather than { and }
{/exp:streeng}

```
> 0 votes

# Answer
There is a detailed post from 2011 that seems to cover some of the issues and work arounds that should help you:

https://stackoverflow.com/q/6514647/1772718
> 0 votes

---
Tags: templates, javascript
---


title: Convert Matrix to Grid

text:
# Question
Title: Convert Matrix to Grid
Is there any way to convert a Matrix field to a Grid field for existing entries without losing any data?

# Answer
> -4 votes
There is no easy way,

you must write a custom code to get the data from matrix field and add them to grid field

some PHP and MySql code.

I can do this for you if you want, but we need to contact in privet to get more info about your site.

Regard's.

# Answer
> 11 votes
Use the EllisLab Playa & Matrix Importer

---
Tags: matrix, grid
---


title: Conditional with categories

text:
# Question
Title: Conditional with categories
So I'm trying to conditionally display an embed within an entry based on several parameters: channel\_short\_name and category. So I have a conditional that checks a few items and then if it matches has an embed that passes along with it the categories that are in the entry.

Below is the template code I initially wrote. There are a couple of issues. 1. It has nested {categories} tags and EE doesn't like that and throws an error. 2. If I just remove the embeds for now (so that something at least renders), I can end up with multiple instances of the embed since the top {categories} tag is a loop and entries can have more than one category assigned.

So is there maybe a way I can just assign all the categories to a variable and use that instead of wrapping the whole thing in a {categories} tag?

```
{categories}
    {if channel_short_name=="webcast-partner" OR channel_short_name=="webcast-mssp" OR category_id==93}
        {embed="_includes/.resource-carousel1" cat="{categories backspace="1"}{category_id}|{/categories}"}
    {if:elseif channel_short_name=="webcast-customer"}
        {embed="_includes/.resource-carousel2" cat="{categories backspace="1"}{category_id}|{/categories}"}
    {if:elseif category_id==60}
        {embed="_includes/.resource-carousel3" cat="{categories backspace="1"}{category_id}|{/categories}"}
    {if:else}
        {embed="_includes/.resource-carousel4" cat="{categories backspace="1"}{category_id}|{/categories}"}
    {/if}
{/categories}

```

# Answer
ok, figured it out:

```
{if channel_short_name=="webcast-partner" OR channel_short_name=="webcast-mssp" OR "|{categories}{category_id}|{/categories}"*="|93|"}
    {embed="_includes-v2/.resource-carousel1" cat="{categories backspace="1"}{category_id}|{/categories}"}
{if:elseif channel_short_name=="webcast-customer"}
    {embed="_includes-v2/.resource-carousel2" cat="{categories backspace="1"}{category_id}|{/categories}"}
{if:elseif "|{categories}{category_id}|{/categories}"*="60"}
    {embed="_includes-v2/.resource-carousel3" cat="{categories backspace="1"}{category_id}|{/categories}"}
{if:else}
    {embed="_includes/.resource-carousel4" cat="{categories backspace="1"}{category_id}|{/categories}"}
{/if}

```
> 0 votes

---
Tags: categories, conditionals
---


# Question
Title: CE Image {height} & {width} variables outputting incorrectly
I'm using CE Image 2.4.5 on EE 2.9.3 and it outputs the image cropped correctly. However I also need the {height} and {width} variables elsewhere. The problem is that both of these variables are ouputting the original value and not the cropped value as suggested by the docs.

For example this code:

```
<p>{exp:ce_img:pair src="{url}" width="300" height="100" url_only="no" crop="yes" quality="100"}h: {height} {height_orig}, w: {width} {width_orig}, u: {made}{/exp:ce_img:pair}</p>

```

outputs the following:

```
<p>h: 614 614, w: 480 480, u: /path/to/d1small_300_100_c1.jpeg</p>

```

Any idea how to resolve this?

# Answer
> 1 votes
We are using the following without any issue:

```
{exp:ce_img:pair src="{logo}" height="75" width="150"}
<img src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEAAAAALAAAAAABAAEAAAI=" data-original="{sized}" width="{width}" height="{height}" alt="{title}">
{/exp:ce_img:pair}

```

Ensure that the cache folder for the resized images has the correct permissions. I believe that folder defaults to /images/sized

If the permissions are not correct, then the image doesn't get resized and I believe the resized width and height remain as the original width and height.

---
Tags: variable, ce-image
---


# Question
Title: I don't know what I'm doing! Please Help?
What is wrong with this template code??

```
{exp:channel:entries channel="featureinfo" limit="1" disable="categories|category_fields|member_data|pagination|trackbacks"}
{sn_header_news}
<div id="mainb">
    <div id="mainc">
        <div id="cimg"><img src="/images/made/images/made/Header-NewsMedia.jpg" alt="Latest News" width="483" height="210" /></div>
        <div id="contbody"><div id="column">
        {sn_newsmedia}
        {embed="index/.colnews"}
        {embed="index/.colpromem"}
            </div>
        <div id="contentc">
        <h1>{title}</h1>
            {if news_image}{exp:ce_img:single src="{news_image}" alt="{title}" width="240" height="160" crop="yes" class="img1"}{/if}
            <h6>Posted: {entry_date format="%l, %j%S %M %Y"}</h6>
            {news_outline}
            </ul>{/if}
            {if news_file}
            <div class="box">
            <h2>Download Related Info</h2>
            <ul>{exp:jco_getfileinfo filename="{news_file}"}
            <li><a href="{news_file}" title="Download {news_filename}" target="_blank">{news_filename}</a>   <span style="text-transform:uppercase; font-size:12px; color:#999">({file_extension} - {file_size})</span></li>
            {/exp:jco_getfileinfo}
            </ul>
            </div>{/if}
        </div></div>
    </div>
{sn_footer}
{/exp:channel:entries}

```

When I view the rendered template i get this error Parse error: syntax error, unexpected 'endif' (T\_ENDIF) in /home/coiorg/public\_html/splodge/expressionengine/libraries/Functions.php(679) : eval()'d code on line 495

My apologies in advance for being a nuisance!

# Answer
Error you are getting is comes only when your {if} statement criteria is not fulfilled. In your case, You have close 1 {/if} without starting any {if} condition. Try this code:

```
{exp:channel:entries channel="featureinfo" limit="1" disable="categories|category_fields|member_data|pagination|trackbacks"}
{sn_header_news}
<div id="mainb">
    <div id="mainc">
        <div id="cimg">
            <img src="/images/made/images/made/Header-NewsMedia.jpg" alt="Latest News" width="483" height="210" />
        </div>
        <div id="contbody">
            <div id="column">
                {sn_newsmedia}
                {embed="index/.colnews"}
                {embed="index/.colpromem"}
            </div>
            <div id="contentc">
                <h1>{title}</h1>
                {if news_image}{exp:ce_img:single src="{news_image}" alt="{title}" width="240" height="160" crop="yes" class="img1"}{/if}
                <h6>Posted: {entry_date format="%l, %j%S %M %Y"}</h6>
                {news_outline}
                {if news_file}
                <div class="box">
                    <h2>Download Related Info</h2>
                    <ul>
                        {exp:jco_getfileinfo filename="{news_file}"}
                        <li>
                            <a href="{news_file}" title="Download {news_filename}" target="_blank">{news_filename}</a>
                            <span style="text-transform:uppercase; font-size:12px; color:#999">({file_extension} - {file_size})</span>
                        </li>
                        {/exp:jco_getfileinfo}
                    </ul>
                </div>
                {/if}
            </div>
        </div>
    </div>
</div>
{sn_footer}
{/exp:channel:entries}

```
> 4 votes

---
Tags: syntax
---


# Question
Title: Remove index.php and subdirectory in url string
I moved my site to a new hoster. Everything works fine (Images path's js css templates, all fine).

I adjusted all path's with Reelocate. But all the Link in the Navigation throw back this error message:

```
Not Found
The requested URL /subdirectory/segment_1/entry was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

```

It must have something to do with the subdirectory

In the webroot I have a .htaccess with this:

```
RewriteEngine on
RewriteCond %{HTTP_HOST} ^domain.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.domain.com$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ /subdirectory/$1 [PT,L,QSA]

```

and then in /subdirectory I have this .htaccess

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

# Remove www.
    RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
    RewriteRule ^(.*)$ http://%1/$1 [L,R=301]

RewriteEngine off

```

Do I miss something?

Thank you

---

Edit:

The sollution of Alexa Lohmeyer worked. Here is how it looks if anybody is intrested:

One main error was that I had `RewriteEngine off` which somehow even disabled removing index.php.

So the root .htaccess looks like this:

```
RewriteEngine on

#Remove www
RewriteCond %{HTTP_HOST} ^www.domain.com$ [NC]
RewriteRule ^(.*)$ http://domain.com/$1 [R=301,L]

#Hosting directive for pointing url to subfolder
RewriteCond %{HTTP_HOST} ^domain.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.domain.com$
RewriteRule ^(.*)$ /subdirectory/$1 [PT,L,QSA]

```

And then in the .htaccess of the subdirectory it looks like this:

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

# Removes subdirectory from url string
RewriteRule ^subdirectory/index.php?(.*)$ /$1 [L]

```

# Answer
> 1 votes
```
RewriteRule ^subdirectory/index.php(.*)$ /$1 [L]

```

This should rewrite your original url:

```
http://domain.com/subdirectory/index.php/segment_1/entry

```

as:

```
http://domain.com/segment_1/entry

```

If that doesn't work, are you able to move your .htaccess into the root of your site directory? Or does it have to stay in your subdirectory?

Here is a handy htaccess test site: http://htaccess.madewithlove.be/

# Answer
> 0 votes
How to remove index.php in ExpressionEngine site from iPage hosting

https://emineysprince.com/technology-tips/post/how-to-remove-index-php-in-expressionengine-site-from-ipage-hosting

---
Tags: htaccess, migration
---


# Question
Title: EE3 Grid - Row count doesn't change when you rearrange
I've uploaded images to each row and rearranged them afterwards. Then in my EE code I want to show row\_id="1" but it's not taking the rearrangement.

# Answer
You can try offset or \> in your conditional

```
{project_photos}
    {if project_photos:count == 1}
        View Photos
    {/if}
{/project_photos}

```

(realize this will only show if there is one, and only one, photo, do you mean \>= 1?)

```
{project_photos offset="1" OR > 1} {/project_photos}

```
> 1 votes

# Answer
Rearrangement will change the ORDER ID of Grid not ROW ID. If you want to do some code on first row of GRID, You can try something like this:

```
{grid}
    {if grid:count == 1}
        {!-- My code --}
    {/if}
{/grid}

```
> 1 votes

# Answer
Thanks for the reply!

I'm using a Lightbox and want to hide the first image from the the full gallery but it still shows the first photo from the gallery.

```
{project_photos}
{if project_photos:count == 1}
<a class="button" href="{project_photos:photo:crop}" data-lightbox="roadtrip" data-title="{project_photos:caption}">View Photos</a>
{/if}
{/project_photos}

{project_photos row_id="not 1"}
<a href="{project_photos:photo:crop}" data-lightbox="roadtrip" data-title="{project_photos:caption}"></a>
{/project_photos}

```
> 0 votes

---
Tags: grid
---


# Question
Title: Structure - New Member Group to edit all pages
Is there any easy way to give a new member group permissions to edit all pages in my structure? In the Member Group it has got Control Panel Access for all he Content Sections and The Add ons sectionand Modules Addon. It has all Channel Posting Privelidges. Channel Assignment as well it has got access to all the relevant ones as well.

But if a member in that group tries to access an entry in the structure they can't - it doesn't have the necessary permissions. I need to go into the Entry Access Tab for the Entry and add the Group there. There is a large no of pages in the structure so is there any easy way to add these permissions?

# Answer
> 0 votes
Make sure Structure is selected under "Module Access Privileges" (at the bottom of the form) along with "can access addons-section" and "can access addons-modules"

---
Tags: structure, entries
---


# Question
Title: Best workflow/approach for dev teams on localhost
I've been a freelancer working solely on my own with all my EE installs on localhost on my Mac. Soon it looks like I'll need to collaborate in my home office with another EE dev so am looking for suggestions as to the best workflow set-up.

Basically we'd both be working on the same EE dev site in the same office but on our individual laptops. What's the best approach to facilitate this?

# Answer
> 0 votes
Well, this is networking question more then the EE question. But I can give you some suggestions:

1. You can migrate your site to any temporary or development server and use files from that server via FTP. (To prevent the site to list in google list while development, you can put robots.txt file on public html folder)
2. In your same system, one can connect your localhost if both pc connected via LAN. so if your IP is 1.1.1.1 I can use your localhost as http://1.1.1.1/ee
3. You can put all your code in GIT, so you can create a branch, pull it in morning. work all day and push the changes to git at evening.

There are many more ways to do so depending on you.

---
Tags: localhost
---


# Question
Title: Tracking Video Plays in Google Analytics
So I have a rescue client running EE 2.10.1 where the client has a number of videos across the site that he wants to track plays. Can anyone provide pointers on how I can achieve this? I'm not very familiar with GA, usually just drop the code into the site and I'm done with it. Here is a quote from my client

> On my Vendor Entry Form Page I have a Vendor Tracking Code at the bottom. I then use this code on my Article Pages, Manufacture Pages, Redirect Pages. This allow me to run my GA Report using that code and all the activity show up on one report per client. This is what I use to charge my clients.
>
> On the Vendor Entry Form, I can add Video. However when the video is watched, it doesn't get tracked. No Video is being tracked on my site. I would like to add the vendor code somehow so that when the Video is clicked on and watch, that activity url shows up on my report also.

Looking at the current GA code I see a bit of custom code being sent that looks similar to this: https://developers.google.com/analytics/devguides/collection/analyticsjs/events

specifically:

```
ga('send', {
  hitType: 'event',
  eventCategory: 'Videos',
  eventAction: 'play',
  eventLabel: 'Fall Campaign'
});

```

Would I be able to add that into this bit of the GA code and not break anything?

```
<script>
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

  ga('create', 'UA-*******', 'auto');
  ga('set', 'dimension1', '{exp:stash:client_code}');
  ga('send', 'pageview');

</script>

```

# Answer
> 2 votes
You could take a look at Google Tag Manager. I use it to inject GA code into our website pages and for click tracking purposes.

---
Tags: stash, video, tracking, analytics, google-analytics
---


title: Alternative for "Structure" in EE3

text:
# Question
Title: Alternative for "Structure" in EE3
I've just started using Expression Engine 3, but it looks like my favourite "Structure" module isn't compatible with EE3. Does anyone know of a decent alternative that I can use?

# Answer
> 4 votes
Check out TJ Draper's Construct.

# Answer
> 3 votes
This is an older question, but...for folks interested in this exact plugin for EE3, Structure has now been ported over.

https://eeharbor.com/structure

---
Tags: structure, ee3
---


# Question
Title: Cartthrob 3 : notification email sent is blank when order as a guest is made
I made my tests of order frequently (connected as super-admin) and everything was fine with the notification emails when an order was placed (email sent to the customer and email sent to the admin).

I disconnected from CP, to check really as a guest and then the email notiications (both admin and customer) arrived completely blank...

What I am missing?

Thanks in advance for your help.

Cartthrob version : 3.0.2 EE version : 3.4.3

# Answer
> 0 votes
Can you try removing all your tags and just having static text in the email as a test? And if that works, can you add your tags back one by one to see if a specific ones is causing the problem?

---
Tags: cartthrob, email, ee3, notification
---


# Question
Title: Channel Entry with Matrix clone or duplicate
Does anybody have an idea of a plugin that can clone/duplicate channel entries that use the Matrix plugin? I have found MX Cloner (http://devot-ee.com/add-ons/mx-cloner) however this is not compatible with Matrix.

# Answer
> 1 votes
I beg to differ. We recently updated Matrix to version 2.5.6 (on EE 2.6.1), and MX Cloner 1.2.1 stopped working. They may update it, but until they do, Devot-ee''s information appears to be accurate.

# Answer
> 0 votes
The devotee information is wrong in this case - I just tested mxcloner with a complex entry with a big matrix inside of it and it cloned it perfectly.

# Answer
> 0 votes
I work on a very large site that is heavily reliant on the Matrix extension: EE 2.7.2, MX Cloner 1.2.7, and Matrix 2.6.

Haven't had any issues with that particular combination.

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


# Question
Title: Remove query string from images in the file manager
this might sound silly but I can't find help in the documentation. When I upload images in the File Manager, their URL automatically gets a query string at the end, which I would like to remove. Do you know how to do that?

I'm running version 2.9.0,

what happens is that if I copy the link address of an image file from the file manager, the URL I get is something like this: http://www.ecfr.eu/page/-/Luxembourg.jpg?v=1483717036

having a query an version number that I'd like to remove as I'm not using any form of automatic image sizing

# Answer
Thank you for adding more information in question:

The answer is "YES", You can remove Versioning query string from your file link.

Follow this steps:

1. Open FTP and go to your EE site.
2. Go to `system > expressionengine > controllers > cp`
3. Open file Named `content_files.php`.
4. On line number "370" (Line number may change) you will find `$r['file_name']` array.
5. Change the value `file_location.'?v='.$file['modified_date'],` to `$file_location,`

Note: This is core file change. Update of EE will loose the changes. Do not do this until you have no other choice.
> 1 votes

---
Tags: ee2, file-manager, querystring
---


title: Video Playlist Thumbnails not Working

text:
# Question
Title: Video Playlist Thumbnails not Working
My Complete website can be seen here.

I'm trying to make a playlist that plays videos. The video and thumbnail information all fill out correctly and after adding two entries all looks fine. However, I can no longer click on the appropriate thumbnail and select the video I want. The latest entry (e.g. Part 2) shows as the selected and I cannot select Part 1. Is something wrong with my tagging? The specific part I'm talking about below is the section tagged `data-thumb="{sermon_thumbnail}"`.

Here is my code:

```
{exp:channel:entries channel="sermon_details" status="open" dynamic="no"}
    <!-- VIDEO 1  -->
    <li data-index="rs-105"
        data-transition="fade"
        data-slotamount="default"
        data-easein="default"
        data-easeout="default"
        data-masterspeed="default"
        data-thumb="{sermon_thumbnail}"
        data-rotate="0"
        data-saveperformance="off"
        data-title="Part {sermon_part}<br/>{speaker_name}"
        data-param1="{entry_date format="%F %d, %Y"}"
        data-description="">
        <!-- MAIN IMAGE -->
        <img src="{site_url}images/video-back.png"  alt=""  data-lazyload="{site_url}images/video-back.png" data-bgposition="center center" data-bgfit="contain" data-bgrepeat="no-repeat" class="rev-slidebg" data-no-retina>
        <!-- LAYERS -->

        <!-- LAYER NR. 1 -->
        <div class="tp-caption   tp-resizeme fullscreenvideo tp-videolayer"
            id="slide-105-layer-3"
            data-x="0"
            data-y="0"
            data-width="['auto']"
            data-height="['auto']"
            data-transform_idle="o:1;"

            data-transform_in="s:1000;e:Power1.easeInOut;"
            data-transform_out="s:1000;s:1000;"
            data-start="1150"
            data-responsive_offset="on"

            data-vimeoid="{vimeo_id}"
            data-videoattributes="title=0&byline=0&portrait=0&api=1"
            data-videowidth="100%"
            data-videoheight="100%"
            data-videoloop="none"
            data-forceCover="1"
            data-aspectratio="16:9"
            data-autoplay="off"
            data-nextslideatend="true"
            data-volume="100"
            data-forcerewind="on"
            style="z-index: 5;"
        >
        </div>
    </li>
{/exp:channel:entries}

```

# Answer
> 0 votes
Figured out the problem. It was a `<li>` tag data-index attribute I was not familiar with. Never seen that before, hence, didn't know I needed to change it to accommodate the aggregation of HTML text as the user adds more sermons. This is what I had for that attribute within the `<li>` div:

I changed the `<li data-index="rs-105"` to `<li data-index="rs-{sermon_part}"`

For clarity, later in this same file, I have a custom field named `{sermon_part}` used numbering what part the sermon is (Part 1, 2, 3, etc). I simply placed that field `{sermon_part}` after the `rs-` and it worked like a charm. I knew this answer was probably stupid simple. Still learning just how simple EE dev is I guess. :)

---
Tags: ee3, tags, thumbnails
---


# Question
Title: Shine PDF - Fatal Error after EE version update
After updating EE to v2.11.3 a previously working setup of Shine PDF has started to error out with the following:

Fatal error: Call to undefined method Channel::Channel() in /SERVER\_PATH/expressionengine/third\_party/shine\_pdf/mod.shine\_pdf.php on line 17

Can anyone help please?

# Answer
> 0 votes
Asked the question on Slack and got the following reply from Stephen Sweetland:

"You need to update your plugin, if that’s not an option, look for parent::Channel() in your plugin scripts, replacing it with parent::\__construct();"

Updating wasn't an option as there hasn't been an update from the developer for a while.

After replacing the above code the add-on was again working as expected aside from some PHP warning messages. That will have to do for now.

Hopefully this might help someone else and thanks to Stephen for the fix.

---
Tags: ee2-upgrades, shine-pdf
---


title: Make File manager files downloadable

text:
# Question
Title: Make File manager files downloadable
How do you make the files of a specific file manager downloadable? For example, lets say you have a file manager which is just for PDFs. What tag do you use for making the PDFs downloadable? I feel like this is basic, but the documentation for EE3 shows nothing of the sort and I'm not sure how to use Google search for something this specific.

See this site for specific details Here

Code for that notes & questions section is as follows, the '???' denote where I have no clue what to put in order to make the PDFs/files downloadable:

```
<div class="col-sm-4">
    <div class="fancy-title title-double-border">
        <h3>Sermon Notes</h3>
    </div>

    {exp:channel:entries channel="sermon_details" dynamic="no"}
    <a href="???" target="_blank" class="button button-rounded button-reveal">
        <i class="icon-line-paper-stack"></i>
        <span>Part {sermon_part}</span>
    </a>
    {/exp:channel:entries}
</div>

<div class="col-sm-4">
    <div class="fancy-title title-double-border">
        <h3>Study Questions</h3>
    </div>

    {exp:channel:entries channel="sermon_details" dynamic="no"}
    <a href="???" target="_blank" class="button button-rounded button-reveal">
        <i class="icon-line2-pencil"></i>
        <span>Part {sermon_part}</span>
    </a>
    {/exp:channel:entries}
</div>

```

# Answer
> 0 votes
It URL needs to be:

```
http://www.mannawebsites.com/_development_sites/bestest//images/uploads/sermon_notes_questions/ruth_notes_pt1.pdf

```

It's showing a %20 (hex 32 code for space) behind every file that referenced from that file manager on the page. It needs to not have the %20 at the end of "sermon\_notes\_questions". I found out why EE is encoding a space in that URL at the end of the file manager name.

I checked the file manager settings and reviewed the upload directory URL. ::palm plant:: I had a small space within the upload directory URL between `sermon_notes_questions` and `\` and I didn't see it!!!! I removed that space and saved the file manager, again. Done, it fixed. Crazy how this all happened unbeknownst to me.

# Answer
> 1 votes
You can use HTML download attribute in the `<a>` tag.

```
<a href="{file_field}" download>Filename</a>

```

# Answer
> 0 votes
Handling files is relatively straightforward enough. Use the documentation found here : https://docs.expressionengine.com/latest/fieldtypes/file.html#single-variable-usage

**UPDATE:**

I checked out your example and it wouldd appear that you have spaces in your link URL - `http://www.mannawebsites.com/_development_sites/bestest/images/uploads/sermon_notes_questions%20/ruth_notes_pt1.pdf` \- note the %20 after questions and before /ruth (it actually appears as a space inthe URL, SE has placed the hex in automatically... remove that space and it works.

I'm unsure why there would be a space but likely due to a space in the destination folder when initially setup.

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


title: Site suddenly displays "Site Not Found"

text:
# Question
Title: Site suddenly displays "Site Not Found"
We have a client website which we inherited from another agency. It came with EE 2.10.1. We are normally a Craft agency, so we aren't unfamiliar with the way EE works.

Last night, I got a message that our client site was down. When I looked at it, the site started returning "File Not Found". This website was working earlier this week. I can get into the CP just fine. The log shows that the last login from our client to add content was on the 3rd. All of our other websites are working fine.

Can anyone tell me how I can diagnose this issue so I can fix it? I'm not getting any errors or anything.

# Answer
Check and make sure your /index.php is in place and configured correctly.
> 3 votes

---
Tags: 404
---


title: Export and import of Cartthrob/EE data?

text:
# Question
Title: Export and import of Cartthrob/EE data?
I need to export some CT order/customer data from a live site to a staging site (updated EE and add-ons), is there a reliable way to do this?

Live site running EE v2.9.3 and CT v2.70 Staging site running EE v2.11.3 and CT v2.71

Import/Export of EE data seems to be generally a bit of pain from what I have read elsewhere.

# Answer
For a simple EE to EE migration (within v.2 at least) there's no need for Datagrab et al, just export the SQL tables that you want and import into the other database.
> 1 votes

# Answer
For data import, I highly recommend using AJW datagrab with CSV data. http://brandnewbox.co.uk/products/details/datagrab

data export is a little bit trickier, but you can setup a template to output to CSV/XML or you can use a plugin like Zenbu Studios Hokoku to setup exports directly from the admin CP (if you use Zenbu).

If you want to setup CSV output and file download via a template you can use a plugin like http header to set the content disposition. Check out the http header plugin here: https://github.com/rsanchez/http\_header

While the above plugins and methods work great for nearly all EE data, CT order data works a bit differently - specifically order\_items/item\_options. Item options are stored in the db as base64 encoded data and must be serialised or unserialized as needed. via php:

```
unserialize(base64_decode($data));

```

you may be able to serialize your data for item\_options prior to export and then import it directly, but I have not tried doing so and cannot vouch for an easy way to handle it. However, if you are simply using the basic item\_options tags (e.g., size, S M L XL; color: red,green,blue etc.) you may be able to work directly with that data via datagrab. Item\_options becomes much more complicated if you are using many custom options.
> 2 votes

---
Tags: cartthrob, database, import, export
---


title: Table doesn't exist after upgrade

text:
# Question
Title: Table doesn't exist after upgrade
I upgraded from EE 2.9.2 to 2.11.5

Everything is working good, except I get this error when I view a News entry at domain.com/news/news-entry-title:

```
Error Number: 1146

Table 'db_name.exp_low_variables_grid_field_27' doesn't exist

SELECT * FROM (`exp_low_variables_grid_field_27`) WHERE `entry_id` IN ('263') ORDER BY `row_order` asc

Filename: models/grid_model.php

Line Number: 413

```

This happens on every News entry, not just `263`.

I can confirm there is **no** `exp_low_variables_grid_field_27` – neither on local or production DB's

Why is the entry referencing this table? I'm not sure where the reference (from entry 263) is coming from or how to fix it.

Any help or advice how to remove this error would be appreciated.

# Answer
Seems related to this bug report. If you have a conditional checking for something like this:

```
{if grid_field:total_rows > 0}

```

try changing that to this:

```
{if '{grid_field:total_rows}' > 0}

```
> 2 votes

---
Tags: database, upgrade, low-variables, ee2-upgrades, database-error
---


title: domain.store/category/entry

text:
# Question
Title: domain.store/category/entry
How do I achieve this? I need to have the domain/category/entry

eg. clothes.store/t-shirts/red-t-shirt

I'm using EE2.11.1, and Carthrob, But I don't know how to achieve that url.

I only know how to get clothes.store/products/t-shirts/red-t-shirt

# Answer
You're going to have to use template routes. This is an EE native function but requires you read the docs well.

Boyink has an intro that will be beneficial here

With the official syntax described in the EE docs here \- it's version 3 doc's but syntax is the same for ee2.
> 0 votes

# Answer
what's your category url indicator?
> -1 votes

---
Tags: ee2, cartthrob
---


title: Item list reorder

text:
# Question
Title: Item list reorder
Help! I am an administrator and my developer out of the country (12 hour time lag), and I am trying to pitch hit a solution. We are a nonprofit organization that sells courses. Our website has gone live with the new semester's courses, but they are not ordered in a logical sequence on the Registration page. How do I change the item list order? Specific screen is https://www.houstonseminar.org/index.php/registration/

Thank you! Janice

# Answer
> 1 votes
Low Reorder was created for this purpose: http://gotolow.com/addons/low-reorder

---
Tags: channel-entries
---


# Question
Title: Import data into Expression Engine channels content
How can I import data into Expression Engine channels? There is a way to do it with the core functionality or there is a plugin for that? I need to import special characters too (ex: á é í)

# Answer
You can use datagrab fot that http://brandnewbox.co.uk/news/details/datagrab-for-expressionengine-3
> 2 votes

---
Tags: import
---


# Question
Title: Show a list of subcategories for current category
I'm trying to develop a simple product catalog using categories; I use Transcribe plugin, also.

I've got main categories CAT1 (id4), CAT2 (id5), CAT3 (id6), CAT4 (id7) and subcategories of CAT1: SUBCAT1, SUBCAT2, SUBCAT3. Every main category have its own template page, for example when the user select CAT1 go to page: http://develop/products/group/C4/ On that page I need to show a list of CAT1 subcategories: SUBCAT1, SUBCAT2 and SUBCAT3. I wanna do it dynamically. Now, I can show my subcategories list right set parent\_id manually...

```
{exp:channel:categories channel="products" style="linear"}
    {if parent_id=="4"}
        {exp:transcribe:replace name="category_{category_url_title}"}<br />
    {/if}
{/exp:channel:categories}

```

I'm able to get the current main category ID...

```
{exp:channel:entries channel="products" limit="1"}
    {categories}
        {category_id}
    {/categories}
{/exp:channel:entries}

```

I wonder if there's a way to combine these informations and, simply, get "SUBCAT1, SUBCAT2, SUBCAT3" as output without use any plugins, when I'm on the CAT1 page.

# Answer
> 1 votes
Use `Gw Code Categories` like as below:

```
{exp:gwcode_categories cat_id="{segment_3}"}
    {cat_name}
{/exp:gwcode_categories}

```

OR if you want to use category url title then:

```
{exp:gwcode_categories cat_url_title="{segment_3}"}
    {cat_name}
{/exp:gwcode_categories}

```

Output:

```
-> CAT1
   -> SUBCAT1
   -> SUBCAT2
   -> SUBCAT3

```

If you don't want to show the "CAT1" category, you can add the incl\_self parameter like so: `incl_self="no"`.

---
Tags: categories, child-categories
---


# Question
Title: Plugin Development - Is it possible to extend the 'Grid' fieldtype?
I'm building a fieldtype plugin that is essentially planned to be an extension of the 'Grid' fieldtype. I can see in the docs how you create a new fieldtype to be used *inside* of a 'Grid' but that's not what I want to do. I'm looking to create a plugin that essentially takes the functionality of a grid but with custom fields already inside.

Is there a way to do this? I'm using EE 3.4.7

# Answer
I'm doing the same right now.

In short - yes, it's possible. Unfortunately there are almost no docs on that, so I took Grid field as example and tried to re-create it with modified functionality.

For my particular purpose, I sometimes call to functions from grid\_lib and grid\_parser, and sometimes write my own code (in particular, because my database table is not named following Grid's naming scheme)

I'm also using Grid javascript events, e.g. on('grid:addRow')
> 2 votes

---
Tags: add-on-development, plugin
---


# Question
Title: What ee ecommerce modules allow for product import?
What EE ecommerce modules allow for product import?

I want to use an Excel doc, save it as a CSV, for example.

I only have about six fields - Title, Number, Price, Image, Pkg Quantity, Weight.

I have about 600 products, will eventually be 3,000.

This would be an EE 3 site but I could still use EE 2 if necessary.

# Answer
> 2 votes
Cartthrob is the defacto standard for commerce within EE3. It uses standard channels for product info which allows you to then use datagrab which you can configure to import your product data. Import once, set Cron jobs to import regularly, use CSV, json or XML as your source.

Plenty of resources around for formatting data to import correctly.

---
Tags: expresso-store, cartthrob, brilliantretail
---


# Question
Title: check if specific field in all rows is empty in a grid field
Trying to check if all the last two fields are empty in all rows in a grid.

Right now code is checking each row:

```
{if page_minutes_table:total_rows > 0}
    <table>
        <thead>
            <tr>
                <th>Meeting Name</td>
                <th>Minutes</td>
                {if page_minutes_table:document_2 != "" && page_minutes_table:document_3 != ""}
                <th colspan="2">Additional Documents</td>
                {/if}
            </tr>
        </thead>
        <tbody>
        {page_minutes_table}
            <tr>
                <td>{page_minutes_table:meeting_name}</td>
                <td>{if page_minutes_table:minutes_document}<a href="{page_minutes_table:minutes_document}" target="_blank">Download Minutes</a>{if:else}coming soon{/if}</td>
                {if page_minutes_table:document_2 != "" && page_minutes_table:document_3 != ""}
                    <td>{page_minutes_table:document_2}</td>
                    <td>{page_minutes_table:document_3}</td>
                {/if}
            </tr>
        {/page_minutes_table}
        </tbody>
    </table>
{/if}

```

# Answer
> 1 votes
Not 100% sure I understand what you are trying to do - in your example code you appear to want to display all entries in the grid field, and have a heading included if there are downloadable documents available for an entry. The only way to do this is to loop through every row in the grid field.

I think you are asking if there is a way to get the information about how many rows in the table don't have either document\_2 or document\_3 defined without having to loop through all the entries. One way would be to use the `search:column_name` parameter in your grid tags.

The `search:column_name` parameter limits the results generated by a tag to just those entries within the entire (in this case grid) field that meet the criteria. This is helpful where you only want to work with a subset of entries, but here you could use it just to flush out a `total_rows` count for the search - thusly:

```
{page_minutes_table search:document_2="not IS_EMPTY" search:document_3="not IS_EMPTY"}
   {if page_minutes_table:total_rows}There are {page_minutes_table:total_rows} entries that have both{/if}
{/page_minutes_table}

```

HTH

---
Tags: grid, table
---


# Question
Title: Order ID Start Number field having no effect
I've updated my Order ID Start Number to 12421 but it is having no effect in either the backend or the frontend. Orders are still incrementing from the previous value.

I've tried removing all of the previous order, cleared the cache, and it still does not work as expected.

Any ideas?

I'm using ee v2.10.1.

# Answer
> 2 votes
Sorted...

I didn't remove all of the orders, i still had shipping and incomplete items in there.

This now works as expected.

---
Tags: expresso-store
---


# Question
Title: Remove/Clear select option value in a freeform pro edit form
I am having a weird issue in a Freeform Pro edit form. I'm using Freeform Pro v.4.2.5 and EE 2.11.2

I think I'm missing something obvious. In my jsfiddle, when Radio Option 1 is clicked , the two drop down menu fields are required. When Radio Option 2 is clicked, the two drop down menus are hidden and their values, if any were selected, are removed.

This works fine.

My problem occurs when I edit a record. If I had clicked Radio Option 1 and then two options from the select menus; if I go back and edit the record and choose Radio Option 2, while the select options are removed in the form, they are not deleted in the database.

Any ideas what I am missing?

I thought the code below removed the value from a select menu but it only saves the removed value from textfields.

```
$('#state_2').val("");

```

I also tried the code blow but it did not work either.

```
$('#country_2').prop( "selected", false );

```

Any help is appreciated, even if to let me know I'm missing something super obvious! Thanks Peter T

# Answer
> 0 votes
I have avague recollection of hiding fields in forms not being updated. Try editing your forms with the non-required fields visible.

If that doesn't work then I vaguely recall submitting forms in EE with empty fields does not update the dB. Try putting in irrelevant/false content ie. none. You can then search those fields for content = 'NOT none'.

---
Tags: solspace-freeform
---


# Question
Title: Comments Module {screen_name} -> {name} updating for previous comments?
Version is EE2.11.3.

I have a private, members only blog with comments set up.

When submitting comments, the {name} input field doesn't seem to do anything. The comments module always defaults to the member's {screen\_name}.

If a member changes their {screen\_name} using the CP, default member templates, or template tags provided by Zeal Smart Members any past comments still keep the OLD {name} value.

NEW comments DO store the updated screen\_name as name.

Looking through the comments table, the name column isn't getting updated. I would have thought it would, unless I have something set wrong?

Looks like DevDemon Freemember posted a fix for their module a few years ago to address something like this:

https://github.com/devdemon/freemember/pull/77/commits/3917d3037919bebd80163140635caa6c5f90001c

Does anyone here know how to get EE to properly update the comments "name" field when a member updates their "screen\_name"?

Thank you,

```
{exp:comment:form
  channel="CHANNEL"
  entry_id="ENTRY_ID"
  return="{segment_1}/{segment_2}/updated"}

<input type="text" name="name" value="new_name"> <!-- doesn't do anything for logged in members -->
<input type="text" name="author" value="new_name"> <!-- worth a try but nothing -->
<input type="text" name="screen_name" value="new_name"> <!-- nope -->
<input type="checkbox" name="save_info" value="yes" {save_info} /> <!-- seems to just save a session cookie -->
<textarea name="comment"></textarea>

{/exp:comment:form}

```

# Answer
> 4 votes
I am developer of zeal smart members. To solve your problem, Please Open file: `system > ExpressionEngine > third_party > smart_members > libraries > sm_lib.php`

Search for this function: `function update_static_fields($member_id, $post_data)`

Change the code from:

```
if(isset($custom_data))
{
    $this->EE->member_model->update_member($member_id, $custom_data);
}

```

To

```
if(isset($custom_data))
{

    /*Special edit for comment module*/
    if(isset($custom_data['screen_name']))
    {

        $this->EE->db->select('module_name');
        $this->EE->db->where('module_name', 'Comment');
        $query = $this->EE->db->get('modules');

        if ($query->num_rows() > 0)
        {
            $this->EE->db->where('author_id', $member_id);
            $this->EE->db->update(
                'comments',
                array('name' => $custom_data['screen_name'])
            );
        }

    }

    $this->EE->member_model->update_member($member_id, $custom_data);
}

```

Thanks for notify this, I will change the code of devote:ee with the updated fix.

---
Tags: comments, comment-form, screen-name
---


# Question
Title: Solspace FreeForm Pro Multi Page Form URL + Structure = 404
Multipage form on a site that is using Structure. The form is built in the Composer and added to the page with a custom field from the publish page.

Obviously page one works as the url is www.domain.com/name-of-page-with-form

But when I click through to page two of the form www.domain.com/name-of-page-with-form/page2, I am getting a 404 page not found. So I tried using Freebie to ignore that last segment but it looks like it is making FreeForm ignore the segment as well, thus displaying the first page of the form still.

Is there a way to use Structure and FreeForm Pro Multi Page forms??

# Answer
> 0 votes
When I have a Channel entries with paging on and Structure I also use the add-on switchee. May be it can also help with a FreeForm Pro Multi pages form.

```
{exp:switchee variable="{segment_2}" parse="inward"}

{case value="#^Page(\d+)$#|''"}
Put here your Form
{/case}

{/exp:switchee}

```

It could work.

Francois

# Answer
> 0 votes
I know this is an old question which has some sort of resolution but for others that are interested I've found a potential fix.

* Create a new template and assign it to the page that contains (or is likely to contain) the form
* Go to `Design > Templates > Template Route Manager`
* Find your template and add the following: `{page:alpha_dash}/{page:alpha_numeric}`

This works perfectly well with my site setup. You can also assign the template / template route to a parent page i.e. `parent-page/{page:alpha_dash}/{page_no:alpha_numeric}`

# Answer
> 0 votes
Try using the Freebie addon and add "page1", "page2", "page3" etc to the list of segments to ignore. Then in your composer tag add the parameter `multipage_page="{freebie_last}"`

---
Tags: solspace-freeform, solspace, structure, freebie
---


# Question
Title: Multi page form with required fields on both pages bombs
Composing multi page form using Freeform Pro Composer where values are required on 2 different pages. Both pages are in same form with pagebreak creating two separate pages. Values are required on both the first and second page of the form. When using straight required="name|last\_name|id\_number" (some of those fields span onto page two of the form) the user can not submit the form without getting error messages about fields being required that are on page 2 of the form which they have not seen yet. Any thoughts?

I don't want to create two separate forms because I want all of the data to dump into the same database entry.

# Answer
Do you have the **required** parameter applied to the **freeform:page:1** variable tag like the docs say (http://www.solspace.com/docs/freeform/form/#required) or is it on the main **freeform** tag pair?

**Update**:
If you are using Composer I believe you need to remove the required parameter entirely from that tag and use the required option for each field you want instead
> 2 votes

# Answer
```
{freeform:page:1 required="name|phone|address"}
    // content
{/freeform:page:1}

{freeform:page:2 required="favorite_food|favorite_sports"}
    // content
{/freeform:page:2}

```

Straight from the docs: http://www.solspace.com/docs/freeform/form/#freeform\_page\_1
> 1 votes

# Answer
I fixed this by finding the follow line in mod.freeform.php

```
  // -------------------------------------
  //    halt on errors
  // -------------------------------------
  if (count($all_errors) > 0)

```

and replacing it with this:

```
  $submit_to_previous = (ee()->input->get_post('submit_to_previous') !== FALSE);
  if (count($all_errors) > 0 && !$submit_to_previous )

```

If you have any HTML5 validation you will need to disable validation on previous click too. So find the line in the function replace\_submit in mod.freeform.php :

```
form_submit($args),

```

and replace it with:

```
form_submit($args,$args['value'],($args['name']=='submit_to_previous' ? ' formnovalidate' : '')),

```
> 0 votes

---
Tags: solspace-freeform
---


# Question
Title: Transcribe + Wygwam + Structure links not working
When adding Structure Links to a wygwam field on a Transcribe entry that's not the default language, they are being rendered like this: `<a href="{page_168}">`

More info:

I have a Transcribe site with Structure and Wygwam. Each language has it's own domain (example.com, `example.de` etc) When I add a Structure Link into Wygwam for the default language (eg `example.com`) by clicking Link Icon \> Link Style: Structure \> then selecting a page, it puts the link in and works fine (eg `http://example.com/news/the_story`). However if I add an entry for the non-default language (eg `example.de`) and then add a Structure Link into Wygwam the URL appears fine in wygwam but when it appears on the site it shows `<a href="{page_168}">` .

After investigation it looks like the page id is referencing the entry id for the default language and not the current language the entry is for. The list of pages that are shown in the Structure Link dropdown is only ever for the default language and not the current language.

I think what's happening is wygwam is looking for the URL based on the default language and then converting that the `{page_XX}` variable but it's getting it wrong because it's ignoring the domain name and choosing the page id that's on the default language. Is there any way to fix this?

EE v2.11.2, Transcribe v1.7.1, Structure v3.3.19, Wygwam v3.3.3

# Answer
I spoke to the developer, this is a known bug. They will fix it at some point.
> 1 votes

---
Tags: ee2, wygwam, structure, transcribe
---


title: Allow SVG upload in EE

text:
# Question
Title: Allow SVG upload in EE
I'm trying to allow SVG uploads via the file fieldtype (EE 2.9.2), but it gives me an error:

> The file type you are attempting to upload is not allowed.

I have updated mimes.php with the following additions:

```
'svgz' => 'image/svg+xml',
'svg' => 'image/svg+xml'

```

but this has made no difference. I have also tried disabling XSS filtering in the EE CP - also does not work.

Finally, I added the following to config.php:

```
$config['allowed_types'] = 'svg';

```

And this does not work either. How can I get this working?

# Answer
> 1 votes
The `svg` files is considered as `text/html` mime type by the `finfo_file()`.

So you need to set `Allowed File Types` as `All file types` inside `File Upload Preferences` to allow svg file uploads.

# Answer
> 0 votes
Have you tried creating a .htaccess file with

```
AddType image/svg+xml svg
AddType image/svg+xml svgz

```

---
Tags: file-uploads
---


title: Inline errors with Freeform composer

text:
# Question
Title: Inline errors with Freeform composer
I would like to show inline errors on my composer form in Freeform. I tried the template code mentioned at https://expressionengine.stackexchange.com/a/25346/961 which is:

```
<p>
    {composer:field_output}

    {!-- composer:field_name will parse first to the field's name --}
    {if freeform:error:{composer:field_name}}
        <strong>{freeform:error:{composer:field_name}}</strong>
    {/if}
</p>

```

but it's giving me the error:

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

Parser State: Unexpected ‘:’ (MISC); expected RD in on line 28.

```

If I remove the inline error code then it works ok but obviously doesn't show the inline errors.

The full composer template is as follows:

```
<div class="ff_composer">
{composer:page}
    {composer:rows}
            <div class="line">
        {composer:columns}
                <div class="unit size1of{composer:column_total}">
                {if composer:field_total == 0}

                {/if}
            {composer:fields}
                {if composer:field_label}
                    {if composer:field_type == 'nonfield_captcha'}
                        {if freeform:captcha}
                        <p>
                            <strong>{composer:field_label}</strong>
                        </p>
                        {/if}
                    {if:else}
                        <label class="field_label" {if composer:field_name != ''}for="freeform_{composer:field_name}"{/if}>
                            {composer:field_label}{if composer:field_required}<span class="required_item">*</span>{/if}
                        </label>
                    {/if}
                {/if}
                {if composer:field_output}
                    {if composer:field_type == 'nonfield_title'}
                        <h2>{composer:field_output}</h2>
                    {if:elseif composer:field_type == 'nonfield_paragraph'}
                        {composer:field_output}
                    {if:elseif composer:field_type == 'nonfield_captcha'}
                        {if freeform:captcha}
                                {freeform:captcha}<br />
                                <input type="text" name="captcha" value="" size="20" maxlength="20" style="width:140px;" />
                        {/if}
                    {if:else}
                        <p>
                        {composer:field_output}
                            {!-- composer:field_name will parse first to the field's name --}
                            {if freeform:error:{composer:field_name}}
                                <strong>{freeform:error:{composer:field_name}}</strong>
                            {/if}
                        </p>
                    {/if}
                {/if}
            {/composer:fields}
                </div>
        {/composer:columns}
            </div>
    {/composer:rows}
{/composer:page}
</div>

```

# Answer
> 2 votes
For EE3, it appears that Freeform 5.x is a bit fussier about the conditional. Try this code instead:

```
<p>
    {composer:field_output}

    {!-- composer:field_name will parse first to the field's name --}
    {if "{freeform:error:{composer:field_name}}"}
        <strong>{freeform:error:{composer:field_name}}</strong>
    {/if}
</p>

```

---
Tags: solspace-freeform, solspace, parse-order, composer-template
---


# Question
Title: CartThrob Redeeming Gift Certificates doesn't work return white page error
Cartthrob dedicated form for redemption doesn't work, it returns white page when submitting with the form a gift certificate code in the field, also balance isn't redempt in backend

# Answer
A white page is generally a sign of a PHP error. Can you turn on PHP error output in your ExpressionEngine config and see what the error is?
> 0 votes

---
Tags: cartthrob
---


# Question
Title: Channel data not displaying in channel loop, but does display in query module tag
I recently had a client referred to me who has an existing EE build, v2.73, and some of their entries just stopped displaying on their templates. According to them, no code has changed and no software (EE or add ons) have been updated.

I created a blank template to put a simple channel loop in to try some of the common problems; dynamic="no", making sure all statuses are accounted for, show\_expired, show\_future\_entries. None of it worked. Some entries' channel data would display, and others wouldn't. All entries, even the one's not displaying, are visible in the backend and I can see them in the database.

So I decided to see if I could pull out the data with the exp:query tag, and sure enough I can. I can pull the data of an entry with the exp:query tag, but not the same entry's data with an exp:channel:entries tag.

I've never encountered this before and have no idea how to troubleshoot it. Thought I'd see if anyone had any ideas.

The code below is on an otherwise blank template. The `{article_text}` field is mapped to `field_id_3` in the `exp_channel_data` table.

```
{exp:channel:entries entry_id="3208" dynamic="no"}

      Channel Tag:<br/>
      {article_text}<br/><br/>

{/exp:channel:entries}

{exp:query sql="SELECT field_id_3 FROM exp_channel_data WHERE entry_id = '3208' "}

      Query Module<br/>
      {field_id_3}

{/exp:query}

```

Both tags in the above block output content when I changed the `entry_id` to an article that is working on the front end. I'm straight up baffled. Any suggestions would be greatly appreciated.

# Answer
> 0 votes
Looks like this was unrelated to native EE. After some investigation the problem seems to be with an add-on.

# Answer
> 0 votes
If that entry does not have the status of "Open", Make sure you set the status parameter to include what ever that entry has. i. e. `status="Open|Draft|Review"` The channel entries tag defaults to Open entries only. The Query Module is ignoring status unless you explicitly set it in the where clause.

---
Tags: channel, query, no-results
---


# Question
Title: 404 page going to listing entry template only in first segment
I can only trigger the 404 template for anything more than two segments, for example, if this is bad link I see 404 page: `site.com/wrong/link`

When just accessing one segment like this for example, `site.com/wrong` page displays my listing entry template outputting same entry.

Here's template...maybe something on there or route that isn't set up correctly?

```
{embed="layouts/index"}

{exp:stash:set parse_tags="yes"}
        {stash:content}
            <div id="subpage-container" class="content">
                <table class="Subsection-Image-Table" style="background-image: url('/assets/images/header-background.jpg');">
                    <tbody>
                        <tr>
                            <td>
                            <!--
                                <table width="100%">
                                    <tbody>
                                        <tr>
                                            <td style="width: 50%;" width="50%">
                                                <h1>Personal Checking</h1>
                                                <p>This outer table (with a green outline in cms) is a table with class "<em>Subsection-Image-Table</em>". To change the image of a page with this table, select the table, right click, choose "Table Properties" and choose an image from the background image select box.</p>
                                            </td>
                                            <td width="50%"> </td>
                                        </tr>
                                    </tbody>
                                </table>
                                -->
                            </td>
                        </tr>
                    </tbody>
                </table>
                <table class="Subsection-Table">
                    <tbody>
                        <tr>
                            <td>
                                <h1><a href="{homepage}">Blog</a></h1>
                                <div class="row">

                                        {embed="embeds/_sidebar"}

                                    <div class="col-md-9 entry-listing">
                                        {exp:channel:entries channel="blog_entry" orderby="date" limit="1"}
                                            <div class="col-right">
                                                <ul class="breadcrumbs">
                                                    <li><a href="{homepage}">Blog Home</a></li>
                                                    <li>{title}</li>
                                                </ul>
                                                <article class="text-area">
                                                    <h1>{title}</h1>
                                                    <div class="owl-carousel owl-theme">
                                                        {blog_entry_images}
                                                            <div>
                                                                <img class="blog-image" src="{blog_entry_images:image}" alt="{alt}" style="margin-bottom:0;"/>
                                                                {if blog_entry_images:caption}<p class="blog-caption">{blog_entry_images:caption}</p>{/if}
                                                            </div>
                                                        {/blog_entry_images}
                                                    </div>
                                                    <span class="posted">Published on {entry_date format='%M %j, %Y'}</span>
                                                    {embed="embeds/_sharing_icons"}
                                                    {blog_entry_blocks}
                                                        {vimeo_embed}
                                                        <div class="videoWrapper">
                                                            {embed}
                                                        </div>
                                                        {/vimeo_embed}

                                                        {block_content}
                                                            {content}
                                                        {/block_content}
                                                    {/blog_entry_blocks}
                                                </article>
                                            </div>
                                        {/exp:channel:entries}
                                    </div>
                                </div>
                            </td>
                        </tr>
                    </tbody>
                </table>
                <table class="Subsection-Image-Table" style="background-image: url('/assets/images/footer-background.jpg');">
                    <tbody>
                        <tr>
                            <td>
                                <!--
                                <table width="100%">
                                    <tbody>
                                        <tr>
                                            <td width="50%">
                                                <h2><a id="Smart-Checking"></a>Heading 2</h2>
                                                <p>A table with the class "Subsection-Image-Table" can be used throughout the site in different locations. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam magna purus, dapibus vel luctus id, efficitur sed nibh. Pellentesque sit amet elit imperdiet, pharetra ipsum non, eleifend metus.</p>
                                            </td>
                                            <td width="50%"> </td>
                                        </tr>
                                    </tbody>
                                </table>
                                -->
                            </td>
                        </tr>
                    </tbody>
                </table>
            </div><!--/subpage-container-->

        {/stash:content}

{/exp:stash:set}

```

Here's my route setup:

# Answer
Still not entirely sure from your question what you are trying to do, or how the template excerpt helps, but just for clarification, the template route in the screen grab will capture any URL that happens to begin `/blog/something` \- regardless of whatever follows it (provided the second term matches the alpha\_dash character list).

Unless you have some other route set up, there appears to be no way that you can get a 404 to display for any URL that happens to begin `/blog/something`as the template route will grab these and send them to your `blog-entry` template.

Maybe you should think about changing the template route status for **Segments Required?** to yes - this will not change the route behaviour for `/blog/something` but will not intercept urls with more terms (so `/blog/something/else` wouldn't be captured by the route if you change the segments required flag.

HTH
> 0 votes

---
Tags: templates, 404
---


title: Member Relationships to single Entry

text:
# Question
Title: Member Relationships to single Entry
I have a tournaments channel where ppl will be able to add tourney's through front end. I now need other members to be able to submit a "team" to a specific tourney entry. There will need to be like 10 "teams" linking to a specific "tournament" channel. I'm trying to figure out best scenario for Teams to register for tourney's.

I was also thinking of allowing someone entering a team to select/seach from a list of "members". I don't think you can have a relationship to members though. Any advice for all this?

# Answer
> 1 votes
Another approach you might want to consider is using the VMG Chosen Member add-on.

Chosen Member gives you the ability to assign members to channel entries without having to turn those member details into entries in a parallel channel, and also provides some tools for hooking out member data fields into templates (so if a member is associated with a channel entry, you can pull information into a template displaying that channel entry from their member profile). It is very handy, and a lot simpler to work with than Zoo Visitor (for example), and (since it does not replicate member data into a channel) is very "DRY".

Also, Chosen Member is compatible with EE3, Zoo Visitor is (AFAIK) EE2 only.

HTH

# Answer
> 0 votes
Use a 3rd party member module (zoo visitor etc) which stores member data in channel entries.

With data in channels you are then free to use relationships.

I did this a while ago and went well down the rabbit hole but your scenario sounds reasonable but with multiple groups and 'captains" you will need some obfuscation to stop 'captains' from editing other teams.

---
Tags: channel-entries, members, relationships, ee3, related-entries
---


# Question
Title: How do I control the amount of links in the homepage feature?
My website currently has 5 links that rotate in a slide gallery on the homepage. I can edit these links by editing the Homepage feature but I don't know how to reduce their number from 5 to 4 links being displayed. Does anyone know how to adjust this?

Thank you

# Answer
> 2 votes
By adding limit parameter to your EE code you will limit the results. For more details please see documentation

# Answer
> 1 votes
It depends on how your homepage feature is actually built, but in most cases, you can simple add something like the following:

limit="4"

This "limit" feature is built into EE (see URL below), but most modules/extensions such as Matrix, Playa, etc all use it as well.

Documentation: https://docs.expressionengine.com/latest/channel/channel\_entries.html#limit

If that does not work, please provide a sample of the code and I can help guide you further to get it fixed up.

---
Tags: ee2
---


# Question
Title: CartThrob Cart Items Info without currency formatting
We're using **CartThrob Pro 2.7** and **EE 2.10**. Is there a way to output the item subtotal without the currency formatting? We've tried:

```
{exp:cartthrob:cart_items_info number_format="yes"}

{item_subtotal}

{/exp:cartthrob:cart_items_info}

```

but it still applies the currency symbol

# Answer
> 2 votes
try using the parameter prefix=""

```
{exp:cartthrob:cart_items_info number_format="yes" prefix=""}
{item_subtotal}
{/exp:cartthrob:cart_items_info}

```

the prefix tag is for manually specifying the currency symbol or prefixing the amounts with whatever you need. Setting it to "" means use no symbol.

---
Tags: cartthrob
---


# Question
Title: Alternative to Objective HTML Google Map plugin
I have a site that’s currently using Objective HTML’s Google Maps plugin to import entries and add geolocation. It looks like the plugin is no longer being actively developed or supported so I’m looking into alternative options.

There are some good Google Map alternatives on Devot-ee, but as far as I can tell, nothing I found can handle importing as well. I'm curious if anyone has an alternative solution for supporting this functionality.

# Answer
> 2 votes
The best alternative I've found is the excellent Gmaps plugin from Rein de Vries.

You can pair this plugin with his Gmaps Importer plugin (which is actually an extension of DataGrab) to replicate the importing functionality of the Objective HTML version.

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


title: Playa broken in MySQL > 5.7.4

text:
# Question
Title: Playa broken in MySQL > 5.7.4
Since v5.7.5 MySQL returns errors for certain badly formed SQL statements. As such Playa v4.5.2 will throw errors.

# Answer
> 5 votes
So far I've discovered and fixed one case and will add more here if discovered.

File: mod.playa.php
Line: 550

FROM

```
$sql = 'SELECT DISTINCT(rel.child_entry_id) AS entry_id

```

TO

```
$sql = 'SELECT DISTINCT rel.child_entry_id AS entry_id, rel.parent_entry_id, rel.parent_field_id, rel.parent_row_id, rel.parent_col_id, rel.parent_var_id, rel.rel_order

```

# Answer
> 1 votes
I've encountered errors trying to open Playa fields due to the stricter group by rules (https://dev.mysql.com/doc/refman/5.7/en/sql-mode.html#sqlmode\_only\_full\_group\_by)

In ft.playa.php I changed line 1406 from

`GROUP BY m.member_id`

to

`GROUP BY m.member_id, m.screen_name, mg.group_title`

---
Tags: playa, pixelandtonic
---


# Question
Title: Comments are appearing without moderation even though they're set to be moderated
I've got an ExpressionEngine 3.5.1 website and the comments posted by the public ('Guests' in EE speak, or non-logged in users) are appearing immediately after posting. We want the comments to go through moderation and have set it up appropriately but it's not working.

The way it's set up is in the Admin \> Members \> Member Groups I've set 'Guests' to:

* Submit comments = Yes
* Bypass moderation = No

The comment module is enabled and the form in the template has been done following EE's documentation, e.g.

```
{exp:comment:form channel="myblog" preview="channel/preview"}

        {if logged_out}
        <div class="row">
            <div class="col-xs-6 col-md-6 form-group">
                <label for="name">Your Name:</label>
                <input type="text" name="name" value="{name}" size="50" required class="form-control" placeholder="Your name">
            </div>

            <div class="col-xs-6 col-md-6 form-group">
                <label for="email">Email Address:</label>
                <input type="text" name="email" value="{email}" size="50" required class="form-control" placeholder="Your email address">
            </div>
        </div>
        {/if}

        <div class="form-group">
            <label for="comment">Post your comment...</label>
            <textarea name="comment" cols="80" rows="5" required class="form-control" placeholder="Write your comments here">{comment}</textarea>
        </div>

        <label><input type="checkbox" name="save_info" value="yes" {save_info} /> Remember my name & email address</label><br />

        {if captcha}
                <label for="captcha">Please enter the word you see in the image below:</label><br />
                <p>{captcha}<br />
                <input type="text" name="captcha" value="{captcha_word}" maxlength="20" /></p>
        {/if}

        <div class="text-center mt-25">
            <input type="submit" name="submit" value="Post Your Comment" class="btn btn-primary btn-lg btn-red">
        </div>

{/exp:comment:form}

```

I've logged out of the Admin panel and even tried it in a Chrome Incognito browser window to make sure it's not using any session/cookie data that thinks I'm an Admin.

The comments appear... but we don't want them to go directly on the site without moderation. How can I fix this?

I've updated to EE 3.5.1 today which is the absolute latest version to make sure it's not an EE bug. Same behaviour as my older version.

# Answer
I see that you have your member group preferences set, how about the channel preferences - Moderate comments \[yes | no\] for the channel in question?
> 3 votes

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


# Question
Title: Are the blocks in the Bloqs Add-On repeatable?
I am asking a very basic question which I could not with 100 % certainty answer by browsing both the old and new owner's web site and documentation of Bloqs (EE3)/Blocks (EE2) or by searching on EE Aswers. Any example I could find was a demonstration how to use the Bloqs once. I'm considering a purchase and contacting the current owner was without any response so far.

**Can I use the predefined Blocks more than once per entry?**

as in the following example ordering:

```
caption

quote

text-field

photoslide

text-field

photo-slide

text-field

```

*Optional question: how would that look like in template code? Would it be enough to define the Bocks layout in template once and it would figure the order of repeated blocks itself or do have to hardcode an order myself?*

I know I can probably make a grid and use Bloqs as field type and get it to do what I want, but it could be much simpler if the bloqs would be repeatable.

Thanks to anybody who can point me into the right direction (favorably somebody who uses Bloqs in an EE3 instance).

# Answer
i'm using bloqs. First time, but it seems to do whatever i like it to. So repeatable content blocks works. It takes the order you give it in the entry screen. The setup in the templates is pretty easy too. I use a tag and a snippet in the templates like this:

```
{pages_page_builder}
{sn_page_builder}
{pages_page_builder}

```

And my (very basic) snippet looks like this:

```
{gecentreerde_titel}
                    {if titel}
                        <div class="row">
                            <h2>{titel}</h2>
                        </div>
                    {/if}
                 {/gecentreerde_titel}
                 {brede_tekst}
                    {if titel}
                        <div class="row">
                            <h2>{titel}</h2>
                        </div>
                    {/if}
                    {if tekst}
                        <div class="row">
                            {tekst} {if link}
                                        <a href="{link}" title="">Lees verder</a>
                                    {/if}
                        </div>
                    {/if}
                 {/brede_tekst}
                 {2_blokken_met_tekst_en_achtergrondafbeelding}
                    <div>
                    {if blok_1_afbeelding}
                        {blok_1_afbeelding}
                    {/if}
                    {if blok_1_kop}
                        {blok_1_kop}
                    {/if}
                    {if blok_1_tekst}
                        {blok_1_tekst}
                    {/if}
                    {if blok_1_link}
                        {blok_1_link}
                    {/if}
                    </div>
                    <div>
                    {if blok_2_afbeelding}
                        {blok_2_afbeelding}
                    {/if}
                    {if blok_2_kop}
                        {blok_2_kop}
                    {/if}
                    {if blok_2_tekst}
                        {blok_2_tekst}
                    {/if}
                    {if blok_2_link}
                        {blok_2_link}
                    {/if}
                    </div>
                 {/2_blokken_met_tekst_en_achtergrondafbeelding}

                 {3_blokken_gecentreerd}
                    <div>
                    {if blok_1_afbeelding}
                        {blok_1_afbeelding}
                    {/if}
                    {if blok_1_kop}
                        {blok_1_kop}
                    {/if}
                    {if blok_1_tekst}
                        {blok_1_tekst}
                    {/if}
                    {if blok_1_link}
                        {blok_1_link}
                    {/if}
                    </div>
                    <div>
                    {if blok_2_afbeelding}
                        {blok_2_afbeelding}
                    {/if}
                    {if blok_2_kop}
                        {blok_2_kop}
                    {/if}
                    {if blok_2_tekst}
                        {blok_2_tekst}
                    {/if}
                    {if blok_2_link}
                        {blok_2_link}
                    {/if}
                    </div>
                    <div>
                    {if blok_3_afbeelding}
                        {blok_3_afbeelding}
                    {/if}
                    {if blok_3_kop}
                        {blok_3_kop}
                    {/if}
                    {if blok_3_tekst}
                        {blok_3_tekst}
                    {/if}
                    {if blok_3_link}
                        {blok_3_link}
                    {/if}
                    </div>
                 {/3_blokken_gecentreerd}

                 {brede_afbeelding}
                    {if afbeelding}
                        {afbeelding}
                    {/if}
                 {/brede_afbeelding}

                 {nieuwsbrief_inschrijfformulier}
                    {if titel}
                        <h3>{titel}</h3>
                        Nieuwsbrief formulier hier
                    {/if}
                 {/nieuwsbrief_inschrijfformulier}

```
> 2 votes

---
Tags: add-on, blocks
---


# Question
Title: Site Error: Unable to Load Site Preferences; No Preferences Found
I've I clients website which has been working fine, today the site has gone down randomly. I was initially able to access the control panel and all seemed fine, whilst logged in the home page displayed a error 28 message which understand means the database has run out of room. The client had checked with the host who said all was fine their end. But now the site is displaying "Site Error: Unable to Load Site Preferences; No Preferences Found" and I can't access the control panel any more?? Has anyone got any suggestions of how this could have come about or more importantly how it can be fixed. Many thanks in advance.

# Answer
> 22 votes
Double check the database.php settings file. It's most likely to be some kinda of database connection issue. It may be that your host has changed the IP of it's DB server or something is blocking the connection.

See if you can log into the database directly through your hosting control panel or phpMyAdmin with the same credentials.

# Answer
> 2 votes
I had this happen once with a client's site recently. It ended up being the server. It was out of writable space in one of the cache/temp directories. But maybe you can try deleting all EE cache and see where that gets you.

We ended up switching hosts for the client and everything is back to normal.

# Answer
> 0 votes
Another thing to check is file permissions on config.php, database.php and the cache directory.

# Answer
> 0 votes
If it's intermittent... this will likely be related to max database connections. Check the max user connections setting, and compare that to the number of connections open.

# Answer
> 0 votes
Check the `database.php` file.
In my case, I resolved just changing hostname from `localhost` to `127.0.0.1`.

# Answer
> 0 votes
There are two possible causes for this error. One is database connection issues. Two, in my case, the host company upgraded PHP on the server and my EE installation became incompatible with the new version of PHP. I could role back to a legacy version of PHP for my host account, and that solved the problem.

---
Tags: error
---


title: ee3 bloqs and relationships

text:
# Question
Title: ee3 bloqs and relationships
I have a channel that uses a Bloqs fieldtype in ee3. One of the defined blocks has a native relationship in it. I can output all the content from the related entries without a problem, but was wondering if anyone else had a problem with the total\_results variable.

```
{exp:channel:entries}
{bloqs_field}
  {block_type}
    total: {relationfield:total_results}
    {relationfield}
        {relationfield:title} ({relationfield:count})
    {/relationfield}
  {/block_type}
{/bloqs_field}
{/exp:channel:entries}

```

Everything above works as expected - except the output of {relationfield:total\_results} which is always "1" regardless of the number of items selected \> 0.

Has anyone else run across this problem?

# Answer
I believe to access the total\_results tag it needs to be inside the relationship tags, currently you have it sitting outside the tag.
> 0 votes

---
Tags: relationships, ee3, blocks
---


# Question
Title: How to use Swtichee and/or Low Variables to optimise an if if:elseif if:else conditional statement
My page is loading really slow due to my inexperience.

Can anyone help me speed things up by perhaps using Switchee and or Low Variables (and perhaps some Stash).

I'm really just looking to be schooled on this one.

Code to be optimised is below, all help and comments are greatly appreciated.

Thank you. =)

```
{logos} <!-- logos is a matrix field type and is returning 40 entries -->
    <div class="item">
        {if external_url}
            <a href="{external_url}" target="_blank"><img src="{logo}" alt="{title}" height="120" width="240" /></a>
        {if:elseif internal_url}
            <a href="{internal_url}"><img src="{logo}" alt="{title}" height="120" width="240" /></a>
        {if:else}
            <img src="{logo}" alt="{title}" height="120" width="240" />
        {/if}
    </div>
{/logos}

```

# Answer
> 1 votes
Frankly, ExpressionEngine code conditions to convert in switchee or law variables will not increase page speed.

To enhance the performance, you should try this plugin for if condition:(EE2) URL

To increase the page speed, There are several ways (You can use all of them)

1. Use CE Cache Plugin: (EE2) URL
2. Enable Gzip compression from .htaccess

```
# BEGIN EXPIRES
<IfModule mod_expires.c>
    ExpiresActive On
    ExpiresDefault "access plus 10 days"
    ExpiresByType text/css "access plus 1 week"
    ExpiresByType text/plain "access plus 1 month"
    ExpiresByType image/gif "access plus 1 month"
    ExpiresByType image/png "access plus 1 month"
    ExpiresByType image/jpeg "access plus 1 month"
    ExpiresByType application/x-javascript "access plus 1 month"
    ExpiresByType application/javascript "access plus 1 week"
    ExpiresByType application/x-icon "access plus 1 year"
</IfModule>
# END EXPIRES

# BEGIN ZIP
<ifModule mod_gzip.c>
    mod_gzip_on Yes
    mod_gzip_dechunk Yes
    mod_gzip_item_include file .(html?|txt|css|js|php|pl)$
    mod_gzip_item_include handler ^cgi-script$
    mod_gzip_item_include mime ^text/.*
    mod_gzip_item_include mime ^application/x-javascript.*
    mod_gzip_item_exclude mime ^image/.*
    mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*
</ifModule>
# END ZIP

```
3. Disable Page tracking by config: (Handling Extreme Traffic) URL
4. Query Disabling (in channel entries) `disable="custom_fields|categories|category_fields|member_data|pagination|trackbacks|relationships"`
5. You can also cache the channel entries by tag caching using parameter in exp:channel:entries `cache="yes" refresh="30"`
6. You can use Template caching in `Design > Template Manager > Template Preferences Manager`. Under `Enable Caching?`

---
Tags: stash, low-variables, switchee
---


title: How to remove twitter-feed from website

text:
# Question
Title: How to remove twitter-feed from website
I was asked by the owners to remove the twitter-feed from their website, but untill now I am unable to find the place where to do that. The website I am working on is:

www.werkelijkheid.com

# Answer
> 0 votes
Where it's located is hard to tell, since every setup is different. It seems as an older site, is it in EE1 or EE2? You'll have to edit the templates via the template manager or look in the global variables or snippets. Also, it can be hiding in an addon(module probably) such as Low Variables. If you need a hand just give me a shout

# Answer
> 0 votes
This might just be a straight up Twitter embed with no EE add-on involvement at all.

Search your EE templates for the string `twitter-timeline`.

And remove the following two lines:

```
<a class="twitter-timeline"  href="https://twitter.com/search?q=%23BMISXSW%20OR%20%23SXSW" data-widget-id="307176336953319424">Tweets about #BMISXSW OR #SXSW</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+"://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>

```

---
Tags: twitter
---


# Question
Title: EE 3.5 Can't add any custom Member Fields for registration
I'm trying to make it so members have to add First and Last name when registering to use in templates. I went to Member Fields and tried adding a new one but I always get exception errors.

Exception Caught

No such property: 'm\_field\_value\_label\_pairs' on EllisLab\ExpressionEngine\Model\Member\MemberField

ee/EllisLab/ExpressionEngine/Library/Data/Entity.php:488

Stack Trace: hide details

# 0 ee/EllisLab/ExpressionEngine/Library/Data/Entity.php(423): EllisLab\ExpressionEngine\Library\Data\Entity-\>setRawProperty('m\_field\_value\_l...', false)

# 1 ee/EllisLab/ExpressionEngine/Service/Model/Model.php(307): EllisLab\ExpressionEngine\Library\Data\Entity-\>setProperty('m\_field\_value\_l...', false)

# 2 ee/EllisLab/ExpressionEngine/Library/Data/Entity.php(74): EllisLab\ExpressionEngine\Service\Model\Model-\>setProperty('m\_field\_value\_l...', false)

# 3 ee/EllisLab/ExpressionEngine/Service/Model/Model.php(203): EllisLab\ExpressionEngine\Library\Data\Entity-\>\__set('m\_field\_value\_l...', false)

# 4 ee/EllisLab/ExpressionEngine/Model/Member/MemberField.php(159): EllisLab\ExpressionEngine\Service\Model\Model-\>\__set('m\_field\_value\_l...', false)

# 5 ee/EllisLab/ExpressionEngine/Controller/Members/Fields.php(393): EllisLab\ExpressionEngine\Model\Member\MemberField-\>\__set('field\_value\_lab...', false)

# 6 ee/EllisLab/ExpressionEngine/Controller/Members/Fields.php(172): EllisLab\ExpressionEngine\Controller\Members\Fields-\>form()

# 7 \[internal function\]: EllisLab\ExpressionEngine\Controller\Members\Fields-\>create()

# 8 ee/EllisLab/ExpressionEngine/Core/Core.php(189): call\_user\_func\_array(Array, Array)

# 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('...')

# 11 admin.php(143): require\_once('...')

# Answer
There was apparently a bug in 3.5.0 and this was fixed in 3.5.1 (I upgraded and confirmed it's fixed).
> 1 votes

---
Tags: ee3, registration, member-management
---


title: EE3 and Structure MYSQL Error

text:
# Question
Title: EE3 and Structure MYSQL Error
When publishing a page with EE 3.4.7 and Structure 4.0.0-b.12 we get a SQL error.

```
SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '15' for key 'PRIMARY':
INSERT INTO exp_structure (site_id, entry_id, parent_id, channel_id, listing_cid, hidden, dead, lft, rgt) VALUES (1,15,0,2,0,'n','', 16, 17)

ee/legacy/database/drivers/mysqli/mysqli_connection.php:122

```

Havent found a solution yet does anyone have any advice.

# Answer
> 2 votes
Updating structure out of beta fixed the issue.

---
Tags: structure
---


title: Custom field as a parameter

text:
# Question
Title: Custom field as a parameter
i 'm working on a project about events in a city using Solspace calendar. What i want is the user to select some data in a form (date range, category -music, theatre, etc- and area). The data are going to the results page. Everything works on the results page apart the area which is a custom text field.

My code is

```
{exp:calendar:events
    channel="events"
    category="{segment_3}"
    show_recurrences="yes"
    load_resource_consuming_data="yes"
    date_range_start="{segment_4}-{segment_5}-{segment_6}"
    date_range_end="{segment_7}-{segment_8}-{segment_9}"
    limit="10" paginate="both"
}

```

The area text field is "event\_city2" and values can be "Athens" or "Piraeus", etc Now, i have tried to include it inside the above code as a parameter like event\_city2 ="segment\_10" or calendar:event\_city2 ="segment\_10" or search:event\_city2 ="segment\_10" with no success

I saw in the solspace calendar documentation that a custom field can be a variable but not a parameter.

So i'm asking the community if there is a solution to that

Thanks

# Answer
It states in the docs that there is hard coded limit of 9 segments. So `segment_10` will never resolve.
> 1 votes

# Answer
By its very nature, calendaring add-ons with recurring event handling like Calendar use a lot of resources to render. It may not be as much of an issue for smaller sites, but for ones with many events it becomes a major performance issue. Because of this, we kept the `{exp:calendar:events}` template tag very lean to keep it always running fast.

This unfortunately means that not all features available with `{exp:channel:entries}` are also available for `{exp:calendar:events}`. In this particular case, **custom field searching (`search:field_name="value"`) is not available at this time.**
> 1 votes

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


title: Discussion Forum

text:
# Question
Title: Discussion Forum
Is there any way to make the discussion forum have better clean URLs?

At the moment it defaults to `/forum/viewforum/7/`, but it would be nice to have something like `/forum/viewforum/expressionengine/`or `/forum/viewthread/test-topic/`.

The only other solution I can think of is to use Channel Form, and build something like similar to a forum.

# Answer
I will suggest you to keep the discussion forum URLs as it is. Because at this moment whole plugin made of '/forum/viewforum/7/' type of URLs and there are no ways to change it. If you want then you need to customize whole plugin. But it becomes very difficult and lengthy.
> 0 votes

---
Tags: safecracker, forum, discussion
---