Closed (fixed)
Project:
FAQ_Ask
Version:
7.x-1.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Reporter:
Created:
12 Jan 2011 at 17:56 UTC
Updated:
6 Feb 2012 at 08:10 UTC
Jump to comment: Most recent file
Here is the error I get when trying to install the dev version:
PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'FaqAccessTestClass-class' for key 'PRIMARY': INSERT INTO {registry} (name, type, filename, module, weight) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4), (:db_insert_placeholder_5, :db_insert_placeholder_6, :db_insert_placeholder_7, :db_insert_placeholder_8, :db_insert_placeholder_9), (:db_insert_placeholder_10, :db_insert_placeholder_11, :db_insert_placeholder_12, :db_insert_placeholder_13, :db_insert_placeholder_14), (:db_insert_placeholder_15, :db_insert_placeholder_16, :db_insert_placeholder_17, :db_insert_placeholder_18, :db_insert_placeholder_19), (:db_insert_placeholder_20, :db_insert_placeholder_21, :db_insert_placeholder_22, :db_insert_placeholder_23, :db_insert_placeholder_24), (:db_insert_placeholder_25, :db_insert_placeholder_26, :db_insert_placeholder_27, :db_insert_placeholder_28, :db_insert_placeholder_29); Array ( [:db_insert_placeholder_0] => Faq_AskTestCase [:db_insert_placeholder_1] => class [:db_insert_placeholder_2] => sites/all/modules/faq_ask/faq_ask.test [:db_insert_placeholder_3] => faq_ask [:db_insert_placeholder_4] => 0 [:db_insert_placeholder_5] => FaqAccessTestClass [:db_insert_placeholder_6] => class [:db_insert_placeholder_7] => sites/all/modules/faq_ask/faq_ask.test [:db_insert_placeholder_8] => faq_ask [:db_insert_placeholder_9] => 0 [:db_insert_placeholder_10] => CreateFaqTestCase [:db_insert_placeholder_11] => class [:db_insert_placeholder_12] => sites/all/modules/faq_ask/faq_ask.test [:db_insert_placeholder_13] => faq_ask [:db_insert_placeholder_14] => 0 [:db_insert_placeholder_15] => FaqExistsFaq_AskTestCase [:db_insert_placeholder_16] => class [:db_insert_placeholder_17] => sites/all/modules/faq_ask/faq_ask.test [:db_insert_placeholder_18] => faq_ask [:db_insert_placeholder_19] => 0 [:db_insert_placeholder_20] => CRAUDFaq_AskTestCase [:db_insert_placeholder_21] => class [:db_insert_placeholder_22] => sites/all/modules/faq_ask/faq_ask.test [:db_insert_placeholder_23] => faq_ask [:db_insert_placeholder_24] => 0 [:db_insert_placeholder_25] => BlockFaq_AskTestCase [:db_insert_placeholder_26] => class [:db_insert_placeholder_27] => sites/all/modules/faq_ask/faq_ask.test [:db_insert_placeholder_28] => faq_ask [:db_insert_placeholder_29] => 0 ) in _registry_parse_file() (line 179 of /includes/registry.inc).
| Comment | File | Size | Author |
|---|---|---|---|
| #18 | rename_classes-1024560-1.patch | 1 KB | aagbsn |
Comments
Comment #1
stenjo commentedI am aware of the recent development in the Frequently Asked Questions module. However, I unfortunately have very little time to attend to developing the D7 version. I will make an effort to find time to apply patches and commit the dev line and keep it updated if dev work is done by others.
Thank you for your contribution so far.
Comment #2
GStegemann commentedMay this is of help? I just removed the these entries from registry table and the install completed.
Comment #3
boftx commentedWhy would the entries be there in the first place in a clean install of D7 and FAQ? I'll dig deeper based on what you said, but the names of the values having 'Test' in them gives me pause. Ah, such is dev.
Comment #4
boftx commentedJust on a hunch I removed the .test file from the files[] array in the .info file (commented it out) and it installed okay.
Permissions were able to be set. The first error I encountered was a WSOD related to the unanswered questions block, I forced a NULL return at the start of the block function to get past that on a temporay basis.
The next error I encounted was that the function drupal_goto() needs its query argument in an array, with each term being in an array as well. Here are my diffs so far (the original file is in the SAVE dir):
When making custom changes to code like this I typically put my initials in a comment so I can quickly find my changes. Hope this helps. Will continue to try to track other errors, such as the WSOD when trying to preview or save a question from the FAQ Ask page. It seems to be connected to the form alteration.
Comment #5
GStegemann commentedJust to confirm the changes you made to drupal_goto.
Next I found that the taxonomy vocabularies are not displayed on the FAQ Ask page. This seems to be related to the changed function taxonomy_get_vocabularies().
Comment #6
boftx commentedI saw the categories displayed correctly, but I am encoutering a WSOD related to the alter_form_id_hook so far as I can tell. Also, the regular FAQ module add content page throws a WSOD with FAQ_Ask is enabled when trying to preview or submit a question and answer. The error is being thrown by the field module, but I am guessing it can be tracked back to the same issue that is throwing the FAQ_Ask error connected to forms.
Edit: Here is the error on the WSOD connected to previewing/saving in FAQ Ask:
Fatal error: Function name must be a string in /includes/form.inc on line 1390
Comment #7
boftx commentedHee is the diff that resolves the WSOD when previewing/saving:
The problem came about because the value in $form['#validate'] is already an array if set, so no need to transform it again.
Now that I am past this I am getting a regular error message regarding fields, which seems to be the same one I get in FAQ with FAQ Ask enabled, so more fun and games.
Here is that message:
Comment #8
boftx commentedHere is another bug that showed when I tried to unpublish a new question from the content admin screen:
Comment #9
boftx commentedTo stenjo, GStegemann and future readers of these comments: Please forgive my somewhat ugly diffs and code postings. While I am no stranger to using Drupal or coding in other languages, I am new to PHP and Drupal code developing. You could say I'm old school. :)
Comment #10
stenjo commentedAbout time i chip in: The error you had initially was probably related to the .test file. All modules (if I have understood this correctly) must have a .test that will be run automatically on every commit of patches or code.
You are doing great I can see. Keep on the good work and tell me if its time to do any updates to the D7-dev version.
@boftx: You are forgiven :-)
Comment #11
GStegemann commentedI have not seen these error messages yet. But I have another one when I attempt to save a new question:
Comment #12
boftx commentedThat fatal error is corrected by the changes in my comment #7 above. The changes are made in faq_ask.module. There is actually a better way to do the logic, but I wanted to leave as much of the old structure intact to make finding it easier.
Comment #13
bellagio commentedCan somebody make a patch file or tell me how to apply diff file? Or show me the code of changed .module file?
I've use Cygwin to patch a file, but i can't figure out what to do with diff file.(i read http://drupal.org/patch/apply but no luck)
Thank you.
Comment #14
boftx commentedBump because it looks like CiviCRM is going to have a working port to D7 in the next couple of months. The lack of a D7 version of CiviCRM has been a major show stopper for me on the political organization sites I run. But once that is in place, then the lack of other modules like this one will become a block point.
I presume D6 will be at end-of-life once D8 comes out, so there is pressure to move to D7 within 12 months or so. However, D6 is very robust and many of what I would call key modules are not working on D7 yet. I consider FAQ and FAQ_ask to be among those key modules.
I have gone about as far as I can on this for now given my time constraints. I believe the module maintainer has real-life circumstances to deal with as well. Can someone step up and finish the job of getting a stable, bug-free D7 version of FAQ and FAQ_ask in place so migrating to D7 is one step closer for many of us?
Comment #15
steinmb commentedStill see this and it is critical.
Comment #16
mudtraining commentedSubscribe
Comment #17
mcncyo commentedsubscribe
Comment #18
aagbsn commentedthis error is raised because the 'faq_ask' has 2 class names that conflict with names in 'faq':
FaqAccessTestClass, CreateFaqTestCase. I renamed these to Faq_AskAccessTestCase and CreateFaq_AskTestCase.
Comment #19
kmontySubscribing.
Comment #20
aagbsn commentedComment #21
aagbsn commentedboftx: split one of your issues to another ticket: https://drupal.org/node/1277186
Comment #22
boftx commentedaagbsn: thanks, I'm not the most knowledgable on how the drupal ticket system works, I just try to make things work anyway I can. :)
Comment #23
stenjo commentedBrilliant. There is a lot of updated in patches now, and I'll see if I can find some time tonight to update the 7.x-dev version with the patches that are submitted.
Comment #24
stenjo commentedPatch in #18 is applied to 7.x-dev
Comment #25
stenjo commented