Views and block empty

vacilando - February 11, 2008 - 19:50
Project:Backlinks
Version:5.x-1.2
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:postponed (maintainer needs more info)
Description

Despite hours of trying, at several occasions, Backlinks do not work on my site. Cron runs, I currently use D5.2, tried both views and block, but the result is always empty - no links. And yes, I do try it at pages that other pages link to :-)

Is that a bug or is there some totally simple little thing you I forgot to set?

#1

mfb - February 11, 2008 - 20:56

Backlinks module relies on the search module finding and indexing the actual links. If the links aren't in a format that search module recognizes, it won't work. You might want to look at your links and the relevant code in search module and see if the links are being indexed.

#2

j4 - March 18, 2008 - 09:24

I also have a similar problem and do not understand the note about the search module. I use alinks module to add links to the content. Will this affect backlinks. Am really in soup. Can somebody help?
Thanks in advance
Jaya

#3

mfb - March 18, 2008 - 17:54

I don't know how alinks works. I probably don't have time to install it and poke around to see if it's compatible with search module.

Drupal core's search module has built-in functionality to find links between nodes and index them. As long as a link is detected and indexed by the core search module, it will be listed by backlinks module.

Search module generates its own internal HTML "view" of a node and parses it to find links. Thus, most modules, filters, etc. which generate HTML links do work with search module (if they don't it might be considered a "bug" on that module/filter).

#4

j4 - March 19, 2008 - 08:34

Thank you mfb for the immediate reply. In that case should this thread get registered as a bug? Is there anything I need to do about it? Solving this issue will really help.
Jaya

#5

mfb - March 19, 2008 - 17:03

Basically, investigation is needed (by you, alinks maintainers, or anyone else) into the interoperability of alinks and search module (in particular, search module's ability to detect links).

#6

j4 - March 23, 2008 - 15:31

There is no problem in having alinks and backlinks in the same site. I only needed to install poormanscron module. now I have both alinks and backlinks working. Thank you.
jaya

#7

mfb - March 24, 2008 - 02:36
Status:active» postponed (maintainer needs more info)

Perhaps vacilando was having the same issue (cron not running)

#8

vacilando - May 4, 2008 - 13:44

Well, no. It still does not work. And my cron is running.

Case study:
* Recently I added a page called Trailscout at http://www.vacilando.eu/ts
* When you do a search for the term 'trailscout' on my site you will see correct results - http://www.vacilando.eu/search/node/trailscout - so cron and search does work.
* But when you click on the tab 'What links here', there are no backlinks! http://www.vacilando.eu/node/783/backlinks

This is totally puzzling.
I also looked at my search settings at /admin/settings/search -- the "Minimum word length to index" is set to '3' ... perhaps that is too high? Or should I check other settings here or elsewhere?

Another find. I went to the list of views and clicked 'Add' as if I were adding another version. Interestingly, 'Arguments' (Backlinks: Node ID) uses 'Return Page Not Found' by default. Is that normal? Should that not be 'Display All Values'? See the attached screenshot.

Thanks for any further ideas!

AttachmentSize
bl_arg.jpg 23.78 KB

#9

mfb - May 4, 2008 - 18:03

Return Page Not Found is what one would normally want to use in a "What links here" view. So I made that the default and there should be no reason to change it. You didn't post links to any other nodes with backlinks, should I assume you do have some? If you do the next step would be to take a look at search.module and the search_index table and figure out why it is not indexing your node-to-node links.

#10

vacilando - May 28, 2008 - 20:10

mfb, further to #8 and your answer (#9) -- again I had a look at the backlinks (the functionality would be desirable on my sites) but despite trying it still does not work.

Yes, I do have other pages to which there are links from other nodes. Here are two test cases:

a) http://www.vacilando.eu/gbg - it is linked from http://www.vacilando.eu/bg
Note that the link at http://www.vacilando.eu/bg is a relative one, starting with a slash, thus <a href="/gbg" .... Could there be a problem in the link syntax, perhaps?

b) but also on D5.7, there is page http://www.uia.be/node/96 to which there is a link from http://www.uia.be/en/members using <a href="/node/96" ...

Both of these sites run on CentOS Linux, both on D5.7, but on different servers. Cron runs daily on both of them (also testified by site search working properly).

You say the next step would be to look at search.module and the search_index table - but I have no idea what to look for. Can I send you any db dump / samples that would help to unravel this?

