Project:Header image
Version:6.x-1.x-dev
Component:Code
Category:task
Priority:normal
Assigned:Unassigned
Status:needs review

Issue Summary

Any work done on this module for the support of D7. I have urgent requirement. Please suggest alternatives.

Comments

#1

Any Developing news ?

#2

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:

#3

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!

#4

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.

AttachmentSize
headerimage-7.x-.1.0-alpha.tar.gz 9.02 KB

#5

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 ;-)

#6

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

#7

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.

#8

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.

AttachmentSize
headerimage-7.x-.1.0-alpha2.zip 10.84 KB

#9

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

#10

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

AttachmentSize
headerimage-7.x-1.0-alpha3.zip 10.85 KB

#11

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.

#12

  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.

#13

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

AttachmentSize
headerimage-7.x-1.0-alpha4.zip 10.87 KB

#14

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?

#15

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

AttachmentSize
headerimage-7.x-1.0-alpha5.zip 10.94 KB

#16

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).

#17

Now, try this one

AttachmentSize
headerimage-7.x-1.0-alpha6.zip 10.87 KB

#18

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

#19

Sounds great, thx for the feedback.

#20

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."

#21

Category:support request» bug report

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.

#22

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.

#23

Fixed both issues, please try new version attached

AttachmentSize
headerimage-7.x-1.0-alpha7.zip 10.95 KB

#24

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

#25

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

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

#26

And will this version be commited to an official release?

#27

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

#28

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.

^^

#29

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?