Warning messages on Collections

anantagati - April 5, 2008 - 15:04
Project:Organic Groups Collections
Version:5.x-1.0-alpha2
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

There are following warnings on page "admin/og/og_collections/collectioncfg":

    * warning: mysql_num_fields(): supplied argument is not a valid MySQL result resource in /home/pp/public_html/coolfords-5-x/public/sites/all/modules/og_collections/og_collections.module on line 170.
    * warning: Invalid argument supplied for foreach() in /home/pp/public_html/coolfords-5-x/public/sites/all/modules/og_collections/og_collections.module on line 202.

#1

sdboyer - April 5, 2008 - 15:14
Status:active» postponed (maintainer needs more info)

Hmmm...you appear to have gotten stuck in a very odd place. I'd forgotten to take that mysql_num_fields() out (it's a drupal no-no), but even so, it shouldn't have failed in THAT way. Combined with the other failure argument, it's clear something's going on with your og_collections table. But I need more info.

Are you using pgsql? Have you created any pcpanels yet? Which of the two 'Enabled' settings did you choose on "admin/og/og_collections"?

#2

anantagati - April 5, 2008 - 15:34

I am using MYSQL 5.0.45 on Ubuntu.

I tried both setting and warning is there for both (Enabled - One Overall Template, Enabled - Templates Per Type)

I have created panels already. Except those warnings it works nice.

#3

sdboyer - April 5, 2008 - 20:35

OK, I've fixed the mysql_num_fields issue (the problem on line 170) in dev, but I'm pretty baffled as to how you're getting that second error, yet it's still working. Have you always been experiencing this error, or did some change you made cause it to appear?

the only other thing I can think of asking you to do is install http://drupal.org/projects/devel, insert dvm($collectioncfg); into line 201 (just before that foreach loop) of your og_collections module, and then paste the message you get here.

#4

anantagati - April 5, 2008 - 20:54

Have you always been experiencing this error, or did some change you made cause it to appear?

I used it today first time. So it was clean install.

I checked it now and it doesn't write foreach() warning. So maybe that one appeared before I created panels.

#5

anantagati - April 5, 2008 - 21:00

So when there are no panels $collectioncfg is null otherwise it is ok.

dvm($collectioncfg) without panels:

null

dvm($collectioncfg) with panels:

array
  3 =>
    array
      'active' => int 0
      'default_page' => int 0
      'weight' => int 0
      'did' => int 15
      'usedef' => int 1
      'page_title' => string 'Home' (length=4)
      'path' => string 'home' (length=4)
      'published' => int 1
      'show_blocks' => int 1
      'grouptype' => string 'default' (length=7)

#6

sdboyer - April 5, 2008 - 21:03

Yeah, that's what it's supposed to do; thing is, if there aren't any pcpanels, the other function (the one I fixed) is supposed to redirect you to create a new pcpanel before that foreach loop is ever reached. What's weird to me is that you were able to even view that page without having created any pcpanels.

#7

anantagati - April 5, 2008 - 21:13

I could see that page because I used og_collection-5.x-1.0-alpha2.

Now I am trying CVS version and it redirects me.

#8

anantagati - April 5, 2008 - 21:13
Status:postponed (maintainer needs more info)» fixed

#9

Anonymous (not verified) - April 19, 2008 - 21:22
Status:fixed» closed

Automatically closed -- issue fixed for two weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.