texts: Need help to stop inner conditionals from parsing with with nested conditionals and stash

texts:
I'm really stuck and I know it's likely something small that I'm missing. I read the page in the wiki that relates to stash conditionals (https://gist.github.com/croxton/9d012297096892ca5c10), but I have to admit, I don’t completely follow whether it would apply the same way to set_list and get_list. Here’s my setup - I’m using the older way of inserting the wrapper template, using a traditional EE embed rather than a stash embed (perhaps that too should change?):

MY LOGIC TEMPLATE (simplified slightly to strip out details you likely don’t need to zero in on my problem)

{embed="_layouts/.catalog-product-details"}
{exp:stash:context name="stock-parts-product-details"}

    {exp:stash:set_list name="main_page_body" context="@" scope="site" parse_tags="yes" parse_conditionals="yes" save="yes" parse_depth="3"}

        {exp:channel:entries channel="products" dynamic="no" limit="1" url_title="{last_segment}" disable="relationships|categories|pagination|member_data" cache="yes" refresh="720"}

            {stash:current_product_category_url_title}{if segment_6}{segment_5}{if:else}{segment_4}{/if}{/stash:current_product_category_url_title}
            {stash:current_product_category_id}{if segment_6}{segment_5_category_id}{if:else}{segment_4_category_id}{/if}{/stash:current_product_category_id}

            {stash:product_name}{title}{/stash:product_name}

            various other individual variables that are stashed for the single product

        {/exp:channel:entries}

    {/exp:stash:set_list}

MY WRAPPER LAYOUT TEMPLATE

{exp:stash:get_list name="main_page_body" context="@" scope="site" save="yes"}

    <h1>{product_name}</h1>

    and other items stashed for the product from the logic template}

    {exp:channel:entries channel="products" dynamic="no" limit="1" category="{current_product_category_id}" url_title="{last_segment}" disable="relationships|categories|pagination|member_data" cache="yes" refresh="720"}

        {exp:ifelse parse="inward"}
            {if current_product_category_url_title == "widgets"}
                Width (A): {cf_prod_width}
            {if current_product_category_url_title == "whosits"}
                Height (A): {cf_prod_height}
                Width (C): {cf_prod_width}
            {if current_product_category_url_title == "somethingelse"}
                Length (A): {cf_prod_height}
                Inside Width (B): {cf_prod_inside_width}{if cf_prod_inside_width_special}{cf_prod_inside_width_special}{/if}

            THIS PATTERN CONTINUES FOR A LONG TIME DOWN THE PAGE BECAUSE THERE ARE 120 CATEGORIES WITHIN WHICH THE SET OF VARIABLES TO DISPLAY COULD BE DIFFERENT

            {if:else}
            {/if}
        {/exp:ifelse}

    {/exp:channel:entries}

{/exp:stash:get_list}

As a test, if I comment out (using EE comments so they don’t parse at all) the inside of the outer if:else conditions, the page loads in less than a second. But when the inside of each condition is kept alive in the template, the page is incredibly slow. So I can tell am I failing to setup the template in a way that would allow the stashed variable, current_product_category_url_title to be evaluated first and prevent the inside of non-matching conditions from being parsed. The product_category_url_title is being set in the logic template and retrieved in the layout template mainly because of my need to parse the segment data conditionally - it’s the “immediate parent” category that I’m after and it’s not always the same segment because I’m concatenating the URLs.

What is it that I’ve missed with the conditional setup? And could the conditionals actually be stored within the logic template (and would that make a difference?). Why are the inside conditionals parsing and how can i prevent that?


texts: "Site Error: Unable to Load Site Preferences; No Preferences Found" when trying to use Multiple Site Manager

texts:
I'm running into a problem when trying to use Multiple Site Manager (v2.1.7) with ExpressionEngine (v2.9.2). This is a fresh install on Digital Ocean. The only posts are ones created by following the tutorial at https://ellislab.com/expressionengine/user-guide/how_to/building_a_simple_news_site.html. I used the instructions on Ellis Lab's site to install MSM. The first time that I try to enable MSM, the page posts, but "Enable Multiple Site Manager" switches back to "No". The second time I enable it, the setting is saved corrently. If I try to do anything at this point I get the Site Error. Disabling MSM in config.php makes the site work just fine. The second I re-enable MSM, the site throws the error again.

Here's what I've done to try and troubleshoot.

I checked open_basedir in php.ini. It's commented out, but I also changed the value to the document root (/var/www/html in my case).
I checked (and changed) all the permissions as described at https://ellislab.com/expressionengine/user-guide/installation/installation.html.
I checked the database settings in database.php and they're correct.
I've tried uninstalling EE and MSM and dropping the database, but I'm still getting the error.
I ran the EE wizard and everything looks okay on that end.

Any ideas? I don't know what else to check.


texts:
So, running on 2.5.5 I would do the following (with SafeCracker instead):

{exp:channel:form channel="resumeer" return="folketinget/resume_ret/ENTRY_ID" include_jquery="no"}

Overskrift: <input type="text" name="title" id="title" value="{title}" size="50" maxlength="100"  />

     <input type="hidden" name="url_title" id="url_title" value="{url_title}" maxlength="75" size="50" />
     <input type="hidden" name="allow_comments" value="y" />
     <input type="hidden" name="relation_lovforslag" value="<?php echo $entry_id; ?>" />
     <input type="hidden" name="status" value="Closed" />
     {field:wygwam_basic}

<input type="submit" name="submit" value="GEM KLADDE" class="form-submit" />

{/exp:channel:form}

This is for creating a related entry to the main channel entry. The field relation_lovforslag is for that purpose and it just sends the entry_id of the main entry. However, this doesn’t work anymore and I wonder what the proper syntax is for 2.7?


texts: CartThrob Per User Limit Discount and Logged Out Useres

texts: I'm trying to setup a discount in CartThrob so members can get 10% off their order. This works gang busters for those members but, for logged out members, the discount shows up and is applied. Is there a way to have a User Limit Discount not apply to logged out members?


texts: Error when upgrading to 2.10.1 - Site not working

texts:
My site, which was running 2.9.x, was delivering a blank page today. In the past, I've found that getting the current version was the first step to debugging.

So, I decided to start by upgrading to the current version of EE.  After following the directions and clicking on the Upgrade button, I received the following error:

Error Number: 1

Can't create/write to file '/tmp/#sql_26a4_0.MYI' (Errcode: 30)

SHOW COLUMNS FROM `exp_sessions`

Filename: /home/bp/public_html/ee_cms/expressionengine/libraries/Smartforge.php

Line Number: 122

Oh, crap. Please help.


texts: 403 forbidden error when creating custom fields

texts:
I'm getitng a 403 Forbidden error when trying to create custom fields. I can create/edit templates, create/edit channels, administer members and I'm a member of the Super Admins group.

The error occurs regardless of the field type and I'm not putting any special characters in there.

Example:
Type: Text field
Name: Strapline
Shortname: cf_productinfo_strapline

The rest of the fields are set as their defaults.

The exact error is

  You don't have permission to access /promin/index.php on this server.

  Additionally, a 404 Not Found error was encountered while trying to
  use an ErrorDocument to handle the request.

Could it be hosting related?

Thanks in advance


texts: P&T Field Pack 2.1.1 on EE2.8.1 Installation Errors Notice and warnings

texts:
A PHP Error was encountered
Severity: Notice
Message: Undefined index: enabled_types
Filename: fieldpack/helper.php
Line Number: 78

A PHP Error was encountered
Severity: Warning
Message: Invalid argument supplied for foreach()
Filename: fieldpack/helper.php
Line Number: 78

On specific field types this error occurs. I am guessing that it is the foreach loop as it is only list, multiselect, pill, etc, fieldtypes.

Not stopping my development - but thought i should flag it and see if anyone knows reason / fix...

N


texts: Clustering two identical markers in Google Maps for EE

texts:
I'm using the clustering feature in Google Maps for EE version 3.0.190 to plot people on a map, but have a problem as some people have the exact same coordinates as they're based at the same address.

I'm finding that the clustering marker shows this as 2 points, but as I keep zooming in, they never split. Until eventually, at the very last zoom level, the marker disappears completely.

Is there a way to work around this at all?

Here's the code I'm using:

{exp:gmap:init id="map1" class="gmap" scrollwheel="false" style="width:930px;height:700px" clusterStyles="{url: '/assets/images/cluster-icon-blue.png', textColor: '#fff', textSize: '12', height: 52, width: 53, anchor: [0, 0]}" overviewMapControl="true" overviewMapControlOptions="{opened:true}" zoom="6" center="Silecroft"}

{exp:channel:entries channel="people" status="open" disable="categories|category_fields|member_data|pagination" limit="1000" dynamic="no" sort="asc"}
  {cf_people_geo_location id="map1" show_one_window="true" icon="/assets/images/map-icon-white.png" infobox="true" offsetY="0" offsetX="15" closeBoxMargin="5px" class="ui-infobox-dark" closeBoxURL="/themes/third_party/gmap/css/images/white-close-button.png" style="width: '250px'" clearanceX="10" show_one_window="true" clustering="true" extend_bounds="false"}

{title} &raquo;

  {/cf_people_geo_location}
{/exp:channel:entries}


texts: Weird 'A Database Error Occurred' when editing certain entries

texts:
I have a very strange error as the title suggests. I am hoping someone might have come across it and found a fix.

On only certain entries, if I edit them, I get:

A Database Error Occurred
Unable to connect to your database server using the provided settings.

Filename: core/EE_Config.php

Line Number: 208

I am using Focus Lab's config set up. Everything is working perfectly, apart from certain channels.

EE 2.9
NginX

If I try to visit the page on the front end I get an SQL error:

Error Number: 1064

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND t.entry_date <= AND t.status = 'open' ORDER BY t.sticky desc, t.entry_date ' at line 2

SELECT t.entry_id FROM exp_channel_titles AS t LEFT JOIN exp_channels ON t.channel_id = exp_channels.channel_id LEFT JOIN exp_members AS m ON m.member_id = t.author_id WHERE t.entry_id !='' AND t.site_id IN ('1') AND t.entry_date < 1406809317 AND (t.expiration_date = 0 OR t.expiration_date > 1406809317) AND t.entry_id = '33' AND t.channel_id = '1' AND t.entry_date >= AND t.entry_date <= AND t.status = 'open' ORDER BY t.sticky desc, t.entry_date desc, t.entry_id desc LIMIT 0, 1

Filename: modules/channel/mod.channel.php

Line Number: 2161

As mentioned, it is only certain entries and not others.

Anyone have the vaguest clue?


texts: MSM Server Path Problems after upgrade to EE3

