WPIntell

Source evidence

Fixed undefined error from .js file

Fade in fade out post title · support · 2014-01-24T21:22:00+00:00

mixedsentiment
mediumseverity
0.72relevance
2replies
Evidence linked to opportunitycommercial context

Proof Health

Open evidence

Commercial opportunities need traceable source links before they are treated as build-worthy.

4 / 27 rows with source links

14.8% of this page's analysis has direct source links.

0 build-decision rows missing links

0 rows here require auditable proof before promotion.

23 rows with no attached evidence

0 rows have source counts but still need direct links.

Conversation

support
rezon8dev resolved
I’d really like to fix the error this plugin has when it renders. I always receive: fifopost_SetFadeLinks’ is undefined in fade-in-fade-out-post-title.js line 36 Can anyone point me in the right direction? http://wordpress.org/plugins/fade-in-fade-out-post-title/ Here it is, the plugin will break; causing a bunch of .js errors and breaking the fade-link and fade-links (inline .js) if and when you use special characters or html entities in the post titles. To fix this I altered lines in the fade-in-fade-out-post-title.php, lines 70-88, with changes made to 77 and 78: if ( ! empty($sSql) ) { $count = 0; foreach ( $sSql as $sSql ) { $title = esc_html( $sSql->post_title ); //$title = $sSql->post_title; $link = get_permalink(esc_html ($sSql->ID)); $fifopost_arr = $fifopost_arr . "fifopost_Links[$count] = '$link';fifopost_Titles[$count] = '$title'; "; if($count == 0) { $first_t = $title; $first_l = $link; } $count = $count + 1; } } wp_reset_query(); Would be great to see you update the plugin to allow special characters in the post titles, thanks for getting us here. This still did not fix all the errors, I was getting them on pages where the plugin did not render, to fix this (and because I am only ever going to use this plugin on the home page I added && is_front_page to the script enqueue …

Comments

2 shown
rezon8dev 2014-06-27T17:53:00+00:00

Here it is, the plugin will break; causing a bunch of .js errors and breaking the fade-link and fade-links (inline .js) if and when you use special characters or html entities in the post titles. To fix this I altered lines in the fade-in-fade-out-post-title.php, lines 70-88, with changes made to 77 and 78: if ( ! empty($sSql) ) { $count = 0; foreach ( $sSql as $sSql ) { $title = esc_html( $sSql->post_title ); //$title = $sSql->post_title; $link = get_permalink(esc_html ($sSql->ID)); $fifopost_arr = $fifopost_arr . "fifopost_Links[$count] = '$link';fifopost_Titles[$count] = '$title'; "; if($count == 0) { $first_t = $title; $first_l = $link; } $count = $count + 1; } } wp_reset_query(); Would be great to see you update the plugin to allow special characters in the post titles, thanks for getting us here.

rezon8dev 2014-06-30T01:11:00+00:00

This still did not fix all the errors, I was getting them on pages where the plugin did not render, to fix this (and because I am only ever going to use this plugin on the home page I added && is_front_page to the script enqueue …