Closed (fixed)
Project:
Vocabulary Index
Version:
5.x-2.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
20 Nov 2008 at 08:33 UTC
Updated:
24 Jul 2013 at 08:40 UTC
I had several Vocabulary Index blocks and pages configured, but somehow the configuration got lost; don't know how, but I have seen this happening a couple of times already. If I now go to blocks/pages administration I get the following error message:
You haven't yet got any vocabularies to enable an index for; you may create them at the categories page.
and yet a dozen vocabularies are definitely still there... If there is something I should look into please let me know before I reinstall from scratch. Thank you.
Comments
Comment #1
xanoVocabulary Index keeps track of all existing vocabularies in its own table. If this gets messed up, the solution is to reinstall Vocabulary Index, so it can 'rebuild' the vocabulary data.
If you keep experiencing data loss, please provide step by step instructions on how to reproduce this problem using the latest development version and a clean Drupal installation.
Comment #2
dries arnoldsI had the same issue in 6.x-2.0-rc2. After I deleted one vocabulary and severely edited another (which had a vocab index page) that index page didn't exist anymore, nor could I build a new page on the same vocab.
Comment #3
xanoPlease provide step by step instructions on how to reproduce the problem using a clean Drupal installation and the latest development version of Vocabulary Index or I won't be able to fix the problem.
Comment #4
skizzo commentedYesterday, for no apparent reason, I stepped into this bug twice again: the problem is elusive and I could not find a way reproduce it. Nothing shows up in httpd error log, while Drupal watchdog lists the following error, maybe it is just a consequence of the problem... Does the extra slash say anything? Maybe the code can be instrumented with a sanity check, for debugging purposes?
Attempt to assign property of non-object/ in //var/[...]/vocabindex.view.inc/ on line /241/.Comment #5
skizzo commentedIt just happened. I was not doing anything specific with vocabindex configuration. I just entered a panel page, the panel does include 3 vocabindex' blocks (now reading "There are currently no terms in this vocabulary"). If I now check the vocabindex table with myPhpAdmin, the table turns out to be empty. Three messages in log read "Attempt to assign property of non-object in /var/www/drupal/sites/all/modules/vocabindex/vocabindex.view.inc on line 241."
Comment #6
xanoI know there are some bugs when used with Panels (only when using multiple alphabetical views on a single page and I'm going to fix this ASAP), but none that should empty the table :S
Could you try to test some more and see if you can find a situation in which this problem always occurs?
Comment #7
skizzo commentedI can't identify a pattern... It happened again now, with a different twist: I see the error
warning: Attempt to assign property of non-object in [...]/vocabindex.view.inc on line 241.
(and the "There are currently no terms in this vocabulary" message) for one vocabulary only
out of 15. However this time the vocabindex table IS stilll there, and contains all the required data.
(indeed after a couple of reloads the block showed up again...)
@Pixelstyle: are you using the "Taxonomy redirect" module?
Comment #8
xanoThe message There are currently no terms in this vocabulary means that Vocabulary Index succesfully displays a VI, but that there are no terms for the vocabulary to display. If there are terms, then this is most likely a problem with Taxonomy, since vocabindex used
taxonomy_get_tree()to get all terms for a vocabulary.Comment #9
skizzo commentedyes, it was an empty vocabulary indeed. That leaves me back to the original problem. Really weird... the vocabindex table loosing all its data. Is there a way in mySQL to make the table "read-only", so that any violation attempt would be reported?
Comment #10
xanoNo, since the table needs to be updated if vocabularies are added or deleted or if VIs are updated. Haven't gotten the time to look into this problem yet.
Comment #11
skizzo commentedI thought that it could have something to do with Taxonomy Redirect, but that proved false: I disabled Taxonomy Redirect but later on the problem showed up again in Vocab Index (blocks only). I am using Panels and Domain Access, but cannot disable those really, as they are central to my architecture. Setting up a similar environment would be quite time consuming... so I don't know if you can reproduce the problem. Hopefully Pixelstyle or someone else can qualify it in a more restricted context. Thank you for putting your effort on this nice module, If I won't be able to use it... I will be really missing it!
Comment #12
xanoThe problem was that
hook_taxonomy()passed on old parameters tovocabindex_vi_delete(), which would delete all VI data if only a single vocabulary were deleted.Fixed and committed to all branches.
Comment #13
xanoComment #15
xano