cms_selflink still links to pages that are marked as inactive?

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
npd1164
Forum Members
Forum Members
Posts: 28
Joined: Tue Apr 08, 2008 5:24 pm

cms_selflink still links to pages that are marked as inactive?

Post 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?
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

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

Post by Dr.CSS »

Are you adding this whole line yourself or is it coming from the self link button?...
npd1164
Forum Members
Forum Members
Posts: 28
Joined: Tue Apr 08, 2008 5:24 pm

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

Post 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.
Last edited by npd1164 on Mon Oct 18, 2010 3:31 am, edited 1 time in total.
NaN

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

Post by NaN »

There is an option in the TinyMCE settings to use common <a href="..." links or {cms_selflink}
npd1164
Forum Members
Forum Members
Posts: 28
Joined: Tue Apr 08, 2008 5:24 pm

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

Post 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.
jmcgin51
Power Poster
Power Poster
Posts: 1899
Joined: Mon Jun 12, 2006 9:02 pm

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

Post by jmcgin51 »

what CMSMS version?
RonnyK
Support Guru
Support Guru
Posts: 4962
Joined: Wed Oct 25, 2006 8:29 pm

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

Post 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
npd1164
Forum Members
Forum Members
Posts: 28
Joined: Tue Apr 08, 2008 5:24 pm

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

Post 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.
Last edited by npd1164 on Thu Oct 21, 2010 9:33 pm, edited 1 time in total.
npd1164
Forum Members
Forum Members
Posts: 28
Joined: Tue Apr 08, 2008 5:24 pm

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

Post 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???
RonnyK
Support Guru
Support Guru
Posts: 4962
Joined: Wed Oct 25, 2006 8:29 pm

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

Post 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
npd1164
Forum Members
Forum Members
Posts: 28
Joined: Tue Apr 08, 2008 5:24 pm

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

Post 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? 
Attachments
html-result.gif
text-editor.gif
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

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

Post by Dr.CSS »

Are you saying that the nhos-membership page is set to inactive yet it still appears in the selflink drop down?...
npd1164
Forum Members
Forum Members
Posts: 28
Joined: Tue Apr 08, 2008 5:24 pm

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

Post 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.  
Last edited by npd1164 on Thu Oct 28, 2010 10:56 pm, edited 1 time in total.
Post Reply

Return to “CMSMS Core”