Hi All,
The next version of OG Panels is under development and ready for test now, attached are 2 patches against the OG Panels 6.x-2.0 version. The first patch will add database changes to og_panels.install, the second patch will make new code change on og_panels.module.

Before releasing the next version of, a thorough testing round is needed. Everyone is welcome to test these 2 patches and together we can make this module better and more powerful.

Here are a list of new changes in these 2 patches:

og_panels.install
1. add drupal_flush_all_caches on hook_enable
2. add new database field use_template and template_did in og_panels table to store og panels template data
add new database table og_panels_templates to store og panels template data

og_panels.module
1. give user a hint of current group context
2. add new menu items for og panels templates
3. add new permission for og panels templates
4. change og_panels_form to integrate og panels template settings
5. create new forms for og panels listing and editing

To start testing, apply the 2 patches attached by running patch -p0 < og_panels_next_version_install.patch and patch -p0 < og_panels_next_version.patch and then run update.php, update to number 6003.

Best Regards,
Jim

Comments

sdboyer’s picture

this looks a lot like blueprints, which in retrospect I really probably should have ported to D6...it was silly to not provide that functionality in the immediate term just because I had a crazy long-term scheme to provide it more generally. So I'm glad to see development in this direction.

I do have to mention, though, that the naming is a problem. "Templates" is the first word that I considered using for blueprints, but ultimately rejected because the namespace has clearly been staked out by the theme system. I then used 'collections' for a while, but that didn't actually encompass the basic pattern very well. So I ultimately settled on 'blueprints.' Given that I'm gonna leave that project as just D5, and I really wanted it integrated into og_panels in the first place, though, if you want to use that namespace (and/or any of the code in there, though I now know it to be very primitive OO work), I'd be very +1 to that.

...and, if I ever do write that holy grail that is a fully abstracted blueprints system, we can integrate it then.

jimthunderbird’s picture

Hi Sam,
Thank you very much for the review. I will take a look at the code at blueprint and see if I can use some of the code there. If "Blueprint" is a better word for "Template", I will make all the wording and description "Blueprint" related.

Best Regards,
Jim

jthomasbailey’s picture

got some errors:


patching file og_panels.install
Hunk #3 FAILED at 105.
Hunk #4 succeeded at 209 with fuzz 2 (offset -21 lines).
1 out of 4 hunks FAILED -- saving rejects to file og_panels.install.rej

and


patching file og_panels.module
Hunk #11 FAILED at 1131.
1 out of 11 hunks FAILED -- saving rejects to file og_panels.module.rej
jimthunderbird’s picture

Hi hobgobbler,
Did you patch against og-panels 6.x-2.0 and what OS are you running?

Best Regards,
Jim

jthomasbailey’s picture

og-panels 6.x-2.0, OSX 10.6.3 (Snow Leopard).

I'm not positive but I probably did it with "patch -p0 <"

I'm getting

warning: call_user_func_array() [Function.Call-User-Func-Array]: First argument is expected to be a valid callback, 'og_panels_template_access' was given in .../.../includes/menu.inc on line 452.

errors.

jimthunderbird’s picture

Hi hobgobbler,

Could you try the following?

"To start testing, apply the 2 patches attached by running patch -p0 < og_panels_next_version_install.patch and patch -p0 < og_panels_next_version.patch and then run update.php, update to number 6003"

Best Regards,
Jim

jthomasbailey’s picture

Same errors when patching, I tried it with the Dev and with the regular release just in case.

Got these when updating:

user warning: Duplicate column name 'use_template' query: ALTER TABLE og_panels ADD COLUMN use_template int(11) NOT NULL DEFAULT 0 AFTER weight in .../.../sites/all/modules/og_panels/og_panels.install on line 198.
user warning: Duplicate column name 'template_did' query: ALTER TABLE og_panels ADD COLUMN template_did int(11) NOT NULL DEFAULT 0 AFTER use_template in .../.../sites/all/modules/og_panels/og_panels.install on line 199.
warning: Invalid argument supplied for foreach() in .../.../includes/database.mysql-common.inc on line 69.
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 ') /*!40100 DEFAULT CHARACTER SET UTF8 */' at line 2 query: CREATE TABLE og_panels_templates ) /*!40100 DEFAULT CHARACTER SET UTF8 */ in .../.../includes/database.inc on line 550.

