Using PHPCS to check PHP 8.0 and 8.1 compatability, I get these four errors on both 8.0 and 8.1.
Please check, and fix them.
--------------------------------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
--------------------------------------------------------------------------------------------------------------------------
96 | ERROR | Since PHP 7.0, functions inspecting arguments, like debug_backtrace(), no longer report the original
| | value as passed to a parameter, but will instead provide the current value. The parameter "$content" was
| | changed on line 32.
785 | ERROR | Since PHP 7.0, functions inspecting arguments, like debug_backtrace(), no longer report the original
| | value as passed to a parameter, but will instead provide the current value. The parameter "$content" was
| | changed on line 32.
1443 | ERROR | Since PHP 7.0, functions inspecting arguments, like debug_backtrace(), no longer report the original
| | value as passed to a parameter, but will instead provide the current value. The parameter "$content" was
| | changed on line 32.
--------------------------------------------------------------------------------------------------------------------------
Thanks.
]]>I found several I18N issues and made necessary modifications, then I listed them as the following.
All modifications should be implemented to include\rtoc_admin.php.
Line 8
__( 'RTOC Admin Screen', 'rich-table-of-content' ),
Line 295 to 298
'ul' => '<ul class="c-list-style"><li><span class="c-admin-round">' . esc_html__( 'H2 TITLE', 'rich-table-of-content' ) . '</span></li><li>' . $rtoc_design_round . '</li></ul>',
'ol' => '<ul class="c-list-style"><li><span class="c-admin-number">1.</span>' . esc_html__( 'H2 TITLE', 'rich-table-of-content' ) . '</li><li>' . $rtoc_design_number1 . '</li></ul>',
'ol2' => '<ul class="c-list-style"><li><span class="c-admin-decimal">01</span>' . esc_html__( 'H2 TITLE', 'rich-table-of-content' ) . '</li><li>' . $rtoc_design_number2 . '</li></ul>',
'none' => '<ul class="c-list-style"><li>' . esc_html__( 'H2 TITLE', 'rich-table-of-content' ) . '</li><li>' . $rtoc_design_none . '</li></ul>'
Line 312 to 313, 343 to 344, 398 to 399, 435 to 436, 509 to 510, 620 to 621
'on' => __( 'ON', 'rich-table-of-content' ),
'off' => __( 'OFF', 'rich-table-of-content' ),
Line 326 to 329
'ul' => '<ul class="c-list-style"><li><span class="c-admin-round">' . esc_html__( 'H3 TITLE', 'rich-table-of-content' ) . '</span></li><li>' . $rtoc_design_round . '</li></ul>',
'ol' => '<ul class="c-list-style"><li><span class="c-admin-number">1.</span>' . esc_html__( 'H3 TITLE', 'rich-table-of-content' ) . '</li><li>' . $rtoc_design_number1 . '</li></ul>',
'ol2' => '<ul class="c-list-style"><li><span class="c-admin-decimal">01</span>' . esc_html__( 'H3 TITLE', 'rich-table-of-content' ) . '</li><li>' . $rtoc_design_number2 . '</li></ul>',
'none' => '<ul class="c-list-style"><li>' . esc_html__( 'H3 TITLE', 'rich-table-of-content' ) . '</li><li>' . $rtoc_design_none . '</li></ul>'
Line 809
update_option('rtoc_title', __( 'Contents', 'rich-table-of-content' ));
Line 813 to 814
'<input type="text" placeholder="%s" id="rtoc_title" name="rtoc_title" value="%s" class="rtoc_admin_text" />',
esc_attr__( 'CONTENTS', 'rich-table-of-content' ),isset($option) ? esc_attr($option) : ''
Line 909
update_option('rtoc_open_text', __( 'OPEN', 'rich-table-of-content' ));
Line 913 to 914
'<input type="text" placeholder="%s" id="rtoc_open_text" name="rtoc_open_text" value="%s" class="rtoc_admin_text" />',
esc_attr__( 'OPEN', 'rich-table-of-content' ), isset($option) ? esc_attr($option) : ''
Line 921
update_option('rtoc_close_text', __( 'CLOSE', 'rich-table-of-content' ));
Line 925 to 926
'<input type="text" placeholder="%s" id="rtoc_close_text" name="rtoc_close_text" value="%s" class="rtoc_admin_text" />',
esc_attr__( 'CLOSE', 'rich-table-of-content' ), isset($option) ? esc_attr($option) : ''
Line 1151 to 1152
'<input type="text" placeholder="%s" id="rtoc_back_text" name="rtoc_back_text" value="%s" class="rtoc_admin_text" />',
esc_attr__('TOC', 'rich-table-of-content'), isset($option) ? esc_attr($option) : ''
Line 1569
<h2 class="rtoc-caption"><?php esc_html_e( 'Live Preview', 'rich-table-of-content' ); ?></h2>
]]>
If you insert the TOC with a shortcode via functions.php, you end up with two TOCs which obviously makes no sense.
]]>Is there any way to uncheck all of the post types and use a shortcode on the posts where I do want it to appear? The problem I have is that I wanted to use RTOC for one custom post type, Help Docs, and not use it for another custom post type, Events. When I had “Posts” checked in the settings, it worked beautifully on Help Docs, showing right where I added the shortcode. However, it also showed automatically on Events, where we cannot have it.
(Events are created with the Events Manager plugin, which is fairly popular, so there may be other users who have a similar problem. We don’t have any regular posts so that is not an issue, at least not yet.)
I tried to uncheck “Posts” but with everything unchecked, when I reloaded the settings page, all three were checked – Posts, Pages and Categories. So I checked “Categories” only. Then it did not show on the Events pages and it still showed on the Help Docs pages, which would have been great except that the open/close button had no text in it and no longer did anything, so now I could not toggle the menu closed.
This is one of the few table of contents plugins that keyboard-only users can use, so I would very much like to get it working on our site. Also, it correctly indexed the headings on a very complicated page, which another plugin failed to do. I may keep it and use CSS to make the RTOC not display on the Events custom post type, but I’d rather not if I don’t have to. The plugin is exactly what we need, except for this issue.
]]>Fatal error: Uncaught Error: Call to undefined function jinr__theme_color() in /wp-content/plugins/rich-table-of-content/include/rtoc_inline.php:155
]]>GREAT PLUGIN, thank you! – My security plugin warns about this:
“#Wordpress Rich Table of Contents plugin <= 1.3.7 – Contributor+ Stored XSS vulnerability
-Vulnerability type: Cross Site Scripting (XSS)
-No Update Available”
Is the author open and able to provide a fix for this?
We need to know, as we might want to switch to another plugin, which I prefer not to do.
THANKS again for your GREAT plugin!
Peter
]]>All was right & working Properly But after some days now, it works in the previous post But not working in the new post that is being written.
Here I confirm a few things.
I have stopped these plugin functions for woocommerce & activated only for post by CSS.
***************************
.woocommerce .rtoc-mokuji-content{
display: none;
}
.woocommerce #rtoc_return.back_button_left a {
right: auto;
left: 16px;
display: none;
}
***************************
I use Newspaper Lite by themecentury (a WordPress theme). I am facing this problem a second time. In previous time I uninstalled it & try other various Plugins But no other plugins suit me. & after trial my all plugin I re-installed it & it started to try fine again. But how this is possible I don’t know.
Now, this is the same issue again what I do?
Hello.
Is there any chance that I can edit the scroll offset from withing the plugin? I have a fixed header on my website and I need to enlarge the offset of the smooth scroll. I have currently done that by editing the “rtoc_scroll.js” by changing this line “var headerHight = 135” (from 100 to 135). Is there a field to do that in the dashboard or could it be implemented? Of course when I now update the plugin my own changes to the JS-code are lost so my solution is not adaequat.
Thank you!
Arne
Hey, is there a way to include headings that are dynamically added on the page? I have a h2
tag that gets added after the post content on single.php.
I was hoping I can include those in the RTOC
]]>TOC is showing on the sidebar but when clicking on it it’s not coming to that position. This is happening after the last update. Please fix this problem.
]]>As I am using Rank Math and it requires adding a filter to the theme so that Rich Table of Contents can be one of the default pugins for SEO optimization. Is it feasible to do so?
The filter is stated below
/**
* Filter to add plugins to the TOC list.
*
* @param array TOC plugins.
*/
add_filter( 'rank_math/researches/toc_plugins', function( $toc_plugins ) {
$toc_plugins['plugin-directory/plugin-filename.php'] = 'Plugin Name';
return $toc_plugins;
});
The filter is stated in the website
https://rankmath.com/kb/score-100-in-tests/
https://rankmath.com/kb/filters-hooks-api-developer/#add-toc-plugin
Please let’s me know if doing the above procedures is feasible or not so that Rank Math could record Rich Table of Contents as one of the default pugins. Thank you.
]]>I used Rich Table of Contents with WPBakery Page Builder and use with shortcode but it’s not working. I check with 2 websites but it’s not working on both websites.
]]>Hello,
what the email support ? need to send you something important by mail ??
regards,
]]>Hi,
I download the plugin because Rank Math SEO said that with table of contents i will succeed better SEO score.
But he does not recognize it, while other plugins works fine. I want this plugin because is modern and beautifull :).
Thanks
]]>Love the RTOC plugin, AND have an issue to exclude its display on the FrontPage:
Using the Page ID as suggested to exclude it, the TOC still displays on the frontpage (currently eliminated by requiring 4 titles to display RTOC).
The page ID used is what shows up in the URL for the FrontPage “https://swisscryptostrategies.com/” – can you verify that page ID is indeed = 80?
Any input is greatly appreciated!
Peter
]]>How to set up plugins or modify “rtoc_return.js”?
]]>I don’t know why. The table of contents is not displayed correctly.
ex) actually, 10 tables but only 5 on displayed.
]]>Hi there
RTOC looks fine!
I have a few problems:
1. RTOC is not displayed on pages see sample filled out in the box. I have read the help section, and there is check mark in both post and pages here “The page to display the table of contents”
2. ?bn/Luk (Open and close in Danish does not have any function
3. Might not be your problem: Rank Math keeps saying: “Use Table of Content to break-down your text” even on posts where RTOC is displayed correct.
Please assist
Kind regards,
Hanne B. Stegemüller,
Denmark
Hi,
No TOC is being displayed, due to the activated W3 cache plugin.. When I deactivate the cache plugin, the TCO shows up..
Any advice? (besides keeping the cache plugin deactivated…:)
WF
I want to change the font size.
How can I archive it?
Hope your reply soon.
Best Regards.
]]>Option: The page to display the table of contents
Can not disable both: post, page
Try this:
1. uncheck both options: post,pages
2. save
3. both options are checked – this is wrong, should be unchecked
The creators use the plugin as a mere marketing tool, there is no intention to make it usable, as you can see when you look for support. They won’t allow you to put the TOC only where you want, even when they put checkboxes to make it happen. They are kidding us, and the promisse to change such an easy thing like this (checkboxes that doesn’t work) has been running for years now, with no real action taken after various updates. Patetic.
]]>hi i cant disable post / page option
how to fixed it
thank you somuch
]]>I’m loading rtoc_admin_js.js with the rtoc_admin_script() function in functions.php, but the file doesn’t exist.
Please answer here.
]]>以下のような警告がGoogleデベロッパーツールのコンソールに出ていました。
DevTools failed to load SourceMap: Could not load content for https://sample.com/wp-content/plugins/rich-table-of-content/css/rtoc_style.css.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
CSSファイルの
/*# sourceMappingURL=rtoc_style.css.map */
の位置が参照できないまたは、見つからないように思えます。
Hi Support,
i want to switch from LuckyWP to RTOC. But RTOC is not working with Avada Theme or an other compatibility topic.
There will be nothing shown. Also Shortcut is not working.
https://camper.help/rtoc
Any ideas?
Thank you
Kind regards
Florian
]]>Hello,
Is there a shortcode to show pages list please?
Thanks
]]>Hi! I’m getting a lots of log rows like this:
Trying to get property ‘post_content’ of non-object in /home/…/public_html/wp-content/plugins/rich-table-of-content/functions.php on line 919
The reffered rows are: 919, 920, 921, 952
I’ve tried to exclude page numbers on which the plugin should not run, not helping. Also I’ve only have a few sites on which I whish to see TOC, which is far less then I need to exclude ??
I’m currently using your plugin for 3 of my websites, I love it.
Would be possible to insert the TOC just using the shortcode option? If I try to untick the display on post and page, the plugin doesn’t save my choice.
Thank you for your work.
-bipi
Hi! Amazing job on this plugin, is the best TOC plugin I’ve used in a long time!
Is possible to make it AMP-compatible? You could include an option to not use any external javascript in the frontend.
Thank you very much for your work!
-BIPI