Installed nap along with ubercart (7.x-3.0-rc3) for drupal 7.1 . I am getting following warning messages
Notice: Undefined variable: results in nap_node_grants() (line 799 of C:\xampp\htdocs\website\sites\all\modules\nap\nap.module).
Warning: Invalid argument supplied for foreach() in nap_node_grants() (line 799 of C:\xampp\htdocs\website\sites\all\modules\nap\nap.module).
Notice: Undefined variable: results in nap_node_grants() (line 799 of C:\xampp\htdocs\website\sites\all\modules\nap\nap.module).
Warning: Invalid argument supplied for foreach() in nap_node_grants() (line 799 of C:\xampp\htdocs\website\sites\all\modules\nap\nap.module).
I have not tinkered with any code in nap module.
| Comment | File | Size | Author |
|---|---|---|---|
| #12 | STRICT_ALL_TABLES.datetime.nap_.patch | 1.59 KB | joshuaw |
| #10 | drupal_7_update.patch | 9.34 KB | joshuaw |
Comments
Comment #1
sminons commentedI am also getting the following error message after installing nap.
Recoverable fatal error: Object of class stdClass could not be converted to string in DatabaseStatementBase->execute() (line 2135 of C:\xampp\htdocs\website\includes\database\database.inc).
Comment #2
light9 commentedsubscribe
Comment #3
danielb commentedI made a quick code change regarding the first error but I'd have to do some testing to find the cause of the second one.
Comment #4
sminons commentedIs there anything I could do to help you? Thanks for the update.
Comment #5
sminons commentedApplied the update and I was trying to add a new product when the following error occurred
PDOException: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''theatre_movies_' ORDER BY n.title, n.nid' at line 1: SELECT n.nid, n.title FROM {node} n WHERE n.status = 1 AND n.type IN :types_theatre_movies_ ORDER BY n.title, n.nid; Array ( [:types_theatre_movies_] => theatre_movies_ ) in nap_get_nodelist() (line 1219 of C:\xampp\htdocs\website\sites\all\modules\nap\nap.module).
Addn info:
Webframework : XAMPP 1.7.7
MySQL Version : 5.5.16
Installed drupal version : 7.10
Comment #6
danielb commentednot sure but i suspect maybe there is a ":types" and ":types_something_else" and it is causing a confusion? Perhaps I will prefix the placeholder with 'nap_'
Comment #7
danielb commentedHmm I found a couple more small problems which might affect this. You'll have to resave the config page for the module.
Comment #8
danielb commentedIs this still an issue?
Comment #9
joshuaw commentedCan't speak for the original poster, but I had an issue similar to #5 which was resolved by disabling and uninstalling NAP & NAP UC, then reinstalling it.
Comment #10
joshuaw commentedRather new to all this, but I believe I have resolved this issue, and many others regarding the move to Drupal 7 and Ubercart 3.x, in the attached patch. Would love extra eyes on this.
Comment #11
danielb commentedComment #12
joshuaw commentedMy QA found an additional issue, but with the attached patch, this module has passed our QA. The issue at hand was the usage of "0000-00-00 00:00:00" as the default value for the expiry_date field, where Drupal 7 uses the STRICT_ALL_TABLES option. Have converted checks to NULL instead.
Comment #13
danielb commentedThere are some seriously questionable things in those patches, I think we'll have to dissect each change bit by bit.
Comment #14
joshuaw commentedI'm not sure what is questionable in the patches. Can you expand on that?
Comment #15
danielb commentedI think a lot of things have been snuck in that don't relate to this issue and while they may be positive changes they really could have used some discussion or a separate issue to properly address them, there are a number of drupal coding standards issues, some changes don't seem to change anything just added white space or slightly change the format of the code, and the patches are done against a packaged version not a git checkout which adds a lot of junk to the files that shouldn't be there.
There a lot of good changes too, and I thank you for spotting those, but I'm at a loss to figure out which ones are necessary to solving the current issue.
You've shed some light on a few major problems that were missed during the upgrade to Drupal 7 but at the same time the patch is quite busy and I'm worried I may commit something that while it fixes the problem for you, may introduce issues for people using the module in a different way.
I might just have to manually do some cumulative improvements and fixes based on your patch and we can then revisit whether this issue continues to be a problem. I may need your advice on the purpose of some of the changes when I get down to it.
Hopefully I will work on it very soon.
Comment #16
danielb commentedI need some feedback about this.
This code appears to remove CA integration and replaces it with rules. How will this affect users relying on the current CA functionality?
Comment #17
danielb commentedI've committed the changes I think are necessary, some I think do not change anything, and a couple I disagree with so I haven't added those.
I'd like to hear about this ca/rules thing, other than that I think any other changes should be discussed in a separate issue.
Comment #18
danielb commentedAnd I think if at this point the module is working we should consider making a tagged release of D7 finally
Comment #19
joshuaw commentedTo my knowledge, conditional actions have been removed for Ubercart 3.x and replaced with Rules.
http://www.ubercart.org/forum/support/22086/where_are_conditional_action...
Comment #20
joshuaw commentedOf course, you are right about my changes being a lump sum and probably not the way things are not normally done, so I apologize for that. I'll just address specific issues in the future.
Comment #21
danielb commentedThanks, I've made that change too, and created a release candidate.
Can sminons or anyone else provide feedback about whether any of the original error message persist with the latest code?
Comment #22
danielb commentedI think more needs to be done with this rules thing. There is still a hook_ca_trigger() there instead of hook_rules_event_info(),
and perhaps all of those should be moved into nap.module not uc_nap as rules is more generic than ca was.Nevermind that last bit, the code within there is uc specific.Comment #23
danielb commentedsomething like this?
Comment #24
danielb commented