Hot answers tagged

7

Totally agree with Steven's comment, I'll give my own answer though as we recently went through similar. We were migrating to a new server and took the opportunity to build php 5.5 on the server to skip a version and save us the hassle of any major version upgrades again anytime soon. Here was our strategy. Upgrade all sites to latest EE build Upgrade all ...


4

It won't work at all. EE 2.7 (and most add-ons built for it) use features only available in PHP 5.2+, probably most notable is json_encode which EE uses a lot internally. Some add-ons such as Store 2 even require PHP 5.3 as minimum now. Personally I would ditch the host and find one who takes software updates (and therefore server security) more seriously. ...


4

So here's what I've found out: EE uses an INT database field to store a UNIX timestamp Because of this, EE can display dates back to about 1901 Switching the database field from INT to BIGINT fixes the problem, but can dramatically increase the size of that database table I discovered the INT vs BIGINT fix through a web search and tested it with success. I ...


4

This is easily accomplished using the start_on parameter. If the start_on date/time should be current time use: {exp:channel:entries channel="events" limit="3" sort="asc" start_on="{current_time format='%Y-%m-%d %H:%i'}" show_future_entries="yes" } If the start_on date/time should be dynamic, enable PHP in the template and set it ...


4

If you add parse="inward" to your channel entries tag parameters, it will force module tags inside your parameters to be parsed before the channel entries tag.


4

Turns out, this has nothing to do with Store at all. Found my answer on StackOverflow: Since PHP 5.3.9 there's a new configuration setting called "max_input_vars" which limits the number of input variables. The default setting is 1000. Also check if Suhosin is installed, because there's also a similar setting.


4

After setting the return data, you need to return program control to the Template class, which ends execution of the current method. if ($date[2] == 25 && $date[1] == 12) { $this->return_data = '<p>Sorry, there are no sailings on Christmas Day.</p>'; return; } Incidentally, it isn't necessary to set the $return_data class ...


4

