Closed (fixed)
Project:
Image javascript crop
Version:
7.x-1.x-dev
Component:
User interface
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
28 Dec 2011 at 11:51 UTC
Updated:
11 Sep 2013 at 22:01 UTC
When I use both the "Basic Popup Window" or "iframe" the theme's layout is rendered, i.e. the cropping settings are rendered essentially the same way as a normale page... is this by design?
I would've expecte to only get the settings in the popup/iframe, without sidebars etc.
Comments
Comment #1
bforchhammer commentedHm, I think I've figured out why... I'm using the Context module to manage the placement of all blocks in my theme. Because of that I disabled all of them on the default block page, including "main content"... As a result
imagecrop_page()couldn't detect the "main region" properly, and as a fallback the whole layout was used (or so it seems).So in case anyone else ever gets this problem: go to
admin/structure/blocksand make sure the "Main Content" block is assigned to the main region on your theme. ;-)Comment #2
gagarine commentedSometimes you don't want the main region in block. Perhaps we can make this module play nice with context.
Comment #3
gagarine commentedUpdate title.
The module should a least provide a error message instead of displaying all region if it can't find the main block
Comment #4
bforchhammer commentedI actually ended up using the following piece of code in a custom module:
Comment #5
jcfiala commentedFor that matter, here at Examiner.com we're using mongo_block instead of the block module, and as such just _querying_ for the block table crashes this module, as it doesn't exist. It'd be nice if this module checked to see if the block module was enabled.
Comment #6
phpconnect commentedI have use "$output .= render($variables['page']['content']);" in drupal 7 thanks for help
Comment #7
nils.destoop commentedImagecrop now checks if block module is enabled, otherwise it will use the content region.
If the block is not found, a message is shown. If it is another case, #4 is recommended.
Comment #9
paskainos commentedThis doesn't seem to solve the problem when using Context with the Boxes or Dashboard modules, for instance, which require Block enabled. Further, anyone using Context should be familiar / aware of how & where to invoke the 'Main page content' block. For instance, here's a use case I thought would work, but didn't:
Using Context, Boxes, Dashboard, and Block (as required by Boxes & Dashboard) with all
admin/structure/blockblocks including 'Main page content' block disabled, I created a 'global' context for sitewide front facing (i.e. non-admin) blocks. I included the path~imagecrop/*so as not to include the various and sundry sitewide blocks in the imagecrop modal window. Then I created an 'imagecrop' context, added Conditions » Path »imagecrop/*, and Reactions » Blocks » 'Main page content' block in Main Content region.Using this recipe, no matter what Popup window type I use, I still receive the 'main content block was not found' error message. For what it's worth, I'm using the settiing: Theme beïng used » Admin theme (Rubik).
Comment #10
kclarkson commented@paskainos,
I just figured this out. I have a sitewide context for my sidebar and my main block content.
Add the URL context then add ~imagecrop/overview/*
then make sure to select REQUIRED ALL CONDITIONS check box on the context.
So in the end you should have
-required all conditions checked
-path (~imagecrop/overview/*)
-sitewide
Comment #11
jhodgdonNone of these solutions will work except the suggestion in #4 for the case where you have the main content region disabled for other reasons, and you are using the Context module instead to handle when the content region is or is not enabled.
Thanks bforchhammer for providing that!!!