Fatal error: Call to undefined function panels_get_content_type() in /home/.../test/sites/all/modules/panels/panels.module on line 765
I created a blueprint, bundle, new group content type. Created the first group of the new content type, it worked fine. I added some content to the panel in the blueprint and tried to create a 2nd group. It created the group without the blueprint panels.
I was getting this on earlier alpha releases when creating the first group instance but it went away for the first but still appears for the 2nd.
I tried to delete the group after the above happened and I got
Fatal error: Call to undefined method og_bundle_type_remover::paint_over_it() in /home/.../sites/all/modules/og_blueprints/og_blueprints.module on line 518
Comments
Comment #1
sdboyer commentedHeh, both my bugs, but two separate modules. The cause of the undefined function error was one of a number of oversights made in Panels2 beta4(a,b). It's been fixed in -dev, and won't be a problem anymore as of the beta5 release, which I intend to do tonight.
Meh, neeeed simpletest. Let me make sure I understand exactly what happened, though: you created a node type (let's call it 'grp1'), marked it as a group type (which also created a corresponding grp1 bundle). You then created a blueprint, edited it a bit, created a release of the grp1 bundle, then created a node of type grp1. This one received the panels just fine, as it's supposed to. You then went back into the og_blueprints setup pages and made some more edits to the blueprints you'd defined there, and created release #2 of grp1. Then, when you created another node of type grp1, blueprints failed to add any og_panels to the group at all.
I really hope I've misconstrued what you said, because that's the EXACT problem I'd swear I spent four hours debugging last night...boiled down to getting too many results from a query and taking the wrong ones.
As for the second error...s'another small typo-kind of error that just proves how much I need to write simpletests for this module; I changed the name of the og_bundle_type_remover::paint_over_it() method to og_bundle_type_remover::retain(), but forgot to update the call...that was all of five lines away :)
Comment #2
stg11 commentedThanks for the quick response.
Your scenario was close but not exactly the same.
1. Created node type marked group node type checkbox when creating
2. I created bluprint, bundle and release
3. created a group of the group type. Everything looked great
4. made some changes to the blueprint
5. Did not (forgot to) make a new release
6. Created a new group from same node type -- got the error as posted in this issue (line 765)
I should have expected pages to be created. Since I didn't make a new release I presume it should have created panel pages as before? Nothing was created.
It seems like a somewhat ambiguous situation. Since your reply I went in to bundles and tried to create a new release.I got the line 765 error again. I went back to the Bundles page for that node type and it now showed Release 2 in spite of the error. So I tried to create a 3rd group from this node type. Another Line 765 error and results just like try #2: it created the group but none of the blueprint panel pages.
I also noticed that right now that are no blueprints in the blueprints tab in the node type sub-tab, only in the master sub-tab. It looks like there should be a table display where I could link the blueprints but only the headings are showing with the message Never worry about delinking a blueprint from the Master blueprint - it's easily reversed, and nothing is deleted. Relinking, however, is a destructive process: the delinked display of the blueprint is deleted from the database, and can only be recovered if you have a backup of your database. Is this normal?
for the record I'm running OG 5.x-7.2, Panels 5.x-2.0-beta4b and your alpha5 release of OG Blueprints
I have legacy views panes turned on in Panels, it probably should be turned off. If you think this has any bearing on the problem, let me know. I will rework my panels to not use legacy views but it will take me some time to fix up all my panels. I did not use any views panes in the blueprint, just custom content, for a simple test.
I could also try upgrading panels to beta5 if you think that would help. Since it has the cautionary indicator I am sticking with beta4 unless you think it might fix the problem.
Comment #3
sdboyer commentedYes, as I said in my first response, your first order of business should be updating to Panels2 beta5; I released it last night, and am as close to positive as anyone can be that it fixes the panels.module line 765 bug. I don't know what cautionary note you're referring to, but I just updated the Panels project page to be clear - updating from beta4(a,b) to beta5 is strongly recommended. The cvslog for the commit that fixed the bug is here: http://drupal.org/cvs?commit=119624 . Now, what's odd is that you didn't get the line 765 error on the first group that you created, but DID get it on the later one. But oh well.
That fact that you're being confronted with an empty table is possibly, maybe even probably, the result of this same bug. Again, update to panels2 beta5, and let me know if these issues go away. Unfortunately, you will need to start from scratch a bit with those blueprints - there isn't exactly a lot of error-checking redundancy in the system (half because I haven't had time, and half because I want to keep it as LIGHT as possible), so when things go off the rails, it's really hard to get them back the way they're supposed to be via direct database manipulation unless you understand exactly how the versioning system works. Hence, my recommendation for making backups.
Comment #4
stg11 commentedThanks so much
Beta5 of Panels fixed the problem. I guess I should have been more aggressive to upgrade.
I was also able to delete the group that did not have the blueprint attached without having to restore the database
Comment #5
stg11 commentedP.S.
I was able to delete one group, but still got the line 518 message on another one, as well as some warning messages going into edit mode on the group:
warning: array_values() [function.array-values]: The argument should be an array in /home/.../sites/all/modules/og_blueprints/og_blueprints.module on line 50.
Maybe because of data out of sync on the database.
Comment #6
MedicSean37 commentedAny fix to this? I got the same problem.
Comment #7
ami.matiauda commentedme too :s