Forum Replies Created

Viewing 15 replies - 1 through 15 (of 35 total)
  • Hi,

    I am having the same issue. Neither the shortcode or the php is working for me.

    If you managed to solve this issue would you mind posting the solution here please?

    Thanks,
    Sam

    The above code is actually to show the thumbnails on attachment pages… to show them in posts change this:

    $images =& get_children( ‘post_type=attachment&post_mime_type=image&output=ARRAY_N&orderby=menu_order&order=ASC&post_parent=’.$post->post_parent);

    to this:

    $images =& get_children( ‘post_type=attachment&post_mime_type=image&output=ARRAY_N&orderby=menu_order&order=ASC&post_parent=’.$post->ID);

    Add this to your theme’s functions.php

    function show_all_thumbs() {
        global $post;
        $post = get_post($post);
    
    /* image code */
    $images =& get_children( 'post_type=attachment&post_mime_type=image&output=ARRAY_N&orderby=menu_order&order=ASC&post_parent='.$post->post_parent);
    if($images){
    foreach( $images as $imageID => $imagePost ){
    
    unset($the_b_img);
    $the_b_img = wp_get_attachment_image($imageID, 'thumbnail', false);
    $thumblist .= '<a href="'.get_attachment_link($imageID).'">'.$the_b_img.'</a>';
    
    }
    }
    return $thumblist;
    }

    Then in your template file:

    echo show_all_thumbs();

    Hope this helps 😉

    ul is obviously ‘good html’, but what if you don’t want it?

    you could always set the ‘echo’ parameter to false and then use preg_replace to remove the ul / li tags.

    example:

    $sub_menu = wp_nav_menu(array( 'echo' => '0'));
    $rep[1]='/<ul (.*?)>/i';
    $rep[2]='/<\/ul>/';
    $repl[1]='';
    $repl[2]='';
    echo preg_replace($rep,$repl,$sub_menu);

    I agree – couldn’t get it to work as the admin was not clear

    Thread Starter sammyb

    (@sammyb)

    Joseph – I think it would be hard to replicate this on a fresh install as it would be impossible to simulate the web traffic and the frequency of spam emails on a private URL. I will try it though…

    cmetge – I think the solution is possibly to change:

    function akismet_cron_recheck($data){

    to:

    function akismet_cron_recheck(){

    but I’m not 100% sure…

    Thread Starter sammyb

    (@sammyb)

    OK – I deactivated, then reactivated, and the error was gone!

    Unfortunately all my configuration settings were gone too 🙁 no real biggie I guess.

    I noticed another problem with the plugin though:

    If you use [] characters in your post title the plugin goes haywire and the twitter button is repeated about 30 times down the page.
    Looks like a character encoding issue I guess….

    I’m getting the same error here! So strange as the blogger import worked for me on the same site about a month ago – perhaps the upgrade to 3.0 has stopped it from working?

    I have found a few threads about this, but no solution so far 🙁

    Has anyone found what the cause of the problem is yet?

    ————————–

    Authorization failed

    Something went wrong. If the problem persists, send this info to support:

    HTTP/1.0 403 Invalid AuthSub token.
    Content-Type: text/html; charset=UTF-8
    Content-Length: 167
    Date: Thu, 12 Aug 2010 10:25:40 GMT
    Expires: Thu, 12 Aug 2010 10:25:40 GMT
    Cache-Control: private, max-age=0
    X-Content-Type-Options: nosniff
    X-XSS-Protection: 1; mode=block
    Server: GSE

    <HTML>
    <HEAD>
    <TITLE>Invalid AuthSub token.</TITLE>
    </HEAD>
    <BODY BGCOLOR=”#FFFFFF” TEXT=”#000000″>
    <H1>Invalid AuthSub token.</H1>
    <H2>Error 403</H2>
    </BODY>
    </HTML>

    I tried the fix – but didn’t seem to work for me – anyone else tried it?

    To add unique to the hash columnof the wpo_campaign_posts table in phpmyadmin:

    1) select the wp_campaigns_post table from the list of tables in the left sidebar

    2) select ‘structure’ from the tabs along the top

    3) you will see the 4 table rows – ‘hash’ is the fourth row – click on the little ‘U’ (for Unique key) icon in the hash row.

    4) If it throws an error because you already have duplicate ‘hash’ entries in your wp_campaigns_post table then you will need to empty the table first. (there is no harm in emptying this table.

    I’m having the same issue with this plugin. When you add multiple campaigns the cron times out, and if you use the wp-cron page loading time increases massively (60-70seconds to load my home page!!!)

    It’s a shame as this plugin has some great features, but it definitely has performance issues….

    you could run the feed through the translate tool on yahoo pipes.

    Hi popokolok
    I have seen these same queries in my slow query log, and have also had server problems.

    I guess if you have literally thousands of posts the SELECT SQL_CALC_FOUND_ROWS and the sorting involved in that query can use up a lot of memory.

    The other query gets the category for each post in get_posts() – The join & sort can cause high memory usage if there are a lot of posts and categories

    Are you using a caching plugin like WP SuperCache ?
    Caching plugins don’t protect you when crawlers crawl the un-cached longtail pages of your site…

    Hi Erfo

    ‘max_allowed_packet’ is a mySQL setting and has nothing to do with .htaccess. it defines the maximum size of any data packet that can be written to a single field in your mysql databse.

    the rewrite_rules refered to in the error are a row in the wp_options table of the wordpress database. WordPress uses these rules to generate the ‘pretty permalinks’ when using a custom permalink structure such as /%category%/%postname%.

    When you create a new page in wordpress extra rules are added to the array of rewrite rules in your database. More pages = more rewrite_rules

    what is happening here is that the number of rewrite rules created by your site is larger than the max_allowed_packet size as set in the mysql configuration on your server.

    Here’s some info on how to increase the max_allowed_packet:
    http://www.liferay.com/web/guest/community/forums/-/message_boards/message/124969

    The only other solution is to reduce the number of pages on your site… not a great option really

    Sam

    Thread Starter sammyb

    (@sammyb)

    I have realised that it makes one big query, returning all posts from the db and then runs a foreach loop on the returned array of posts making one additional query per post:

    $sql = "SELECT * FROM " . $table_prefix . "posts " . $sqlwhere . $sqlorder;
    		$allposts = $wpdb->get_results($sql);
    
    		$postcounter = 0;
    		$postheader = "BLOG SITEMAP:";
    		$postend = "WP Archive-Sitemap Generator";
    		foreach($allposts as $ap)
    		{
    			$perma = get_permalink($ap->ID);
    			//$perma = sanitize_title($ap->post_title);
    			$postcounter++;
    			$posts = '<b>' . $postcounter . '.</b>&nbsp;&nbsp;' . '<a href=' . $perma . '>' . $ap->post_title . '</a>';

    If you have 15000 posts on your site how many queries will this plugin make for each sitemap page?

    The SELECT * query with no limit set will end up in the slow query log for sure on bigger sites with many posts & pages.

    sammyb

    (@sammyb)

    This rewrite_rules issue still seems to persist in 2.9.2

    On most default mysql setups the max_allowed_packet variable is set to 1MB.

    If you are using a custom permalink structure, such as /%category%/%postname% there is a limit to how many pages you can create before the rewrite_rules option exceeds the 1MB limit.

    If rewrite_rules does get bigger than the limit set in max_allowed_packet it will not be written to the wp_options table. This causes wordpress to compile the rewrite_rules on every page load resulting in literally thousands of database queries per page load… enough to bring any server to its knees…

    A quick fix is to increase the max_allowed_packet size. However, if the rewrite_rules option can just grow and grow as you add more wordpress pages it is only a matter of time before it starts showing up in the slow query logs too…

    the trac is still open
    http://core.trac.wordpress.org/ticket/8958

Viewing 15 replies - 1 through 15 (of 35 total)