check if article is still linked from menu or other article(s)

Need help with the Administration of your Joomla! 3.x site? This is the spot for you.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
Post Reply
Thomsterdam
Joomla! Intern
Joomla! Intern
Posts: 90
Joined: Mon Dec 12, 2011 5:55 pm

check if article is still linked from menu or other article(s)

Post by Thomsterdam » Thu Nov 28, 2019 4:01 pm

Hi there,
I am running a 10 year old intranet site that has been upgraded from Joomla! versions as old as 1.5 or 1.6. Over the past 10 years there have been reorganisations that are reflected in the intranet site: the new menu and category structures have been built, but the old organisation structure is also still visible in the category structure, including a number of articles that I don't know if they are orphaned or not.

So my question is: is there a way (with an extension or otherwise) to identify articles that are no longer linked from any page (e.g. a regular internal URL) or menu-item and which are NOT included in category blogs?

I found this article viewtopic.php?t=962869, but the suggested SQL query includes articles that are found in category blogs, which I cannot delete for obvious reasons.

Is there anyone who can help? SQL query? extension?

Thanx,


Thom
Give a man a fish and you feed him for a day;
teach a man to fish and you feed him for a lifetime.

 
User avatar
sozzled
Joomla! Exemplar
Joomla! Exemplar
Posts: 8563
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia
Contact:

Re: check if article is still linked from menu or other article(s)

Post by sozzled » Thu Nov 28, 2019 6:19 pm

I guess you're seeking help with broken links (i.e. menu items that point to "non-existent" targets), yes? So you're looking for a "broken link checker" or some such tool, perhaps?

I don't know how to help you with "orphaned" articles. Even if there is not a menu item for an article, an article can always be displayed if (a) your logged-in user account allows you to view the article and (b) you know it's ID number and you use the technique described in viewtopic.php?t=855812#p3207152.
https://www.kuneze.com/blog
“If you think I’m wrong then say, ‘I think you’re wrong.’ If you say ‘You’re wrong!’, how do you know?” :)

Thomsterdam
Joomla! Intern
Joomla! Intern
Posts: 90
Joined: Mon Dec 12, 2011 5:55 pm

Re: check if article is still linked from menu or other article(s)

Post by Thomsterdam » Thu Nov 28, 2019 6:47 pm

Perhaps you need to read the question again. I am NOT "seeking help with broken links". Maybe I have not been clear enough, but give it a try.
Give a man a fish and you feed him for a day;
teach a man to fish and you feed him for a lifetime.

User avatar
sozzled
Joomla! Exemplar
Joomla! Exemplar
Posts: 8563
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia
Contact:

Re: check if article is still linked from menu or other article(s)

Post by sozzled » Thu Nov 28, 2019 6:52 pm

Re-reading your question
Thomsterdam wrote:
Thu Nov 28, 2019 4:01 pm
So my question is: is there a way (with an extension or otherwise) to identify articles that are no longer linked from any page (e.g. a regular internal URL) or menu-item and which are NOT included in category blogs?
Short answer: no; I am not aware of a way to find out if there are articles that are unconnected with a menu item or if there is a link from an existing URL that points to an article or articles or contains some other content (e.g. a module) to another article or articles. But the second part of my previous answer explains that, even if an article is unconnected with a menu item (or some other means), the article can be viewed with a direct link to that article.
https://www.kuneze.com/blog
“If you think I’m wrong then say, ‘I think you’re wrong.’ If you say ‘You’re wrong!’, how do you know?” :)

User avatar
sozzled
Joomla! Exemplar
Joomla! Exemplar
Posts: 8563
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia
Contact:

Re: check if article is still linked from menu or other article(s)

Post by sozzled » Thu Nov 28, 2019 7:01 pm

Further thought: If you have some articles that you're unsure about (i.e. those articles may be unconnected to menu items or links on other pages) you could always unpublish the article(s) and check for broken links. If you find any broken links on your website then you know that those unpublished articles were referenced. Hmm?
https://www.kuneze.com/blog
“If you think I’m wrong then say, ‘I think you’re wrong.’ If you say ‘You’re wrong!’, how do you know?” :)

