Package??
danielb - July 28, 2008 - 05:29
| Project: | Node Link |
| Version: | 5.x-1.1 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Description
Hi I tried to use this module because I would like to build an extension module to add more features. However I cannot figure out how to make a link.
I tried to create a node link from the node add page but it keeps saying "Package field is required" - however there is no package field. It just says "package" and there are no choices.
So in the backend under site config, I found a packages tab, and I try to add a new package it says: "warning: Invalid argument supplied for foreach() in /node_link/node_link.module on line 675." (it adds the package correctly, but there is still an error - and then I lose the tabs).
Please do some more testing on the module and release a bug fix.

#1
Now I choose a package under node/add and it says "Unknown Package" ???
To be honest mate I just wanted to make a simple link so i could check out your reciprocal validation, I dunno about this packages business...?
#2
I had the same problem.
The only working solution that I found for this problem was to;
1. Delete all the "packages" that has been created.
2. Add a new "type".
3. Add packages by selecting "types" that you have created.
4. Now you can create a node from link_node type from "node/add/node-link"
Are you also using node browser with this module? There is a cache issue with node browser (5.x-2.5), so if you intent to use node browser to make a link exchange directory you have to clear cache whenever you make any changes to node_browser settings or/and taxonomy terms. I personally used drupal.org/project/devel module for clearing caching (after installing devel module you have to enable devel block from admin/build/block, after this you will find a link in devel block that says "clear cache").
I had to give my whole day to setup node browser + node link but still I'm unable to make a directory similar to one shown at http://www.united-kingdom-travel.info/en/directory/ . I don't see the addsite (http://www.united-kingdom-travel.info/en/directory/addsite.html) page in my website after enabling node link module. ??
And, the node that I added from "node/add/node-link" redirects me to a node page, containing link title + link description + link url (that I added manually in CCK with the help of link filed module) but actually it should redirect to an external link page similarly to the one in http://www.united-kingdom-travel.info/en/directory/. ??
Anyway, if I get these, node link + node browser, working, I'll be more than happy to write a small documentation + a small video podcast for this great module.
I would really appreciate if developer of this module can answer to these queries. :-)
#3
I am no expert and I use many of the default settings but this is how I use Node Link:
From Administer > Settings > Node Link Settings
Settings tab:
Add Form Title = eg New Link
Edit Form Title = eg Edit Link
Categories = I created a taxonomy vocabulary called 'Node Links' to categorise my links
For all other settings I used the defaults
Site Details tab:
Used defaults
Types tab:
Added a type with the title of 'URL' (though I am not sure what else can be entered here)
Reciprocal = No
Package:
Added a Package with the title of 'Links'
Checked the URL type created in previous tab
Used defaults for the other settings
Then clicked Submit
To create a Node Link go to:
Administer > Creat Content > Node Link
A form with the title 'New Link' (created earlier in 'Node Link' settings) is created.
Select a category for your link from the Taxonomy Vocabulary created for your links (in my case 'Node Links' which I created for my links)
Select a 'Package', in this case 'Links' (created earlier in 'Node Link' settings)
Add the 'URL' (the 'Type' created earlier in 'Node Link' settings)
Everything else I used defaults and left 'Email' empty
Click submit and 'Node Link' will attempt to validate the URL. A warning will be issued if the link fails validation.
Repeat Administer > Creat Content > Node Link to build up a directory of links categorised using taxonomy.
Each 'Node Link' that is created is a Drupal node. Node Browser can then be configured to display all the links (or sub-sections) created using 'Node Link'.
My observations:
I think the 'Type' tab is where the misunderstanding occurs. I have not tried any type other than a simple URL but I guess various types can be added and these can be bundled into a 'Package'. 'Packages' can contain a mix of 'Types' and then the required 'Package' can be selected when filling out the 'Node Link' creation form. If you have created one or more 'Packages' selecting a 'Package' will cause the 'Node Link' creation form to refresh and display the 'Types' bundled with the selected 'Package'.
Hope this helps.
#4
will add configuration of node link in details.....soon
#5
Wow thanks, I didn't expect a detailed response like that :D
It's good to know you guys got it working, perhaps we can encourage dortik to put a brief explanation on the project page or readme file to avoid these issues in future?
I am considering contributing a patch to give this information to the user via drupal_set_message if they use the wrong workflow, rather than just throwing a php error.
My ideas for a module which depends on this module include adding links automatically to the system from referers - like how youtube videos show the referer links (people who are linking to the video), and URLs suggested by frontend users, and also maybe I will write some kind of thing to go looking for references to our website, or topics from our website, on the internet and add those URLs too.
#6
danielb That will be great!
There is still one things I was unable to figure out:
The node that I added from "node/add/node-link" redirects me to a node page, containing link title + link description + link url but actually it should redirect to an external link page similarly to the one in http://www.united-kingdom-travel.info/en/directory/ ? How can this be done. ??
I would really appreciate if you someone can provide a solution for it.
#7
Might want to check out http://drupal.org/project/weblinks/ It is a simple weblinks package.
Thanks
Robert