Getting: Assertion failed: "gettype($default) != gettype($value): NULL vs string" after installing (Comment Driven, Comment driven (taxo)), configuration and first try. I'm also using Talk.module along with comments.

Additional error logs when changing taxonomy via Comment driven:

  • Duplicate entry '1-2085' for key 'PRIMARY' query: INSERT INTO en_term_node (nid, vid, tid) VALUES (216, 2085, 1) in (...)\taxonomy\taxonomy.module on line 693.
  • Invalid argument supplied for foreach() in (...)\taxonomy\taxonomy.module on line 70.

Module works fine though, "Assertion failed"-msg hasn't reappeared since. Let me know, if you require any additional information.

Comments

arhak’s picture

Priority: Normal » Critical
Status: Active » Postponed (maintainer needs more info)

I need more info to discriminate:

regarding the Assertion
- the involved vocabulary is non-tags AND non-required?
- multiple or not?
- were you changing a term:
-- from "none" to certain value
-- from certain value to "none"
-- other?

regarding the error logs
- were you trying preview?
- taxonomy.module on line 70 seems a core bug #716788: option none causes "Invalid argument supplied for foreach()" when previewing
- I can't identify what the duplicated entry was about, will have to dig on that one, and don't know even what info could you provide to alight me...
-- modules in use?
-- what is your term #1?
-- was that the one you were changing when the problem arose
-- can you reproduce the error and provide steps?

neurer’s picture

Sure. Here's some more feedback:

> regarding the Assertion
- Yes.
- no multiple select, no.
> were you changing a term:
-- yes, none to certain value <- am able to reproduce -- generates "Assertion failed" error
-- yes, going from certain value to none <- am able to reproduce -- generates "Assertion failed" error
-- nope

> regarding the error logs
- no preview, no.
- OK
- OK
-- Talk.module and Resizable Body.module for comments
-- there's no tid1 if I'm not mistaken -- tid1 only shows up in the db on nodes I touched via Comment driven. Other than that, there's no tid1 -- first one with a value is tid2.
-- nope
-- Yes, I can reproduce -- by going from none to any value. Going from value to value doesn't seem to generate error logs.

Hope this helps. Just let me know if there's any other way for me to assist.

arhak’s picture

- regarding the Assertion
-- as you might have noticed, there is a known bug regarding non-tags and non-required vocabularies, i.e. changing from and to "none" triggers that assertion
-- this known bug should be present in both: multiple or non-multiple <select> and will be addressed for unstable4
-- the reason for this known bug to be there yet: I'm waiting for the fix that might come up for #716788: option none causes "Invalid argument supplied for foreach()" when previewing, our bug doesn't depend on that one, but is due to similar causes, and having core's taxonomy not taking care of the situation will force us to take our own solution (and though, previewing will always trigger core's taxonomy bug)

- regarding the error logs
-- I don't recall if core's taxonomy bug is expected to be triggered without previewing (I'll check it out when fixing the assertion issue and ask for more feedback if needed)

-- the unknown bug
--- the "Duplicate entry '1-2085' for key 'PRIMARY' query" is where you hit an unknown spot
--- I'll have to test if it might be due to other modules involved
--- "tid1 only shows up in the db on nodes I touched via Comment driven"
---- this is worrying, please provide as much details as possible regarding this mysterious term #1
----- can you reproduce it in a fresh install without talk & resizable_body?

It would help a lot having your data, (if you have not problem with it):
- export your commen_driven_log* table and send it by mail (arhaks [at] gmail [dot] com)
- also the results of the following queries
-- SELECT * FROM `term_data` WHERE tid =1*
--

SELECT * FROM `term_node` WHERE tid =1
AND (
  vid IN (
    SELECT old_vid AS vid
    FROM comment_driven_log
  )
  OR vid IN (
    SELECT new_vid AS vid
    FROM comment_driven_log
  )
)

*

* Note: table names will require adjusting table prefixes to your current configuration

neurer’s picture

Logs and further details have been sent to your email.

arhak’s picture

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

properly received

arhak’s picture

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

I opened a new issue for the known bug #728054: support option "none" for non-required vocabularies
if you know how to test a patch, please do
otherwise subscribe to that issue to know when it gets committed to HEAD

regarding the error logs:
- I couldn't reproduce them
- the core's taxonomy bug should not be showing up unless previewing
- the phantom term #1 doesn't come from comment_driven, talk, resizable_body nor userpoints, none of them create terms ({term_data}) nor relations to node's taxonomy ({term_node})
- if the problem is being introduced by other module it should NOT be a comment related one
- check for modules that might be affecting the node_form instead (regarding its taxonomy)

if you have no time to set up a fresh install, maybe you can try disabling some modules while leaving comment_driven and discriminate which one is introducing the errors
otherwise I'm unable to guess what configuration/information/data should be requested

I need steps to reproduce the errors
or at least a (reasonable) list of possible conflicting modules

I'm intrigued about:
- why do these errors show up at the same time of the known bug of comment_driven?
- what is that relation being created for a phantom term #1 and from where it comes from?

... wait a second...
what theme are you using?
are you somehow theming the node_form or node's view?
note that core's taxonomy bug might show up if invoking taxonomy_link('taxonomy terms', $node) with a non-saved $node

... still, the "Duplicated entry" is unexplainable to me...

arhak’s picture

Title: Error: "Assertion failed" & error logs » error logs
Category: bug » support

haven't heard anything front jant

the Assertion part was addressed, the error logs weren't

neurer’s picture

You can count on my feedback. But as I've mentioned in my email to you, "really don't have the time to do that any time soon". I'll get back to you as soon as time permits. Please forgive.

arhak’s picture

Priority: Critical » Normal
Status: Postponed (maintainer needs more info) » Closed (fixed)

three weeks without any reply
things have changed a lot since unstable3

I guess that whatever it was should be fixed by now (if it was something beyond #728054 in first place)
otherwise, if the problem arise again feel free to reopen this issue with further details