Pathauto for RDF is a pathauto-based module that creates readable paths for RDF versions of nodes.

The pathauto module can alias /node/1 to a more meaningful URL: http://site/organisation/some-organisation-name that displays the original node. However when using RDFx and restws the RDF document is still only available at /node/1.rdf, this module allows the RDF to be accessed at: http://site/organisation/some-organisation-name.rdf or any configurable pathauto URL. It also allows for bulk update/creation of aliases.

Core: 7.x (developed on 7.18)
Project: Pathauto for RDF
Version control:
git clone --recursive --branch 7.x-1.x shah@git.drupal.org:sandbox/shah/1871288.git pathauto_for_rdf
cd pathauto_for_rdf

sandbox link: http://drupal.org/sandbox/shah/1871288

Comments

georgemastro’s picture

Please give url for your sandbox project.
You should also fix your branches like the screenshot. Delete master branch.

georgemastro’s picture

Status: Needs review » Needs work
Seyyed’s picture

Status: Needs work » Needs review

Done, thanks georgemastro.

wuinfo - bill wu’s picture

Status: Needs review » Needs work

I have downloaded your module, put in my test site and enabled it. Here is something I found.

1) Module dependency is not setup. This module is depending on pathauto and RDF module which need to be listed on .info file.
2) You module name is not consistent. Folder name is pathauto_for_rdf. File name is pathauto_rdf.module. It was not working properly after I enable the module.
3) Function pathauto_rdf_pathauto($op) is not using $op variable.

Below is some other issues need to be fixed
http://ventral.org/pareview/httpgitdrupalorgsandboxshah1871288git-7x-1x

Seyyed’s picture

Done, thanks wuinfo. Please check the issues are now fixed.

Seyyed’s picture

Status: Needs work » Needs review
wuinfo - bill wu’s picture

Status: Needs review » Needs work

I saw you had changed the name. The folder name and files name are good now.

Following issues are still there.
1) Module dependency is not setup. This module is depending on pathauto and RDF module which need to be listed on .info file.
For example: feeds_import module is depending on feeds module. In feeds_import.info file, there is a line like this.
dependencies[] = "feeds"

Below is some other issues need to be fixed
http://ventral.org/pareview/httpgitdrupalorgsandboxshah1871288git-7x-1x

Here is what I copied from above page:

FILE: ...7-pareview/sites/all/modules/pareview_temp/test_candidate/CHANGELOG.txt
--------------------------------------------------------------------------------
FOUND 1 ERROR(S) AFFECTING 1 LINE(S)
--------------------------------------------------------------------------------
4 | ERROR | Files must end in a single new line character
--------------------------------------------------------------------------------

FILE: ...ew/sites/all/modules/pareview_temp/test_candidate/pathauto_for_rdf.info
--------------------------------------------------------------------------------
FOUND 1 ERROR(S) AFFECTING 1 LINE(S)
--------------------------------------------------------------------------------
4 | ERROR | Files must end in a single new line character
--------------------------------------------------------------------------------

FILE: .../sites/all/modules/pareview_temp/test_candidate/pathauto_for_rdf.module
--------------------------------------------------------------------------------
FOUND 12 ERROR(S) AND 4 WARNING(S) AFFECTING 13 LINE(S)
--------------------------------------------------------------------------------
2 | ERROR | Missing file doc comment
4 | WARNING | Format should be "* Implements hook_foo()." or "Implements
| | hook_foo_BAR_ID_bar() for xyz_bar()."
13 | ERROR | Whitespace found at end of line
18 | ERROR | Function comment short description must start with a capital
| | letter
18 | ERROR | Function comment short description must end with a full stop
22 | ERROR | Space found before comma in function call
22 | ERROR | There should be no white space before a closing ")"
23 | ERROR | Whitespace found at end of line
27 | WARNING | Format should be "* Implements hook_foo()." or "Implements
| | hook_foo_BAR_ID_bar() for xyz_bar()."
30 | ERROR | Line indented incorrectly; expected 2 spaces, found 4
34 | WARNING | Format should be "* Implements hook_foo()." or "Implements
| | hook_foo_BAR_ID_bar() for xyz_bar()."
37 | ERROR | Line indented incorrectly; expected 2 spaces, found 4
41 | WARNING | Format should be "* Implements hook_foo()." or "Implements
| | hook_foo_BAR_ID_bar() for xyz_bar()."
44 | ERROR | Inline comments must start with a capital letter
44 | ERROR | Inline comments must end in full-stops, exclamation marks, or
| | question marks
49 | ERROR | Expected "foreach (...) {\n"; found "foreach(...) {\n"
--------------------------------------------------------------------------------
Seyyed’s picture