You can do this by developing your add-on as a module rather than a plugin since only modules can use EE actions. (See the EE docs for an explanation of the difference between the types of add-on.) More info on EE actions here. Essentially, you need to develop a module to perform your desired action, then call the associated ACT URL (e.g. http://example....


4

You can make a module - like Steve advice. Use Yeoman ExpressionEngine Add-On generator to simplify developing process. On server you will need to setup cron with wget: execute cronjob every day at 3am 00 03 * * * wget http://example.com/index.php?ACT=XX&task_id=1 Or if you want something really quick and simple: Create a special template with some ...


4

Do you have PHP Parsing Stage on "Input"? <form method='POST' action='gen_req'> <input id='input' name='uid' placeholder='uid' /> <button class='btn'>Go</button> </form> {exp:member:custom_profile_data member_id="<? echo ee()->input->post('uid', TRUE); ?>"} <p>{email}</p> {/exp:member:...


4

Why aren't you just using https://devot-ee.com/add-ons/character-limiter ?? Also, if PHP is set on output, what happens when {event_summary} has a value like this? And the event was great, he said "Everything is healing nicely!"


4

Replace the continue with return statement.


4

There are at least two ways to get copies of EE 3 and 4. 1) Log in to https://expressionengine.com. If you have any EE purchases from this site before, you can go to your Purchases page and download the latest 2, 3, and 4 versions of EE. 2) Clone the git repository at https://github.com/ExpressionEngine/ExpressionEngine/. There is a master-v3 and master-v4 ...


4

Have you created all the necessary files for your add-on? I'm not sure EE will look for your library file in an empty add-on folder. You need to make sure you have an addon.setup.php file at least, and possibly the basic framework for a module I believe for EE to try and load any libraries from your addon. You may need to install said module as well for it ...


3

I wouldn't go updating a production server without running any tests first. I'd mirror your production server first and then test the sites individually. That's the only way you'll guarantee to be headache free.


3

Create a category group in EE called "Cars" (assumes cat group ID of 2 in code below). In there you create categories with the Make. You then create child categories of each Make with the relevant Model. You can then create children of the models if there are variants of the model. Channel Categories Main landing page template has this code: {!-- MAKE --} ...


3

Not a solution to your specific question, but a solution to your general problem (how to display only upcoming events): This is exactly why I wrote EEvent Helper years ago. The idea is that you set events to expire at the end of their event date, allowing you to easily pull just past events, or just upcoming events. {!-- Upcoming Events --} {exp:channel:...


3

Can you define what you mean by "a modern CMS"? Any database driven system will face similar problems when using Git source control. This isn't specifically an ExpressionEngine problem. The only systems that wouldn't suffer this difficulty are those using flat file architecture. I often use Git with ExpressionEngine. The only possible sticking point being, ...


3

Ugh, wasn't logged in properly.... They sent me this on email support: If you could just replace line 814 in Assets_lib.php file with if (!(count($full_folder_list) == 1 && reset($full_folder_list) == ":any:")) you should be fine :)


3

Do this right way - do not follow the dark side. Put all your php code into plugin. Your code is not good even from optimization way - not good solution to loop the channel entry. Just make function which will return list of $item['some_key']|$item['some_key']|$item['some_key']|$item['some_key'] In this case you will do only one request of channel:entry. ...


3

$plugin_info is a required array for ExpressionEngine 2.x plugins. The PHP class providing the functionality for the plugin will work fine without it, but that is where the information for installed plugins is pulled to be displayed in the control panel. You can find the full details here: ExpressionEngine Plugin API: $plugin_info array e.g.: $plugin_info ...


3

This is a PHP parse error. It's exactly what Derek Hogue said. On line 33 you are trying to use a stdClass as an array in some functionality on a template that has PHP parsing turned on. EE template: Hello from {site_url}! <?php $stdclassvar = new stdClass; echo gettype($stdclassvar); // this outputs "object" $arrayvar = array(); echo gettype($...


3

Concerning a statement from EllisLab, they posted a blog-entry on 13th April, 2016 telling that EE2 and EE3 are PHP 7-compatible: https://ellislab.com/blog/entry/time-to-upgrade-php


3

Suggest you contact the hosting provider recommended by EllisLab: https://ellislab.com/community/hosting Also read this whitepaper supplied by them: https://www.nexcess.net/expressionengine/hosting-optimization You could Google "expressionengine hosting" and contact numerous of the hosting providers to see what they would recommend and supply, then either ...


2

I think, you need to look into that channel preferences under "Channel Posting Preferences". You can see "Default HTML formatting in channel entries" and set it to "Convert HTML into character entities". I hope, it would work for you.


2

You'll need an embed, with or without stash. I always prefer to not use add-ons if I can. So, without stash: {exp:channel:entries status="featured" limit="1"} <div class="featured"> [...] </div> {embed="entries/.list" featured_id="{entry_id}"} {if no_results} {embed="entries/.list" featured_id="0"} {/if} {/exp:...


2

I've found a way to do this; not sure its the 'right' way, but it works and seems logical :-) {exp:plugin_name parse="inward" variable_to_pass="{some_id}"} Then in the plugin: $my_var = $this->EE->TMPL->fetch_param('some_id');


2

You can fetch that global variable like: $address = ee()->db->select('variable_data')->where('variable_name', 'address')->get('global_variables')->row('variable_data'); echo trim(str_replace(array("\r\n","\n","\r"), ', ', $address)); It would work for you.


2

Fixed this recurring error which was caused by huge traffic spikes ourselves by doubling the RAM from 2GB to 4GB (which spiked to 400% during heavy memory pressure) allocated to the VM.


2

For the first two errors, you need open the extension's setting in the CP and setup all parameters. For errors 3 & 4, check if your server path to Mage.php is correct.


Only top voted, non community-wiki answers of a minimum length are eligible