After creating albums & inserting some content there using the respective links, I had everything functioning normally, at least when one clicked on /acidfree. There, one would see all the albums created.

Today for no apparent reason I can imagine, I have the message: "This album is empty"!

I can however see the different child albums (sorry cant think of a better term) on the main page beside the pictures posted there & clicking on them takes me to the individual albums.

When I click on "List" I get the same "This album is empty"!

When I click on "Album contents" I have the missing albums listed there!

If I click on the individual albums, under View & List I get the same error message & only see the contents, ie child albums or images/videos only when I click on Album Contents!

So what could have happened to /acidfree and what's going on??

Regards

CommentFileSizeAuthor
#18 acidfree_hook_view.patch588 bytesvhmauery

Comments

lionheart8’s picture

Title: Albums have disappeared » Acidfree Albums have disappeared

When I tried to add an image, to see if submission would work, I noticed it has 2 acidfree albums drop-downmenus to select the target album directory, though one was not activated & was empty but had the required field asteriks! When I chose the one looking normal, & selected the target directory, I got this error

Acidfree albums field is required.

meaning I practically cannot submit any image.

Whatever caused all this?

crischan’s picture

Hi,

Weird enough I i have this problem on my site too. for me it seems to be cache poisoning, as emptying all cache tables fixes this for ONE view - then the cache gets poisoned again.

Even more weird is the fact, that on a different site, same server, same module versions this works.

crischan’s picture

Pinned it down to a problem with the {cache_menu} table. But what now?

crischan’s picture

Pinned it down to a problem with the {cache_menu} table. Clearing it gives the one-time correct view.
But what now?

bassam’s picture

Hi all,
I have the same problem. When i click on edit album, and save, I can see the the sub albums. When i refresh the page, the albums disappear.

artis’s picture

I have the same problem. I click on edit then submit and everything shows fine. The refresh the page and it goes away.

Help!

lionheart8’s picture

