Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Old Version fixes and change logs (http://forum.bytesforall.com/forumdisplay.php?f=37)
-   -   BUGFIX 351/352-03: Comment Form Anchor Link gets a 404 (Not found) (http://forum.bytesforall.com/showthread.php?t=7587)

juggledad Jun 15, 2010 05:00 AM

BUGFIX 351/352-03: Comment Form Anchor Link gets a 404 (Not found)
If you use this fix, think about donating to me, I've spent several hours figuring this issue out and coming up with the fix. Sending me a donation will encourage me to continue to support Atahualpa. You can use the 'Donate to Juggledad' button on the donate page

This fix is for Atahualpa version 3.5.1 and 3.5.2
DESCRIPTION: The directions at ATO->Edit POST/PAGE INFO ITEMS indicate

NOTE: On single post pages the %comments('...')% link won't display anything because the comments are on the same page. If you still want to link to the comments, the comment section and the comment form start with named anchors, so you use something like this:
<a href="#comments">Skip to comments</a> or <a href="#commentform">Skip to comments form</a>
however this causes an error at run time where the link has lost the '#' causing a 404 to occur.

CAUSE: This issue occurs because the '#' is used as the php DATE escape character in the Atahualpa options. Because the php DATE() function has so many options and each needs to be escaped, when the footer (or kicker or title) is being displayed, all occurrences of '#' are changed to '\' leading to this problem.

FIX: change the last line of bfa_postinfo.php from
HTML Code:

HTML Code:

function getH() {
        global $bfa_ata, $post;

next change your post footer from
HTML Code:

<a href="#commentform">Skip to comments form</a>
HTML Code:

<?php echo '<a href="'.getH().'commentform">Skip to comments form</a>'; ?>
and the link should now work correctly

Optionally, if you would like the documentation at ATO->Edit POST/PAGE INFO ITEMS to reflect this change, edit bfa_ata_admin.php and change line 269 from
HTML Code:

                        <code>&lt;a href="#comments"&gt;Skip to comments&lt;/a&gt;</code> or <code>&lt;a href="#commentform"&gt;Skip to comments form&lt;/a&gt;</code>
HTML Code:

                        <code>&lt;?php echo '&lt;a href="'.getH().'comments"&gt;Skip to comments&lt;/a&gt;'; ?&gt;</code> or <code>&lt;?php echo '&lt;a href="'.getH().'commentform"&gt;Skip to comments form&lt;/a&gt;'; ?&gt;</code>

Gravity Jun 16, 2010 06:32 PM

Juggledad, which file is "post footer"; I couldn't find the code you mention.

juggledad Jun 16, 2010 06:39 PM

I'm referring to ATO->edit POST/PAGE INFO ITEMS->FOOTER:xxxxxxxxx ie the four different footer areas

Gravity Jun 16, 2010 06:45 PM

Ohhh... thanks!

All times are GMT -6. The time now is 03:32 PM.

Powered by vBulletin® Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.