cmsms 1.6, external link target bug

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
rimvydukas
Forum Members
Forum Members
Posts: 21
Joined: Thu Nov 01, 2007 7:49 pm

cmsms 1.6, external link target bug

Post by rimvydukas »

Hi,

So I have new fresh installation of cmsms 1.6 without any modifications. When I create a page with type external link and set target to _blank and when I press on new created link it opens in the same page and tot the new one. Checked source - no _blank anywhere. How to solve this bug? Thanks.
User avatar
blast2007
Power Poster
Power Poster
Posts: 508
Joined: Wed Aug 01, 2007 5:36 pm

Re: cmsms 1.6, external link target bug

Post by blast2007 »

Can't reproduce this problem, also with 1.6 fresh installed.

Did you try resetting TinyMCE settings?

Post your CMSMS and module version.

regards
blast
Sonya

Re: cmsms 1.6, external link target bug

Post by Sonya »

I can confirm and guess, that target is now only loaded if you add loadprops="1" to the menu tag.
Last edited by Sonya on Mon Jun 29, 2009 6:38 am, edited 1 time in total.
rimvydukas
Forum Members
Forum Members
Posts: 21
Joined: Thu Nov 01, 2007 7:49 pm

Re: cmsms 1.6, external link target bug

Post by rimvydukas »

Can you be more specific? Where exactly must I add this loadprops=1 stuff?
alby

Re: cmsms 1.6, external link target bug

Post by alby »

rimvydukas wrote: Can you be more specific? Where exactly must I add this loadprops=1 stuff?
in {menu template='xxxx' ...... loadprops=1} tag of your template page BUT check if this menu template has $node->target or add in

Alby
Last edited by alby on Mon Jun 29, 2009 9:41 am, edited 1 time in total.
rimvydukas
Forum Members
Forum Members
Posts: 21
Joined: Thu Nov 01, 2007 7:49 pm

Re: cmsms 1.6, external link target bug

Post by rimvydukas »

Hi,

I'm using standard CSSMenu left + 1 column template.

I made following change:

{menu template='cssmenu.tpl' loadprops=1}

but nothing has changed. Where must I add and how exactly this other part - $node->target

And why such changes? I can remember that in previous versions it was enough to set only target option in external link's options tab.
xfm

Re: cmsms 1.6, external link target bug

Post by xfm »

I have a fresh install of cmsms 1.6, and I can confirm this bug. Didn't found a good solution right away, because the proposed solution didn't work for me:

Code: Select all

 {menu template='simple_navigation.tpl' collapse='1' loadprops='1'}
       

That is because the simple_navigation.tpl does not have that {$node->target} specified. And even less convenient is that this template is read only. The only thing that worked for me is to:

(1) Make a copy of the simple_navigation.tpl, by going to Layout » Menu Manager, and click the icon Import Template to Database.
(2) Give it a new name, e.g. MyTemplate
(3) Edit MyTemplate and add to every link definition the following: {if $node->target ne ""} target="{$node->target}"{/if}

For example:

Code: Select all

<li><a href="{$node->url}">
into:

Code: Select all

<li><a href="{$node->url}" {if $node->target ne ""} target="{$node->target}"{/if}>
(4) Edit the used Layout »Templates and edit the line  {menu template='xxxx' collapse='1' } to {menu template='MyTemplate' collapse='1' loadprops='1'}

For me that fixed the problem.
Last edited by xfm on Mon Jun 29, 2009 2:55 pm, edited 1 time in total.
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: cmsms 1.6, external link target bug

Post by calguy1000 »

This issue is confirmed and will either be fixed in the upcoming 1.6.1 release... or if necessary a 1.6.2 release.

But the problem is minor.  it's a two part problem.
a) you need to add the loadprops=1 parameter onto the {menu} tag.  This is because the target parameter is essentially an 'additional property' to the content types... and yeah, I know that's ugly.. it's a design issue that we should look at working around.
b) the simple_navigation.tpl and other menu manager templates aren't using the {$node->target} value at all.  This will be rectified
    but in the mean time.... just try adding:
   

Code: Select all

{if isset($node->target)}target="{$node->target}" {/if}
    into the appropriate place in your menu manager template(s).
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Post Reply

Return to “CMSMS Core”