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.

CommentFileSizeAuthor
#11 submitted_by-1415042-quickfix-.patch846 bytesgoodale

Comments

modstore’s picture

Is there a solution to this? happening for me as well on omega theme.

Thanks.

voidberg’s picture

Until there's a fix for this go to your content type, in Display fields, and hide the "Submitted by" field that appears there.

spidersilk’s picture

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

cedewey’s picture

This is happening for me as well (using a sub-theme of Bartik if that helps).

crosshairs’s picture

First, 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:

<?php if ($display_submitted): ?>
        <p class="submitted"><?php print $submitted; ?></p>
      <?php endif; ?>

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! :)

cnh’s picture

I had the same problem BUT after I clear the cache everything work fine.

brankoc’s picture

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

Jasonrj’s picture

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

nancydru’s picture

Are you sure your theme is not messing with the positioning?

Jasonrj’s picture

I'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.

goodale’s picture

StatusFileSize
new846 bytes

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

rajat42059’s picture

For this you can goto structure->content type->articles-manage display
there u can see submitted by make it HIDDEN

sdsheridan’s picture

#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

SilviaT’s picture

#11 worked for me too.
Thanks for the patch

nancydru’s picture

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

nancydru’s picture

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

nancydru’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

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