We have set up scholar at our school, and have made some minor changes. I have created a site, and everything seems to work fine except when I'm logged out and go to look at the different content types for my page I get a bunch of errors.
# warning: array_keys() expects parameter 1 to be array, null given in /usr/local/PostgreSQL/EnterpriseDB-ApachePhp/apache/www/trunk/sites/all/modules/contrib/og/og.module on line 363.
# warning: array_fill(): Number of elements must be positive in /usr/local/PostgreSQL/EnterpriseDB-ApachePhp/apache/www/trunk/includes/database.inc on line 253.
# warning: implode(): Invalid arguments passed in /usr/local/PostgreSQL/EnterpriseDB-ApachePhp/apache/www/trunk/includes/database.inc on line 253.
# warning: array_keys() expects parameter 1 to be array, null given in /usr/local/PostgreSQL/EnterpriseDB-ApachePhp/apache/www/trunk/modules/user/user.module on line 513.
# user warning: 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 ')' at line 1 query: SELECT p.perm FROM role r INNER JOIN permission p ON p.rid = r.rid WHERE r.rid IN () in /usr/local/PostgreSQL/EnterpriseDB-ApachePhp/apache/www/trunk/modules/user/user.module on line 513.
# warning: in_array() expects parameter 2 to be array, null given in /usr/local/PostgreSQL/EnterpriseDB-ApachePhp/apache/www/trunk/sites/all/modules/contrib/og/og.module on line 365.
# warning: array_keys() expects parameter 1 to be array, null given in /usr/local/PostgreSQL/EnterpriseDB-ApachePhp/apache/www/trunk/sites/all/modules/contrib/views/views.module on line 480.
# warning: array_keys() expects parameter 1 to be array, null given in /usr/local/PostgreSQL/EnterpriseDB-ApachePhp/apache/www/trunk/sites/all/modules/contrib/views/views.module on line 480.
# warning: array_keys() expects parameter 1 to be array, null given in /usr/local/PostgreSQL/EnterpriseDB-ApachePhp/apache/www/trunk/sites/all/modules/contrib/context/context.core.inc on line 471.
# warning: array_fill(): Number of elements must be positive in /usr/local/PostgreSQL/EnterpriseDB-ApachePhp/apache/www/trunk/includes/database.inc on line 253.
# warning: implode(): Invalid arguments passed in /usr/local/PostgreSQL/EnterpriseDB-ApachePhp/apache/www/trunk/includes/database.inc on line 253.
# warning: array_merge(): Argument #2 is not an array in /usr/local/PostgreSQL/EnterpriseDB-ApachePhp/apache/www/trunk/sites/all/modules/contrib/context/context.core.inc on line 475.
# user warning: 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 ') OR r.rid IS NULL) ORDER BY b.region, b.weight, b.module' at line 1 query: SELECT DISTINCT b.* FROM blocks b LEFT JOIN blocks_roles r ON b.module = r.module AND b.delta = r.delta WHERE b.theme = '' AND (r.rid IN () OR r.rid IS NULL) ORDER BY b.region, b.weight, b.module in /usr/local/PostgreSQL/EnterpriseDB-ApachePhp/apache/www/trunk/sites/all/modules/contrib/context/context.core.inc on line 475I was wondering if anyone might know what the issue is, or could point me in the direction of resolving this. Thanks.
Comments
Comment #1
redndahead commentedAre you using postgres?
Comment #2
blackhole82 commentedWe were using it but it didn't work right. We are using mySQL now.
Comment #3
redndahead commentedWhat version are you using? What php version is it? When you say minor changes what are those?
Comment #4
blackhole82 commentedmySQL version 14.12, PHP version 5.3.2. The changes I made were to openscholar_front.module openscholar_front_getyoursitebutton() so that the scholar register button only shows up if you are logged in. We installed LDAP and only want those who are authenticated to be able to create a site. I also changed user.pages.inc user_page( ) function to direct the user to site/register if they are new and don't have a site yet, otherwise to their site. Then for the user_logout() function I redirect back to the welcome page once the user is logged out.
Here's the code:
Comment #5
ferdi commented@blackhole82 Here are two extra modules that we use to customize our own installation (iqss_openscholar_front ) and allow only Harvard affiliates to be able to create a site (iqss_pinserver_register):
http://scholar.svn.sourceforge.net/viewvc/scholar/trunk/sites/all/module...
Also, if you want to do anything when user logs in (i.e. redirect to site/register) or out (i.e. redirect to a some url), have a look at hook_user: http://api.drupal.org/api/function/hook_user/6
mysql5 + php 5.2 is a good combination do run Drupal / OpenScholar.
thanks!
Comment #6
redndahead commentedAs @ferdi said you can run into any number of errors using Drupal 6 and PHP 5.3. Not all modules support 5.3 yet and there are plenty of 3rd party modules in openscholar. I would suggest using 5.2 also.
Comment #7
blackhole82 commentedI will try installing php 5.2 and see if that fixes some of our problems. Thanks.