Thomsterdam
Joomla! Intern
Joomla! Intern
Posts: 90
Joined: Mon Dec 12, 2011 5:55 pm

Re: check if article is still linked from menu or other article(s)

Post by Thomsterdam » Thu Nov 28, 2019 7:14 pm

The articles that are in category blog menu items are not a problem. Nor are the articles that are directly linked from the menu.
This is what may have happened: Someone writes a new article in a category of the new structure. This article is either linked directly to the menu or shows up in a category blog menu item. In this article s/he may link to an article that was written in the old category tree. As long as an old article is linked to from a new one, I cannot delete it. But I cannot find a way by which to find those links.

I hope this is a clearer description of the problem.

Thom
Give a man a fish and you feed him for a day;
teach a man to fish and you feed him for a lifetime.

User avatar
sozzled
Joomla! Exemplar
Joomla! Exemplar
Posts: 8563
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia
Contact:

Re: check if article is still linked from menu or other article(s)

Post by sozzled » Thu Nov 28, 2019 7:20 pm

Thank you for your explanation which is clear and understandable except for one point:
Thomsterdam wrote:
Thu Nov 28, 2019 7:14 pm
As long as an old article is linked to from a new one, I cannot delete it.
Are you saying that you are not permitted (because of some human policy restriction) to delete an old article or are you saying that there is a technical reason that stops you pressing the "unpublish" or "trash" options for an old article?

There is no technical obstacle preventing anyone from unpublishing or trashing an old article. I hope I have made that point clear, too. What I would like to know is what is preventing you from removing an old article that may be linked in a newly-created article (apart from the obvious reason that the new article would contain a broken link if you removed the reference to an article that doesn't exist)?
https://www.kuneze.com/blog
“If you think I’m wrong then say, ‘I think you’re wrong.’ If you say ‘You’re wrong!’, how do you know?” :)

Thomsterdam
Joomla! Intern
Joomla! Intern
Posts: 90
Joined: Mon Dec 12, 2011 5:55 pm

Re: check if article is still linked from menu or other article(s)

Post by Thomsterdam » Thu Nov 28, 2019 7:40 pm

Hi there,
Of course I can unpublish and/or delete articles, but I don't want articles to have dead links. Your last argument is the only one, and a very compelling one not to unpublish the articles. I don't want a site with broken links.
If you have a way to detect broken links in articles, I will happily unpublish all those articles in the old category structure and then use your method of checking the broken links.

To give you an idea of the scale we are talking about: 250 categories (old and new) and some 6,500 articles. You don't want to check these links manually.

Cheers,


Thom
Give a man a fish and you feed him for a day;
teach a man to fish and you feed him for a lifetime.

User avatar
sozzled
Joomla! Exemplar
Joomla! Exemplar
Posts: 8563
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia
Contact:

Re: check if article is still linked from menu or other article(s)

Post by sozzled » Thu Nov 28, 2019 7:48 pm

Thanks for your reply.

I can't really get a handle on the problem. If a person creates a new article, OK. A person creates a new article. If a person references another article in that article, OK. A person references another article in that article. If the reference to the "other" article is a reference to an article "that was written in the old category tree" what exactly is that problem? I mean, what's the significance of the "old category tree"; what defines what is old and new?

As I say, I can't really get a handle on the issue here. Is this a technical problem (i.e what is it that exposes the "old category tree" structure) or is this an editorial policy matter (i.e. please, when you create new articles, be sure to use the "new category tree" structure)? Maybe I'm misreading the issue?
https://www.kuneze.com/blog
“If you think I’m wrong then say, ‘I think you’re wrong.’ If you say ‘You’re wrong!’, how do you know?” :)

Thomsterdam
Joomla! Intern
Joomla! Intern
Posts: 90
Joined: Mon Dec 12, 2011 5:55 pm

Re: check if article is still linked from menu or other article(s)

Post by Thomsterdam » Thu Nov 28, 2019 8:31 pm

