[wp-trac] [WordPress Trac] #34475: get_comment_link incorrect page number in returned url.
WordPress Trac
noreply at wordpress.org
Wed Oct 28 17:26:46 UTC 2015
#34475: get_comment_link incorrect page number in returned url.
-------------------------------+------------------------------
Reporter: Property118 | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Comments | Version: 4.3.1
Severity: normal | Resolution:
Keywords: reporter-feedback | Focuses:
-------------------------------+------------------------------
Comment (by Property118):
Replying to [comment:7 boonebgorges]:
> Sorry to be pedantic, but can you tell me exactly where the
`commenttest()` code is? Are you just pasting it into the `cron-test` post
content (and running a plugin that parses the PHP)? Or is this a custom
page template? I assume that the "comment notifier" plugin you've referred
to is https://wordpress.org/plugins/comments-notifier/; it appears that it
runs at 'comment_post'. The exact place in the load order may be important
for the purposes of your issue.
>
> Can you verify whether, in these problematic cases, `get_comment_link()`
is calling `get_page_of_comment()`?
>
> `get_page_of_comment()` and `get_comment_link()` logic has been
completely overhauled for 4.4. Is there any chance you have a testing
environment where you can run the latest 4.4 beta to see if it resolves
your issues?
No problems at all, the commenttest() code is currently on my dev version
in the functions.php file of twentyfifteen, this is the only custom code
in that theme, all plugins are disabled (and plugin folder renamed to
-plugins for good measure)
On the live site i gave you the urls for they are in the custom
property118 themes functions file, however as that version is live it
still has all the plugins enabled etc, the issue persists on both my dev
and live sites though regardless of theme used or plugins.
cron-test page is a custom template with the following code:
{{{#!php
<?php
<?php /* Template Name: CronTest Page Template */
error_reporting(E_ALL);
ini_set('display_errors', 1);
get_header('btl'); ?>
<div style='background:#F9F5F5; margin-top:-20px;margin-
bottom:-10px;width:100%;display:inline-block;left:0px;'>
<section>
<div class='wrapper'>
<h1>Test Page</h1>
<?php
commenttest();
?>
</div>
</section>
</div>
}}}
sorry to sound silly but how do i check if get_comment_link() is calling
get_page_of_comment()?
I have a local development machine with a docker instance for my dev
version of the site that yes i can install 4.4 beta onto.
Thanks
--
Ticket URL: <https://core.trac.wordpress.org/ticket/34475#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list