roryg / ElementHelper

Element Helper is a MODx Revolution plugin for automatically creating elements from static files without the MODx manager.
27 stars 10 forks source link

TV's need to be correct case #18

Open JayCarney opened 11 years ago

JayCarney commented 11 years ago

This is something I might look at fixing myself, but essentially if you enter a Tv Type with incorrect capitalisation (which is somewhat inconsistent throughout modx) you get possible errors with duplicate output renderers, all tv types need to be sanitised when they're coming from the JSON file

roryg commented 11 years ago

Is this confirmed as the problem you were having in Issue 15?

Perhaps just simply making the type lowercase would be enough e.g.

if ($property === 'type')
{
    $element->set($property, strtolower($value));
}

or do some types require capitalisation?