The acidfree album is really one of the best around and I would like to use it, but the problem is when problems come up, like those addressed, there is virtually no support OR it takes too long to get it.
I have had to abandon it, though I have not given up hope things will change.
If I could do some programming, I would offer to help ...
I think I read somewhere the script writer has little spare time to work on it or respond to (all) support requests. :(

crischan’s picture

Well, this seems to be related to too long theme function names which can't be resolved using theme(). I have opened a issue for Drupal Core (http://drupal.org/node/222310).
A fix seems to be shortening the theme_... function names. For that i replaced all occurences of "_print_thumb_" with "_pt_" in all function names and calls in all acidfree files.

crischan’s picture

On my live server, shortening the problem did not solve the problem.
Changing theme.inc, line 166 (Drupal Core, "include" directory) from if (!isset($functions[$function])) { to if (!($functions[$function])) { fixes this though.

vhmauery’s picture

CRiSCHAN,

What version of php are you using? This sounds like a problem that could be related to php versions... I tested a little code snippet http://drupalbin.com/883 to see what the maximum function name length was and it got up to 12000+ before it ran out of memory. I just ran it on the command line like `php test.php` and it prints out the length of the function name from the function. If that does not have any issues for you, then this really could be a drupal limitation. If the test fails for you, then you should upgrade to a newer php. :)

crischan’s picture

Locally: PHP Version 5.2.3-1ubuntu6.3 (14234 max. function name length)
Server: PHP Version 5.2.4 (5212 max function name length)
Server alternative: PHP Version 4.4.7 (4246 max function name length)

All three don't work with the original theme.inc, but work with the hotfix mentioned in comment #9.
Now I'm trying to remember if testing for an array element like I do in that fix breaks under certain setups...?

andre75’s picture

Hello CRiSCHAN,

i have the same problem. Your fix works for me too, but I don't understand how you came up with that.
Could you elaborate a little more on why this works?

Thanks

vhmauery’s picture

Status: Active » Postponed (maintainer needs more info)

Could someone please tell me the exact steps to reproduce this bug. I cannot reproduce this one on my own. Narrow down the list of modules enabled and give me a minimal list of modules enabled that still has the problem. Does disabling one of the remaining modules get rid of the problem? Was it on an upgrade or a new install?

crischan’s picture

Using the local copy of my website, i disabled contrib modules until the problem occurs. nodeword (Meta Tags) 5.x-1.7 is causing the failure on my website.
The I tried it with a fresh install of Drupal and nodewords causes acidfree to fail in this case too. Here are the details:
Looking in the issue queue for nodewords, i can find this exact problem: http://drupal.org/node/153295
So obviously there is a conflict with nodewords. I'll have a look at their code next...

* MySQL 5.0.51a-1ubuntu1
* Apache 2.2.8-1
* PHP 5.2.4-2ubuntu5

* Installed Drupal 5.7 (Plain vanilla install with just one superuser uid=1)
* Installed Image 5.x-1.7
* Installed Views 5.x-1.6
* Installed Acidfree 5.x-1.x-dev (3/05/08)
* Create Test Album
* Create Test Image in Test Album
* Looks good so far, everything works as expected
* Installed nodewords 5.x-1.7
* Acidfree fails.

crischan’s picture

Project: Acidfree Albums » Nodewords: D6 Meta Tags
Version: 5.x-1.x-dev » 5.x-1.7
Component: User interface » Code

Ok, going after the cause I found that in nodewords metatags/description.inc, line 23 a call to
node_build_content($node, TRUE, FALSE)
is the trigger. Commenting this line makes acidfree work normal, but will break nodewords functionality for the description metatag.
I'm afraid of diving deeper into the core functions here but will do so anyways...

vhmauery’s picture

First, note that this only affects albums in an album, not images in an album. All my images still show up after enabling Meta Tags.

acidfree root
  Test image 1
  Test album A
    Test image 2
    Test album B
      Test image 3
    Test album C
      Test image 4

In this case, from Acidfree root, only Test image 1 shows up. If I manually navigate to Test album A, only Test image 2 shows up, etc. So it seems that only the albums are going awol here.

Another work around for this is to manually insert a description on the "Meta Tags -> Description" field when editing an album. For example, edit Test album A and add any string to the Meta Tags description field and suddenly Test albums B and C show up.

vhmauery’s picture

Another work around is to uncheck "Use the teaser of the page if the meta description is not set." on the Meta Tags admin page.

vhmauery’s picture

StatusFileSize
new588 bytes

Okay, I think I may have found a bug in Acidfree's view hook. Try this patch out. Please test it thoroughly.

Index: acidfree.module
===================================================================
--- acidfree.module     (revision 550)
+++ acidfree.module     (working copy)
@@ -159,6 +159,12 @@
             );
         return $node;
     } else {
+        if ($teaser) {
+            $output = check_markup($node->teaser, $node->format, FALSE);
+            $node->content['body'] = array('#value' => $output);
+            return $node;
+        }
+        /* here is !$teaser && !$page */
         static $head_set;
         if (!$head_set) {
             $size = _acidfree_get_sizes('thumbnail');
vhmauery’s picture

Status: Postponed (maintainer needs more info) » Needs review

oops. code needs review.

crischan’s picture

Project: Nodewords: D6 Meta Tags » Acidfree Albums
Version: 5.x-1.7 » 5.x-1.x-dev
Status: Needs review » Reviewed & tested by the community

Works perfectly for me on two different server environments.

vhmauery’s picture

Status: Reviewed & tested by the community » Needs work

I am not happy with this current patch. It breaks rendering for albums if the album is promoted to the front page. We need to find some other way to fix the problem.

Lion.creek’s picture

Priority: Normal » Critical

none

ngstigator’s picture

subscribing

kecinzer’s picture

Thanks for the patch, I have the same problem on 2 websites - on both I installed nodewords 2 days ago.

yngens’s picture

has this patch already been commited? i tried to install the dev latest version and this patch produced:

[root@host acidfree]# patch < *.patch
patching file acidfree.module
Hunk #1 succeeded at 169 (offset 10 lines).

syedys’s picture

Hi.. I also had this problem in both of my websites ( http://www.highy.com and http://www.bannu.com )
But I solved it in my first website, i tried everything that is mentioned above but nothing worked for me. But when I had a look at Categories in admin/content/taxonomy, there were three or four vocabularies automatically built with the same name as "Acidfree". I tried removing the extra vocabularies but it didnt solve the problem, then I opened views, and I made a copy of album_grid_view by clicking "add" in "Actions" column. There was a wrong vocabulary selected in the view in "Filters->Taxonomy: Vocabulary Name". I just selected the right vocabulary and saved the view. When I opened my albums, they were working properly.
Thanks 2 all for the help.

ngstigator’s picture

Here's how I was able to do this without having to create a additional view: (warning: requires command line access to database or equivalent)

  1. delete the "acidfree albums" vocabularies that do not actually contain your terms
  2. note the id of the remaining "acidfree albums" vocabulary
  3. update your "variable" table: UPDATE `variable` SET `value`='i:{YOUR_VOCAB_ID};' WHERE name = 'acidfree_vocab_id';
  4. flush your cached views: TRUNCATE TABLE `cache_views`;
  5. voila!

Thanks for the clue!

yngens’s picture

having this problem since long. confused with number of different solutions offered. would be nice if some experienced Drupal guru suggested what exactly should be done to solve the issue.

glassgrrl’s picture

subscribing

Chris Bray’s picture

I wish you could subscribe without having to comment!

For what it's worth vhmauery's patch in #18 worked for me.

mwheinz’s picture

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

Closing. 5.x is no longer supported.