Page 1 of 1

cms_selflink still links to pages that are marked as inactive?

Posted: Mon Oct 18, 2010 2:53 am
by npd1164
Is it normal behavior that {cms_selflink page="my alias" text="some text"}  still generates a link when the page being linked to is set as inactive?

shouldn't it render the link as plain text (not a link) in such a case?  ...or have i missed something?

Re: cms_selflink still links to pages that are marked as inactive?

Posted: Mon Oct 18, 2010 3:03 am
by Dr.CSS
Are you adding this whole line yourself or is it coming from the self link button?...

Re: cms_selflink still links to pages that are marked as inactive?

Posted: Mon Oct 18, 2010 3:28 am
by npd1164
Entering the link code directly, of course.

TinyMCE has a "insert link to page" button - but that does not generate a smarty cms_selflink, just regular html link.

Re: cms_selflink still links to pages that are marked as inactive?

Posted: Thu Oct 21, 2010 2:31 pm
by NaN
There is an option in the TinyMCE settings to use common <a href="..." links or {cms_selflink}

Re: cms_selflink still links to pages that are marked as inactive?

Posted: Thu Oct 21, 2010 3:09 pm
by npd1164
Thanks, NAN - i hadn't seen that TinyMCS setting before and its good to know its there! 

However, the problem still stands - linking to a page using {cms_selflink} (either by manually entering, or via its insertion thru TinyMCE) results in the same -  if a linked-to page's "Active" status is later set to "false", CMSMS still generates the link in content sent to users - but the result is broken since the page is not available.

This seems like a bug to me - the processing of {CMS_selflink} tag should verify the destination page's status before inserting the link into user-delivered output.

Re: cms_selflink still links to pages that are marked as inactive?

Posted: Thu Oct 21, 2010 4:37 pm
by jmcgin51
what CMSMS version?

Re: cms_selflink still links to pages that are marked as inactive?

Posted: Thu Oct 21, 2010 5:54 pm
by RonnyK
The version-question in the previous remark is a valid one, as this has been fixed several releases ago. So a post about this issue of before 1.8.1 is NOT valid in terms of ProductSupport.

Ronny

Re: cms_selflink still links to pages that are marked as inactive?

Posted: Thu Oct 21, 2010 9:28 pm
by npd1164
RonnyK wrote: The version-question in the previous remark is a valid one, as this has been fixed several releases ago. So a post about this issue of before 1.8.1 is NOT valid in terms of ProductSupport.

Ronny
Hey guys - i'm talking about CMSMS 1.8.2 - just downloaded and installed a few weeks ago.  This is a clean install, not an upgrade.   I have it installed and running locally on my development machine as well as the live site - both behave the same with regards to this issue.

These installs have only 3 extra modules added:  FormBuilder, Captcha, & CGCalendar - along with their dependents, of course.

Re: cms_selflink still links to pages that are marked as inactive?

Posted: Wed Oct 27, 2010 3:05 pm
by npd1164
Hey Guys - Sorry to bump this ...but i'm still looking for a solution.  ..especially since Ronny states this "was fixed several releases ago". 

Any input anyone???

Re: cms_selflink still links to pages that are marked as inactive?

Posted: Thu Oct 28, 2010 7:14 am
by RonnyK
The fix that I meant, was concerning the relational-links. In a direct-call to a page, those links will remain in the page, even if the page is NOT active anymore... So I am not sure if those are the links that you refer to.

Ronny

Re: cms_selflink still links to pages that are marked as inactive?

Posted: Thu Oct 28, 2010 3:10 pm
by npd1164
RonnyK wrote: The fix that I meant, was concerning the relational-links. In a direct-call to a page, those links will remain in the page, even if the page is NOT active anymore... So I am not sure if those are the links that you refer to.
Sorry ... i'm not sure i know which types of links you refer to either.

There seems to be a couple ways to insert links that use a cms_selflink tag.  One uses the text editor, the other is a manual entry

I've attached a screenshot of the link generation - One showing the insertion using the editor and the other, the cms_selflink code that the editor generates.

The 2nd means to enter a cms_selflink is just to manually type it.  The "html-result.gif" screenshot, 2nd tag, shows a manually entered one, as defined/described under Admin > Extensions > Tags > cms_selflink . 

I guess my point is - in either case, both of the above generate dead links if the page alias referred to is set to inactive.  Is this proper? 

Re: cms_selflink still links to pages that are marked as inactive?

Posted: Thu Oct 28, 2010 5:10 pm
by Dr.CSS
Are you saying that the nhos-membership page is set to inactive yet it still appears in the selflink drop down?...

Re: cms_selflink still links to pages that are marked as inactive?

Posted: Thu Oct 28, 2010 10:41 pm
by npd1164
Dr.CSS wrote: Are you saying that the nhos-membership page is set to inactive yet it still appears in the selflink drop down?...
No, this has nothing to do with creating the link.  The issue is later, when CMSMS generates its  output:
 If a link to a page is created, and at some point later the page that was "linked-to" is set to Inactive, the CMS still generates the link to it  ...of course, a user clicking on it receives a 404 error as that page is INACTIVE and thus not accessible.  

 If a page is DELETED, the link generated is "empty", as in Membership Page. Though not ideal, at least it does not generate a 404 for users.

 However, if a page has simply been set to INACTIVE, the CMS still generates a full link : Membership Page, But since this page is inactive, and thus publicly inaccessible, it generates a 404.

 I'm not sure how you explain this any more clearly.... but i appreciate all those who've tried to help.