Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Add Existing Content" block doesn't respect the "Show author and date information" checkbox. #2536

Closed
herbdool opened this issue Feb 13, 2017 · 11 comments

Comments

@herbdool
Copy link

herbdool commented Feb 13, 2017

Toggling the "Show author and date information" option does nothing from what I can see.

In Backdrop 1.6.0


PR: backdrop/backdrop#2047
PR by @herbdool backdrop/backdrop#2684

@Al-Rozhkov
Copy link
Member

I can confirm this bug. When I watch variables in hook_preprocess_node, display_submitted is not overwritten and block flag is set to false.

@Al-Rozhkov Al-Rozhkov self-assigned this May 2, 2017
@olafgrabienski
Copy link

I confirm the bug as well, it's still active in Backdrop 1.8.0.

As Rabbit Hole is being ported to fix Add a system of page-less nodes in contrib, there are new use cases for "Add existing content" blocks, and this bug will concern more sites in the future. @Al-Rozhkov are you still/again up to have look at the issue?

@Al-Rozhkov
Copy link
Member

Unfortunately I don't have time to work on this. Anybody can pick this up.

@serundeputy
Copy link
Member

Added PR to check for NodeBlock in node_view() and then check display_submitted from the block form.

Website: http://2047.backdrop.backdrop.qa.backdropcms.org
Username: admin
Password: Lci5EopL

@herbdool
Copy link
Author

@serundeputy works!

@serundeputy
Copy link
Member

Updated PR fixing test failures.

@quicksketch
Copy link
Member

quicksketch commented Dec 21, 2017

The PR looks like it would work but it's mixing the data model (the $node object) with the display information (by setting $node->display_submitted). It shouldn't matter where the node is being rendered, the $node object should always just contain the node data. Instead we should be passing a variable to theme('node'), or in our case because this is a renderable, as $content['#display_submitted'] = TRUE;

We're already doing this, but it looks like this value might be getting wiped out in template_preprocess_node(). Could you take another look at this @serundeputy?

Code review comments: backdrop/backdrop#2047 (review)

@quicksketch quicksketch modified the milestones: 1.8.1, 1.8.2 Jan 2, 2018
@quicksketch quicksketch modified the milestones: 1.8.2, 1.9.1 Jan 16, 2018
@quicksketch quicksketch modified the milestones: 1.9.1, 1.9.2 Feb 12, 2018
@quicksketch quicksketch modified the milestones: 1.9.2, 1.9.3 Feb 21, 2018
@quicksketch quicksketch modified the milestones: 1.9.3, 1.9.4 Mar 28, 2018
@klonos klonos modified the milestones: 1.12.3, 1.12.4 Feb 20, 2019
@jenlampton jenlampton modified the milestones: 1.12.4, 1.12.5 Mar 13, 2019
@klonos klonos modified the milestones: 1.12.5, 1.12.6 Mar 20, 2019
@jenlampton jenlampton modified the milestones: 1.12.6, 1.12.7 Apr 17, 2019
@jenlampton jenlampton modified the milestones: 1.12.7, 1.13.1 May 15, 2019
@herbdool
Copy link
Author

The issue was that it was assuming the node was using a view_mode == "block" when actually the user can set it to anything. I've come up with a small PR backdrop/backdrop#2684. Maybe @olafgrabienski you feel like testing? Thanks!

@olafgrabienski
Copy link

@herbdool Thanks for the new PR! It's working in the sandbox site, test page: http://2684.backdrop.backdrop.qa.backdropcms.org/about.

@herbdool
Copy link
Author

PR approved by @serundeputy

@quicksketch
Copy link
Member

Looks great! Nice and simple. Merged backdrop/backdrop#2684 into 1.x and 1.13.x.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants