Modify

Opened 18 years ago

Closed 17 years ago

Last modified 10 years ago

#714 closed enhancement (fixed)

Breakdown of what pages the broken links are located in.

Reported by: anonymous Owned by: anonymous
Priority: normal Component: WantedPagesMacro
Severity: normal Keywords:
Cc: trachacks@…, gburd@… Trac Release: 0.9

Description

Would it be possible to break this list down futher?, for example:

  • Wikipage1
    • missing page
    • missing page
    • missing page
  • Wikipage2
    • missing page
  • Wikipage2
    • missing page

It would also be nice to be able to turn off displaying pages that have been !'d, I've got plenty of those which are mostly names that will never be described.

Thanks! It would be much easier to find out which pages have broken links so you can read that page and decide wether it needs to be described, or !'d

Attachments (0)

Change History (11)

comment:1 Changed 18 years ago by anonymous

Cc: trachacks@… added; anonymous removed
Owner: changed from trachacks@… to Justin Francis

Correct mistake, asigned -> jfrancis (previously it was set to my email by accident, which I just noticed now.)

comment:2 Changed 18 years ago by Justin Francis

I've received another request to do this. Unfortunately, it is somewhat complicated to implement, but I can look into it.

As a work-around, you can use trac's built-in search functionality to search for the term. If it is in the list, the search feature will pull up the pages.

As for !'d wiki words, those should not show up. Can you give me an example of a word that does?

comment:3 Changed 18 years ago by anonymous

Would be great if you could, It would certainly be a feature that should be included in the main branch, I don't think any wiki should be without such a page.

I've been using the search function currently.. however it's a horribly slow method to go about it.

As for an example.. I don't have one however I was using the latest CVS of trac from 2006-09-12, All the !'d words are showing up in the list. They're not links to the pages they just show up as plain text. The Wanted Pages however do show up as links to the non-existent wiki pages. Now that I think about it this is going to be related to me using CVS versus 0.9.

comment:4 Changed 18 years ago by Justin Francis

The issue you reported about camel case words that are escaped is a confirmed bug related to the new version of trac and I have split this off into ticket #776

comment:5 Changed 18 years ago by Justin Francis

Component: WantedPagesMacroWantedPagesPlugin

comment:6 Changed 18 years ago by Justin Francis

What if there was a link next to each item in the list that brought you to the search page for that word? Would that solve this?

If not, I need more details of why the "search function is a horribly slow method to go about it."

comment:7 Changed 17 years ago by Justin Francis

following patch implements the suggestion I gave in the last comment.

Patch supplied by Gregory Burd <gburd@…>, thanks Gregory! I closed #1347 he opened as a duplicate of this one.

I will integrate this within the week and publish a new version.

Index: wanted_pages/wanted_pages.py
 ===================================================================
 --- wanted_pages/wanted_pages.py        (revision 2103)
 +++ wanted_pages/wanted_pages.py        (working copy)
 @@ -49,9 +49,16 @@
         pages = self.findBrokenLinks(texts, req).values()

         wikiList = ''
 +        referers = ''
         pages.sort()
         for page in pages:
 -            wikiList += ('  * %s\n' % page)
 +            referers = ''
 +            db = self.env.get_db_cnx()
 +            cursor = db.cursor()
 +            cursor.execute("select name n from wiki where text like '%" +
 page + "%' and version = (select max(version) from wiki where name = n)")
 +            for (name) in cursor:
 +                referers += (' [wiki:%s] ' % name)
 +            wikiList += "  * " + page + " (" + referers + ")\n"

         return wiki_to_html(wikiList, self.env, req)

comment:8 Changed 17 years ago by anonymous

Cc: gburd@… added

comment:9 Changed 17 years ago by Justin Francis

Owner: changed from Justin Francis to anonymous
Status: newassigned

Been busy lately, and have not had time to integrate this patch. It will happen soon, in the meantime, it is up-to-date so simple to apply to a local copy.

comment:10 Changed 17 years ago by Justin Francis

Resolution: fixed
Status: assignedclosed

This has been fixed in [2167] and integrated into both 0.9 and 0.10 branches. It has been added as an option to minimize the impact (and I think it makes the list look cluttered). To enable it, use [[WantedPages(show_referrers)]].

It was not implemented with the UI above, because I believe it to be weird to index the wanted pages by the referring pages, not least of which because it would lead to duplicate missing links appearing in the list. Instead, I used Gregory's model of listing the referring pages after each missing link like so: * MissingLink (Linked from Page1, Page2)

It was not implemented using Gregory's patch, on the other hand, because this required more hits to the DB, when a little refactoring meant this was not necessary.

comment:11 Changed 10 years ago by Ryan J Ollos

Component: WantedPagesPluginWantedPagesMacro

Renaming plugin from WantedPagesPlugin to WantedPagesMacro.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain anonymous.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.