I want to get rid of the old categories and articles. This category structure reflects the old organisational make up of the organisation. It is obsolete.
The problem is: there are still a number of articles in those categories and I have no way of finding out if they are still linked to from new articles, so I cannot get rid of the categories and articles. If there were a way to check that, I'd be happy.

Thom
Give a man a fish and you feed him for a day;
teach a man to fish and you feed him for a lifetime.

User avatar
sozzled
Joomla! Exemplar
Joomla! Exemplar
Posts: 8563
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia
Contact:

Re: check if article is still linked from menu or other article(s)

Post by sozzled » Thu Nov 28, 2019 8:53 pm

Ah ... OK! I think I understand what you mean now.

When you write "old organisational make-up" you are referring to the structure of the organisation (i.e. the names of the various departments and who reports to whom). Yes, that is clear to me.

So, when someone creates a new article that refers to another article based on the old organisational structure, you don't want them to do that, correct? You want new articles to refer to articles based on the new organisational structure, yes?

So ... that's one problem. That's an editorial policy problem.

The second problem is how do you safely remove the articles based on the old, outdated organisational structure, right? Well, that's a tricky question.

It begs a few other questions, like, is there an old article (based on the old organisational structure) that is still relevant to the new organisational structure? That's also an editorial matter. That's something for the editorial people to look at. They need to decide, article by article, whether something that was written before the reorganisation took place, if an old article is useful. And then there's the question of whether such old "useful" articles contain references to other articles that may not be useful.

The question of "usefulness" can't be adjudicated automatically or technically. That's just a job for the editorial staff.

However ...

... you could unpublish all of the old organisational categories ...

... and then you could use a "broken links" tool to discover if "newer" articles contain references to the older material. It's not a perfect science but it may help.

My advice, 6,000 potentially-affected articles notwithstanding, is ... hard work: case-by-case, article by article ... or unpublish/archive the outdated stuff and wait for people to complain if links don't work.

Another idea would be to write a plugin that places text on the "old" stuff like this:

"Notice: this article contains information that may be outdated, superseded, or written before our organisation's structure was changed. The information in this article is displayed as a matter of historical significance but there may be more recent information published elsewhere on the website that is more relevant to your request for information."
https://www.kuneze.com/blog
“If you think I’m wrong then say, ‘I think you’re wrong.’ If you say ‘You’re wrong!’, how do you know?” :)

User avatar
sozzled
Joomla! Exemplar
Joomla! Exemplar
Posts: 8563
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia
Contact:

Re: check if article is still linked from menu or other article(s)

Post by sozzled » Thu Nov 28, 2019 9:21 pm

Further thoughts: I would not remove (i.e. unpublish or trash) old articles.

In my working life, I've been through many organisational restructures. It's a tough job, as part of those re-orgs, to update the relevant policy material.

The key element, however, is to preserve the context of the decision-making that is documented in older material. Even if the some of the details within the older material are incorrect (for example, "The head of the infrastructure division may be contacted on telephone ext. 23", and the new number is "ext. 4291") I'm sure that people are able to use their own intelligence and say, "Ah, I remember when we installed the new PCX and I can look up the telephone number by another method").

So, some details may be incorrect but the articles, themselves, may still be relevant within the context of the organisation's decision-making process.

So, seriously, I would suggest that you approach this matter cautiously and make sure you have the executive management board's approval before you do anything.
https://www.kuneze.com/blog
“If you think I’m wrong then say, ‘I think you’re wrong.’ If you say ‘You’re wrong!’, how do you know?” :)

Thomsterdam
Joomla! Intern
Joomla! Intern
Posts: 90
Joined: Mon Dec 12, 2011 5:55 pm

Re: check if article is still linked from menu or other article(s)

Post by Thomsterdam » Fri Nov 29, 2019 10:02 am

Hi there,
Thanks for your contribution. I think I'll look into your suggestion:
However ...

... you could unpublish all of the old organisational categories ...

