Hi,
i use ctools on vary pages..but one got a problem with the new release 7.x1.2. The frontpage is a panel and after updating to 7.x1.2 i become this list of errors on the frontpage. i try the dev version but from 19. august but the same...so i switch back to ctools 7.x1.1 an all error msg are gone and the site is still working.
Warning: Attempt to assign property of non-object in ctools_block_content_type_render() (Zeile 152 von ./modules/ctools/plugins/content_types/block/block.inc).
Warning: Attempt to assign property of non-object in ctools_block_content_type_render() (Zeile 153 von ./modules/ctools/plugins/content_types/block/block.inc).
Warning: Attempt to assign property of non-object in ctools_block_content_type_render() (Zeile 162 von ./modules/ctools/plugins/content_types/block/block.inc).
Warning: Attempt to assign property of non-object in ctools_block_content_type_render() (Zeile 166 von ./modules/ctools/plugins/content_types/block/block.inc).
Warning: Attempt to assign property of non-object in ctools_content_render() (Zeile 289 von ./modules/ctools/includes/content.inc).
Warning: Attempt to assign property of non-object in ctools_content_render() (Zeile 293 von ./modules/ctools/includes/content.inc).
Warning: Attempt to assign property of non-object in ctools_block_content_type_render() (Zeile 152 von ./modules/ctools/plugins/content_types/block/block.inc).
Warning: Attempt to assign property of non-object in ctools_block_content_type_render() (Zeile 153 von ./modules/ctools/plugins/content_types/block/block.inc).
Warning: Attempt to assign property of non-object in ctools_block_content_type_render() (Zeile 162 von ./modules/ctools/plugins/content_types/block/block.inc).
Warning: Attempt to assign property of non-object in ctools_block_content_type_render() (Zeile 166 von ./modules/ctools/plugins/content_types/block/block.inc).
Warning: Attempt to assign property of non-object in ctools_content_render() (Zeile 289 von ./modules/ctools/includes/content.inc).
Warning: Attempt to assign property of non-object in ctools_content_render() (Zeile 293 von ./modules/ctools/includes/content.inc).
Warning: Attempt to assign property of non-object in ctools_block_content_type_render() (Zeile 152 von ./modules/ctools/plugins/content_types/block/block.inc).
Warning: Attempt to assign property of non-object in ctools_block_content_type_render() (Zeile 153 von ./modules/ctools/plugins/content_types/block/block.inc).
Warning: Attempt to assign property of non-object in ctools_block_content_type_render() (Zeile 162 von ./modules/ctools/plugins/content_types/block/block.inc).
Warning: Attempt to assign property of non-object in ctools_block_content_type_render() (Zeile 166 von ./modules/ctools/plugins/content_types/block/block.inc).
Warning: Attempt to assign property of non-object in ctools_content_render() (Zeile 289 von ./modules/ctools/includes/content.inc).
Warning: Attempt to assign property of non-object in ctools_content_render() (Zeile 293 von ./modules/ctools/includes/content.inc).
Warning: Attempt to assign property of non-object in ctools_block_content_type_render() (Zeile 152 von ./modules/ctools/plugins/content_types/block/block.inc).
Warning: Attempt to assign property of non-object in ctools_block_content_type_render() (Zeile 153 von ./modules/ctools/plugins/content_types/block/block.inc).
Notice: Trying to get property of non-object in ctools_block_content_type_render() (Zeile 156 von ./modules/ctools/plugins/content_types/block/block.inc).
Warning: Attempt to assign property of non-object in ctools_block_content_type_render() (Zeile 156 von ./modules/ctools/plugins/content_types/block/block.inc).
Warning: Attempt to assign property of non-object in ctools_block_content_type_render() (Zeile 166 von ./modules/ctools/plugins/content_types/block/block.inc).
Warning: Attempt to assign property of non-object in ctools_content_render() (Zeile 289 von ./modules/ctools/includes/content.inc).
Warning: Attempt to assign property of non-object in ctools_content_render() (Zeile 293 von ./modules/ctools/includes/content.inc).
Warning: Attempt to assign property of non-object in ctools_block_content_type_render() (Zeile 152 von ./modules/ctools/plugins/content_types/block/block.inc).
Warning: Attempt to assign property of non-object in ctools_block_content_type_render() (Zeile 153 von ./modules/ctools/plugins/content_types/block/block.inc).
Warning: Attempt to assign property of non-object in ctools_block_content_type_render() (Zeile 162 von ./modules/ctools/plugins/content_types/block/block.inc).
Warning: Attempt to assign property of non-object in ctools_block_content_type_render() (Zeile 166 von ./modules/ctools/plugins/content_types/block/block.inc).
Warning: Attempt to assign property of non-object in ctools_content_render() (Zeile 289 von ./modules/ctools/includes/content.inc).
Warning: Attempt to assign property of non-object in ctools_content_render() (Zeile 293 von ./modules/ctools/includes/content.inc).
Comment | File | Size | Author |
---|---|---|---|
#32 | ctools-fix-warning-message-1739718-32.patch | 944 bytes | IshaDakota |
#30 | ctools-fix-warning-message-1739718-30.patch | 1.26 KB | IshaDakota |
#27 | ctools-fix-warning-message-1739718-27.patch | 936 bytes | rickmanelius |
#27 | interdiff.txt | 377 bytes | rickmanelius |
#26 | ctools-fix-warning-message-1739718-26.patch | 940 bytes | IshaDakota |
Comments
Comment #1
merlinofchaos CreditAttribution: merlinofchaos commentedThis patch should fix that.
Comment #2
merlinofchaos CreditAttribution: merlinofchaos commentedI'll commit this as soon as I get confirmation from someone experiencing this problem that it fixes it.
Comment #3
drupalycious CreditAttribution: drupalycious commentedHello,
yes it works for me, I applied it to the latest dev.
thanks for the patch!
Comment #4
ntigh52 CreditAttribution: ntigh52 commentedHi,
I installed the 1.2 ver.
I applied the patch ( I dont know how but: )
I switched the lines from
to
but I still get one worning:
whats wrong?!
Thanks a lot
Comment #5
drupalycious CreditAttribution: drupalycious commentedI tried also with the 1.2 version and it works.
To apply the patch go to the ctools folder in your terminal window and type:
curl http://drupal.org/files/1739718-fix-block-warning.patch | git apply
Comment #6
IshaDakota CreditAttribution: IshaDakota commentedpatch applied. I still get the same single remaining error as #4.
Comment #7
eule CreditAttribution: eule commentedhi,
after applying the patch i get the blogs now on the frontpage ..but one single error appears
Notice: Trying to get property of non-object in ctools_block_content_type_render() (Zeile 156 von ./sites/all/modules/ctools/plugins/content_types/block/block.inc).
zeile 155,156,157
Comment #8
rickmanelius CreditAttribution: rickmanelius commentedI applied the patch. Works like a charm!
Comment #9
ntigh52 CreditAttribution: ntigh52 commentedI have 4 drupal websites.
I tried to update to ver 1.2 in all the 4 websites.
in 2 websites ver 1.2 is fine (even without the patch)
In the other (2) I have the same problem (#4) (even after apply the patch)
still in 1.1 ver.
Comment #10
elBradford CreditAttribution: elBradford commentedPatch seems to remove the warnings for me. Thank you
Comment #11
pjbarry21 CreditAttribution: pjbarry21 commentedPatch applied (per note here: http://drupal.org/node/1738540). Went from:
to
Comment #12
justadropofwater CreditAttribution: justadropofwater commented#1 took care of the Warning for me against D7.15, thanks Merlin.
Comment #13
ethnovode CreditAttribution: ethnovode commentedI get the warning only when I try to limit the block visibility to not appear on the frontpage (with default block UI). This block is also inside a panel on the frontpage. Hope this help.
Comment #14
bpeicher CreditAttribution: bpeicher commentedPatch worked for me.
Comment #15
agerard CreditAttribution: agerard commentedpatch still leaves me with
"Notice: Trying to get property of non-object in ctools_block_content_type_render() (line 156 of /var/www/drupal7Sites/sites/all/modules/ctools/plugins/content_types/block/block.inc)." - wondering if it's worth rolling back, since I accidentally did this on a production site...
Comment #16
merlinofchaos CreditAttribution: merlinofchaos commentedOn a production site you can always go into your administration under error reporting, I think, and check the setting that tells it NOT to report error messages to the user. In general on a production site this is a good idea (and on a dev site you do want error reporting).
Comment #17
imoreno CreditAttribution: imoreno commentedon a front page with a panel - fixed the issue for me.
Comment #18
eule CreditAttribution: eule commentedi have a front page with a panel and this issue is not fixed!
Comment #19
danjuls CreditAttribution: danjuls commentedPatch didnt solve it for me either, not reverting back to previous ctools either, but then i remebered i also updated panels. So i reverted back that update too and now site is back to normal
Comment #20
BenVercammen CreditAttribution: BenVercammen commentedI've patched it like this:
Seems simple enough. No more warnings for me. I had to do this for menu_block blocks...
Comment #21
ntigh52 CreditAttribution: ntigh52 commentedEarl,
Maybe in the function: function ctools_block_content_type_render ( ./sites/all/modules/ctools/plugins/content_types/block/block.inc)
its necessary to Ensure before, with isset function, the $info->title Variable.
before:
after:
it resolved the issue.
I dont know yet how to create a patch, ( I was happy if I had patch commit in ctools module ) ;-)
the lines 516-519 on the file helped me
Thanks.
Comment #22
arturs.smirnovs CreditAttribution: arturs.smirnovs commentedThanks! #1 and #21 helped me.
Comment #23
alanom CreditAttribution: alanom commented#1 and #21 work for me too. I'd do them slightly differently, but it makes very little difference:
For #1, move
$block = (object) $block;
out ofif (!empty($info)) {
and as #20 suggests wrap it inif( is_array($block))
For #21, not sure why the new
if
is nested as that could leave $block->title needlessly unset, seems to make more sense to simply replaceif ($module == 'block'){
withif ($module == 'block' && isset($info->title)) {
. So the new code would be:Comment #24
kenheim CreditAttribution: kenheim commented#1 and #23 worked for me
Comment #25
ntigh52 CreditAttribution: ntigh52 commentedI'm no expert but I wonder with you,
1.
what about function ctools_user_login_pane_render line 484
maybe also there need to add in line 519
the isset Condition (isset($info->title))?
2.
is $module == 'block' Condition necessary?
maybe just
Is Enough?
The goal is to commit & release correctly code, :-)
Thanks.
#23 - thanks (That's how the code looks like when tests...)
Comment #26
IshaDakota CreditAttribution: IshaDakota commentedPatch that includes original in #1 plus #23. Applied and tested - working here.
Comment #27
rickmanelius CreditAttribution: rickmanelius commentedJust a quick style note for the patch in #26... you have a whitespace issue right above "if (empty($block)) {" on line 13 of your patch. A quick re-roll and an interdiff.
Comment #28
merlinofchaos CreditAttribution: merlinofchaos commentedI believe we'll need a !empty($info) to prevent a strict warning as well.
Comment #29
ntigh52 CreditAttribution: ntigh52 commentedwhats about function ctools_user_login_pane_render line 484?
Comment #30
IshaDakota CreditAttribution: IshaDakota commentedemployed as such?:
@ntigh52, you may be right about ctools_user_login_pane_render(), but I can't create a problem there. Do you have one?
Comment #31
merlinofchaos CreditAttribution: merlinofchaos commentedNo, the $block->title = $block->subject will need to potentially happen even if $info is empty. I would put it as this:
Comment #32
IshaDakota CreditAttribution: IshaDakota commentedright, of course. Thanks.
This should do then.
Comment #33
hackwater CreditAttribution: hackwater commentedPatch at #32 fixed this for me. Anyone else?
Comment #34
deepbluesolutions CreditAttribution: deepbluesolutions commentedcleared the problem for me! +1
Comment #35
rickmanelius CreditAttribution: rickmanelius commented#32 works for me as well. Seeing as it fixed both trouble areas and also uses the exact fix as merlinofchaos suggested in #31 and we have 3 successful reviews, marking as RBTC.
Comment #36
ntigh52 CreditAttribution: ntigh52 commentedPatch at #32 fixed this for me too.
This issue problem seems fixed!
Thanks to all.
Comment #37
ntigh52 CreditAttribution: ntigh52 commented@eule, whats about you?
Comment #38
Screenack CreditAttribution: Screenack commentedPatch at #32 fixed my problem, and re-enabled the display of a view block that I lost with this update. Thanks.
Comment #39
eule CreditAttribution: eule commented@ntigh52 i switch back to 1.1 but i can test it ..wait a half hour
Comment #40
eule CreditAttribution: eule commented+1 in my environment this patch from #32 fix the error...so thanks all for your work
Comment #41
xbrianx CreditAttribution: xbrianx commentedI assume an update will be posted soon.
Comment #42
Summit CreditAttribution: Summit commented#32 working for me also, thanks!
greetings, Martijn
Comment #43
merlinofchaos CreditAttribution: merlinofchaos commentedCommitted and pushed.
Comment #44
mapruter CreditAttribution: mapruter commented#32 worked for me as well!
Comment #45
sanchiz CreditAttribution: sanchiz commentedThanks! #32 working patch, solved the problem
Comment #46
augenbrauezug CreditAttribution: augenbrauezug commented#20 worked best for me
Comment #47
nabilb CreditAttribution: nabilb commentedHi there,
Can you help on 7.14 or 7.15 version.
thanx
Comment #48
ntigh52 CreditAttribution: ntigh52 commented@nabilb,
Its work fine on 7.14 or 7.15 Drupal core version.
the version in this issue is of the Chaos tool suite (ctools) module.
Comment #49
jaykainthola CreditAttribution: jaykainthola commented@BenVercammen Thanks, It work for me.
Comment #50
enricotersi CreditAttribution: enricotersi commented#32 working for me also, thanks!
Comment #51
ccbearyeh CreditAttribution: ccbearyeh commentedMy core is 7.15
I switched the lines from
to
and it's work for me.
Comment #52
omaster CreditAttribution: omaster commented#32 should be commited. It worked for me brilliantly.
Comment #53
kafitz CreditAttribution: kafitz commented#32 worked for me (drupal core version 7.15)
Comment #54
dddave CreditAttribution: dddave commentedFolks this is commited. No need to report that it is working. Use the latest dev.
Comment #55
seoDemon CreditAttribution: seoDemon commented#1: 1739718-fix-block-warning.patch queued for re-testing.
Comment #56
mgiffordWe're using #32 and really see that it should be in the next release.
Comment #57
merlinofchaos CreditAttribution: merlinofchaos commentedWhy are we retesting and marking RTBC already committed patches?
Comment #58
merlinofchaos CreditAttribution: merlinofchaos commentedhttp://drupalcode.org/project/ctools.git/commitdiff/03f10455c9ca38c152b3...
Comment #59
inventa CreditAttribution: inventa commented#1: 1739718-fix-block-warning.patch queued for re-testing.
Comment #60
ar-jan CreditAttribution: ar-jan commentedReally...
Comment #61
dddave CreditAttribution: dddave commented@inventa
Your first action on drupal.org was unnecessarily retriggering the test process for an already committed patch. Congrats. Please learn about how to use and behave in the issue queue by reading: http://drupal.org/node/317
I am closing this one with the hope that people won't leave this thing rest already.
Comment #62
MichaelCole CreditAttribution: MichaelCole commented@inventa, welcome to the Drupal community! Most of us are pretty friendly :-)
Thanks for the patch! Fixed this just in time :-)
Comment #63
ashii CreditAttribution: ashii commented#21 worked fine, Thanks a bunch.
Comment #64
thejtate CreditAttribution: thejtate commented#32 worked great for me.
Comment #65
amjad1233#32 worked for me should goto module update
Comment #66
dddave CreditAttribution: dddave commentedSTOP POSTING THAT THIS WORKS! THIS IS ALREADY IN DEV. SEE #43 and #58
Comment #67
stevesmename CreditAttribution: stevesmename commentedAs dddave repeats, this is broken in 1.2 (current stable release today) but fixed in 1.x-dev -- I think it will be better that a maintainer commit this into a stable release so that more developers (like me) are not heavily searching for an answer.
I understand ctools is a very complicated and highly dependent utility so it may it be tough to maintain a regulated release schedule. I'm curious though, what issues are stopping us from a stable release? I'm guessing a lot of issues are implemented in -dev and need testing. It's been over 2 months since the last stable release.
* edit: didn't mean to change status, don't think it will hurt anything though.
Comment #68
merlinofchaos CreditAttribution: merlinofchaos commentedIt's okay to run a -devif you need to. There will be a release when I have the time and energy to go make one. Please stop putting energy into something already fixed.
Comment #70
curtispenner CreditAttribution: curtispenner commentedOkay, from a completely ignorant non-programmer...
How do I implement the patch in #32? Where or where in my little ol' Mac do I plug that code to make this stupid warning disappear?
Comment #71
dddave CreditAttribution: dddave commentedAs stated multiple times in this issue you can use the latest dev where this code is already committed. If you don't want to do this you can patch manually: http://drupal.org/patch/apply
Comment #72
ntigh52 CreditAttribution: ntigh52 commented@curtispenner, I can understand your feeling...
Lets try do it in words:
Before all, backup the file that you need to change code inside.
inside the ctools folder: there is a file in the destination ctools/plugins/content_types/block/block.inc
inside this file, find the function ( line 135 )
inside this function you have the lines: (lines 145 -146 )
you need to change those two lines to: (Replace them)
inside this function you have the line: (line 155)
you need to change this line to:
If something went wrong return the old file.
good luck.
Comment #74
MikeDzl CreditAttribution: MikeDzl commentedI have applied the #32 poster's patch and am still seeing this issue in Drupal 7.17 - is anyone else seeing this problem still with Drupal Core 7.17 after applying this patch?
NOTE: I took the poster number #51's advise and changed the:
$block = (object) $block;
}
to
}
$block = (object) $block;
It reduced the errors but I am still seeing one:
Notice: Trying to get property of non-object in ctools_block_content_type_render() (line 156 of /var/www/sites/all/modules/ctools/plugins/content_types/block/block.inc).
Final update (issue resolved):
I took poster # 72's advise and it resolved the final error for me:
inside this function you have the line: (line 155)
if ($module == 'block') {
you need to change this line to:
if ($module == 'block' && !empty($info) && isset($info->title)) {
Ideally, these should be rolled up for the latest update to be compatible with 7.17 core. I thought I would put my experience here for other's knowledge and acknowledgement of those that helped resolved the issue above.
Comment #75
Draven_Caine CreditAttribution: Draven_Caine commented#72 fixed it for me
Comment #76
Summit CreditAttribution: Summit commentedHi Would be great if #72 would be set up as a patch to latest .dev. I am on travel so no go for me.
greetings, Martijn
Comment #77
MegaChriz CreditAttribution: MegaChriz commentedAlready in dev:
http://drupalcode.org/project/ctools.git/commitdiff/03f10455c9ca38c152b3...
Maybe changing the version will help to stop people reopening this issue over and over again.
Comment #78
LeviThomason CreditAttribution: LeviThomason commented#72 worked for me on Drupal 7.17
Comment #79
JeniferTucker CreditAttribution: JeniferTucker commented#72 worked for me too on Drupal 7.17
Comment #80
axle_foley00 CreditAttribution: axle_foley00 commented#72 worked for me also on Drupal 7.17
Comment #81
espurnes#72 worked for me also on Drupal 7.17. Thank you.
Comment #82
odyseg CreditAttribution: odyseg commentedusing the patch on #1 saves my day. thank you.
Comment #83
bemery CreditAttribution: bemery commentedI don't want to re-open this issue. I just need to know HOW to apply the patch.
I tried applying it like adding a module through the admin. I also looked up how to add a patch to c-tools but cannot find the information.
C-tools is installed and everything is checked off. How do I give it this information? I do not see a c-tools folder anywhere. Do I do it manually through the ftp?
(Drupal 7.1.5 not in dropdown box to choose.)
Comment #84
MegaChriz CreditAttribution: MegaChriz commented@bemery
How to apply a patch:
http://drupal.org/patch/apply
Contrib modules are usually located in sites/all/modules, so you probably find the ctools folder there.
The patch is already committed to dev
Since the patch posted in this issue has already been committed (see #43 and the commit), you can save your time of trying to apply the patch by downloading the latest 7.x-1.x-dev, where the fix is already included (or you must have a good reason by not using the latest dev).
Comment #85
smileeman2002 CreditAttribution: smileeman2002 commented#72 works for me. Thanks for the explanation in words for us newbies.
Comment #86
aalireza CreditAttribution: aalireza commented#72 works for me too , drupal 7.17
Comment #87
fizk CreditAttribution: fizk commented@merlinofchaos, it's been a while since this was fixed in dev but not in the latest release. I think we're due for a 7.x-1.3 release?
Comment #88
AndreyMukha CreditAttribution: AndreyMukha commentedСпособ из сообщения #72 работает
Comment #89
radj CreditAttribution: radj commented#72 also worked for me!
Comment #90
christoph CreditAttribution: christoph commentedI don't want to add to a fixed item, but for those still looking until the next release, I found that simply going into the block and setting the title to <none> fixed the issue I was having. I had a custom menu as a panel-pane and had these errors and the menu pane wouldn't appear.... but setting the title to something (or <none> in the Drupal blocks admin area seemed to fix it.
Just in case this helps anyone else.
Comment #91
cesabal CreditAttribution: cesabal commentedPerfect, this fixed the problem, thank you so much!
Comment #92
jswazzer CreditAttribution: jswazzer commented#72 FTW! Worked for me. (7.10)
Comment #93
JeniferTucker CreditAttribution: JeniferTucker commentedD7 (7.20) clean install with ctools (7.x-1.2) installed and enabled.
Warning: Attempt to assign property of non-object in ctools_content_render()
I got this message after adding content (selecting a menu) into a landing page created in Panels (7.x-3.3).
#66 - is it fixed?
#72 worked for me too.
Comment #94
fizk CreditAttribution: fizk commentedThis was committed over 6 months ago here:
http://drupalcode.org/project/ctools.git/commitdiff/03f10455c9ca38c152b3...
But there hasn't been a 7.x-1.3 release yet that would include this fix.
You can follow #1932458: Blockers to a 7.x-1.3 release? to see when 7.x-1.3 will be released.
Comment #95
oliverpolden CreditAttribution: oliverpolden commented#72 worked for me
Comment #96
eckersley CreditAttribution: eckersley commented#72 Worked for me. Thanks so much. Hope to see the update soon!
Comment #97
vandam-me CreditAttribution: vandam-me commented#72 worked and for me. Is unusual, on the other site the same thing works without problems.
Comment #98
rwoldezghi CreditAttribution: rwoldezghi commented72 worked for me.
Comment #99
fizk CreditAttribution: fizk commentedGood news! 7.x-1.3 has been released!
This latest release contains the fix for this issue.
PLEASE DO NOT ADD COMMENTS about #72 working for you.
Comment #100
c2webdev CreditAttribution: c2webdev commentedntigh52 #72
http://drupal.org/node/1739718#comment-6613292
work for me!
thanks
Comment #101
c2webdev CreditAttribution: c2webdev commentedI am using 7.1.3 and the CTOOLS issue was there.