texts:
I am in the process of upgrading an MSM configuration from EE 2.11.x to 3.5.7 and have run into the following error on the MSM site:

  Your system folder path does not appear to be set correctly. Please
  open the following file and correct this: index.php

Before the upgrade the path I was using to reference the system folder was this:

/home/sitename/public_html/system/

That has not changed but now I get the error message.

Any guidance on how to resolve this?


texts:
having some problems with a GRID field type in my templates. I have an entrie setup with the grid field type containing three records.

{exp:channel:entries limit="1"}
    {body_image}
        COUNT1 | {body_image:count}
        COUNT2 | {count}
        FILE1 | {body_image:file}
        FILE2 | {file}
    {/body_image}
{/exp:channel:entries}

As expected the {count} outputs 1 since this is the channel:entries count.
The weird thing is i'd expect the {body_image:count} would output 1,2 and 3. But it's output is empty. This is also the case for {body_image:file}. The {file} tag does output the link to the images I added.

Could someone explain this since this is the exact syntax used in the documentation?


texts: Updater Error: Destination dir is not writeable

texts:
EE 2.9.2 Updater 3.2.15

After uploading a file and starting the action queue, I get this error

"LOCAL: The destination dir is not writeable:"

There is nothing after the last colon to explain in more detail. Updater's test settings says FAILED for all 25 tests.

I have checked the permissions and ownership of all the files. I have had Nexcess check the permissions and ownership of the files. They reviewed your common errors page They wrote…

  I would recommend contacting the developer directly for more information if possible, as the files are all owned by your user/group and as he states in his bottom portion of his FAQ since it's a single user environment for this account, the permissions are set correctly with 2755 and 0644 which is standard for accounts such as this on shared environments for security reasons.


texts: member control panel channel entry field relationship permissions

texts:
I am trying to give members access to the control panel so that they can publish edit their own entries. Say I have Channel A and Channel B. It is easy to setup EE so that each member can only edit the entries they create but say Channel B has a relationship field to Channel A.  There does not seem to be a way to restriction the entries in the relationship field to the entries from Channel A that the current user created just to the to the users group.  Which would let them select entries from Channel A that they did not create.

I realize I could build all this functionality in front end templates but would really rather not since the Channel A fields has a lot of grids and relationships to other channels as well.

So is there a way in EE to set this up or is there a plugin that allows for this type of permissions in the relationship field type?


texts:
Upgraded EE 1.7.3 to EE 2.9.2, But on add-ons not updated. On frontend showing error like,

Unable to load requested field type file:  ft.ftype_id_8.php.
Confirm the fieldtype file is located in the
expressionengine/third_party/ directory

How can i move all old add-ons like plugins,modules,extensions etc.


texts: Is it possible to create an SAEF event entry form for Solspace Calendar that doesn't use the event widget?

texts:
I'm building a site that uses Solspace's Calendar module to manage bookings for rental properties.

The booking entries are all made on a single calendar and are related to one of the property entries by means of a relationship field.

The event entries need to be made on the front end of the site by the property owners so I have an SAEF to allow them to do this.

The problem I have is that it seems one must use the {exp:calendar:date_widget} tag to get the date entry fields. Unfortunately this generates a "widget" that includes a lot of stuff that simply isn't needed for this application.

I can do stuff with javascript to customise the widget, such as ticking the "all day" box and hiding it, but it just seems like a horrible hack when I'm used to just building what I need. I really hate the fact I'm tied to using this nasty widget.

I have tried simply using the HTML and JS that the widget generates, although there are some custom id values generated that mean I'd need to work out what they're doing in order to get the right values going into the entry. Besides that, the datepicker doesn't work.

From browsing the Solspace support forums it seems the common answer to this type of question is "you have to use the widget... it does lots of other stuff behind the scenes".

Does anyone have experience of this problem and some kind of workable, non-hacky solution?


texts: EE 5.3.2 - missing Upload Directory Synchronize function

texts:
Recently updated to EE 5.3.2 and i am no longer able synchronize my upload directory folders.
According to docs, i should have a Synch button under Files, but nothing there.
https://docs.expressionengine.com/latest/control-panel/file-manager.html#sync-directory
Any ideas? Am i missing something?


texts:
I have in EE a json file that pull the file name (file_name@2x.jpg) from de database where the name is ok but the output is file_name%402x.jpg

how can I fix that?

{exp:channel:entries channel="json" disable="member_data|paginate" dynamic="off" orderby="hotspot" sort="decs" category="3"}{
    "id": {entry_id},
    "foto_groot": "{foto_groot}{file_name}{/foto_groot}",
    "titel": "{title}",
    "url_ext": "{url}",
    "url_int": "{url_title_path=/}",
    "categorie": "{categories}{category_name}{/categories}",
    {if {current_time format="%U"} - {entry_date format="%U"} < '2500000'}"flagsn":{"nieuw":true },{/if}
    "flags":{"new":{hotspot}} }{if count==total_results}{if:else},{/if}{/exp:channel:entries}
]
}


texts:
I get the following error when updating Playa to V4.4.5

Unknown column 'parent_var_id' in 'exp_playa_relationships'

ALTER TABLE exp_playa_relationships ADD parent_is_draft INT(1) UNSIGNED NOT NULL DEFAULT 0 AFTER parent_var_id

Filename: third_party/playa/ft.playa.php

Environment is MAMP, EE2.7.0.

This happens when clicking the playa link in the fieldtypes CP display. Oddly, the version is already at 4.4.5 when I do that, but maybe because I ran the module updates before - I was updating two other P&T addons at the same time - Matrix and Assets.


texts: Compare a get variable with a path of categories

texts:
I have a series of if:elseif statements that compare $_GET Variables using "{exp:parameters:get name='price'}"=="<?php echo $myVariableHere; ?>". This is filtering out some of the entries so that they don't show, this works perfectly.

NOTE: $myVariableHere is coming from <?php $myVariableHere="{categories show_group='#'}{category_name}{/categories}"; ?>

The exception is my 'region' variable, because it uses child categories. I tried to call them this way, <?php $myVariableHere="array{categories show_group='#' backspace='2'}'{category_name}', {/categories}"; ?>

The problem is that even though it appears to print to my page correctly ('Canada', 'Foo', 'Bar') it does not have separate keys in the array, they are all part of the 1st key. So I can not call on the categories separately to use them in my comparison.

In the end, I need to compare the $_GET VARIABLE of ?region=Canada to the entries categories in that group ('Canada' with a child of 'Foo' with a child of 'Bar').

Looking forward to any suggestions. NOTE: I have been using gw:categories in places.


texts:
We recently upgraded EE (2.7.2) and run Solspace User (3.4.4) plugin.

Our client side registration form no longer works. Upon submission we get
“You are not authorized to perform this action”

Any clue?

Thanks,
L.


texts: Turning off Emoticon smilies is breaking image path

texts: Running into a weird issue where when I turn off the Emoticon Smilies, spaces are being added to a few image names in my channel entries loops, causing it to break the image path. Also, not all of the entrie's image names are getting spaces added to them, just a few of them. Has anyone seen this before?


texts: Cartthrob: Does the Purchased Items channel call ‘entry_submission_end’ EE hook?

texts: When an order is complete, and a new entry has been created within the ‘Purchased Items’ channel, does the entry_submission_end EE hook fire? I need to process some data as orders are completed with the data held within this channel.


texts: Filter results between two custom number fields

texts:
I have two custom fields. One is a start year and one is an end year. I need to filter my search results based on if the search query falls between that range. I have read the docs related to the range:field_name filter but can't seem to wrap my head around what I need to do?

e.g. If someone types 1998 into the year custom field, it MUST find an entry where the year falls between the custom_field_1 and custom_field_2 values.

I tried this as the field name but it errored out with the Disallowed Key Character message.

<input type="text" name="range:vehicleYearFrom|vehicleYearTo" id="years" placeholder="Year">

I hope this makes sense. :-)

Thanks for your help!

UPDATE: Everything works except when I try to combine the range and the search filters I get no results. If I use ONLY field search filters it works fine, and if I use ONLY the range filter, it works fine, but when I use both, I get no results. Any ideas why?

  {exp:low_search:form
    force_protocol="https"
    result_page="/get-started/%s"
  }
    {error_message}

Your Vehicle

e.g. 2003 Buick Rendezvous

              <input type="text" name="range-from:vehicleYearFrom" id="yearsFrom" placeholder="Year">
              <input type="text" name="range-to:vehicleYearTo" id="yearsTo">

              <input type="text" name="search:vehicleMake" id="makes" placeholder="Make">

              <input type="text" name="search:vehicleModel" id="models" placeholder="Model">

100% Money Back Guarantee - Free Shipping on Purchases of $30 or More

    <button type="submit">Search</button>
  {/exp:low_search:form}


texts:
Good evening,

Im looking at creating a form for a website that allows for bulk updating of a price field within an expression engine channel, lets say for instance, increase all prices for all entries by 5%

Looking into it the HTML form is no issue, and I can pass the figure to a process to make the changes and I think the the thing i need is:

ee()->api_channel_entries->update_entry((int) $entry_id, (array) $data);

but im very new to EE and would appreciate any pointers on putting a script together that gathers all the info from each entry then applies the update


texts: Top ten most used attributes for category/channel tags?

texts:
I'm a novice at EE development. Can anyone suggest the top ten (or any number) of the most used attributes for most channel:entries/category tags? Scrolling through the docs seems overwhelming at times.

I spent several hours wrestling with a channel tag to show related articles within an entry level page layout only to find a simple related_categories_mode="yes" was enough to do exactly what I wanted. Any help is appreciated, forgive me if this is not how this works or if this is the wrong place to ask.


texts: Purge all unused files/assets from file manager?

texts:
Is there a way I can purge all unused files/assets via the file manager? I'd like to clean up some directories for a client? If not, is there a query I could use to find out which files are unused?

UPDATE

Adding a little more context, the files are used with a number of add-ons:

Native file fields
Matrix
Wygwam


texts: Extend cart_items_info function from mod.cartthrob.php

texts:
the mod.cartthrob.php has the cart_items_info function.

On that function I have

    foreach ($data as &$row)
    {
        $row['cart_count'] = $count;
        $row['cart_total_results'] = $total_results;
        $row['first_row'] = ($count === 1) ? TRUE : FALSE;
        $row['last_row'] = ($count === $total_results) ? TRUE : FALSE;
        //added by me
        $row['conversion_rate'] = $this->EE->cartthrob->store->config('Cartthrob_stripe_settings')['stripe_conversion_rate'];

        $count++;
    }

But the stripe_conversion_rate key was added by me in the file. I don't think this is the way, because I should not edit the core files. So in my case how can I add that key so in the html file to have access to conversion_rate:

