<![CDATA[ YAMS refuses associating language TVs with template - My Forums]]> https://forums.modx.com/thread/?thread=97723 <![CDATA[YAMS refuses associating language TVs with template]]> https://forums.modx.com/thread/97723/yams-refuses-associating-language-tvs-with-template#dis-post-528513
Failed to associate template variable content_fr" with template number 3 .
Failed to associate template variable content_de" with template number 3 .
Failed to associate template variable content_en" with template number 3 .

Hello,

Which could be the cause of such errors, which occur when trying to switch a template to multilingual (in "Modules > YAMS > Multilingual templates")?

I checked that the TVs for languages are available for the given template (which has id=3 in the templates table).
YAMS language tabs are displayed, but empty, as the multilingual TV remain on the "General" tab.

Thanks for your help.

Configuration

  • MODx 1.0.15
  • Content of tables coming from a working multilingual MODx 1.0.3 site.
]]>
Jul Jul 18, 2015, 10:11 AM https://forums.modx.com/thread/97723/yams-refuses-associating-language-tvs-with-template#dis-post-528513
<![CDATA[Re: YAMS refuses associating language TVs with template]]> https://forums.modx.com/thread/97723/yams-refuses-associating-language-tvs-with-template#dis-post-556915 What I can see is that this error can also occur with ManagerManager-0.5.1-pl when unpublishing a language. For some reason, multilingual TV from languages that are still published are duplicated (with same name), i.e. YAMS creates new TVs even if they already exist.

For instance, assuming you have a trilingual website with English, French, German as languages. When unpublishing (Desactivating) German, new TVs for English and French are automatically created
content_en (128) -   (content (en))
content_en(11) - content_en
content_fr (129) -   (content (fr))
content_fr (12) - content_fr

and the same with other TVs, like pagetitle_en/fr, a.s.o.

This makes your YAMS site crash.

In such a case the solution is to delete the wrongly created TVs with a SQL request in phpMyAdmin (or equivalent).
First, look which id does the lastly created TV have:
SELECT MAX(id) FROM `sdo_site_tmplvars`
Which returns 130 for instance.
Second, list all the last TVs and look which one is a duplicated TV:
SELECT * FROM `sdo_site_tmplvars` WHERE id>90 ORDER BY id

If the first duplicated TV is 117, apply:
DELETE FROM `sdo_site_tmplvars` WHERE id>116 
]]>
Jul Feb 18, 2018, 06:26 PM https://forums.modx.com/thread/97723/yams-refuses-associating-language-tvs-with-template#dis-post-556915
<![CDATA[Re: YAMS refuses associating language TVs with template]]> https://forums.modx.com/thread/97723/yams-refuses-associating-language-tvs-with-template#dis-post-534904 ]]> fourroses666 Nov 27, 2015, 09:21 AM https://forums.modx.com/thread/97723/yams-refuses-associating-language-tvs-with-template#dis-post-534904 <![CDATA[Re: YAMS refuses associating language TVs with template]]> https://forums.modx.com/thread/97723/yams-refuses-associating-language-tvs-with-template#dis-post-528750
Currently, the solution of using ManagerManager 0.5.1-pl is ok for me, but I may try the patch again with a future site.]]>
Jul Jul 22, 2015, 11:19 AM https://forums.modx.com/thread/97723/yams-refuses-associating-language-tvs-with-template#dis-post-528750
<![CDATA[Re: YAMS refuses associating language TVs with template]]> https://forums.modx.com/thread/97723/yams-refuses-associating-language-tvs-with-template#dis-post-528747 plugin managermanager config is linking to mm_rules and mm_rules is correct with the important line on the bottom:
require( $modx->config['base_path'] . 'assets/modules/yams/yams.mm_rules.inc.php' );


I have no problems anymore in 1.0.15 when doing this.
https://github.com/DivanDesign/MODXEvo.plugin.ManagerManager/issues/11#issuecomment-64813210


]]>
fourroses666 Jul 22, 2015, 10:55 AM https://forums.modx.com/thread/97723/yams-refuses-associating-language-tvs-with-template#dis-post-528747
<![CDATA[Re: YAMS refuses associating language TVs with template (Best Answer)]]> https://forums.modx.com/thread/97723/yams-refuses-associating-language-tvs-with-template#dis-post-528597 downgrading ManagerManager to version 0.5.1-pl.

For version ManagerManager 0.6.2, this thread provides a patch on Github.
http://forums.modx.com/thread/95259/bug-managermanager-6-2-not-workin-with-yams-anymore#dis-post-515733
However, I could not make it work.]]>
Jul Jul 20, 2015, 06:02 AM https://forums.modx.com/thread/97723/yams-refuses-associating-language-tvs-with-template#dis-post-528597