Another problem I've just encountered: the submitted by line, as customized by this module, appears twice: Once where it's supposed to, where the node originally had its submission information, and then a second time as unstyled text directly within the body of the node. The second instance is not wrapped in any kind of HTML tags, so I can't style it or hide it.
If I uncheck "Display author and date information" in the content type settings, then it only displays once - the unstyled version, unfortunately. There doesn't seem to be a way to make it only display the properly positioned and styled version.
The theme I'm using is Sky, if that makes a difference. It's a subtheme of AdaptiveTheme.
Comments
Comment #1
modstore commentedIs there a solution to this? happening for me as well on omega theme.
Thanks.
Comment #2
voidberg commentedUntil there's a fix for this go to your content type, in Display fields, and hide the "Submitted by" field that appears there.
Comment #3
spidersilk commentedDid that - didn't seem to make any difference. I still get only the unstylable version of the line, which is not great because the lack of CSS selectors means I can't control its appearance at all. It's always going to be set to exactly the text format of the body of the node, because it has no unique HTML tags around it of any sort.
Comment #4
cedeweyThis is happening for me as well (using a sub-theme of Bartik if that helps).
Comment #5
crosshairs commentedFirst, thanks so much for this useful module, this is always something that takes longer than it should to customise on a site!
I have the same problem, (line appears twice, if "Display author and date information" is unchecked, only the unstylable line remains).
Theme is AT Codex, a subtheme of Adaptivetheme.
The node.tpl.php file does contain the following lines:
EDIT:
I found a very simple work-around to add a class to enable styling of the 'Submitted by' line.
In the Display settings of your content type, in the 'Byline text' field, you can simply add in HTML span tags. So mine looks like this:
<span class=submitted>[node:created:short]</span>Then you can style in your css file as normal! :)
Comment #6
cnh commentedI had the same problem BUT after I clear the cache everything work fine.
Comment #7
brankoc commentedI can confirm that the problem disappeared after I cleared the cache. I can also confirm this was because of clearing the cache, that is to say: I viewed the page, cleared the cache, and reloaded the page, after which the extra, themed byline was gone.
Comment #8
Jasonrj commentedClearing the cache does work, but the one that remains is the unstyled line. That is ok I suppose (I can style it however I want by adding the code in the box).
However, there is still a problem. The new customized by line is also moved down into the body of the node rather than where you specify from the Mange Display tab of that content type's settings.
Comment #9
nancydruAre you sure your theme is not messing with the positioning?
Comment #10
Jasonrj commentedI'm using Adaptive Corolla theme. Unless I'm missing something, this module, when enabled, simply puts the by line into the first line of the node's body, it's even moved down into the same DIV and taken out of it's own normal style tags and everything.
Whereas Drupal 7's normal functionality usually lets you control the display and order of those both separately.
Comment #11
goodale commentedAs far as I could see the code is adding an extra element to the render array, and then setting a flag to not show the 'submitted by' in the node.tpl.php file.
I've created a patch which removes the extra element from the render array (after using it to change the byline) and doesn't set the flag. It works for me, but is very quick and dirty - if I knew more about the internals of drupal I'd hope to not add the element to the array in the first place.
Comment #12
rajat42059 commentedFor this you can goto structure->content type->articles-manage display
there u can see submitted by make it HIDDEN
Comment #13
sdsheridan#11 worked for me. I think this is the best way to fix this, although the entire second if statement can be removed, and avoid the condition check.
shawn
Comment #14
SilviaT commented#11 worked for me too.
Thanks for the patch
Comment #15
nancydru#11 did not work for me. Nor does #12.
I definitely see what's going on, but have yet to figure out to stop both the node and the theme from showing the same thing.
Comment #16
nancydruThe official answer now is: If your theme does not display the $submitted variable, then turn this field on ("visible") in the manage display page. If you want to use the manage display to affect the placement of this field, then turn off the theme display (node--type.tpl.php).
Comment #17
nancydru