Comments

AlexWebDesigner’s picture

Any Developing news ?

sense-design’s picture

Hi all,

I am currently working on the migration to D7. Please let me know if anyone is interested in getting this release. It will take me some more days to finish this but we can keep in contact directly.

Additional info:
I will also include some of the issues mentioned here and apply the patches to D7:

ryan.armstrong’s picture

I would definitely love to see a Drupal7 version. I can hand code workarounds to this module, but having an official module would be great!

sense-design’s picture

StatusFileSize
new9.02 KB

Here is a first D7 release of the module
Please run this module in DEV environment only and backup all data including database before installing module.

Balbo’s picture

Please let me know if anyone is interested in getting this release.

I'm working on a drupal7 small size site.
I can handle different headers images with blocks, but whether the site will grow I'll probably need something like this module ;-)

sense-design’s picture

Please test the d7 alpha version I posted in #4 and give me feedback.

phonk’s picture

Hi,
Thank for your work on the migration of this module to d7.
However, there are a few errors which I will give below:

1. Bugs in file headerimage.module - in variable_get missing quotes.
function headerimage_form_alter(&$form, &$form_state, $form_id (line 441) must be: $condition_types = variable_get('headerimage_condition_types', array('nid' => 'nid'));
- function headerimage_node_update($node) (line 567) must be: if (!empty($node->type) && in_array($node->type, variable_get('headerimage_node_type', array()), true)) {

2. When remove the block I get the error: Warning: Illegal offset type in headerimage_block_confirm_delete () (line 124 of / home / test/ public_html / drupal / sites / all / modules / headerimage / headerimage.admin.inc).

Block can't be removed.

sense-design’s picture

StatusFileSize
new10.84 KB

Thanks for the feedback. The bugs mentioned in 1 are already fixed.
Bug 2 is fixed with the attached new version. Please give me feedback on this.

phonk’s picture

ok, I updated to the new version. Next couple of errors below:

1. On delete confirmation form.
Notice: Undefined index: w headerimage_block_confirm_delete() (line 124 from /home/test/public_html/drupal/sites/all/modules/headerimage/headerimage.admin.inc).
But Header Image block deleted.

2. On node where headerimage is displayed.
Notice: Undefined variable: unpublished w include() (line 16 from /home/test/public_html/drupal/sites/all/modules/headerimage/headerimage-block.tpl.php).
Notice: Undefined variable: unpublished w include() (line 22 from /home/test/public_html/drupal/sites/all/modules/headerimage/headerimage-block.tpl.php).

3. After edit headerimage node.
Notice: Use of undefined constant headerimage_condition_types - assumed 'headerimage_condition_types' w headerimage_node_conditions() (line 628 from /home/fenestra/public_html/drupal/sites/all/modules/headerimage/headerimage.module).

Node has been stored properly.

I have only set Node ID condition (two separated by comma).

4. Usability issue.
When user click on submit button in edit headerimage name form (admin/structure/headerimage/edit/2) form should redirect back to admin/structure/headerimage.

Sorry for my english

sense-design’s picture

StatusFileSize
new10.85 KB

New release according bugs from #9, please test and let me know.

phonk’s picture

Hi,
Thanks for new release.

There is still Notice: Undefined variable: unpublished w include() (linia 16 z /home/test/public_html/drupal/sites/all/modules/headerimage/headerimage-block.tpl.php).
Notice: Undefined variable: unpublished w include() (linia 22 z /home/test/public_html/drupal/sites/all/modules/headerimage/headerimage-block.tpl.php).

It is worth to consider whether to add a function to check headerimage node status. If it not published, should not be displayed. It doesn't work in version d6 and d7, it only adds div with class="node-unpublished". Additionally, as seen above, there is a problem with the undefined variable.

The rest works without problems.

sense-design’s picture

  1. Yes, confirming this. I forgot to edit the theme function for the headerblock adding the unpublished param.
  2. Furthermore the hook_theme changed. Instead of "arguments" it should be "variables".

Update will follow tonight.

sense-design’s picture

StatusFileSize
new10.87 KB

Here is the new version with edited theme function. Please clear the cache after installing / overriding files.

phonk’s picture

Thanks,

1. when add new headerimage node:

Notice: Undefined property: stdClass::$nid w headerimage_node_prepare() (linia 601 z /home/test/public_html/drupal/sites/all/modules/headerimage/headerimage.module).
Notice: Trying to get property of non-object w headerimage_node_prepare() (linia 602 z /home/test/public_html/drupal/sites/all/modules/headerimage/headerimage.module).
Notice: Trying to get property of non-object w headerimage_node_prepare() (linia 603 z /home/test/public_html/drupal/sites/all/modules/headerimage/headerimage.module).
Notice: Trying to get property of non-object w headerimage_node_prepare() (linia 604 z /home/test/public_html/drupal/sites/all/modules/headerimage/headerimage.module).
Notice: Undefined property: stdClass::$headerimage_condition_nid w headerimage_form_alter() (linia 454 z /home/test/public_html/drupal/sites/all/modules/headerimage/headerimage.module).
Notice: Undefined property: stdClass::$headerimage_condition_url w headerimage_form_alter() (linia 464 z /home/test/public_html/drupal/sites/all/modules/headerimage/headerimage.module).
Notice: Undefined property: stdClass::$headerimage_condition_taxonomy w headerimage_form_alter() (linia 495 z /home/test/public_html/drupal/sites/all/modules/headerimage/headerimage.module).
Notice: Undefined property: stdClass::$headerimage_condition_nodetype w headerimage_form_alter() (linia 541 z /home/test/public_html/drupal/sites/all/modules/headerimage/headerimage.module).
Notice: Undefined property: stdClass::$headerimage_condition_php w headerimage_form_alter() (linia 551 z /home/test/public_html/drupal/sites/all/modules/headerimage/headerimage.module).

2. published/unpublished works the other way than as it should. This means when the node is published, the function adds a div with class="unpublished".

Could you do functionality when headerimage node is unpublished, it was not displayed for users other than admins - just like works the classic Drupal node?

sense-design’s picture

StatusFileSize
new10.94 KB

Sorry for that, please try this one with added "node_access" support (Drupal style)

phonk’s picture

node_access support works very well.
Still unpublished class is added to the node which is published.

Is still a few bugs when adding headerimage node:

Notice: Undefined property: stdClass::$nid w headerimage_node_prepare() (linia 605 z /home/test/public_html/drupal/sites/all/modules/headerimage/headerimage.module).
Notice: Trying to get property of non-object w headerimage_node_prepare() (linia 607 z /home/test/public_html/drupal/sites/all/modules/headerimage/headerimage.module).
Notice: Trying to get property of non-object w headerimage_node_prepare() (linia 610 z /home/test/public_html/drupal/sites/all/modules/headerimage/headerimage.module).
Notice: Trying to get property of non-object w headerimage_node_prepare() (linia 613 z /home/test/public_html/drupal/sites/all/modules/headerimage/headerimage.module).

sense-design’s picture

StatusFileSize
new10.87 KB

Now, try this one

phonk’s picture

Works great. So far no problems and errors. Thank you.

sense-design’s picture

Sounds great, thx for the feedback.

1kenthomas’s picture

Priority: Critical » Normal

"Critical" means "critical to the community," such as a bug that stops a module from working. It does NOT mean "critical for ME because I didn't plan in advance and now have to deliver something I don't know how to implement."

gge’s picture

Category: support » bug

Alpha 6 produce the following errors:

Notice: Trying to get property of non-object in headerimage_node_prepare() (line 609 of C:\xampp\htdocs\drupal\sites\all\modules\headerimage\headerimage.module).
Notice: Trying to get property of non-object in headerimage_node_prepare() (line 610 of C:\xampp\htdocs\drupal\sites\all\modules\headerimage\headerimage.module).
Notice: Trying to get property of non-object in headerimage_node_prepare() (line 611 of C:\xampp\htdocs\drupal\sites\all\modules\headerimage\headerimage.module).

I tried different themes and the same error shows up.

gravisrs’s picture

Works in this order:
1. Select node types for header image in settings
2. Create a node for header image.

Doesn't work when:
1. Create node of a type.
2. Select that type for header image in settings.
3. Trying to edit that node and save it results in no header image and above errors.

Issue for maintainer:
headerimage_node_update() should create correct headerimage entry if no such yet.

sense-design’s picture

StatusFileSize
new10.95 KB

Fixed both issues, please try new version attached

gratefulsk’s picture

I have used this version (7.x-1.0-alpha7) on 2 Drupal 7 sites with no problems or errors. Thanks

sutharsan’s picture

Title: Urgent requirement for D7 support » Port to Drupal7
Category: bug » task
Status: Needs work » Needs review

Changing title to make is less alarming. Changing status too.

Frederic wbase’s picture

And will this version be commited to an official release?

sense-design’s picture

Yes, it will be when I have some time to commit everything.

loominade’s picture

First Bug:

The specified file headerimage-7.x-1.0-alpha7.zip could not be uploaded. Only files with the following extensions are allowed: tar tgz gz bz2.

^^

loominade’s picture

I have some real bugs (and fixes) for both the D7 and D6 version. Why isn't there an official 7.x-1.x-dev version to post issues?

lumberjackmac’s picture

I have been working with this and other modules all morning trying to put a headline banner on my site. I would prefer if the banner would rotate but for now I'm just looking to put an image in the header grid zone. Could you direct me toward a tutorial that is easy to follow. I'm not a developer, I'm just learning.

I can't seem to assign a header image node to the block and I'm receiving this error:

Notice: Undefined variable: block_nids in headerimage_select_node() (line 288 of /home/abeauty/public_html/sites/all/modules/headerimage/headerimage.module).

sense-design’s picture

  1. Create new content type "headerimage"
  2. Add Image field to new content type and define appearance of node and fields (hide label)
  3. Go to "admin/structure/headerimage/settings" and select the new content type under node type
  4. Define which condition types you want to use
  5. Go to "admin/structure/headerimage" and create a block, configure block and select region to display
  6. Add new content headerimage and upload image and define block and display conditions

That should be all

sense-design’s picture

Version: 6.x-1.x-dev » 7.x-1.x-dev

Moving to correct branch

lumberjackmac’s picture

Component: Code » User interface
StatusFileSize
new214.67 KB

I really appreciate you walking me through this but I'm having the same problem where it says: "No Header Image nodes assigned to this block."

I'm pretty certain I followed every step exactly as you have it laid out.

Header Image Block

sense-design’s picture

When you create content you have to define to which headerblock the content will be assigned

lumberjackmac’s picture

Thank you VERY much for your help. I hope I can one day contribute as well. I have a great revolving banner at the top of my pages now but there are still a couple of issues. "Image Node:" appears at the top left corner of my banners and for some reason the banners don't show up when I'm logged out and viewing the site as anonymous. I'm going to peak around in permissions for the answer to the second problem but I don't know where to begin with the "Image Node:" text outside the top left of the banner.

sense-design’s picture

There is an extra permission called "view header image"

lumberjackmac’s picture

StatusFileSize
new280.13 KB

I was able to figure out how to get the header image to appear but there is still the title above the image. I can't seem to get rid of it because it is mandatory to name it when building the header image. Can I change that somehow?

Header Title

sense-design’s picture

go to your content type, section "manage fields" and disable the label of the field
UPDATE: sorry, ment "manage display"

loominade’s picture

no, its 'manage display'

sense-design’s picture

Assigned: Unassigned » sense-design
Status: Needs review » Fixed
sense-design’s picture

Status: Fixed » Closed (fixed)