URL to Images Management and Album Settings does not work

zyxware - August 20, 2009 - 15:40
Project:album photos
Version:6.x-2.6-beta3
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:reviewed & tested by the community
Description

The URLs to Images Management and Album Settings did not work for me when I had pathauto set up. Here was my configuration

Pathauto

Album Node - albums/[nid]/[title-raw]

The album view page for the ablum.
http://example.com/photos/album/66

The node view page for the album node (When you click on the latest album image)
http://example.com/albums/66/test-album

When accessing the album view page the Image Management and Album Settings page links were incorrectly pointing to

http://example.com/albums/66/test-album/photos and http://example.com/albums/66/test-album/edit

which then came back to the same page. The correct URLs should have been

http://example.com/node/66/edit
http://example.com/node/66/photos

You can fix this by correting this in the tpl/photos_albumview.tpl.php

and changing the following lines

  <?php if($album['access']['edit']) : ?>
    <a href="<?php print $album['node_url'];?>/edit"><?php print t('Album settings');?></a>
    <a href="<?php print $album['node_url'];?>/photos"><?php print t('Images Management');?></a>
  <?php endif; ?>

to

  <?php if($album['access']['edit']) : ?>
    <a href="/node/<?php print $node->nid;?>/edit"><?php print t('Album settings');?></a>
    <a href="/node/<?php print $node->nid;?>/photos"><?php print t('Images Management');?></a>
  <?php endif; ?>

#1

zyxware - August 20, 2009 - 15:43

Here is the patch file for the same

AttachmentSize
554866-photos-fix-local-task-links.patch 743 bytes

#2

Murz - September 23, 2009 - 17:34
Status:active» reviewed & tested by the community

Confirm the bug, patch is solve the problem.

 
 

Drupal is a registered trademark of Dries Buytaert.