... and then you could use a "broken links" tool to discover if "newer" articles contain references to the older material. It's not a perfect science but it may help.
Thanx,

Thom
Give a man a fish and you feed him for a day;
teach a man to fish and you feed him for a lifetime.

User avatar
leolam
Joomla! Master
Joomla! Master
Posts: 19965
Joined: Mon Aug 29, 2005 10:17 am
Location: Netherlands/ UK/ S'pore/Jakarta/ North America
Contact:

Re: check if article is still linked from menu or other article(s)

Post by leolam » Sat Nov 30, 2019 3:13 am

@Thom,
What you want is not possible with standard Joomla but is achievable with a custom extension to be build

Leo 8)
Joomla's #1 Professional Support Provider:
-> Joomla Professional Support: https://gws-desk.com -
-> Joomla Specialized Hosting Solutions: https://gws-host.com -
-> Joomla Webmaster Services: gws-webmaster.services

User avatar
sozzled
Joomla! Exemplar
Joomla! Exemplar
Posts: 8563
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia
Contact:

Re: check if article is still linked from menu or other article(s)

Post by sozzled » Sat Nov 30, 2019 6:02 am

@Thomsterdam: I agree with Leo: I'm not aware of a "broken links" checking tool that you can install in J!—I think that's what Leo was talking about—but there are external services that could perform this task.
Even so, this has been a very interesting discussion and you're not alone in dealing with this matter.

I have idea—a workaround—that may help you with the problem.
sozzled wrote:
Thu Nov 28, 2019 8:53 pm
Another idea would be to write a plugin that places text on the "old" stuff like this:

"Notice: this article contains information that may be outdated, superseded, or written before our organisation's structure was changed. The information in this article is displayed as a matter of historical significance but there may be more recent information published elsewhere on the website that is more relevant to your request for information."
I'm working on this idea at the moment and—give me a day or two—I think I can have it ready. Eventually I will list this plugin on the JED (but that could take a week before it appears there).

Would this idea work in your situation?
https://www.kuneze.com/blog
“If you think I’m wrong then say, ‘I think you’re wrong.’ If you say ‘You’re wrong!’, how do you know?” :)

User avatar
mandville
Joomla! Master
Joomla! Master
Posts: 14867
Joined: Mon Mar 20, 2006 1:56 am
Location: The Girly Side of Joomla in Sussex

Re: check if article is still linked from menu or other article(s)

Post by mandville » Sat Nov 30, 2019 7:55 am

Compare site map results with an actual lost of articles? Or something like xenu
HU2HY- Poor questions = Poor answer
Un requested Help PM's will be reported, added to the foe list and possibly just deleted
{VEL Team Leader}{TM Auditor }{ Showcase & Security forums Moderator}

Thomsterdam
Joomla! Intern
Joomla! Intern
Posts: 90
Joined: Mon Dec 12, 2011 5:55 pm

Re: check if article is still linked from menu or other article(s)

Post by Thomsterdam » Sat Nov 30, 2019 9:23 am

Hi Mandville,
Could you elaborate on that? I don't know what xenu is, nor do I know how your suggestion would work.
Thanx,

Thom
Give a man a fish and you feed him for a day;
teach a man to fish and you feed him for a lifetime.

User avatar
sozzled
Joomla! Exemplar
Joomla! Exemplar
Posts: 8563
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia
Contact:

Re: check if article is still linked from menu or other article(s)

Post by sozzled » Sat Nov 30, 2019 7:14 pm

As a reminder (because you may have missed seeing it):
sozzled wrote:
Sat Nov 30, 2019 6:02 am
... this has been a very interesting discussion and you're not alone in dealing with this matter.

I have idea—a workaround—that may help you with the problem.
sozzled wrote:
Thu Nov 28, 2019 8:53 pm
Another idea would be to write a plugin that places text on the "old" stuff like this:

"Notice: this article contains information that may be outdated, superseded, or written before our organisation's structure was changed. The information in this article is displayed as a matter of historical significance but there may be more recent information published elsewhere on the website that is more relevant to your request for information."
I'm working on this idea at the moment and—give me a day or two—I think I can have it ready. Eventually I will list this plugin on the JED (but that could take a week before it appears there).