Status: Needs work » Needs review

Hi wuinfo,

Thanks again for pointing that out, I fixed it before but forgot to push the second change last time! anyhow I've fixed it and some more issues found by ventral.org (very useful!) as well as trying the drupal "coder" module.

Please have another look if possible.

wuinfo - bill wu’s picture

Status: Needs review » Needs work

Hi Seyyed,

Checked your code and found that you had fixed the outstanding issues.

I did a further test by installing and enabling your module on my site. After updating an article, I got a white screen. Please test it yourself and check the apache log.

PHP Fatal error: Call to undefined function pathauto_rdf_create_alias() in /var/www/html/sites/all/modules/pathauto_for_rdf/pathauto_for_rdf.module on line 48, referer: http://localhost/node/495/edit?destination=admin/content

Seyyed’s picture

Status: Needs work » Needs review

Hi wuinfo

I noticed this soon after my last commit and uploaded a fix, pull the latest commit from earlier today (3412e1e), it's fixed there.

Thanks once again!

klausi’s picture

We are currently quite busy with all the project applications and I can only review projects with a review bonus. Please help me reviewing and I'll take a look at your project right away :-)

eule’s picture

Manual Review
i try to install your Module and found these probs

  1. Please add the dependence on RDFx on your Project Page and your README.txt file
  2. add a .install file see here http://drupal.org/node/51220
  3. i see no problems with your code
  4. maybe try to implement tokens module for your pattern :: but this is only one suggestion by me!

Good Luck

eule’s picture

Status: Needs review » Needs work
Seyyed’s picture

Thanks for the suggestions eule, here is my reply:

1) The module README.txt and description page is updated with RDFx instead of RDF (wow very observant)

2) The module creates no tables or variables, so the install file would be empty- i.e. not needed! Sombody correct me if I'm wrong. Also I'd rather not have empty hook_install and _uninstall functions.

3) Thanks!

4) Tokens support is there already via pathauto

Thanks for your comments.

Seyyed’s picture

Status: Needs work » Needs review
lorenlang’s picture

The module is fairly straightforward and I see no problems with the code.

The only thing I might suggest is that you mention the requirements needed for your required modules to be installed. For example, this module requires Pathauto and RDFx but Pathauto also requires Token and RDFx requires Entity API. While this is certainly not a necessity, it'd just be a nice thing to mention to a potential user reading your README.txt file.

acy76’s picture

Status: Needs review » Needs work

Installed the module for a test and was not able to get the module to generate any aliases.

Performed a manual review of the code - looked like some callbacks etc. were improperly named in a few of the functions, so I made the following changes and the aliases were then generated:

Line 20:
$settings->module = 'pathauto_rdf';
Should read:
$settings->module = 'pathauto_for_rdf';

Line 25:
$settings->batch_update_callback = 'pathauto_rdf_pathauto_bulkupdate';
Should read:
$settings->batch_update_callback = 'pathauto_for_rdf_pathauto_bulkupdate';

Line 34:
$alias = pathauto_create_alias('pathauto_rdf', $op, 'node/' . $node->nid . '.rdf', array('node' => $node));
Should read:
$alias = pathauto_create_alias('pathauto_for_rdf', $op, 'node/' . $node->nid . '.rdf', array('node' => $node));

Also, your README file mentions that the "prerequisites are the pathauto, RDFx, restws and global redirect modules", but the .info file only lists pathauto and RDFx as dependencies. I was able to at least generate RDF aliases without all the dependencies in the README (after patching as described above), so it would seem that the README needs an update.

PA robot’s picture

Status: Needs work » Closed (won't fix)

Closing due to lack of activity. Feel free to reopen if you are still working on this application.

I'm a robot and this is an automated message from Project Applications Scraper.

PA robot’s picture

Issue summary: View changes

added link to sandbox project