Revolution: Missing smarty template in update to 2.5.0

Created on 7 Jul 2016  路  8Comments  路  Source: modxcms/revolution

The template manager/templates/default/element/tv/renders/input/textareamini.tpl is missing from 2.5.0 causing any site using a TV "Tiny Text" type to throw a 500 error in the manager.

I got around it by copying the textareamini.tplp from a backup into the appropriate location.

I did a search on the server looking for other site with this file ~ about 30 sites all recently updated to 2.5.0 none had the file.

bug area-core

All 8 comments

Are you sure "Tiny Text" is a core TV? textareamini sounds like something from the evo days.

these guys have been around for about 5 or 6 years & started out as a new revolution installation - they have been updated regularly. I've never installed an Evo instance.

the exact error is:

PHP Fatal error: Uncaught --> Smarty: Unable to load template file 'element/tv/renders/input/textareamini.tpl' <-- \n thrown in /var/www/vhosts/domain.com/core/model/smarty/sysplugins/smarty_internal_template.php on line 219

the option to create a "Textarea (mini)" is still available in the TV input type field. For this site - but not there in a couple others..... hmmm maybe an extra inserted it at some point then?

There has obviously been a 'textareamini' TV type: https://github.com/modxcms/revolution/search?q=textareamini

But this issue shows a larger problem, I faced sometime before: If i.e. a custom TV type is removed and some TVs using this type after, a fatal error occurs there too.

The only reason errors surface in 2.5.0 is because of the cleanup script that was added to it. The actual functionality of textareamini was removed long before that. Having textareamini in the dropdown of available tvs is a bug. There should also be some sort of callback for the tvs if they are not found.

Implementing the fallback and removing the option is the actual issue to be solved here.

@OptimusCrime Is correct, official support for textareamini was removed upstream back in January 2011 (See 57a78453f3200f05be3175cf7b2274e4d3f0aa53) but no means previously existed for cleaning up removed files from the download distribution channels until the new legacy file 2.5-cleanup-script

This reminds me #11255 _(usually encountered during Evo migrations)_, and perhaps an opportunity for systematically auditing modx_site_tmplvars.type for non-supported TV entries.

Maybe the issue title should be renamed or a new issue should be opened:

It has to be solved that deprecated TV types are not selectable anymore and not existing old TV types (i.e. removed custom TV types) could create a fatal error. Some fallback to a default TV type should be implemented.

In favor of closing this as it and the discussion up to this point will be misleading. A new issue which clearly states that to be done and which references this as a source would be optimal imo.

Closing this in favor of #13077

Was this page helpful?
0 / 5 - 0 ratings