URL to Images Management and Album Settings does not work
| Project: | album photos |
| Version: | 6.x-2.6-beta3 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | reviewed & tested by the community |
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
Here is the patch file for the same
#2
Confirm the bug, patch is solve the problem.