#11

mfb - May 28, 2008 - 20:21

You need to look at links between nodes as indexed in the search_index table. Each link will show up as an entry in this table; the nids of the two nodes will appear in the nid and sid columns. If the links aren't being detected or indexed, then that's not really a problem with backlinks module, it's a bug or incompatibility with the search module.

#12

vacilando - May 28, 2008 - 22:20

Well, I've had a look. For sid = 3 (node of the source page http://www.vacilando.eu/bg) there are happen to be 564 entries.

Note there is 'nid' column that you mention - only 'sid'.

There are these columns:
word sid type fromsid fromtype score

In column word I found only one instance of string 'gbg'. The columns content there is:
gbg 3 node 0 NULL 8.93008

From this I assume links are detected and indexed - correct?

But what about the missing 'nid'?

Thanks for looking into this!

#13

mfb - May 28, 2008 - 22:23

Sorry I am confusing Drupal 5 and 6 (as usual ;) You want to look for the two nids in the sid and fromsid columns. type and fromtype will both be 'node'.

#14

vacilando - May 29, 2008 - 07:52

All my fromsid values are 0 and all my fromtype values are NULL! Is that the problem? Any idea why that might be?
I just use the search.module that comes with D5.7...

#15

mfb - May 29, 2008 - 08:26

You've found the problem, the search module isn't indexing your links. I'm not sure off-hand what would cause it. You could try truncating the search_* tables and re-indexing (on a test site). You could also try sprinkling the search module with debug code to see what's going on.

#16

vpiotr - June 22, 2008 - 12:17

For D5 you need to patch a little (see attachment).

What is wrong?
1. Search engine ignores links that are NOT stored inside "url_alias" table.
2. This is because drupal_lookup_path() does not know anything about freelinking module.
3. This is because drupal_lookup_path() is not customizable (does not allow to handle dynamic aliases - like "freelinking/*").

What needs to be done:
1. Patch "path.inc" file using "path_hook_patch.inc.php"
It calls new hook - "lookup_path" - replace drupal_lookup_path() and add new function _drupal_invoke_lookup_path()

2. Add hook handler to freelinking module
Check "freelinking_lookup_path.inc.php" - add this code on the end of "freelinking.module" (without the first line)

Note: this patch is not a standard "patch" file - please provide a better format if required.
Note2: drupal_lookup_path() has been optimized here. In D6 and D7 this function does not include "select count()" so I removed it from this version of function.
Note3: I will be glad if drupal_lookup_path() could include the patch in the future. Anybody?

AttachmentSize
freelinking_ref_fix.zip 1.94 KB

#17

vpiotr - June 22, 2008 - 12:24
Status:postponed (maintainer needs more info)» needs review

Status change

#18

mfb - June 23, 2008 - 01:22

For this to be considered, you'll need to create a (proper cvs) patch on drupal 7. And file an issue on drupal core (or move this issue).

#19

dugh - August 4, 2008 - 03:23

Same as vacilando. Backlinks essentially doesn't work at all.

And you're saying we have to patch drupal 7 to fix it.

#20

mfb - August 4, 2008 - 17:13

@dugh: the patch above has nothing to do with backlinks module, it's on freelinking module and drupal core. To fix those, issues need to be created on freelinking module and drupal core if they haven't been already. I don't know anything about freelinking module so please let me know if there's anything backlinks module can do to help here (I have no idea otherwise).

Generally speaking, with a few exceptions, Drupal core has a policy of patches being reviewed and committed on head before being backported to releases.

#21

farser - December 9, 2008 - 23:15

So what was the conclusion? What do we do to fix the indexing of backlinks?

#22

mfb - December 10, 2008 - 08:59
Status:needs review» postponed (maintainer needs more info)

I'm not sure myself but I'm setting this to active (needs more info) because the the patch in #16 is not actually for this module.

#23

vacilando - December 10, 2008 - 09:15

The problem is related to indexing of content (summarized in #14 and other posts above) but I never found a solution for it, which means I never could use this module on my D5 sites.

#24

mfb - December 10, 2008 - 20:14

Backlinks module has no effect on search indexing so if there's a problem on the indexing side then it would be a bug against the core search module or whatever other module might not be working with core search indexing.

 
 

Drupal is a registered trademark of Dries Buytaert.