[SOLVED] Page inactive, selflink not?

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
User avatar
thomahawk
Power Poster
Power Poster
Posts: 312
Joined: Fri Jul 25, 2008 10:13 am

[SOLVED] Page inactive, selflink not?

Post by thomahawk »

Hello
I had the opinion that if a page is inactivated, all selflinks to that page would disappear. I've seen that with the pages in the menues (menu manager) and was expecting CMSMS to behave the same with selflinks. Is this not the case? It seems not, because I have just done precisely that, deactivated some pages but found all selflinks still appearing...

Any thoughts?

Thom
Last edited by thomahawk on Mon Jul 20, 2009 12:51 pm, edited 1 time in total.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Page inactive, selflink not?

Post by Dr.CSS »

Selflinks as in ones you put in other pages?...

The only way to get a page to not show at all is to set it as not active, in Content » Pages hit the green check mark oir Content » Pages » Edit Page: options untick the Active: box but either way clear site cache after doing this...
User avatar
thomahawk
Power Poster
Power Poster
Posts: 312
Joined: Fri Jul 25, 2008 10:13 am

Re: Page inactive, selflink not?

Post by thomahawk »

Thank you MArk (again) for the response.

What I meant is that the links to the page disappear, together with the page itself. But when I set a page ti inactive, the selflinks on other pages that link with the inactive page are still there. But it seems CMSMS does not natively support such a function? As I have seen it in other CMS like Typo3.

Thom
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Page inactive, selflink not?

Post by Dr.CSS »

Well you put them there like the content they aren't going to just remove themselves because you removed the page...

There is no way, no how, you can tell me that any CMS is going to automatically remove something like a link from the content because you removed a page from circulation...

Maybe from the selflink at the bottom of a page when you use the selflink tag as it actually uses part of the menu structure to build itself...

If "the selflinks on other pages that link with the inactive page are still there" means the selflink tag like {cms_selflink dir="previous"} or {cms_selflink dir="next"} is still showing the page then you have discovered a bug...

Even {cms_selflink page="nameofpagesetinactive"} will show nothing either so maybe you need to explain exactly what steps you took to make the link...
User avatar
thomahawk
Power Poster
Power Poster
Posts: 312
Joined: Fri Jul 25, 2008 10:13 am

Re: Page inactive, selflink not?

Post by thomahawk »

Mark, you are right, if page link is handled by the CMSMS MenuManager, the link disappears if a page is deactivated. In my case I have hoped to have that effect with any internal link (selflink). Technically its not so difficult for a CMS to be able to do that, but now it seems its not a feature of CMSMS. I know it from Typo3 and WordPress.

Thanks
Thomas
jmcgin51
Power Poster
Power Poster
Posts: 1899
Joined: Mon Jun 12, 2006 9:02 pm

Re: [SOLVED] Page inactive, selflink not?

Post by jmcgin51 »

I think thomahawk is asking for CMSMS to print the link text only, for selflinks that point to inactive (or missing) pages.  This would require that, as the page loads, it checks the validity of the selflink (does it point to an active page? does it point to a missing page?  etc) before actually rendering the page.

I can think of both positives and negatives to this.  Definitely something that is worth considering, but I'm thinking the negatives may end up outweighing the positives.

@thomahawk - if you would like the dev team to consider this, please post it in the Forge as a feature request for the Core.
User avatar
thomahawk
Power Poster
Power Poster
Posts: 312
Joined: Fri Jul 25, 2008 10:13 am

Re: [SOLVED] Page inactive, selflink not?

Post by thomahawk »

Thanks. No, I dont think its something so important. I just was somehow accostumed to from other CMS.
Thomas
Dee
Power Poster
Power Poster
Posts: 1197
Joined: Sun Mar 19, 2006 8:46 pm

Re: [SOLVED] Page inactive, selflink not?

Post by Dee »

jmcgin51 wrote: This would require that, as the page loads, it checks the validity of the selflink (does it point to an active page? does it point to a missing page?  etc) before actually rendering the page.
For a quick hack to add this functionality (when cms_selflink is used with the 'page' parameter), add

Code: Select all

if (!$content->Active()) { return; }
on line 83 of plugins/function.cms_selflink.php, just after

Code: Select all

$content =& $node->GetContent();
Regards,
D
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: [SOLVED] Page inactive, selflink not?

Post by Dr.CSS »

If you read what I said it does work that way...
Even {cms_selflink page="name-of-page-set-inactive"} will show nothing
this is a self link link if you put it in anywhere and then deactivate the page it won't show the link to the page, whether this is in the content or the template I've checked it every which way...

Hence my asking exactly what it is you did to create the link otherwise we have no idea how to reproduce this to try and fix it or let you know how to do it so it works...

My van has a flat do you know why or how it happened?...
jmcgin51
Power Poster
Power Poster
Posts: 1899
Joined: Mon Jun 12, 2006 9:02 pm

Re: [SOLVED] Page inactive, selflink not?

Post by jmcgin51 »

mark wrote: If you read what I said it does work that way...
Even {cms_selflink page="name-of-page-set-inactive"} will show nothing
this is a self link link if you put it in anywhere and then deactivate the page it won't show the link to the page, whether this is in the content or the template I've checked it every which way...
Using CMSMS 1.6, creating the selflink like this:

{cms_selflink page='sitemap' text='sitemap'}
or
sitemap

it does not work for me the way you describe.  If I create the link (via the selflink dropdown in Tiny), then deactivate the page, then clear my cache, then open a page that contains the "link", the link is displayed as normal, even though the page is not active.  If I click the link, I get my custom 404 page.

As noted above, I tried with both style links, and cms_selflink style links (Tiny > Advanced)
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: [SOLVED] Page inactive, selflink not?

Post by Dr.CSS »

Well it worked that way for me but it doesn't now...

And you gave a very nice explanation of what you did so I was able to replicate the steps you took to confirm that it indeed doesn't remove any link to nonactive pages...

I was asking them for something like this, not knowing the steps used to make the link or whatever we talk about makes it hard to replicate the problem...

Someone may want to put in a bug report or feature request to change this behavior...
Pierre M.

Re: [SOLVED] Page inactive, selflink not?

Post by Pierre M. »

I thought the cms_selflink tag used a "where status=active" filter to work properly. How can this be TinyMCE related ?

Pierre M.
Post Reply

Return to “CMSMS Core”