Closed (cannot reproduce)
Project:
Drupal core
Version:
8.9.x-dev
Component:
node system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
2 Feb 2011 at 10:08 UTC
Updated:
8 Jul 2021 at 09:29 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
dejavu_007 commentedTry this. I hope it works.
Comment #2
klaus66 commentedI think this don't work because always wenn page is false he get the title. And there is the problem. When the full preview is themed then the page variable is false and that is not ok.
I have fix it with
<?php if (!$page && empty($node->in_preview)): ?>But I think there is a release of drupal 7 and I think it is funny that so a basic function don't work.
I cannot understand that nobody should have seen that there is no title in the full preview.
Comment #3
droplet commentedabsolutely a bug.
Comment #4
dejavu_007 commentedI think there is another issue too. When a page is previewed in node add/edit it should be functioning like this..
If the page content (text content added) in full view is not equal to trimmed view, then it should show preview of both views. And if both full view content and trimmed view content are equal, it should show only a single preview.
I think the code which implement this is in nod.page.inc.
The issue in d7 is that, even if page content for full view and trimmed view are same it shows both previews. I suppose the If statement is always true. Somebody please take a look at this.
Comment #5
klaus66 commentedIn my case I do it with my own theme_function. I only want to see the full preview.
And here you see the node comes from the function node_view and when you have a standart template like 'Bartik' the title is rendered in page.tpl.php and not in node.tpl.php
And therefore I think we must change the node.tpl.php to show us the title when node is in preview like so:
Or we set the title in the theme_node_preview function
Comment #6
dejavu_007 commentedThanks klaus66.
But this issue is with drupal core. I suppose the second issue should be reported as another bug in drupal core.
Comment #7
dejavu_007 commentedThe second issue has been reported here.
http://drupal.org/node/1049584
Comment #8
klaus66 commentedYou are right.
In normal case this statement is always true because $full and $teaser are normal strings and when you have a teaser the title is always an anchor tag and the title of the $full is no anchor tag.
Comment #9
droplet commentedComment #10
klaus66 commented#9: 1048494.patch queued for re-testing.
Comment #11
klaus66 commentedOK.
We have al solution that works for our special case.
But the workflow of creating nodes (that includes the preview) is a basic feature of drupal and the core team must eliminate this bug.
Comment #12
droplet commented@klaus66,
Yes, it is a bug and #9 getting it fix, anything else ?
Comment #13
klaus66 commentedBut with this patch you have a title in the full preview but it is the title from the node template with the anchor and the h2 tag.
I think that is not that what we want to see in the full preview.
I think we must add the title in the theme_node_preview function.
Comment #14
droplet commentedSo what we want to see in "full preview"?? like #5 ? we can't do hard coding there.
anchor is a problem when it is on overlay.
Comment #15
klaus66 commentedOK
I think the best compromise is to let the patch and then we can look in the template file whether the node is in preview and set the h1 or h2 tag against the view mode.
Comment #16
droplet commentedComment #17
kscheirer#9: 1048494.patch queued for re-testing.
Comment #27
pameeela commentedAll of the code mentioned here is no longer relevant, and I can't understand the issue to be able to reproduce it. If anyone know what this is about and thinks it's still valid in D9 please re-open with steps to reproduce.