Which version of ModX / ManagerManager are you using?

$("head").append(' <script src="/assets/plugins/managermanager/widgets/tags/tags.js" type="text/javascript"></scr'+'ipt> ');
$("head").append(' <link href="/assets/plugins/managermanager/widgets/tags/tags.css" rel="stylesheet" type="text/css" /> ');
Looking at these two lines:
$("head").append(' <script src="/assets/plugins/managermanager/widgets/tags/tags.js" type="text/javascript"></scr'+'ipt> '); $("head").append(' <link href="/assets/plugins/managermanager/widgets/tags/tags.css" rel="stylesheet" type="text/css" /> ');
Wouldn’t the absolute links in these tags cause a few issues if the MODx install was in a sub-directory (hence the JS error)? Just thinking out loud, as I haven’t used ManagerManager before
and I was trying to change the paths whereever i could. But not in the tags.php file.
$("head").append(' <script src="/assets/plugins/managermanager/widgets/tags/tags.js" type="text/javascript"></scr'+'ipt> ');
$("head").append(' <link href="/assets/plugins/managermanager/widgets/tags/tags.css" rel="stylesheet" type="text/css" /> ');
$output .= includeJs(''. $modx->config['base_url'] .'assets/plugins/managermanager/widgets/tags/tags.js');
$output .= includeCss(''. $modx->config['base_url'] .'assets/plugins/managermanager/widgets/tags/tags.css');
Thanks - had forgotten that some people may use subdirs.
UPDATE:
To make it work for a modx installataion in a subdirectory the lines:
$("head").append(' <script src="/assets/plugins/managermanager/widgets/tags/tags.js" type="text/javascript"></scr'+'ipt> '); $("head").append(' <link href="/assets/plugins/managermanager/widgets/tags/tags.css" rel="stylesheet" type="text/css" /> ');
Needs to be changed into:
$output .= includeJs(''. $modx->config['base_url'] .'assets/plugins/managermanager/widgets/tags/tags.js'); $output .= includeCss(''. $modx->config['base_url'] .'assets/plugins/managermanager/widgets/tags/tags.css');
Et voila!
I ran into this problem elsewhere a while ago, and the problem is the newline at the start of the (single) quoted string - you really only need to eliminate the initial newline, you can leave the rest.
I had the same JavaScript error like Metalle. The solution is to write the string in line.
Just change this in "mm.inc.php" (line 605) :
$empty_tab = ' <div class="tab-page" id="tab'.$id.'"> <h2 class="tab">'.$name.'</h2> <div class="tabIntro" id="tab-intro-'.$id.'">'.$intro.'</div> <table width="'.$width.'" border="0" cellspacing="0" cellpadding="0" id="table-'.$id.'"> </table> </div> ';
to:
$empty_tab = '<div class="tab-page" id="tab'.$id.'"><h2 class="tab">'.$name.'</h2><div class="tabIntro" id="tab-intro-'.$id.'">'.$intro.'</div><table width="'.$width.'" border="0" cellspacing="0" cellpadding="0" id="table-'.$id.'"></table></div>';
Without any linebreaks!
greez from Germany
MarcelF
Which version numbers of ModX / ManagerManager?
I’ve got the latest releases of MODx and ManagerManager installed, and my rules are only partially working. I get new tabs as specified, but the hideSections and moveFieldsToTab don’t seem to be working as I’d thought -- All the same fields still appear on the General tab, and then all TVs (not just the specified ones) also appear on both the new tabs. Any way to solve this?
Yes - if you use the Tag widget, it will allow you to input new tags, or choose from previously entered ones.
Could I use ManagerManager for a "tag" field where I want to be able to select predefined tags and be able to input some new as I need some?
This discussion is closed to further replies. Keep calm and carry on.