Would this idea work in your situation?
https://www.kuneze.com/blog
“If you think I’m wrong then say, ‘I think you’re wrong.’ If you say ‘You’re wrong!’, how do you know?” :)

User avatar
mandville
Joomla! Master
Joomla! Master
Posts: 14867
Joined: Mon Mar 20, 2006 1:56 am
Location: The Girly Side of Joomla in Sussex

Re: check if article is still linked from menu or other article(s)

Post by mandville » Sat Nov 30, 2019 8:15 pm

Thomsterdam wrote:
Sat Nov 30, 2019 9:23 am
Hi Mandville,
Could you elaborate on that? I don't know what xenu is, nor do I know how your suggestion would work.
Thanx,

Thom
http://home.snafu.de/tilman/xenulink.html broken link checker.
If you have a site map of all linked articles. Compare that to your actual article list.
HU2HY- Poor questions = Poor answer
Un requested Help PM's will be reported, added to the foe list and possibly just deleted
{VEL Team Leader}{TM Auditor }{ Showcase & Security forums Moderator}

User avatar
leolam
Joomla! Master
Joomla! Master
Posts: 19965
Joined: Mon Aug 29, 2005 10:17 am
Location: Netherlands/ UK/ S'pore/Jakarta/ North America
Contact:

Re: check if article is still linked from menu or other article(s)

Post by leolam » Sun Dec 01, 2019 4:16 am

All well and still workarounds but it is rather easy to build a custom extension which can search for articles with certain criteria. Of course programming cost money hohoho

Leo 8)
Joomla's #1 Professional Support Provider:
-> Joomla Professional Support: https://gws-desk.com -
-> Joomla Specialized Hosting Solutions: https://gws-host.com -
-> Joomla Webmaster Services: gws-webmaster.services

User avatar
sozzled
Joomla! Exemplar
Joomla! Exemplar
Posts: 8563
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia
Contact:

Re: check if article is still linked from menu or other article(s)

Post by sozzled » Sun Dec 01, 2019 6:06 am

I've built and tested a small plugin to add a piece of HTML (uses a WYSWYG editor so you could add other things like images, etc) to the end of all articles in selected categories (with the ability to exclude certain articles, if you like). I still need to write the user guide and that's about it.
https://www.kuneze.com/blog
“If you think I’m wrong then say, ‘I think you’re wrong.’ If you say ‘You’re wrong!’, how do you know?” :)

gsmela
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 107
Joined: Thu Jun 10, 2010 12:38 pm
Contact:

Re: check if article is still linked from menu or other article(s)

Post by gsmela » Sun Dec 01, 2019 10:36 am

sozzled wrote:
Sun Dec 01, 2019 6:06 am
I've built and tested a small plugin to add a piece of HTML (uses a WYSWYG editor so you could add other things like images, etc) to the end of all articles in selected categories (with the ability to exclude certain articles, if you like). I still need to write the user guide and that's about it.
Sozzled,

I would be very interested in this and i suspect others would as well. I've been following this discussion because I have a similar situation: A nine-year old J! site that has been upgraded over the years from the initial version 1.5. I dread culling from the thousands of articles on the site!

User avatar
sozzled
Joomla! Exemplar
Joomla! Exemplar
Posts: 8563
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia
Contact:

Re: check if article is still linked from menu or other article(s)

Post by sozzled » Sun Dec 01, 2019 8:22 pm

@gsmela: thank you for your interest.

I've written the user guide, created a demonstration page—these things take time—and I hope I've explained everything. The plugin is available but, of course, I can't advertise it or promote it on the forum; I cannot even tell you what it's called because that is "self-promotion". I will submit it to the JED and, within the next "21 days" it should be there and you can search for it (if you know what you're looking for, of course) ;)
https://www.kuneze.com/blog
“If you think I’m wrong then say, ‘I think you’re wrong.’ If you say ‘You’re wrong!’, how do you know?” :)

