The issue I'm facing is that after editing the block-enabled node and saving it, the respective block title remains unchanged (still has the title of the initial version of the node). If you view the node directly, you can see that the title has been updated and this change is also reflected in the block administration label (in /admin/structure/block). The body of the node is also updated after node save and that change is reflected in the respective block - it's the bloody title thing that doesn't get updated and it honestly drives me mad!

Am I doing something wrong?

In the block settings I leave the "Block title" field blank. If I enter <none>, the block title is hidden. But in #1068594-10: Hide the block title? @Johnny vd Laar said:

You can now change the block title from the node config, there you can leave it empty.

Comments

legolasbo’s picture

I am not able to reproduce this behaviour with the latest dev version. Can you do a step by step description of how you encounter the problem?

Johnny vd Laar’s picture

Status: Active » Fixed

I've committed a fix here:
http://drupalcode.org/project/nodeblock.git/blobdiff/6c286f2a403afa82652...

can you please verify if this solves the problem?

klonos’s picture

Status: Fixed » Active

@Johnny vd Laar: are you sure you pointed to the right change? I'm asking because I'm using the latest dev of the module and it seems to already include the changes you point to.

Unfortunately, no the issue is not fixed still. I'll try to find some time to provide steps to reproduce soon as I'm back from a short weekend holiday.

Johnny vd Laar’s picture

Status: Active » Postponed (maintainer needs more info)

Did you select "Provide a block title" because then it doesn't update the block title.

Johnny vd Laar’s picture

I have added a small fix that is related to this. This fixes a problem with node imports:
http://drupalcode.org/project/nodeblock.git/commitdiff/87639bf?hp=a8395d...

But probably this doesn't influence your situation.

klonos’s picture

...alright! I believe we're getting somewhere since I managed to narrow this down to steps to reproduce and steps to not reproduce the bug. Please refrain from replying until I'm ready at which point I'll set the issue's status back to active after making numerous posts.

Thanx in advance and here's a first post with the simplest form of the STR the bug:

klonos’s picture

Ok, here are the STR this issue:

1. Fresh installation of latest D7 core 7.24-dev + Nodeblock latest 7.x-1.x-dev
2. Create a new content type (Structure -> Content types -> Add content type) - lets call it "Featured content".
3. In its Node Block settings tab, set the Available as block setting to enabled - leave all defaults. (unrelated but do note that the Default comments display is set to Hide)
4. Hit Save content type...
5. Hit the Add content link in the shortcuts toolbar (/node/add).
6. Choose to add a node of the newly created "Featured content" type (or whatever you called your content type in step 2 above).
7. Give it a title - lets say "Test featured node".
8. Add some body text - say "bla bla bla...".
9. (optional but useful) Make sure the Promoted to front page setting in the Publishing options tab is checked.
10. Save the node and visit the site's home page. You should be able to see the node with "Test featured node" as its title.
11. Go to your sites block configuration page (Structure -> Blocks).
12. You should see a new block called "Test featured node". Set its region to Sidebar first.
13. Save your blocks configuration and visit your home page. You should now have both the node in the main region as well as its corresponding block on the right sidebar. Both the node as well as the block have "Test featured node" as their title.
14. Edit the node and change its title to say "Changed title" and its body to say "Changed body text".
15. Save the node.

Bug: See how the body text is updated to "Changed body text" for both the block and the actual node as well, but while the node title was updated to "Changed title", the block title is still "Test featured node".

You can edit and change the node title as many times as you like (by repeating steps 14 and 15), and you'll still get updated node title but no update for the block title.

klonos’s picture

...taking a short break for now and will come back with a similar set of steps that won't cause the bug as well as a workaround that solves the bug (still a very nasty and not-to-be-applied-to-production-environments workaround and this issue needs to be addressed)

Will be back in a few hours. In the meantime you can follow the steps from #7 above to see that I'm not crazy after all. Thanx ;)

[edit]: have to run for family/health matters so bear with me for the rest of the scenarios. Hopefully I'll get to it within the day...

Johnny vd Laar’s picture

Ok I think this will be sufficient for me to find the bug :-)

thanks for the effort.

klonos’s picture

Ok, Thanx for looking into it.

Just to clarify that the bug does not occur when enabling nodeblock for content types that were existing before. It only occurs when you enable the nodeblock feature for a node type at the same time as you are creating it. So, if you:

- first create a node type and save it without enabling the nodeblock feature
- or use the ones that come out of the box with Drupal core

...and then edit the type (again) in order to enable the feature, you won't see the bug happening.

note-to-self/related-but-off-topic: One thing that one might consider a bug (due to or in combination with this one here) is that if you have already created content of a certain type and you then want to make them available as blocks, it simply won't work by enabling the nodeblock feature for their content type (you won't see corresponding blocks for these nodes available in the block admin page). So, you have to then re-edit each one of these nodes and explicitly request to have them available as blocks (simply edit -> save the node will do, as the setting is there by default). I'm not entirely sure about this one - I will have to re-test once this bug here is fixed and if it is a bug indeed, I will open a separate issue for it.

klonos’s picture

Status: Postponed (maintainer needs more info) » Active

@Johnny vd Laar: I'm still being tormented by this bug and it causes me to do additional tedious work. Could you please take a look at it? Thanx in advance.

Johnny vd Laar’s picture

I've reproduced your error and found the bug. I've solved it here:
http://drupalcode.org/project/nodeblock.git/commit/7cad3e0

The other situation that you mention is not something that I consider to be a bug so that would be a feature request. But I don't think that I will add that shortly.

Johnny vd Laar’s picture

Status: Active » Fixed
klonos’s picture

Thank you! Thank you!! Thank you!!!

I confirm that this is fixed now in latest dev.

Related: #2082997: The "Provide a block title" option (when allowed to override the block title) is inconsistent - It should be on by default.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.