unreal4u
Forum Replies Created
-
Forum: Plugins
In reply to: [Q and A Focus Plus FAQ] enque style errorsok ??
Forum: Plugins
In reply to: [Q and A Focus Plus FAQ] enque style errorsGreat to know it is solved!
Little question: When are you going to release the next version? Can you also include fixes for these ones:
Notice: Undefined offset: 0 in /Users/camilo/html/cmslandingpages/app/wp-content/plugins/q-and-a-focus-plus-faq/inc/ratings.php on line 65
Fix:
function hasAlreadyVoted($post_id) { global $current_user, $timebeforerevote, $qafp_options; $voted_ID = array(); $meta_ID = get_post_meta($post_id, "voted_ID"); if (isset($meta_ID[0])) { $voted_ID = $meta_ID[0]; } get_currentuserinfo(); if ( is_user_logged_in() ) $id = $current_user->ID; else $id = 'A' . ip2long($_SERVER['REMOTE_ADDR']); if ( in_array($id, array_keys($voted_ID)) ) { if ( $id[0] != 'A' || $qafp_options['rate_wait'] == null ) return true; $time = $voted_ID[$id]; $now = time(); if ( round(($now - $time) / 60) > $timebeforerevote ) return false; return true; } return false; }
and the following notice:
Notice: Undefined variable: output in /Users/camilo/html/cmslandingpages/app/wp-content/plugins/q-and-a-focus-plus-faq/inc/ratings.php on line 99Fix:
function getPostLikeLink($post_id) { global $qafp_options; $vote_count = get_post_meta($post_id, "votes_count", true); $icons = $qafp_options['ricons']; $output = ''; if ( $qafp_options['restrict_ratings'] == false || ( $qafp_options['restrict_ratings'] == true && is_user_logged_in() ) ) { if(hasAlreadyVoted($post_id)) { $vote_count = $vote_count - 1; if ($vote_count == 1) $persons = "person"; else $persons = "people"; $output .= '<span title="' . __('You already found this helpful!', 'qa-focus-plus') . '" class="qtip qafp-like-' . $icons .' qafp-alreadyvoted-' . $icons .'"></span> '; $output .= '<span class="qafp-count">'; $output .= sprintf( __('You and %1$s other %2$s found this helpful.', 'qa-focus-plus'), $vote_count, $persons); $output .= '</span>'; } else { if ($vote_count == 1) $persons = "person"; else $persons = "people"; $output .= '<a href="javascript:void(\'0\');" data-post_id="'.$post_id.'" class="qafp-star"><span class="qafp-rating-helper">'; $output .= __('Please click here if this helped you.', 'qa-focus-plus'); $output .= '</span><br />'; $output .= '<span title="' . __('This is helpful!', 'qa-focus-plus') . '" class="qtip qafp-like-' . $icons .'">'; $output .= '</span></a> <span class="qafp-count">'; $output .= sprintf( __('%1$s %2$s found this helpful.', 'qa-focus-plus'), $vote_count, $persons); $output .= '</span>'; } } else if ( $qafp_options['restrict_ratings'] == true && !is_user_logged_in() ) { if ($vote_count == 1) $persons = "person"; else $persons = "people"; $output .= '<a href="' . wp_login_url( get_permalink() ) . '" target="_top"><span class="qafp-rating-helper">'; $output .= __('Please log in to rate this.', 'qa-focus-plus'); $output .= '</span><br />'; $output .= '<span title="' . __('Please log in to rate this.', 'qa-focus-plus') . '" class="qtip qafp-like-' . $icons .'">'; $output .= '</span></a> <span class="qafp-count">'; $output .= sprintf( __('%1$s %2$s found this helpful.', 'qa-focus-plus'), $vote_count, $persons); $output .= '</span>'; } return $output; }
Thanks.
Forum: Fixing WordPress
In reply to: White Screen of Death when editing large posts and/or pages@james: that was the first thing I did.
I have completely solved the problem: on the hosting, there was a php.ini value which was the cause of the problem: it was auto-prepending a file called anti-spam-v2.php so a simple php_value auto_prepend_file none in my .htaccess was enough to completely solve the issue.
Greetings.
Forum: Fixing WordPress
In reply to: White Screen of Death when editing large posts and/or pagesAfter reinstalling WP 3.0.1, WP 3.0.0, and trying endlessly different solutions… I’ve kind of solved it, and it has nothing to do with whatever was posted before…
I copied/pasted a LOT of lorem ipsum text just to see whether it was a post size problem, but everything was ok. In total, 2x 150 paragraphs, 2x 17939 words, 2x 120716 bytes of Lorem Ipsum text, which was far up the 4.553 bytes text I was trying to post. (Thanks to lorem ipsum btw, you’ve helped a lot of times xD)
With the lorem ipsum result, the only problem could be in the text itself… the only “strange” character was the “@”, which was repeated a lot of times (it is a page which displays many, many emails). I replaced all occurrences of @ with some other text (
:%s/@/(in)/g
did the trick) and violá: everything was normal.Conclusion:
I don’t think this is a specific WP bug, because on my test server I have no problems at all with the same “@-contaminated” text. Could it be some spam filter on the hosting? It that even possible?Greetings.
Forum: Fixing WordPress
In reply to: White Screen of Death when editing large posts and/or pagesOk, will try that tonight. However, I don’t think it will solve the problem, i did a scp to the production server so everything should be right.
I forgot that I have also tried different browsers with the same result (Well, should be, as it is a PHP issue, not a browser issue).
Greetings !
Try deactivating APC; I had the exact same error, once i de-activated APC (in php.ini :
extension=apc.so apc.enabled=0
)
it worked smoothly ??
Greetings ??
UPDATE:
In your APC conf:
Update 2 (SOLUTION): This seems promising. In php.ini in the [apc] section I set apc.filters = wp-cache-config which should exclude wp-cache-config.php and wp-cache-config-sample.php from being cached by APC.