User avatar
sozzled
Joomla! Exemplar
Joomla! Exemplar
Posts: 8563
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia
Contact:

Re: check if article is still linked from menu or other article(s)

Post by sozzled » Sun Dec 01, 2019 11:44 pm

Quick update: my plugin is now on the JED; I'm quite surprised at the quick turnaround from submission to approval (thank you JED team).
https://www.kuneze.com/blog
“If you think I’m wrong then say, ‘I think you’re wrong.’ If you say ‘You’re wrong!’, how do you know?” :)

User avatar
toivo
Joomla! Master
Joomla! Master
Posts: 11927
Joined: Thu Feb 15, 2007 5:48 am
Location: Suzhou, China

Re: check if article is still linked from menu or other article(s)

Post by toivo » Mon Dec 02, 2019 12:33 am

@sozzled, you can ask for beta testers but also publish a link to the extension in JED at the forum 'Open Source Products for Joomla!' at viewforum.php?f=46.
Toivo Talikka, Global Moderator

User avatar
sozzled
Joomla! Exemplar
Joomla! Exemplar
Posts: 8563
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia
Contact:

Re: check if article is still linked from menu or other article(s)

Post by sozzled » Mon Dec 02, 2019 1:29 am

Thanks, @toivo. I'm aware of that. I don't wish to say any more about the matter except to say, in relation to the original question—check if article is still linked from menu or other article(s)—this is a question that I feel many of us will encounter over the years. To summarise, people have a variety of choices:

1) Unpublish or trash old articles and wear the consequences that there may be references on a website that will "fail"; this is probably the most inelegant solution. If there are, say, 5,000 articles and 50,000 links between articles, this could result in a huge mess.

2) Unpublish (or trash) old articles and then use some broken link checking tool (such as the one mentioned by @mandville) and hope that it finds any/all broken links. Again, if there are, say, 5,000 articles with 50,000 links between them, the outcome of broken link-checking could mean that there may be a sizeable number of references that (over time) will have to be repaired. This is likely to be the most costly solution.

3) Archive the old articles and use a plugin (or combination of Joomla features) to indicate that while these archived articles may be useful—from a historical perspective—they are not reliable. Again, if there are 5,000 articles, this will require manually checking each of those articles to determine if they should be archived or not. This is probably the least effective solution because people don't always notice whether they're reading an archived article or a "current" one. (For example, there are hundreds of thousands of "archived" discussions on this forum and, given the kinds of questions we read here everyday, it's fairly obvious that people don't pay any attention.) In other words, this solution requires the end users to have to be experts and figure things out for themselves.

4) Add some additional notice to the end of articles located in certain categories to say "The article you are reading may be outdated." If there are, say 5,000 articles with 50,000 links between them, this would require no work by the webmaster apart from deciding which categories should fall under this classification. The only other work to be done would be to have a content plugin that did the work of adding the notice.

5) Make the end-users do the repair work. An example of collaborative authoring is docs.joomla.org. There are thousands of articles and tens of thousands of links between those articles, and we know that those articles contain errors. Gradually, over time, those articles will be repaired.

An intranet website is a bit like an organisation's "wiki". The intranet is the repository of the organisation's explicit knowledge. In my view, it is probably better to preserve that knowledge (that is, do not delete it) even if parts of that document store are outdated or even obsolete.

After all is said and done, the final choice is in the hands of the webmaster. 8)
https://www.kuneze.com/blog
“If you think I’m wrong then say, ‘I think you’re wrong.’ If you say ‘You’re wrong!’, how do you know?” :)

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 38016
Joined: Sat Apr 05, 2008 9:58 pm

Re: check if article is still linked from menu or other article(s)

Post by Webdongle » Mon Dec 02, 2019 9:28 am

Use https://extensions.joomla.org/extension/osmap/ to create a sitemap then compare the results to the Articles listed.
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"The definition of insanity is doing the same thing over and over again, but expecting different results": Albert Einstein

 

Post Reply

Return to “Administration Joomla! 3.x”