Quote from: toasteddigital at Jan 09, 2012, 04:05 AMHi There,
Is there a way to limit the amount of rows a user can add to a MIGx table? Or a way to prevent them adding more than x KB of data?
My client has a fairly large site using MIGx, and the user is data entry happy, occasionally putting more data in than the system is capable of holding. What then happens is the database truncates the data and they get errors. MIGx is brilliantly useful, it'd just be great to stop them putting in more than they should be.
They're not technical, so it'd be great if this could be implemented, I can potentially do this myself if given a nudge in the right direction. Apologies if this has already been asked or I'm missing something very simple![]()
Environment:
MODX Revolution 2.1.3-pl (traditional)
MIGx 1.1.0
PHP Version 5.3.8
MySQL 5.1.56
there isn't a way (yet) to limit the entries.
Fatal error: Uncaught exception 'SmartyException' with message 'Unable to load template file 'element/tv/renders/input/richtext.tpl'' in /home/rx2/domains/collaborativemedia.ca/public_html/core/model/smarty/sysplugins/smarty_internal_template.php:162 Stack trace: #0 /home/rx2/domains/collaborativemedia.ca/public_html/core/model/smarty/sysplugins/smarty_internal_template.php(537): Smarty_Internal_Template->isExisting(true) #1 /home/rx2/domains/collaborativemedia.ca/public_html/core/model/smarty/Smarty.class.php(335): Smarty_Internal_Template->getRenderedTemplate() #2 /home/rx2/domains/collaborativemedia.ca/public_html/core/model/modx/modmanagercontroller.class.php(252): Smarty->fetch('element/tv/rend...') #3 /home/rx2/domains/collaborativemedia.ca/public_html/core/model/modx/modtemplatevar.class.php(1103): modManagerController->fetchTemplate('element/tv/rend...') #4 /home/rx2/domains/collaborativemedia.ca/public_html/core/model/modx/modtemplatevar.class.php(421): modTemplateVarInputRender->render('I have download...', Arra in /home/rx2/domains/collaborativemedia.ca/public_html/core/model/smarty/sysplugins/smarty_internal_template.php on line 162I think, I will add a upgrade-script which adds this MIGX-id field to all MIGX-TVs automatically.
I recently updated a site to 2.2.0 pl with MIGX 1.1.0 rc2 and I get this whenever I try to add or edit a MIGX item:
Fatal error: Uncaught exception 'SmartyException' with message 'Unable to load template file 'element/tv/renders/input/richtext.tpl'' in /home/rx2/domains/collaborativemedia.ca/public_html/core/model/smarty/sysplugins/smarty_internal_template.php:162 Stack trace: #0 /home/rx2/domains/collaborativemedia.ca/public_html/core/model/smarty/sysplugins/smarty_internal_template.php(537): Smarty_Internal_Template->isExisting(true) #1 /home/rx2/domains/collaborativemedia.ca/public_html/core/model/smarty/Smarty.class.php(335): Smarty_Internal_Template->getRenderedTemplate() #2 /home/rx2/domains/collaborativemedia.ca/public_html/core/model/modx/modmanagercontroller.class.php(252): Smarty->fetch('element/tv/rend...') #3 /home/rx2/domains/collaborativemedia.ca/public_html/core/model/modx/modtemplatevar.class.php(1103): modManagerController->fetchTemplate('element/tv/rend...') #4 /home/rx2/domains/collaborativemedia.ca/public_html/core/model/modx/modtemplatevar.class.php(421): modTemplateVarInputRender->render('I have download...', Arra in /home/rx2/domains/collaborativemedia.ca/public_html/core/model/smarty/sysplugins/smarty_internal_template.php on line 162
Before I update to the latest version of MIGX (though perhaps this isn't MIGX but I need to reinstall MODX, maybe missing a file?)
Was this done:
I think, I will add a upgrade-script which adds this MIGX-id field to all MIGX-TVs automatically.
Ok, will try. I'm building some new code in another site with the new version. So basically MIGX_id replaces?[[+idx]]
[[!getImageList? &tvname=`migx1` &limit=`3` &toJsonPlaceholder=`json`]] [[!print_r_json? &json=`[[!+json]]`]]
$json = $modx->fromJson($json); return '<pre>' . print_r($json,1) . '</pre>';
This discussion is closed to further replies. Keep calm and carry on.