After enabling the module the following error message is displayed on a migrated 6.20 site:
Fatal error: Call to a member function condition() on a non-object in /var/www/html/cm7/sites/all/modules/faq_ask/faq_ask.module on line 1537
Can this be fixed by patch?
| Comment | File | Size | Author |
|---|---|---|---|
| #17 | faq_ask_category_setting.png | 3.5 KB | stenjo |
Comments
Comment #1
boftx commentedThe following code changes eliminate the initial WSOD in the case of an annonymous user. This seems to be either a result of changes to the DB API or just a simple misuse. In any event, it seems that chaining of the various functions is no longer supported in the same way. Similar changes will need to be made to the other db_select calls in that function.
Note that I had to had the join clause to pull in the users table, which made the final condition call unneeded.
Comment #2
GStegemann commentedYes, that works so far. But shouldn't "u.status" be changed to "n.status"?
And, all references to table name "taxonomy_term_node" have to be changed to "taxonomy_index".
Comment #3
boftx commentedYes, the table name needs to be changed wherever the old name occurs. I would say you are correct that u.status should be n.status. I'll need to work thru the logic to see if u.status should be used, too, but I wouldn't think so.
This was just a quick fix to prove the concept. I'll post a full diff later on, probably tonight sometime.
Comment #4
rogical commenteda fresh install on D7.10
Comment #5
stenjo commentedThis shall now have been fixed in dev. Please verify that this is the case
Comment #6
GStegemann commentedNo, now it fails at line 1537, at the following statement:
I.e. at the first call of condition().
Comment #7
stenjo commentedThere is something wrong with that query. This error do not appear for me, are you able to figure out where the problem might be?
Some documentation can be found on http://drupal.org/node/310086
Comment #8
stenjo commentedThere was quite a set of database access stuff that had to be corrected. Issue seemed to have more with the fact that the taxonomy database structure is changed.
This error should be gone now.
Comment #9
stenjo commentedHave been working on this for a while now and it seems one of the changes from D6 to D7 on taxonomy is that the tables are changed. So is the way the tables are used.
The table holding the relationship between nodes and terms is now called taxonomy_index but that table only keeps track of all published nodes. See issue #962664: Taxonomy Index for unpublished entities. Un-published nodes are kept in field tables and not introduced into the taxonomy system until the node is published.
I am tempted to resort to a supporting module http://drupal.org/project/taxonomy_entity_index that solves this for us by maintaining also the relation to unpublished nodes.
I am reluctant, however, as this means introducing a dependency we really should try and be without.
Any ideas or comments here?
Comment #10
nancydruI am very much opposed to a dependency. How difficult is it to use the field tables?
Comment #11
GStegemann commentedYes, the error is gone. Thanks.
Comment #12
stenjo commentedI assume I can close this now then
Comment #13
GStegemann commentedBut now I get a new error:
Comment #14
stenjo commentedIt is not fixed then. Can this be related to the need for a "Tags" vocabulary?
I think it is a bug in the code if this is in a way hardcoded to a given vocabulary name. I need to have a look at that...
Comment #15
GStegemann commentedYes.
I would say yes.
Thanks.
Comment #16
jlea9378 commentedAny update on this issue?
Comment #17
stenjo commentedHave implemented some sort of workaraound where the admin must select field in

admin/config/content/faq/askfor the category to work from.
Save the settings page and see how this works
Comment #18
stenjo commentedIn the latest dev release this should be fixed now. The workaround in #17 is removed as well and should work without the need of setting the category selection field specifically.