and

The following queries were executed
og_panels module
Update #6003
Failed: ALTER TABLE {og_panels} ADD COLUMN use_template int(11) NOT NULL DEFAULT 0 AFTER weight
Failed: ALTER TABLE {og_panels} ADD COLUMN template_did int(11) NOT NULL DEFAULT 0 AFTER use_template
Failed: CREATE TABLE {og_panels_templates} ) /*!40100 DEFAULT CHARACTER SET UTF8 */
jimthunderbird’s picture

Hi,
I guess what happened is somehow you have already got use_template and template_did field in the database. Could you first drop those fields in database, then run update.php again?

Best Regards,
Jim

jthomasbailey’s picture

I dropped those tables and updated to 6003 again:

warning: Invalid argument supplied for foreach() in .../.../includes/database.mysql-common.inc on line 69.

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 ') /*!40100 DEFAULT CHARACTER SET UTF8 */' at line 2 query: CREATE TABLE og_panels_templates ) /*!40100 DEFAULT CHARACTER SET UTF8 */ in .../../includes/database.inc on line 550.

and

The following queries were executed
og_panels module
Update #6003
ALTER TABLE {og_panels} ADD COLUMN use_template int(11) NOT NULL DEFAULT 0 AFTER weight
ALTER TABLE {og_panels} ADD COLUMN template_did int(11) NOT NULL DEFAULT 0 AFTER use_template
Failed: CREATE TABLE {og_panels_templates} ) /*!40100 DEFAULT CHARACTER SET UTF8 */

There's something wrong with the patches, that's what's causing it.

jimthunderbird’s picture

Hi,
Do you still have og_panels_templates table in the database? If you still have that table, it will fail when trying to create it. So remove that table and try again see if it works.

Best Regards,
JiIm

jthomasbailey’s picture

StatusFileSize
new822 bytes
new12.98 KB

I dropped them like you said, and when I updated it put them back. I'll upload the patch rejects, maybe that will tell you something.

amitaibu’s picture

Related to the issue (the future of og_panels), but not to the patches -- #837064: Re-implement UI with custom changes (e.g. og_panels)

drupalusering’s picture

Issue tags: +og panels template patch
StatusFileSize
new13.02 KB
new852 bytes

Installed 6.x-2.0
checked db - no tables exist for og_panels
downloaded patches
executed following for the first patch
>> patch -p0 < og_panels_next_version_install.patch
>> patching file og_panels.install
>> Hunk #3 FAILED at 105.
>> Hunk #4 succeeded at 209 with fuzz 2 (offset -21 lines).
>> 1 out of 4 hunks FAILED -- saving rejects to file og_panels.install.rej
executed second patch
>>patch -p0 < og_panels_next_version.patch
>>patching file og_panels.module
>>Hunk #11 FAILED at 1131.
>>1 out of 11 hunks FAILED -- saving rejects to file og_panels.module.rej
went to update database
6003 became available for og_panels
executed it
>> * warning: Invalid argument supplied for foreach() in /path_to/database.mysql-common.inc on line 78.
>> * 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 ') /*!40100 DEFAULT CHARACTER SET utf8 */' at line 2 query: CREATE TABLE ogroups_og_panels_templates ) /*!40100 DEFAULT CHARACTER SET utf8 */ in /path_to/database.inc on line 551.

drupalusering’s picture

could you please possibly provide a zip file of working patched module for download?

drupalusering’s picture

Status: Active » Closed (fixed)

Solution in pdf [comment #20] tells how to create a variant with latest version 2.0 that will be set as default for og_panels http://drupal.org/node/553456

jason.fisher’s picture

Status: Closed (fixed) » Needs review

The issue should remain open. Is anyone successfully testing this?

jason.fisher’s picture

FYI I believe hobgobbler was testing with PHP 5.3.

jthomasbailey’s picture

I can't remember for sure if I was using 5.3 but it's very possible. I didn't know there were problems with it until recently.

dawehner’s picture

Category: support » feature
Priority: Critical » Major

Update status

dawehner’s picture

Update status