You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In short, the removeLanguageLinksToResource function is not careful enough when it updates the values of modx_site_tmplvar_contentvalues.
The following line of code can potentially retrieve any rows from modx_site_tmplvar_contentvalues including Date TV's or standard Text TV's which happen to contain a number matching $resourceId:
$templateVarResources = $this->modx->getCollection('modTemplateVarResource', array('value:LIKE' => '%:'.$resourceId.'%'));
Even if this function was limited to only operate on values belonging to Babel's TV, there is still the issue that $resourceid must exactly match the values found.
For example: removeLanguageLinksToResource(38) would update all four of these modx_site_tmplvar_contentvalues values (below), even those the last two do not relate to doc 38.
Please see here for full details:
http://forums.modx.com/thread/76315/data-going-missing-in-modx-site-tmplvar-contentvalues
In particular, please read the 5th post for a partial (but not perfect) fix:
http://forums.modx.com/thread/76315/data-going-missing-in-modx-site-tmplvar-contentvalues#dis-post-422404
In short, the removeLanguageLinksToResource function is not careful enough when it updates the values of modx_site_tmplvar_contentvalues.
The following line of code can potentially retrieve any rows from modx_site_tmplvar_contentvalues including Date TV's or standard Text TV's which happen to contain a number matching $resourceId:
$templateVarResources = $this->modx->getCollection('modTemplateVarResource', array('value:LIKE' => '%:'.$resourceId.'%'));
Even if this function was limited to only operate on values belonging to Babel's TV, there is still the issue that $resourceid must exactly match the values found.
For example: removeLanguageLinksToResource(38) would update all four of these modx_site_tmplvar_contentvalues values (below), even those the last two do not relate to doc 38.
web-fr:91;web:38
web:38;web-fr:91
web:138;web-fr:261
web-fr:261;web:138
thanks
The text was updated successfully, but these errors were encountered: