Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter llewellynworld

    (@llewellynworld)

    @jonathan, I haven’t really spent time digging into it, so I’m not sure if there is or not. I don’t spend a lot of time on our WordPress install as the rest of our sites takes up all of my time.

    Thread Starter llewellynworld

    (@llewellynworld)

    Aaahh, no meed for attribution. I didn’t think to check the validation. We have other things that cause the page to not validate, so I didn’t look to see if this plugin made it worse or not.

    Thread Starter llewellynworld

    (@llewellynworld)

    Sure thing. At line 403 in the recaptcha.php page, there’s a function called “save_comment_script”. In the middle of it is a block of code that currently looks like this:

    <script type="text/javascript">
    var sub = document.getElementById('submit');
    document.getElementById('recaptcha-submit-btn-area').appendChild (sub);
    document.getElementById('submit').tabIndex = 6;
    if ( typeof _recaptcha_wordpress_savedcomment != 'undefined') {
    	document.getElementById('comment').value = _recaptcha_wordpress_savedcomment;
    }
    document.getElementById('recaptcha_table').style.direction = 'ltr';
    </script>

    Change that to look like this instead:

    <script type="text/javascript">
    if(document.getElementById('submit') != null)
    {
    	var sub = document.getElementById('submit');
    	document.getElementById('recaptcha-submit-btn-area').appendChild (sub);
    	document.getElementById('submit').tabIndex = 6;
    	if ( typeof _recaptcha_wordpress_savedcomment != 'undefined') {
    		document.getElementById('comment').value = _recaptcha_wordpress_savedcomment;
    	}
    	document.getElementById('recaptcha_table').style.direction = 'ltr';
    }
    </script>

    I basically wrapped an if statement around the chunk of code so that it makes sure the submit Id actually exists before it attempts to do anything with it. Does that help?

    Thread Starter llewellynworld

    (@llewellynworld)

    hmm… could be. All I had at the time was the Role Scoper plugin and the Top Level Categories plugin installed. Here’s the query that the wp_get_archives function is executing:

    SELECT * FROM wp_posts LEFT JOIN wp_term_relationships AS tr ON wp_posts.ID = tr.object_id LEFT JOIN wp_user2role2object_rs AS uro ON uro.obj_or_term_id = wp_posts.ID AND uro.src_or_tx_name = ‘post’ AND uro.scope = ‘object’ AND uro.assign_for IN (‘entity’, ‘both’) AND uro.group_id IN (‘1’) WHERE wp_posts.post_date > 0 AND post_type = ‘post’ AND post_status IN (‘publish’, ‘private’) ORDER BY post_date DESC LIMIT 10

    It’s the term_taxonomy_id column in the query that’s causing the duplicates. I guess I need to figure out what that table is used for and why my install is causing duplicates.

    Jenifer

Viewing 4 replies - 1 through 4 (of 4 total)