Community Forums › Forums › Archived Forums › General Discussion › Upgraded to Genesis 2.0.0 but Post Info text now displays incorrectly
- This topic has 19 replies, 7 voices, and was last updated 11 years, 7 months ago by
Poursuivant.
-
AuthorPosts
-
August 7, 2013 at 2:45 pm #54700
neville
MemberJust got hold of Genesis 2.0.0! Running on my test WordPress site, kick the tyres, get to know it and what's new, planning to upgrade my primary blog at the weekend.
Test site: http://www.nevillehobson.com/sandbox2/
The upgrade went fine as expected. But one thing now doesn't work as it did before.
It's an odd thing. The test site with Genesis runs the eleven40 child theme, version 1.1 - I've not yet upgraded the child theme to the new eleven40 Pro 2.0. All I did was upgrade Genesis itself.
In each post, I have the post info details: date of post and author. Instead of displaying that info correctly as it did before, it now displays the actual code, as in:
published may 24, 2013 by neville hobson leave a comment
Edit: can't get this to show as code in this forum post. So here's a screenshot of what it looks like on the blog -
The Post info text in Simple Edits is this:
Published [post_date] by [post_author_link] [post_comments] [post_edit]
It's been that since I first installed Genesis and eleven40 - nothing has changed except today's Genesis upgrade.
Have the short codes changed? I can't see anything on the support website. Or will this work correctly if I update the theme to eleven40 Pro?
Thanks for your help!
Twitter: @jangles
August 7, 2013 at 7:11 pm #54775Marcy
ParticipantYes, the genesis_post_info hook has changed just a bit. Since you're running eleven40 though, I would just update to 2.0 whenever you can. That should fix it.
Marcy | Amethyst Website Design | Twitter
August 7, 2013 at 7:28 pm #54783KenTheriot
MemberThat didn't happen to me. I have Eleven40 as well and have not started using Eleven40-Pro (tried but didn't like). Have others had the same post-info issue?
Ken
August 7, 2013 at 10:16 pm #54819Bill Murray
Member@Marcy - I don't think that's exactly accurate. genesis_post_info is a filter, not a hook. See the first code sample. Further, Genesis 2.0 is 100% backwards compatible (excluding bugs and unintended consequences) with themes released before Genesis 2.0 was released - provided that HTML5 is not enabled. Since the OP said all he did was upgrade Genesis but not his child theme, there's likely something else going on.
@neville - I'll take a guess and say you are using Google authorship? Have you checked your Genesis settings to make sure your user profile is still selected in Genesis SEO settingss? Is your Google+ profile entered? After a quick look at the code, I think the cause is nothing you did but rather is due to adding esc_html() on line 170 of genesis/lib/shortcodes/post.php. I'll ask around and let you know what I find out.
Web: https://wpperform.com or Twitter: @wpperform
We do managed WordPress hosting.
August 7, 2013 at 10:32 pm #54821Bill Murray
MemberThat esc_html() is on line 171, not 170. I need new glasses desperately.
Web: https://wpperform.com or Twitter: @wpperform
We do managed WordPress hosting.
August 8, 2013 at 1:12 am #54828Gary Jones
Membergenesis_post_info is a filter, not a hook
Filters are hooks, as are actions.
That esc_html() does look incorrect. It's also not something that was in 1.9, so I agree that in this case, we've changed the default behaviour.
I'll get Nathan to take a look, but since I'm 99% certain that we'll remove that esc_html() in core, you've got two options.
1) Remove the
esc_html(
and)
(leave the$author
bit) in your copy of Genesis as well - usually that's a big no-no, but in this case, the next version of Genesis will have the same fix applied anyway.2) Try adding the code from https://gist.github.com/GaryJones/6182252 to your child theme functions.php as a temporary workaround.
WordPress Engineer, and key contributor the Genesis Framework | @GaryJ
August 8, 2013 at 3:18 am #54838neville
MemberThanks, everyone, I appreciate your time and suggestions.
@Marcy - I do intend to upgrade eleven40 to eleven40 Pro. But, I hesitate because I want to keep the orange header title background in eleven40 that looks as though is no longer there in eleven40 Pro, according to the demo site. Any idea of how I keep it, ie, what code I need to edit/add?
@Bill Murray - thanks, yes, I do use Google authorship. One thing I checked after upgrading Genesis to 2.0.0 was the link in the SEO settings. It had become unset, so to speak, in the upgrade so I enabled it again and saved the settings.@GaryJ - thanks. I tried the second option first (it's within my current skill set :). I copied and pasted the code (from line 5 onwards) into eleven40's functions.php file. It threw this error:
Warning: Missing argument 2 for gmj_fix_post_info_linked_author() in /[snip]/sandbox2/wp-content/themes/eleven40/functions.php on line 89
Line 89 in the functions.php file corresponded to this:
function gmj_fix_post_info_linked_author( $output, $atts ) {
(I've removed the code now.)
I'll give your first rec a shot, will advise what happens...
Thanks everyone, much appreciated.
Twitter: @jangles
August 8, 2013 at 5:07 am #54846neville
MemberFYI, I've installed eleven40 Pro - and the Post Info error that happens with eleven40 is gone.
That's all I've done - no tweaks, edits, nothing: Genesis 2.0.0. installed out of the box, ditto eleven40 Pro.
Twitter: @jangles
August 8, 2013 at 7:37 am #54869Gary Jones
MemberFWIW, I've updated my code snippet, to fix the error you specified, so should you ever give the non-Pro theme another go (or use linked authors), you've got a workaround.
WordPress Engineer, and key contributor the Genesis Framework | @GaryJ
August 8, 2013 at 8:01 am #54884August 8, 2013 at 8:02 am #54886Bill Murray
Member@neville - That works differently, and essentially confirms the issue that I raised with @Garyj. The old eleven40 is not HTML5 whereas the new one does support HTML5.
The code for the shortcode you are using distinguishes between situations where HTML5 is active (your new, current situation) and when it isn't (your old situation). That's why the end result is different because you upgraded the theme. The code contains a critical logic difference. For HTML5, the esc_html() function is applied to the $author variable separately, as it is being assembled into a string to be displayed. For your old situation, the esc_html() function was effectively applied after the string was assembled as complete HTML, and that's why it broke. As @Garyj indicated, this fix will be in the next update to Genesis, so users of the original Eleven 40 theme that don't plan to upgrade should note this fix. It's good the theme upgrade went smoothly for you, but if you had a lot of theme customizations, more would have been involved.
@Garyj - Thanks for following up. On the "filters are hooks" issue, you're right. Having read a post elsewhere on the forum on remove_action not working, I had "actions" on my brain rather than what @Marcy actually said about "hooks."
@Marcy - Sorry for my mixup on filters vs actions. I took your comment as "this hook is different in Genesis 2.0", when in fact the hook name and how it is called it is not different but is different in what it does, and that's probably what you were summarizing by "changed just a bit." I tend to be wordy, so sometimes I miss the simple explanations 🙂
Web: https://wpperform.com or Twitter: @wpperform
We do managed WordPress hosting.
August 8, 2013 at 8:10 am #54889neville
MemberAugust 8, 2013 at 10:28 am #54968Poursuivant
MemberHi,
I'm having the exact same problem as @neville, except I'm using the Prose theme for my site http://www.reneetaylorcpa.com. Upon updating to Genesis 2.0, my post info looks just like Neville's screenshot above -- except for my info versus his, of course. (I don't know how to make a screenshot.)
I've verified G+ in my User Profile, and selected myself as the Homepage Author in the Genesis SEO settings. I'm afraid I don't know how to find out if esc_html() is occurring in my code.
My question: Should I just copy and paste the code from https://gist.github.com/GaryJones/6182252 into the Prose theme's Custom Functions?
Many thanks for your help!
August 8, 2013 at 10:51 am #54989Gary Jones
MemberYes - from line 5 onwards of my code snippet.
WordPress Engineer, and key contributor the Genesis Framework | @GaryJ
August 8, 2013 at 11:43 am #55012Poursuivant
MemberStill seems not to work, so I've just removed the Post Info for now. I'll try again later.
Any idea when a non-temporary fix might be applied?
Thanks again!
August 8, 2013 at 2:26 pm #55072Gary Jones
MemberWell, you could just follow my point 1) above - it's removing less than a dozen characters.
WordPress Engineer, and key contributor the Genesis Framework | @GaryJ
August 8, 2013 at 4:51 pm #55120Mealtog
Memberooops, wrong thread.
August 9, 2013 at 11:37 am #55276neville
Member@Poursuivant - Renee, I noticed today an alert on my blog that a new version 2,0 of Genesis Simple Hooks is out. The major change says this:
Updated to use new entry hooks in Genesis 2.0.
Maybe installing that might help?
http://www.studiopress.com/plugins/simple-hooks
Twitter: @jangles
August 9, 2013 at 2:34 pm #55319Poursuivant
MemberThanks so much Neville! That worked great.
(I was using the Genesis Simple Edits plugin and didn't know about the Simple Hooks. I appreciate the tip.)
August 9, 2013 at 2:53 pm #55322Poursuivant
MemberOh rats. Now the author info shows up on pages too, which I don't want. http://www.reneetaylorcpa.com/hire-me/
If anyone knows the code that I should add to Simple Hooks genesis_before_post_content so that author info is displayed on posts only, I'd appreciate it.
Meanwhile I'll keep looking.....
-
AuthorPosts
- The forum ‘General Discussion’ is closed to new topics and replies.