{exp:cartthrob:cart_items_info}
  {conversion_rate}
   ..........


texts: Clean 301 redirects using an .htaccess that also removes index.php

texts:
I've got a somewhat standard .htaccess for removing index.php from my EE1 URLs:

RewriteEngine On
RewriteBase /

RewriteCond %{REQUEST_URI} ^/$ [NC]
RewriteCond %{QUERY_STRING} ^(utm_source=.*)
RewriteRule ^(.*)$ /index.php?/ [L,PT]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php?/$1 [L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{QUERY_STRING} (.+)
RewriteRule ^(.*)$ /index.php?/$1&%1 [L]

What I need to do is redirect calls to a subfolder (/store) to a new subdomain (store.example.com). So I added this line at the top:

Redirect 301 /store http://store.example.com/

Unfortunately, the end result is that I get redirected to http://store.example.com//?/store/

I've tried a few variations, such as moving the line to the bottom, but nothing worked properly.

How can I do a 301 redirect (using .htaccess) without including the extra /?/store/ bit at the end?


texts: I would like to use Apple Pay in my checkout through Stripe. Is this possible and if so, is there any documentation to make this happen?


texts:
I am trying to do something that seems as if it should be simple but it's baffling me!

I have a template page that needs to embed something different depending on the URL.

There are three possible cases.

Case one is that segment_2 is blank. In this case I need to embed option A. Simple enough I think.

In Case two, segment_2 is not blank and contains the url_title of one of the products in this channel. I know the channel. I need to embed option B.

In case three, segment_2 is not blank and contains something else that is NOT the url_title of one of my products in this channel. Again I know the channel. I need to embed option A - the same as in the first case.

I have tried putting an if inside the exp:channel:entries tag pair, comparing {url_title and {segment_2) - that doesn't seem to work.

Rather than having anyone try to debug my code, how would anyone advise doing this? I am aware that I could be arranging my site in a different way, but I am where I am!


texts: Where does the var_prefix come from in Playa?

texts:
I tried commenting on this thread, but it's closed. I am having a similar issue - the deprecated {parent:field} is working, but I'm sure won't forever. I'd like to switch to using the var_prefix, but I can't find where that is set.

I tried using the channel name {channel:field} - just not sure what var_prefix is in reference to.

{exp:channel:entries channel="products"}
    {accessories url_title="{segment_4}" limit="1"}
        {parent:title} product title
    {/accessories}
{/exp:channel:entries}

The accessory is a child and accessories is the field name in the products field group.


texts: Add-on Dev: Extending channel->entries and tagdata

texts:
I have a search module that grabs locations based on coordinates and estimates distances. I've decided to extend then channel class so I can take advantage of the entries method to display search results. In my method, I use an sql query to find the entry_ids and estimated distance. I then have the following:

public function search_results() {
    ...
    $entry_ids = '4|24|265|23';
    $distances = array(
        1.023536,
        1.254824,
        3.000325,
        4.923142
    );

    ee()->TMPL->tagparams['entry_id'] = $search_ids;
    return parent::entries();
}

This works great with the following code in my template, with one problem:

{exp:module:results}

        {distance}

{title}

{my_custom_field}

{/exp:module:results}

The "distance" is not a channel field, but that calculated value. Any suggestions on how I can inject that into the parsing per row?


texts: The action you have requested is invalid in Zoo Visitor

texts:
I am using Zoo Visitor registration with inline error message. if I submit the registration form with some empty fields, it shows inline errors correctly but while submitting again I am getting the EE error message The action you have requested is invalid., which seems odd.

Please see the attachment for this EE error message.


texts: Force devdemon channel files to open pdf's in a browser

texts: I need to make channel files locked url to open pdf's in the browser rather than prompting users to download. I can't see this as an option, is it possible?


texts: sql subquery channel entry & matrix rows

texts:
I need to export channel entries with matrix data and having problems joining the entry id with my matrix subquery

This is the matrix subquery which adds up my rows:

SELECT exp_matrix_data.entry_id, sum(exp_matrix_data.col_id_13) as TotalPartyPoints, sum(exp_matrix_data.col_id_14) as RedeemablePoints
FROM exp_matrix_data WHERE  exp_matrix_data.entry_id = 60

These are the other fields:

SELECT
        exp_channel_data.entry_id as ID,
        exp_members.username as Email,
        exp_channel_data.field_id_27 as FirstName,
        exp_channel_data.field_id_28 as LastName,
        exp_channel_data.field_id_29 as Gender,
        exp_channel_data.field_id_31 as Address,
        exp_channel_data.field_id_32 as City,
        exp_channel_data.field_id_33 as State,
        exp_channel_data.field_id_34 as ZipCode,
        exp_channel_data.field_id_35 as CellPhone,
        exp_channel_data.field_id_36 as AltPhone,
        exp_channel_data.field_id_37 as SpouseName,
        FROM_UNIXTIME(exp_channel_titles.entry_date, '%m/%d/%Y') as InceptionDate,
        exp_channel_data.field_id_39 as Country,
        exp_channel_data.field_id_40 as GoldClub,
        exp_channel_data.field_id_43 as KAMA,
        exp_channel_titles.entry_id,
        exp_channel_titles.author_id,
        exp_channel_titles.channel_id
        FROM  exp_channel_data, exp_channel_titles, exp_members
        WHERE  exp_channel_data.entry_id = exp_channel_titles.entry_id
        AND exp_channel_titles.channel_id = 6
        AND exp_members.member_id = exp_channel_titles.author_id
        ORDER by LastName asc

Both selects return the desired results. How can I join my matrix query here as a subquery?


texts: The CP Theme appears to be locked. How do I change it?

texts:
I am seeing some strange Control Panel formatting in a site I work on. The site is running EE 2.6.1 and in general works fine, however, I cannot change the Control Panel theme. It defaults to Corporate and even if I remove Corporate from cp_themes from the server, it still displays Corporate. Any suggestions on how to change that?

Thanks.


texts: Low search keywords + tagger tags + select2?

texts:
I'm trying to build a low search field that displays one visible predictive select2 input field that pulls in suggestions from a devdemon tagger field, as well as the last x most popular search terms. These options will probably generated with the template rather than an ajax behaviour as the list won't be huge and it would be faster to do it that way I think.

The ideal behaviour would be this:  when the user starts typing, I suggest matching words based on tags/previous searches. If they select a tag from the list, I run a tag field search based on that tag; if they select a previous search term I run a keyword search based on that phrase. If they don't select any matching suggestions I run a keyword search based on what they typed.

Ideally I'd like them to be able to select more up to two suggestion combinations.

My question is - should I have one visible select2 input field, but populate hidden search fields when selections are made? (eg call the select field 'keywords' and also have a hidden field called 'tags' (or whatever my tag field is called)?

What's the best way (if any) to achieve this?

My fallback would be to remove the recent search suggestions and simply suggest tags, but still allow them to enter a keyword search. The same question applies to the fallback situation...!


texts: Zoo Visitor + Radio button & Matrix fields + Inline error handling

texts:
These don't seem to be playing very nicely together.

Here's what's happening:

I've got a Zoo Visitor registration form that contains generic member fields and well as a couple of required custom fields, of which, some are matrix and one is a radio button.

With inline error handling enabled, I'm seeing intermittent undefined index errors on submit within:

matrix/ft.matrix.php :: line 1982 :: field_required
radio/ft.radio.php :: line 131 :: field_pre_populate
radio/ft.radio.php :: line 150 :: field_pre_field_id
radio/ft.radio.php :: line 151 :: field_pre_channel_id

Field layout is as follows:

The matrix field is birthdate - 3 selects, all required. I know, I know... use a date field. Client req. But anyway... it should work. And it does sometimes. It has been addressed (sort of) by P&T and only errors out when the radio button following it is set to required.

The radio is gender, but it's not using the member field. And it's required.

At first, this seems obvious - the fields are set to pre-populate from another channel. But they're not. They're all set to 'n' and stored as such in the db and in the settings array. However, when validation runs and loops through settings, it's reading 'n' as NULL. So it errors out when it tries to query 'field_id_' on a null channel.

I'm at a loss here. And open to just about any ideas aside from defaulting everyone to M or F - which actually works when required.

Also - apologies if this is a repeat. I see a bunch of Q&A on related topics but nothing that quite matches my scenario.


texts:
i have a channel, called html5, that contains more articles (4 right now) and i have a template to show theese articles. When you open the website.com/html5, everything works: the default article is displayed, and the menu in sidebar contains all the articles listed, BUT, when you click on any of the links in the menu (redirecting you to website.com/html5/article-name), the right article is shown, but in the menu, just the active article is shown, and other articles just disappear. So i ask, how to list all articles in channel even in single-article page?

{embed="overall/header"}

            //Sidebar START

                //This shows static link to the home of the HTML section

HTML5

                //And this lists all the articles... (The problem is right there!)
                {exp:channel:entries channel="html5"}

{title}

            {/exp:channel:entries}

            //Sidebar END

        {if segment_2 == ""}
        //STATIC content goes here
        {/if}
        {if segment_2}

            {exp:channel:entries channel="html5"}

{title}

                {page_content}
           {/exp:channel:entries}
        {/if}

{embed="overall/footer"}


texts: FreeForm Pro 4.2.0 form fields prepulated with "value"

texts:
I'm trying to get the fields that appear on my contact form to be pre-populated using the standard HTML "Value" attribute, but can not figure out how to get the freeform:field declaration to pass it on.

I currently have the following in my form code:
{freeform:field:name value="test"}

Here is the form online as of right now:
http://sustainablefurnishings.com/contact_us/

The "value" is not populated in the code and therefore doesn't appear in the field.

How can the "Value" be set for a form field using the FreeForm Pro tools? Am I missing something in their documentation?


texts:
If I create a matrix field with 5 columns, I am fine. However, if I create one with 6 or more, I am locked out of editing custom field types. I don't see any errors. No CP errors are triggered and the data remains in the db. I cannot, however, go edit the field type to modify or remove the extra field in the matrix. I have to edit the db table and forcefully remove it from the table. After doing this, I can once again edit the fieldtype and rebuild it without the last addition. I have run into this a few times on older sites. I haven't had the need for that many matrix columns on anything in EE2 yet so I don't know if this extended to that or not. Has anyone else run into this before?

I am running EE 1.6.8 on the sites this has happened on.


texts: Attempting to access file outside of directory - when trying to access member profile

texts:
I had other issues with avatars, but a fresh install of 3.1.1 seemed to resolve that. Now, when I went into the member profile on a fresh install, it displayed proper the first time. When I went back in the second time, I got this error:

Exception Caught

Attempting to access file outside of directory.
C:\GIT\Production\stkhomes.net\system\ee\EllisLab\ExpressionEngine\Service\File\Directory.php:28

Stack Trace: hide details

#0
C:\GIT\Production\stkhomes.net\system\ee\EllisLab\ExpressionEngine\Library\Filesystem\Filesystem.php(306): EllisLab\ExpressionEngine\Service\File\Directory->normalize('facebook_1.png')

#1
C:\GIT\Production\stkhomes.net\system\ee\EllisLab\ExpressionEngine\Controller\Members\Profile\Settings.php(120): EllisLab\ExpressionEngine\Library\Filesystem\Filesystem->exists('facebook_1.png')

#2
[internal function]: EllisLab\ExpressionEngine\Controller\Members\Profile\Settings->index()

#3
C:\GIT\Production\stkhomes.net\system\ee\EllisLab\ExpressionEngine\Core\Core.php(191): call_user_func_array(Array, Array)

#4
C:\GIT\Production\stkhomes.net\system\ee\EllisLab\ExpressionEngine\Core\Core.php(94): EllisLab\ExpressionEngine\Core\Core->runController(Array)

#5
C:\GIT\Production\stkhomes.net\system\ee\EllisLab\ExpressionEngine\Boot\boot.php(138): EllisLab\ExpressionEngine\Core\Core->run(Object(EllisLab\ExpressionEngine\Core\Request))

#6
C:\GIT\Production\stkhomes.net\public_html\admin\index.php(143): require_once('C:\\GIT\\Producti...')

#6
C:\GIT\Production\stkhomes.net\public_html\admin\index.php(143): require_once('C:\\GIT\\Producti...')

This happens on both production server and development server.

PHP Version 5.3.29
EE Version 3.1.1

*** UPDATE

It is happening here:

protected function normalize($path)
    {
        $path = $this->root.'/'.$path;

        if (strpos($path, '..') !== 0)
        {
            throw new FilesystemException('Attempting to access file outside of directory.');
        }

        return $path;
    }

If I echo out the path, it is : C:/GIT/Production/stkhomes.net/public_html/images/avatars/facebook_1.png

The statement should equate to False thus returning the variable $path.

If I comment out this section:

if (strpos($path, '..') !== 0)
            {
                throw new FilesystemException('Attempting to access file outside of directory.');
            }

The page loads fine.


texts: Categories variable pair not backspacing at all

texts:
I am using the following code to display an inline list of regions from a categories list for a product entry. The backspace isn't working at all, no matter how I change my code around. I will post a couple of the combinations I tried. Any ideas?

Region:
    {categories show_group="9" style="linear" backspace="7"}
        {category_name},&nbsp;
    {/categories}

as well as

Region:
    {categories show_group="9" style="linear" backspace="7"}
        {category_name},&nbsp;
    {/categories}

and this one with a , and regular space afterwards

Region:
    {categories show_group="9" style="linear" backspace="2"}
        {category_name},
    {/categories}

I've read a few posts on the ellislabs forums related to this...which is why I have a few combinations, but nothing is working. I am using EE 2.6.1.


texts:
I'm trying to use field:billing_name error:order_custom1 to generate the error message I've set in Settings > Order Fields > order_custom1 - but the message is not displayed when the field on the front end is left empty.

I have error_handling="inline" and require="name" set in exp:store:checkout. If it makes any difference I'm using membership on the site.

Have I missed something out?

Thanks!
Lee


texts: An Error Was Encountered : Non-existent class: Table

texts: Prior this was working. I transfer few files and later it stop working and after login to expression engine when I go to modify -> entry, it shows me an error was encountered.


texts:
I have EE 3.5.12 installation set up on Production server. I uploaded license key file but it seems system doesnt take this license into consideration.

It still says "The Core version of ExpressionEngine is feature limited. Upgrade today."

Any ideas appreaciated.


texts: Facebook Connect no longer pulling {fbc_facebook_name}

texts:
Wondering if anyone has seen anything like this lately--might be an issue from Facebook (i.e., affecting all version of Facebook Connect). Or, it might be something particular to these old versions and/or this particular site:

On an EE 1.7.x site running Solspace's Facebook Connect 2.0.9, the {fbc_facebook_name} variable suddenly stopped working about 10 days ago. It's used in this code:

{exp:fbc:member_data member_id="CURRENT_USER" profile_pic_size="square"}{fbc_facebook_name}{/exp:fbc:member_data}

Now, instead of pulling in a user's Facebook name, the unparsed tag shows.

The corresponding symptom is that, when a new user logs in via FBC for the first time, their EE {name} is not their Facebook name, but an obvious placeholder name from FBC, like facebook1000000000000.

I can see, as well that other fields like {fbc_facebook_username} similarly fail.

But then other aspects of FBC seem to be working fine, and, for example, the site is still pulling the correct FB profile pictures via this:

{exp:fbc:member_data member_id="{author_id}" profile_pic_size="square" profile_pic_height="50" profile_pic_width="50"}{fbc_profile_pic}{/exp:fbc:member_data}

Anyone see anything like this recently? Any ideas about what's going on?

The only other clue I have is that this issue started right after the Heartbleed bug, and this site did have an SSL certificate change in response to that. But this is maybe (probably?) purely coincidental.


texts: Why is Text Formatting: None wrapping  tags around my text?

texts:
I recently upgraded a site I'm working on to 2.7.1. And now I have some text being output with <p> tags around it, despite having the text formatting set to "none".

Is this a bug, or is there a new setting I'm not aware of that's overriding the set preference?


texts:
please help me ... i'm nubiew on EE.

how to display the latest article on the front page, so I want each of my finished publishing my article and the article was immediately appear on the front page.

how to change this into a recent article:

Latest News

                                28
                                SEP

Lorem ipsum sit amet

                                Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem
                                Sept 23, 2013 | Read More

                                24
                                SEP

Lorem ipsum sit amet

                                Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem
                                Sept 23, 2013 | Read More

                                20
                                SEP

Lorem ipsum sit amet

                                Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem
                                Sept 23, 2013 | Read More

this is screenshot:

and this is my web  danchindia.com


texts: How to add categories to a SQL query that outputs channel entry data

texts:
I'm trying to create a query that will output all the entries in a channel. I'm wanting to output the title, some custom fields, and the categories that the entry belongs to. Each entry will belong to one category in Category Group 1, and one category in Category Group 2 (as I'm using the excellent Category Field add-on to ensure this).

I'm not great with SQL, so I've only worked out how to output the title and custom fields so far. I'm getting stuck on how to output the category names from each category group that each entry belongs to, so was hoping that someone could help me out with this.

Here's my SQL so far (stripped back as far as I can), and the two commented-out category fields are where I'd like the category names to appear (except I can't figure out how to add the extra joins to pull this information in - linking the entry ID with the exp_category_posts table, and pulling in the category name from the exp_categories table). Thanks in advance for any help with this.

SELECT
  title AS 'Entry Title',
  field_id_1 AS 'Custom Field 1',
  # exp_categories.cat_name AS 'Category Group 1 Category Name',
  # exp_categories.cat_name AS 'Category Group 2 Category Name',

FROM exp_channel_data cd
INNER JOIN exp_channel_titles ct ON cd.entry_id = ct.entry_id
WHERE ct.channel_id = 4;


texts: Entry linking 2.1 with dynamic categories

texts:
I am using Entry Linking 2.1 to display prev/next entries in the SAME cateogry as the current single entry page.

I cannot get the plugin to recognize the current category unless it is hardcoded.  I tried low segtocat and it will not work in the Entry Linking code.

{exp:entry_linking entry_id="{entry_id}" link="previous" channel="portfolio" orderby="entry_date" status="Open|Sold" sort="asc" mode="short" category="{segment_3_category_id}"  no_results="cycle"}
<
{/exp:entry_linking}


texts: All channel entries have had their statuses changed to 'closed'

texts:
It looks like one of my sites has been compromised with an SQL injection. All the channel entries have been closed, which amounts to over 5k entries.

I restored the database with a previous daily backed, so all is well again, but have no idea what could have caused this, seems most likely to be a rogue sql query as no way to accidentally change all open statuses to closed in the CP.

I have added in extra security by changing passwords, system directory name, removed some add-ons, switched XSS filter back, check permissions, etc.

The site's still on 1.7 and Ellislab have had a look around the CP and say they can't see any evidence of a virus.

I'd be very interested to hear if anyone has had a similar experience.


texts: Sort by views but limit to last 30 days?

texts:
I am counting views per entry, and I have a 'Most Popular' section on the homepage that shows the most popular entries using

orderby="view_count_one"

I am finding this list tends to be the oldest entries, since they have been around so long they have the most views.

Is there away to either:

divide the views by number of days active and sort on that
or
only show the last 30 days?

Any ideas?

Thx!

Added:
I tried display_by="day" limit="30"  but that lists all entries in 30 days and kills my entry limit breaking the page layout. I am currenty showing 7 entries, and 30 is too much.

For example, I would need somethind like
display_by="day" day_limit="30" limit="7"
(I know that wont work ;) just example)

I also tried to set the start by date range by using:

localize->format_date('%Y-%m-%d %H:%i', ee()->localize->now - 3600);
?>

from
PHP conditional inside EE conditional - parse order problem

but that brakes my page and throws an error about line 45 referring to ()


texts: Channel Images: "success":"no","body":"No file was uploaded or file is not allowed by EE.(See EE Mime-type settings)."}

texts:
I am getting a error every time I try and upload an image using channel images.

There's no file size or dimension restrictions in upload preferences, its a simple .jpg about 50kb. Max upload is set to 8mb. tried .png too.

Error: "success":"no","body":"No file was uploaded or file is not allowed by EE.(See EE Mime-type settings)."}

ExpressionEngine 2.9
Channel Images 5.4.19

Any Ideas?


texts: Assets in Wygwam not displaying on front end in EE 2.6/Assets 2.1.1/Wygwam 2.7.1

texts:
Just updated to EE 2.6 today, also updated Assets and Wygwam to 2.1.1 and 2.7.1 respectively.

I have images in my Wygwam fields, if I var dump the raw data, the code stored looks like this: {assets_86:{filedir_2}faculty-staff-stats.png}

When it gets rendered, it looks like this: http://mysite.dev/uploads/assorted/faculty-staff-stats.pngfaculty-staff-stats.png}.

Same code worked perfectly prior to upgrading.


texts: Recently I upgraded an EE2 website to EE5. After upgrade, everything working very well except I am getting error while trying to edit/create a template from CP or from Template Manager -> Template Settings. For error message, please see screenshot -


texts: Transcribe adding 'favicon.ico' to url on language switch

texts:
I have EE 2.9.3, Transcribe 1.6.1 and Structure 3.3.14.7 running on a bilingual website and sometimes when the language switch button is pressed 'favicon.ico' is added the end of the url, thus giving a 404 error.

This addition of 'favicon.ico' seems to be random, it happens sometimes and is fine at other times.

I have absolutely no idea why this might be happening and have been advised to use the {exp:transcribe:no_match} tag, but I am completely lost and do not know where and how to use this tag in my template.

To display the language switcher I am using the following code:

{exp:transcribe:language_links}

          {languages}

{name}

          {/languages}

{/exp:transcribe:language_links}

Any help would be muchly appreciated.

Thanks.


texts:
I am trying to integrate PayU as payment gateway into my ExpressionEngine2 website, but battling to make the code fit and understand where I need to put what code (I wrote an extension for the gateway using the sample code I downloaded from PayU's website using sendData() and getData() functions in the gateway). How could I actually test that the payment gateway code is actually being read?

My page flow is as follows:

Credit Card Page -> PayU Gateway -> Success Page


texts:
When saving a template I'm greeted with this rather familiar error:

  Unable to save your template as a text file

It's definitely the server path, since the permissions of the templates folder are set to 777.

The server path I'm working with looks rather peculiar though.
When printing the $_SERVER["SCRIPT_FILENAME"], I get this in return:

  D:\WebSites\limited-cobe\www\test.php

notice the backslashes, instead of forward slashes.

So, I'm using this for my Basepath to Template File Directory, but apparently I'm still doing something wrong.

  D:/WebSites/limited-cobe/www/system/expressionengine/templates/

Any ideas ?


texts: Preload replace not evaluating variable outside of pair

texts:
I am trying to get the current entry's category so I can make a comparison inside a menu elsewhere to see if the menu item is for the current page. I have the following code at the top of my template:

{exp:channel:entries}
    {categories limit="1"}
        {preload_replace:current_category="{category_id}"}
        {current_category}
    {/categories}
{/exp:channel:entries}

which gives an output of 56

However, if I move {current_category} out of the pair so I can use it elsewhere, it does not evaluate:

{exp:channel:entries}
    {categories limit="1"}
        {preload_replace:current_category="{category_id}"}
    {/categories}
{/exp:channel:entries}
{current_category}

gives an output of {category_id}

How can I get the replace variable to save the evaluated category_id inside of the pair so I can use it elsewhere? Or, is there a better way to be doing this?


texts: Custom module, get channel_id so I can pass it to function: ee->api_channel_structure->delete_channel()

texts:
I am using api_channel_structure
I want to correctly set up the uninstall function.
To delete a channel I'm creating, I'm calling delete_channel.
It requires a channel_id.
Fine, but I only have a channel_name.

Is there an inbuilt function to get the id from name.. or is it stored in some session/object that I'm not aware of?

I need to get channel_id for uninstalling a module.


texts: Local Copy of Expression Engine site is not showing changes

texts:
When I edit the files on my local copy, like the /project/templates/default_site/main.group/layout.html file.

On my project local url the changes are not displaying, the site works but any changes I make or develop are not showing up.

Any Ideas, could it be cache? I did clear all cache multiple times.

Thank you in advance.


texts: Expresso Store Inline Errors Not Working

texts:
I'm using Expresso Store 1.6.4 and EE 2.6.0.  The inline errors are not working, the page just refreshes to the site homepage.  If I remove the inline errors, the default EE error page displays correctly.

I'll just mention that we're also using Boldmindeds Publisher on this site as well, which has caused some issues on other parts of the site, so that could be an explanation.

Thanks,


texts:
Bear with me as I am brand new to expression engine and PHP in general but the headers on these pages are not showing up in IE10...running it in compatibility mode fixes it but this needs to not happen. Id like to attempt to find the problem myself so here is a sample page starting at line 1:

 {assign_variable:sectionID="products"}
{assign_variable:pageID="index"}
{assign_variable:entryID="32"}
{assign_variable:subnav="n"}

{assign_variable:sectionTitle="Products"}
{assign_variable:pageTitle="-"}

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

 {embed="includes/browser-title-tag" pageTitle="{pageTitle}" sectionTitle="    {sectionTitle}"}

{exp:weblog:entries weblog="static_content" entry_id="32"}
<meta name="keywords" content="{sc_meta_tags}" />
<meta name="description" content="{sc_meta_description}" />
{/exp:weblog:entries}

{embed="includes/global-head"}

{!-- hook to put anything necessary right after the opening body tag --}
{embed="includes/global-page-top"}

    {embed="includes/global-header"}

    {embed="products/subnav" catID="0"}

            {!-- shows plain content --}
            {embed='includes/plain-content' entryID="{entryID}" sectionTitle="{sectionTitle}" sectionID="{sectionID}" pageID="{pageID}" subnav="{subnav}"  pageTitle="{pageTitle}" }

{!-- Commercial Lines --}
            {exp:weblog:entries weblog="products" entry_id="50"}

    {title}

{prod_short_desc}

            {/exp:weblog:entries}

{!-- Personal Lines --}
            {exp:weblog:entries weblog="products" entry_id="51"}

{title}

{prod_short_desc}

            {/exp:weblog:entries}

{!-- Workers Comp --}
            {exp:weblog:entries weblog="products" entry_id="52"}

{title}

{prod_short_desc}

            {/exp:weblog:entries}

{!-- Specialty Programs --}
            {exp:weblog:entries weblog="products" entry_id="53"}

{title}

{prod_short_desc}

            {/exp:weblog:entries}

{!-- All Products --}
            {exp:weblog:entries weblog="products" entry_id="66"}

See all our Products

{prod_short_desc}

            {/exp:weblog:entries}

            {embed='includes/sidebars-static' entryID="{entryID}"}

{!-- copyright, footer links, etc. --}
{embed="includes/global-footer"}

{!-- hook to put anything necessary right before the body tag, e.g. Google Analytics code --}
{embed="includes/global-page-bottom"}

So on this page the header not showing up is "Products" and instead is showing up as three x'S vertically in its place. When viewing the page source after the page loads the titles that are not showing are typically in an  tag like in this page's case.

I believe this is EE 1.

Let me know if you need any other code!


texts:
I wish to load some javascript in the footer, but only if a certain condition is met. I was wondering what the best option might be for this?

For example, if an entry has some related entries further up the page, then add the javascript in the footer.

The reason being that i don't want to include the javascript on every page.


texts:
How are everyones .gitignore files looking in the latest iteration of EE?

Mine .gitignore is included below.

Is there anymore secret data / files that should not be in the repo?

# Capistrano
config
capfile

# Cache
system/user/cache/*

# Settings
system/user/config/*

#Images
images/avatars/*
!images/avatars/index.html
images/captchas/*
!images/captchas/index.html
images/forum_attatchments/*
images/forum_attatchments/index.html
images/member_photos/*
!images/member_photos/index.html
images/signature_attatchments/*
!images/signature_attatchments/index.html
images/smileys/*
!images/smileys/index.html
images/uploads/*
!images/uploads/index.html

Update 09/11/15

Added cache above due to tip from @seavers


texts: EE relationship field inside tagger entries loop

texts:
Try as I might (and it might not be possible I guess) I have a relationship field in EE of author against an article channel.

I want to show the author of an article while showing the article for a given tag.

{exp:tagger:entries channel="article" tag="{segment_2}" custom_fields="article_byline"}

{tagger:entry_title}

{tagger:article_byline}
    {tagger:article_byline:title}
{/tagger:article_byline}

{/exp:tagger:entries}

I do get entries returning - just no author though.


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

Thanx.


texts: Create an extension to update the status

texts:
I'm just starting to work with Store 2.x and wondering if it's possible for me to create an extension that updates the order status once the order is complete. I know I'm needing to use the 'store_order_complete_end' hook, but not sure how I can update the status at this point. Can somebody point me in the right direction? I'm basically wanting to update the status to one of 2 things depending on what products they are buying.

Thanks,
Dan


texts:
I'm trying to install a new module into ExpressionEngine and no matter what I try, I can't get the new module to show up in the control panel under Add-Ons > Modules. I suspect there is some kind of caching or permissions issue, but I've given 777 to all possibly related directories and cleared all the cache I know about. I've run "Run Module Updates" a few times as well.

The reason I think this might be caching is that I've tried to add several other plugins to the system/expressionengine/third_party directory, and these will not show up either. A few days ago (before I found this new plugin that I want), I added one that did show up in the list. I then tried deleting it but it still shows up in the list...

The module I'm trying to add is CE Tweet, and I've followed these installation instructions to a T: http://docs.causingeffect.com/expressionengine/ce-tweet/installation.html

I have also checked that my system meets the module's requirements:http://docs.causingeffect.com/expressionengine/ce-tweet/requirements.html

I am running EE 2.8.1.

In case this has any relevance, my system directory is actually named admin. I've read that this is fine as long as your configs are set up to expect that, but maybe it has something to do with this.

Please help if anyone can point me in the right direction! I'm under a deadline but can't even start


texts: Logging into CP in EE 1.x after migration

texts:
I just inherited an EE 1.6.7 project. I'm attempting to log into /system in my local dev environment and each time I'm just redirected to the CP login page, which does not have any images or styles.

I remember from way back when that it's doing this because the Site URL & other paths don't match. I also remember (and was just reminded when I blew things up) that I can't modify these values in the database directly.

What's the solution to be able to log into the CP homepage in a different environment than what's stored in the database?


texts:
I can not run the relationship feature since upgrading to 2.6.1.
I've searched through he forums and I found similar issues, but the answers there didn't help me, so I'm posting my question here. Sorry if I duplicate anything.
I have a channel called "noticies" with a field that relates inputs of the same channel. The channel field is single relationship called "noticies_relacionades"
My code is as follows:

{exp:channel:entries  status="not closed"}
…
    {if noticia_relacionada}

TAMBÉ ET POT INTERESSAR

          {noticia_relacionada}

                    {noticia_relacionada:title}

           {/noticia_relacionada}

    {/if}
{/exp:channel:entries}

Thanks in advance. Any help is wellcome.


texts:
I'd like to use some templates to display content at segment 4 of the URL.

http://example.com/news/world/australia/melbourne

News and World have their own templates and Australia is channel entry that uses the same template as World. I'd like to extend the Australia channel entry to Melbourne and use a new template but not sure how?


texts: Fresh migration, functioning locally, backend issues (Template Manager, Matrix)

texts:
I'm running out of ideas on how to debug this, hoping someone has some knowledge to share.

I've been working on a site locally with EE, Exp-resso Store and Matrix/Matrix Multi-Upload. All plugins are current, as is the EE install (currently 2.7.3).

I'm rebuilding a site, and I planned to move the new site to a subdirectory of the old site for remote access, testing, QA, etc. There were issues with the old site's back-end (among many other things). Details below.

While working local, I've run into no issues. However, today after moving the site successfully to the server, I'm seeing issues in the back-end. These seem to specifically relate to the Matrix plugin (it may not be Matrix's fault, but it's being affected) and the Template Manager. All of these issues were present on the old site. Apart from sharing a server and a database, the two builds are separate. Separate database entries, CSS files, JS, etc.

Dreamhost is the server. PHP 5.4. Possible FastCGI issue? I'm out of ideas.

Console is giving me this:

Uncaught TypeError: Object [object Object] has no method 'ee_focus'


texts: Solspace User 3.3.5 compatible with EE 2.9?

texts: I have one website which uses Solspace User version 3.3.5. The website is running ExpressionEngine version 2.2.2.  I was wondering if my 3.3.5 version of User will still work if I upgrade my ExpressionEngine webite to 2.9?


texts: Stripe Strong Customer Authentication (SCA) and Expresso Store 1.6.4

texts:
I've looked around for answers to this but nothing's really come up. I understand that Stripe is implementing Strong Customer Authentication (SCA) in September 2019. I have a couple of legacy sites, that use much older versions of Expression Engine and Expresso Store. Can anyone provide some guidance on how I can continue to take payments on the site after September 2019? Upgrading the add-on isn't going to work in this case as everything was built such a long time ago, and it would mean a total rebuild.

Thanks!


texts: Force URL titles to auto increment and be unqiue

texts:
Since using EE 3, I've noticed ExpressionEngine doesn't automatically make the url_titles unique - instead giving an error message and telling the user. Is there any way to bring back the functionality of EE 2 where a number was added to make it unique automatically?

Thanks,
Dan


texts: Stashing Entry Ids not working with get tag

texts:
I've got a stash set like this:

{!-- retrieved at line 173--}
{exp:stash:set name="st_featured_ids" type="snippet" parse_tags="yes"}
    {director_featured_spots backspace="1"}{director_featured_spots:entry_id}|{/director_featured_spots}
{/exp:stash:set}

And in a test section of the template outputs entry ids as expected using this:

stashed: {exp:stash:get name='st_featured_ids'  type='snippet'}

However when I'm trying to filter a relationship tag to only show specific entries it doesn't work. If I manually add in the entry_ids it's fine. I jsut cant' get them with stash.

{parents field="spot_director" limit="5" entry_id="{exp:stash:get name='st_featured_ids'  type='snippet'}"};

or

{parents field="spot_director" limit="5" entry_id="{st_featured_ids}"}

Not sure what I'm doing wrong.


texts:
I'm sure I've read somewhere how to do this but I am not able to find it at the moment.

I have Postmaster installed, and I am using that to send various emails based on entry creations and status changes.

This all works great, and I have a customised template (with inline css) to produce a nice looking email.

Now I would like to customise the system messages, (i.e new member regs, activation links etc.)

I know there is the Email Notification Templates under the Design>Message Pages option, and these templates produce plain text simple emails.

Is there a way to customise these? Ive read on the Postmaster docs that you can use postmaster for this purpose, but I have been unable to find any more info, or documentation other than to say it can be done.


texts: Limit related entries to specific category

texts:
How can I limit related entries to a specific category, while matching the relation on specific category groups?

Obviously this would be the code for it

{exp:channel:entries related_categories_mode="yes" channel="news" custom_fields="yes" limit="10" category="16" category_group="7|1"  uncategorized_entries="no"}

        {news_title_{language_code}}

{/exp:channel:entries}

but the category parameter is not supported with using related_categories_mode.

EDIT - additional clarification:
Category group is used to make sure that only in entries that have the same categories in those groups are presented as related entry.
E.g: the news channel has 5 category groups, but only 2 of them are relevant for the relationship, the others are e.g. audience segment (partner, customer, supplier) or message type (press release, item, blog)
In this case only the related entries need to be shown if their audience segment is 'customer' (multiple can be selected)


texts: Using exp:query with WHERE = {segment_2} is it safe?

texts:
I'm querying the database directly using the exp:query tag and filtering results on the value of a segment, is this safe?

How can I make it safe?


texts: Calculating a value with Stash and MX Calculator

texts:
I'm trying to do some basic math using a Stash Get var and MX Calculator. Any recommendations? I'm sure my lack of understanding of parse order strikes again.

I can get the variable using:

{exp:stash:get name='house_starting_price'}

But when I try to use it in the MX_Calculator plugin the value doesn't parse.

{exp:mx_calc parse="inward" expression="({exp:stash:get name='house_starting_price'}*.05)"}

Based on feedback I've made the following adjustments:

The stash variable is set like so (note it is in a matrix field):

{exp:channel:entries channel="Homes" dynamic="no" limit="1" url_title="{segment_3}" require_entry="yes" disable="categories|category_fields|member_data|pagination"}
                {!-- Go through the elevations matrix but only pull the fields that are from the current community, set with segment_4 --}
            {elevations orderby="elevation_name" sort="asc" orderby="elevation_name" sort="asc"  search:elevation_community="{segment_4}"}
                {!-- Stash the first price as starting price for community --}
                {exp:stash:set name="house_starting_price" match="^1$" against="{row_count}"}{elevation_price thousands_sep=''}{/exp:stash:set}
            {/elevations}
{/exp:channel:entries}

I've modified the stash get to use stash:parse:

starting price = {exp:stash:get name='house_starting_price'}
    {exp:stash:parse parse="end"}
This is within stash parse: {exp:stash:house_starting_price}

MX Calculator value: {exp:mx_calc expression="({exp:stash:house_starting_price}*.05"})
{/exp:stash:parse}

Here's what's output:

Starting price = 326600
This is within stash parse: 326600
MX Calculator value:

In the output debugger I see:

 {exp:mx_calc expression="(M00o93H7pQ09L8X1t49cHY01Z5j4TT91fGfr*.05"})
 {exp:mx_calc expression="(365000*.05)"} <-manually entered 365000

UPDATE 2012-12-01

I've simplified this even more for testing. This takes channel:entries out of the equation all together. I'm finally getting it to calculate but I'm seeing some weird stuff.

{!-- Set the mytestvariable --}
{exp:stash:set name="mytestvariable"}645323{/exp:stash:set}

The test variable outside of MX Calculator equals: {exp:stash:get name="mytestvariable"}

    {!-- Use stash:parse to attempt using the stash var within MX Calculator --}
    {exp:stash:parse process="end"}

      {!-- Ensure the varible loads within stash:parse --}

The test variable within Stash Parse equals: {exp:stash:get name="mytestvariable"}

      {!-- Try to use the stash variable in MX Calculator --}

The test varible within MX Calculator equals: {exp:mx_calc parse="inward" expression="{exp:stash:get name='mytestvariable'}*.05"}
    {/exp:stash:parse}

Output:

The test variable outside of MX Calculator equals: 645323
The test variable within Stash Parse equals: M60o93H7pQ09L8X1t49cHY01Z5j4TT91fGfr
The test varible within MX Calculator equals: 32266.15

Question: Should the second value not equal 645323?
Note: I tried switching all stash gets to shorthand version as well:   {exp:stash:mytestvariable}

When I do this I get the following output:

The test variable outside of MX Calculator equals: 645323
The test variable within Stash Parse equals: 32266.15
The test varible within MX Calculator equals:

When I look in the debugger MX Calc is using M60o93H7pQ09L8X1t49cHY01Z5j4TT91fGfr*.05 instead.


texts: Fatal error when trying to submit exp:channel:form

texts:
Trying to submit entries "outside" EE with the exp:channel:form, but when hitting the submit-button, it gives me

Fatal error: Using $this when not in object context in /hsphere/local/home/distortedkid/bigsouth.se/system/ee/legacy/libraries/Core.php on line 539

The form-code/markup on the site is pretty complex, but even when I dumb it down to the super-duper basic example given by the EE docs, I still get the error.

<!DOCTYPE html>
<html lang="en-US">
<head>
  <meta charset="UTF-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <meta name="apple-mobile-web-app-capable" content="yes">
  <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  <title>Standup</title>
</head>
<body>
  {exp:channel:form channel="standup" return="contact/thanks" }
     <input name="title" type="text">
     <input type="submit" value="Submit">
  {/exp:channel:form}
</body>
</html>

Any thoughts?

Googling this issue hasn't really given me anything of value (or that I can understand).

Just updated form 2.7x to 3.0.6 flawlessly, if that could have anything to do with anything.


texts: image re-sizing in Expressionengine Discussion Forums

texts:
I am using ExpressionEngine 2.5.5 and Discussion Forum 3.1.10.

Issue i am having it will not re-size photos when my members post them as Image Links, it works in Chrome browser but it will not work in Firefox or IE.

When you look at the forum post where photo is posted with chrome browser it is nicely re-sized to fit the look of the forum.

However if you look at the same post where image is in Firefox or IE the image is huge (true size) and breaks the look of the forum.

Any suggestions on how to fix or where to look would be much appreciated.


texts: Workaround for Grid incompatibility with Parent realtionships?

texts:
I am developing a Tutoring service website: a school contacts the Tutoring service for a Student, the Tutoring service arranges a private Tutor.

Each school can log in and see the Students from their school placed with the Tutoring service.

Schools are members. The Students are channel entries.

Each School is the author of all of their Students’ entries. Using {author_id} ensures a school can only see its own Students.

There is a details page for each Student.

On the details page is the Tutor's schedule.

The Tutor's schedule channel is going to be authored by the Tutors.

There could be more than one Tutor per Student. The same Tutor could be assigned to more than one Student. Also, one Tutor can teach the same Student more than one subject.

I used a Grid field to set up the Tutor’s schedule.  (Day of Week - Start Time - End Time)

I have related the Tutor's schedule channel to the Student channel.

But it seems the only way I can get the Tutor's schedule into the Student channel is by putting this into the Student channel:

{parents channel="tutors_subjects_schedules"}

{parents:tutors_name}

{parents:tutors_email}

{parents:tutors_phone}

{parents:subject}

{parents:schedule:day} {parents:schedule:start_time} {parents:schedule:start_am_pm} {parents:schedule:end_time} {parents:schedule:end_am_pm}

{parents:exceptions}

{/parents}

My problem is all the fields comes in except the Grid fields. And from what I see in the EE 2.7.1 guide, it's an issue the Grid fields can't be used with parent relationship.

I am looking into using Matrix/Playa instead of EE's native Grid/Relationships, but I was wondering if there was another workaround for the probelm.

I'm not an expert with either EE or Relationships. :(

Thank you!


texts: Channel Type dropdown not showing all channels

texts:
I have 2 channels that are both linked to the same category and status group. However, I tried changing/editing the status from the "options" tab after I published my and only one (the current channel that is assigned to the entry) of my two channels are listed. Is there a setting I missed somewhere to allow all of channels to display here or is this not allowed to change after the page is saved?

http://dl.dropbox.com/u/1739837/Screenshots/dw.png

I'm using Structure which may be causing an issue? Thoughts?


texts: Solspace Calendar Orderby Date vs. Title

texts: If I want to output the same list of occurrences by date vs. by title, is the best way to do this by switching tags?  So for by date, use {exp:calendar:cal}, but for by title, use {exp:calendar:occurrences}?


texts:
By that I mean can an email field be presented twice on a form and the entry have to match before form submission is allowed?

Best wishes
Lee


texts: PHP error when using Low Variables 2.4.0

texts:
Has anyone come across this error with Low Variables?

Trying to create a new variable (the first one for this install):

A Database Error Occurred
Error Number: 1364

Field 'variable_data' doesn't have a default value

INSERT INTO `exp_global_variables` (`variable_name`, `site_id`) VALUES ('lv_test', '1')

Filename: third_party/low_variables/mcp.low_variables.php

Line Number: 1135

This was trying to get create a textarea filed. Get the same error when trying to create an Assets field too:

Error Number: 1364

Field 'variable_data' doesn't have a default value

INSERT INTO `exp_global_variables` (`variable_name`, `site_id`) VALUES ('lv_assets', '1')

Filename: third_party/low_variables/mcp.low_variables.php

Line Number: 1135

EE 2.7.2
LV 2.4.0


texts: Store: Removing item from cart triggers paid=yes

texts:
When removing an item from the cart in Store, I'm seeing the order being changed to Paid=Yes in Orders. It correctly stays as Incomplete status and doesn't show any items in the details, but Paid is Yes.

Removing works correctly otherwise, and am using:

<button class="cart-remove-btn" type="submit" name="remove_items[{key}]" value="x">x</button>

within the Store checkout form.

EE 2.9.2, Store version: 2.4.1

1 simple custom Store extension: uses on_store_order_complete_end to update Entry status


texts: Cartthrob 1 > 2 upgrade - updating price modifiers?

texts:
I'm in the process of moving a Cartthrob powered EE1.x/Cartthrob 1.x store to EE2.x and Cartthrob 2.x. Most things have gone as smoothly as can be expected with such a big leap (ie not that smoothly, but I'm getting there!)

One issue I'm struggling with is migrating my product options now that they're handled differently. Cartthrob's new (stored option) solution is really good, but I don't know how to bulk-apply my old per-item price modifiers to the new method, as it looks like every item with a stored option saves it as some kind of unique (encrypted?) string. So I don't think it's a case of me writing a sql query to look for serialized arrays in the corresponding field_id and replacing them with a new string.

Has anyone got any experience of this or can think of a handy solution that doesn't involve me manually opening and closing hundreds of entries? Because at teh moment I'm only working on a staging DB - when my update is ready, I'm going to have to migrate the production database and that's going to be tricky in itself... :/


texts: Matrix, Low Variables file upload cell randomly removing image

texts:
EE 2.9.3
LV 2.6.0
Matrix 2.6.1

This has happened twice now.

There are a number of low variables with Matrix fields where a file upload cell is losing the image that was uploaded. The image is not deleted from the server, just not associated with that field or cell anymore. It happens to all file cells in matrix fields in low variables but not in channel entries.

It appears to happen for no apparent reason.

I have no idea how to troubleshoot this and am on the latest version of both Matrix and Low Variables.


texts:
this is my form:

{exp:channel:form channel="contactform" return="contact/dank" include_jquery="no"  include_assets="no"}

            <input type="text" class="text-input mandatory" size="33"  name="firstname" id="firstname" placeholder="Name">

            <input type="text" class="text-input mandatory" size="33" name="lastname" id="lastname" placeholder="Surname">

            <input type="text" class="text-input mandatory" size="33" name="title" id="title" placeholder="Company">

            <input type="text" class="text-input mandatory" size="33" name="function" id="function" placeholder="Function">

            <input type="text" class="text-input mandatory" size="33" name="zip" id="zip" placeholder="Zip code">

            <input type="text" class="text-input mandatory" size="33" name="city" id="city" placeholder="City">

            <input type="text" class="text-input mandatory" size="33" name="country" id="country" placeholder="Country">

            <input type="text" class="text-input mandatory" size="33" name="email" id="email" placeholder="E-mail">

            <input type="text" class="text-input mandatory" size="33" name="tel" id="tel" placeholder="Tel">

            <textarea cols="78" rows="5" name="question" id="question" placeholder="Insert free text"></textarea>

                <input type="submit" value="Submit" class="submit" id="formsubmit">

{/exp:channel:form}

CHANNEL FORM SETTINGS:
contactform> allow guest posts: Yes

i include the form as a snippet and i had to disable jquery as it gave conflicts.

the forms works via /home or /contact, but not via index


texts: Can I use an email address as a discount code in Expresso Store?

texts:
I'm considering purchasing Store by Exp:resso in order to use the discount feature for client project.

I'm wondering if the discount value can have the characters normally used in an email address. Can a discount code be equal to test@email.com or is it randomly generated by software?


texts:
I'm trying to use the new channel form captcha functionality, and I never get the fields displayed, apparently because the {if captcha} conditional always fails.  However, like one of the blog posts I saw, when I take the conditional off, I do get a display of the {captcha} image.

I have followed the instructions and have Allow Guest posts set to yes, Guest Captcha set to yes, And I yave Use TrueType Font set to Yes and that font is there in the {site_url}/images/captchas directory.  I just re-affirmed for the second time that my images/captchas directory is set to 0777, although that may not be valid as it's a Windows server.  I don't know how to check the GD library, but every other aspect of EE seems to work fine.

I am not able to see any evidence of GD library.  As it's a windows server, I'm not sure where to look.  Anyone know where in the GUI, or elsewhere, I can see that?


texts: Does native EE caching support configurable redis db indexes?

texts:
After combing through the redis driver cache file (/system/libraries/Cache/drivers/Cache_redis.php), it appears that an option doesn't exist to allow a user to specify a redis db index.

This is important in the event we use the same redis database for both a development and staging server.

Is this possible to accomplish another way? Or is anyone aware of plans to add this as an option?


texts: Manual member account activation for one group

texts: Is there any way to have one member group require manual activation but have another group not require any activation?


texts:
Recently the site we've been working on has been attracting a lot more traffic.

We've been seeing high CPU spikes and recently installed New Relic.

Already we've been able to pinpoint a bottle neck but I'm seeing something in the reporting that I can't make sense of.

We're seeing a high transaction time on /article/undefined

My initial thought was that perhaps the second segment was wrong (typo, non-existent) etc but our article template has require_entry="yes" and in the if no_results will redirect to our 404.

I wonder if it's worthwhile moving our 404 outside of EE entirely if we're getting that much throughput on it.

Any ideas?


texts:
Is this possible? I've been searching and  have not been successful in finding any solid answers. I've tried submitting the user registration form with ajax and it just returns the expected html page.  I hope I'm not just missing some parameter.

** edit **
figured out that you can submit, if successful you will get the expected response. If their are errors you will get undesirable response back. It a normal Expression Engine error page


texts: I am looking to build a sweepstake system that would send a unique code to the user every time they submit their email. What would be the best add ons to use to accomplish a system like this? Maybe safecracker could create entries and I could use the entry id & add another generic number to it creating the unique code eg: AUGCOMP23. Then maybe use Postmaster to send the unique code to them? Am I heading on the right track? How would I limit the amount of times they could enter?


texts: Files displaying in File Manager even though they don't exist

texts:
I must have at some point manually deleted images via FTP in my image file directories.

In the file manager, even after 'syncing' the directory, those files that no longer exist are still displayed. If I try to delete the rows, it shows an error:

File /var/sites/domain.com/public_html/images/uploads/galleries/filename.jpg does not exist.

How can I remove these?


texts: Prevent multiple users from editing the same item

texts:
Working on a site with several steps that have to be done by different editors. I am afraid of data loss through cross-editing (two or more users editing an entry at the same time).

The item should not be locked down completely, I would just like to have a warning displayed. This would prevent accidental lockdown (someone leaves their browser open while editing a post and goes to lunch).

This all has to happen on a Safecracker form.

There is one add-on on devotee, but the reviews say that it breaks Zoo Admin and the author seems to be unresponsive.


texts: How to get width, height from file field within a matrix cell

texts:
I have a site with a matrix field that stores images (file field) in one matrix cell and captions in another. I am trying to get the file field to output the height and width of the image. Here is my code.

{matrix_field_name}
  {gallery_image_field}{width}x{height}{/gallery_image_field}
{/matrix_field_name}

So this code does output the width and height but it also outputs the path to the file. Something like this

http://sitename.com/image/image.jpg800x600

Does anyone know how to get it to only output the dimensions?

EE 2.9.2 and Matrix 2.6.1

In answer to the question if there was more code. There is.

    {cf_project_gallery}

          {exp:ce_img:pair src="{cell_1}" width="92" height="69" crop="yes|left,top" allow_scale_larger="yes"}

          {/exp:ce_img:pair}

{cell_2}

    {/cf_project_gallery}

This is the full code minus the channel entries tag which has a bunch more code in between so I have not included. I just used a paired down version for simplicity of explanation in my original post.

I tried just stripping down the code like in your example and it did output the correct data. I think EE was getting confused on the first {cell_1} being the opening tag which makes sense I guess. I rewrote it to this.

    {cf_project_gallery}

          {exp:ce_img:pair src="{cell_1}" width="92" height="69" crop="yes|left,top" allow_scale_larger="yes"}

          {/exp:ce_img:pair}

{cell_2}

    {/cf_project_gallery}

And that did the trick. I didn't notice it originally but in the first version it was not outputting the path to the image on the first cell_1 so that's what eventually clued me in.


texts:
I have set an extended set of segments based on playa parent/child relationships

http://example.com/template-group/template/playa-parent/playa-child

I would like retrieve the content of an entry based on segment 4 but

I'm not sure I can do this and
I'm not sure if what I am doing is
right?

{exp:channel:entries channel="countries" dynamic="yes" limit="1"}
{exp:playa:parent dynamic="yes" limit="1" channel="cities"}
{title}
{/exp:playa:parent}
{/exp:channel:entries}

I expect cities to yield the entries title ("London") based on the following URL

http://example.com/template-group/template/england/london

[EDITED: Typo fixed for limit syntax]


texts: Passing a GET variable back in a query while using mysqli_real_escape_string()

texts:
I'm trying to take a variable that's passed in a query string (GET) and then use that variable to do a SELECT based on it...

// Assign query string to a variable while sanitizing it against XSS
$event = ee()->input->get_post('event', TRUE);

// Build query
$sql = "SELECT t.entry_id
    FROM exp_channel_titles t
    LEFT join exp_channel_data d
    ON t.entry_id = d.entry_id
    WHERE
        field_id_42 LIKE '" . mysqli_real_escape_string($event) . "';";

// Execute query
$query  = ee()->db->query( "$sql" );

It executes as expected, however I am seeing the following error in the error log:

Severity: Warning  --> mysqli_real_escape_string() expects exactly 2 parameters, 1 given

What is the 'EE way' to pass the required connection parameters to the mysqli_real_escape_string() function?


texts: How to run a php script silently (like a cron job) from an EE template

texts:
I've got a PHP script that updates an entry's status depending on certain criteria being met. I was planning on running this script as a cron job on my web server every hour.

It'd also be nice if I could run it on certain templates on the website too (like on a success/confirmation page after an entry was submitted), so that entries can be updated right away should they need to be.

How would I go about running this script silently from a template though, without it outputting anything to screen? I almost want to 'ping the cron job' (pardon the lack of technical terms here!) from the EE template. It's not something I've done before so I'd appreciate any advice on the best way of going about this, thanks.

Edit:

As a final follow-up, here's the code I ended up using inside my EE template. I followed Anna's first recommendation below and used the PHP exec() function, and I ran this PHP using CE String's php method:

{exp:ce_str:ing php}
  <?php
    exec("php path/to/my/php/script.php > /dev/null &");
  ?>
{/exp:ce_str:ing}


texts: Different Top vs Bottom Pagination Code Blocks

texts:
Pagination is pretty simple but I can't figure out how to have a different pagination style at the top vs the bottom. What I want to do is show the pagination links at the bottom of the results but show some other information that is only available within the pagination tags at the top of my results. I have AB Pagination installed as well so I can use some it's extra tags to show more info.

So my question is, is there a way to have something similar to

{pagination_top} Showing results 1-10 of 56. Show: 10  20 30 per page  {/pagination_top}

{entries loop} stuff here {/entries}

{pagination_bottom} Prev | 1 | 2 | 3 | etc | Next {/pagination_bottom}

Any help would be appreciated! Thanks


texts:
I have an issue with an old build.

EE 1.6.8 - Build 20090723
Matrix 2.0.11
Playa 3.1.2

I create the matrix field fine, but if I add a playa segment, after saving the field, I can no longer access the field. If I click on the field label to edit it, I am shown nothing but an Update button. I can not edit the field in the entry template either. I need to get this fixed until I get everything rebuilt and updated to 2.


texts: Error message after upgrading to 3.5.17 (from 2.11.9)

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


texts:
I have downloaded de payment method "Check" for Expresso-store. If I make a payment with this payment, the order will be placed on paid. How can I fix this?

Thank you!


texts: Channel form problem when using inline errors

texts:
I am using channel forms to publish articles and would like to use inline errors but when I have this enabled I get an error.

A PHP Error was encountered
Severity: Notice
Message: Undefined property: EE::$view
Filename: libraries/File_field.php
Line Number: 704
Fatal error: Call to a member function head_link() on a non-object in /web/nifootball2/system/expressionengine/libraries/File_field.php on line 704

My template code

 {exp:channel:form channel="reports" return="clubhouse/fixtures" class="sky-form" rules:report_body="required|min_length[50]" error_handling="inline" }
                     Publish Match Report
                        <input type="hidden" name="report_match" value="{segment_3}" />
                        <input type="hidden" name="report_club" value="{club_name}">
                        <input type="hidden" name="report_club_url" value="{club_url_title}">

                      <fieldset>

                            Title
                                    {exp:teammanager:club_team_match match_id="{segment_3}" team_id="{segment_4}" }
                                    <input type="hidden" name="title" id="title" value="{match_report_type} - {home_team_name} v {away_team_name} {match_date}" size="50" maxlength="100" >
                                    <input type="hidden" name="url_title" id="url_title" value="{match_report_type}-{home_team_url}-v-{away_team_url}-{match_date}" maxlength="75" size="50">
                                    {match_report_type} - {home_team_name} v {away_team_name} {match_date}
                                    {/exp:teammanager:club_team_match}

                         </fieldset>

                           <fieldset>

                       Report Body
                                      {error:report_body}
                                    {field:report_body}

                           </fieldset>

                           <fieldset>

                            Cover Image

Add a cover image for the Article to be displayed beside the Article snippet on the Reports lists and at the top of the full article.

                                {field:report_image}

                            </fieldset>

                                <button type="submit" class="btn-u">Submit</button>

                        {/exp:channel:form}


texts:
I've got a directory of locations in a channel, 4500 of them.

I'm using the Google Maps addon but given how many locations we're showing, the performance is terrible.

Right now we're outputting the locations via the Query Module to a JS template formatted as JSON. That JSON file is 1.1Mb

What I'd like to do is some how export that to a static JSON file for say 1 day (rather than run the query each time) and see if the performance improves and have it run a cron to update once a day in the background.

Doable?


texts:
I have gone to the steps in this page to setup safecracker registration module.

This is my form for registration.

{exp:safecracker
    channel="members"
    class="form-horizontal"
    dynamic_title="[email]"
    error_handling="inline"
    include_jquery="no"
    register_member="yes"
    return="index.php/sign-up/"
    safecracker_head="no"
}

    {if global_errors:count > 0}

General Errors

        {global_errors}

{error}

        {/global_errors}

    {/if}

    {if field_errors:count > 0}

Form Errors

        {field_errors}

{error}

        {/field_errors}

    {/if}

    <fieldset>
        <legend>Sign Up</legend>

        {stash:embed name="forms:fields:.email"}
        {stash:embed name="forms:fields:.password"}
        {stash:embed name="forms:fields:.password-confirm"}

                <button type="submit" class="btn btn-primary">Register</button>

    </fieldset>

{/exp:safecracker}

When I try to submit with valid fields, I get redirected to index.php/sign-up with nothing displayed at all.

Keep in mind that this form is in index.php/sign-up which means it should redirect to itself.

I don't receive any emails at all which means that registration probably failed.

Am I doing anything wrong here?


texts:
Is there an HTML to DOCX plugin/module for Expression Engine? I am looking for a solution akin to Shine PDF.

We would like to allow users to download PDF or Word doc versions of their content. The reason for a DOCX format is to allow users to edit the content after they have downloaded it.

Thanks for any help you can provide.


texts: Minimee not working. How do I display template debugging?

texts:
I've installed Minimee. It doesn't seem to be combining CSS and JS files, despite them being wrapped in {exp:minimee:css} and {exp:minimee:js} respectively. Minimee is installed and "Combine Assets" are checked for CSS and JS (as well as "Minify").

When I view the rendered template, I still see the individual files itemized in the mark up. Basically, they weren't combined. They weren't minimized, either. NOTE: CSS and JS files are in templates.

It seems that when I check the minify HTML checkbox that it does affect the mark up a bit (though I thought it would minify it to the point that the HTML becomes a single line -- unless there are <pre> or <code> tags, I suppose).

Anyway, Minimee doesn't seem to be doing its thing. So, I am trying to debug it by turning on Template Debugging. I have set it in CPanel. However, I don't see anything on the rendered page that looks like template debugging. I am logged in as a Super Admin.

Any ideas what might be wrong with Minimee or Template Debugging?

UPDATE 1:

I created the cache folder in the wrong place (was confused since I am using MSM). It's been fixed now. Minimee is now creating the combined/minified CSS and JS and in the cache folder. It seems to also properly reference it from within the templates. However, it seems like what is being retrieved is the home page's HTML instead of the actual contents of the file in the cache folder. Still looking into this.

UPDATE 2:

Seems that there might be some sort of server issue. When I go to www.domain.com/cache/, I see the combined/minified JS and CSS files. However, when I click on them, I get a 404 error.


texts: Add-on - Building Queries w/ Field Names vs Field ID's

texts:
I have an add-on I've built to provide custom e-commerce reports for a client.  It started as one of those 'we need this very specific thing' builds and of course has grown and grown as more needs arose.  At it's core it is querying the db of an EE & Cartthrob site to pull out information about orders, products, etc.

A problem I've run into as it's grown is that it's not very portable between local/dev/live.  My queries are built using field ID's, which is problematic if I end up with any discrepancies in when fields were created between those environments.  This is a large & very actively developed site, so I'm not often able to wipe out my dev/local DB's with the live DB to correct those problems as they arise.

To solve the issue, I'd prefer to use field name's as opposed to field ID's, but I can't work out how to best integrate that into my queries.  I know I can get ahold of field names, but from an add-on development / query standpoint I'm not sure how to best integrate them.  Here's a trimmed down & anonymized version of one of my queries.  I've removed a lot of fields & all field ID's are 00, which isn't the case in the real query obviously.

SELECT FROM_UNIXTIME(pict.entry_date, '%c/%e/%Y %r') as 'Order Date',
picd.field_id_00 as QTYShipped,
ocd.field_id_00 as 'email address',
ocd.field_id_00 as Company,
ocd.field_id_00 as Ship_Address1,
ocd.field_id_00 as Ship_Address2,
ocd.field_id_00 as Ship_City,
ocd.field_id_00 as Ship_State,
ocd.field_id_00 as Ship_Zip,
picd.field_id_00 as 'Order Number',
oct.status as 'Order Status',
pcd.field_id_00 as 'Product ID Number',
pm.member_id as 'Member ID',
pmg.group_title as 'Member Group'
from exp_channel_data as picd
left join exp_channel_titles as pict on picd.entry_id = pict.entry_id
left join exp_channel_data as ocd on picd.field_id_00 = ocd.entry_id
left join exp_channel_titles as oct on ocd.entry_id = oct.entry_id
left join exp_channel_data as pcd on picd.field_id_00 = pcd.entry_id
left join exp_members as pm on oct.author_id = pm.member_id
left join exp_member_groups as pmg on pm.group_id = pmg.group_id
where picd.field_id_00 in (select entry_id from exp_channel_titles where channel_id = '0')
order by pict.entry_date desc

So the question is - in an add-on, what's the best way to feed this query from field names rather than field ID's?


texts:
guys.

I'm a beginner to EE and I'm looking for a way to add "" to any paginated pages in a Blog template in EE.

Is there any way to check in header if it's a paginated page and, if so, display this tag?

Thanks!