The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

WP Photo Album Plus
[resolved] WPPAP Upgrade now shows "Undefined" on all the photos (18 posts)

  1. Jami Gibbs
    Posted 5 years ago #

    After reading the support threads here, I found one reference to "undefinded" showing up on someone else's install and opajaap said that it was fixed in a previous update. Unfortunately, the latest update of the plugin doesn't solve it for me.

    I'm using version

    Also, the rating system gives me an error that says:

    "ERROR: Illegal attempt to enter a rating."

    The URL of the gallery is:


    Thanks in advance for any help I receive!

  2. Jacob N. Breetvelt
    Plugin Author

    Posted 5 years ago #

    You have this problem as documented in the changelog:

    Known problems

    The Thesis theme has a problem with the field that is required for the rating system. (nonce field). The rating system should be disabled in that case (using Thesis).

    The required javascript (that is dynamicliy generated and therefor can not be placed in the header section) is put into a meta tag by the theme. The theme pre-renders the content and mis-interpretes the nonce field as far as i can analyse this.

    Pls disable the rating system (settings table II item 13) and please tell me as you did so, so i can look into your site again.

  3. Jami Gibbs
    Posted 5 years ago #

    Thank you for your response, opajapp!

    I have disabled the rating system although I'm not actually using the Thesis theme. Regardless, I'm not interested in using the rating system anyway so it's no problem.

    Thanks for looking over the site again.

  4. Jacob N. Breetvelt
    Plugin Author

    Posted 5 years ago #

    I see that this did not fix the problem unfortunately.
    I will investigate further on this as i really want to fix it...

  5. Jami Gibbs
    Posted 5 years ago #

    Thanks opajaap. I'll keep an eye out for an update from you. :)

  6. Jacob N. Breetvelt
    Plugin Author

    Posted 5 years ago #

    There is a set of Facebook meta tags where 'my' javascript is erroneously inserted. Can you pls deactivate the plugin that creates the Facebook meta tags and try again?

  7. Jami Gibbs
    Posted 5 years ago #

    It looks like that fixed the "undefined" issue! Thanks so much for hanging in there with me. :)

  8. Jacob N. Breetvelt
    Plugin Author

    Posted 5 years ago #

    Please tell me what really fixed it, so i can correct the documentation and no longer blame thesis.

  9. Jami Gibbs
    Posted 5 years ago #

    You said to remove the Facebook plugin function I was using and removing it is what worked.

    If you're asking me what exactly in that function is what was causing the conflict, then I don't have an answer for you. I don't have enough knowledge of your plugin and how it interacts with the plugin I removed.

    But here is the Facebook function I removed if it helps you:

    function insert_facebook_metatags(){
    	global $wp_query;
    	global $post;
    	$thePostID = $wp_query->post->ID;
    	if(is_single() || is_page()){
    		$the_post = get_post($thePostID);
    		// The title
    		$title = apply_filters('the_title', $the_post->post_title);
    		// Description
    			$desc = apply_filters('the_excerpt', $the_post->post_excerpt);
    		} else {
                    $text = strip_shortcodes( $the_post->post_content );
                    $text = apply_filters('the_content', $text);
                    $text = str_replace(']]>', ']]>', $text);
                    $text = addslashes( strip_tags($text) );
                    $excerpt_length = apply_filters('excerpt_length', 55);
                    $words = preg_split("/[\n\r\t ]+/", $text, $excerpt_length + 1, PREG_SPLIT_NO_EMPTY);
                    if ( count($words) > $excerpt_length ) {
                            $text = implode(' ', $words);
                            $text = $text . "...";
                    } else {
                            $text = implode(' ', $words);
    			$desc =  $text; //wp_specialchars(strip_tags(do_shortcode( $the_post->post_content ), 'double'));
    		$type = "article";
    		$url = get_permalink( $the_post );
    		// Post thumbnail
    		if( has_post_thumbnail( $thePostID )){
    			$thumb_id = get_post_thumbnail_id( $thePostID );
    			$image = wp_get_attachment_image_src( $thumb_id );
    			$thumbnail = $image[0];
    		} else {
    			// get the logo
    			$thumbnail = get_option( 'logo_url' );
    	} else {
    		$title = get_bloginfo('name');
    		$desc = get_bloginfo('description');
    		$type = "blog";
    		$url = get_home_url();
    		$thumbnail = 'http://scottpiro.com/wp-content/themes/scottpiro/images/default_avatar_visitor.gif';
    	$site_name = get_bloginfo();
    	echo "\n<!-- Start of Facebook Meta Tags by shailan (http://shailan.com) --> ";
    	echo "\n\t<meta property=\"og:title\" content=\"$title\" />";
        echo "\n\t<meta property=\"og:type\" content=\"$type\" />";
        echo "\n\t<meta property=\"og:url\" content=\"$url\" />";
        echo "\n\t<meta property=\"og:image\" content=\"$thumbnail\" />";
        echo "\n\t<meta property=\"og:site_name\" content=\"$site_name\" />";
        //echo "\n\t<meta property=\"fb:admins\" content=\"USER_ID\"/>";
        echo "\n\t<meta property=\"og:description\"
              content=\"$desc\" />";
    	echo "\n<!-- End of Facebook Meta Tags -->\n";
    add_action('wp_head', 'insert_facebook_metatags');
  10. Jacob N. Breetvelt
    Plugin Author

    Posted 5 years ago #

    Thanx for this, i am getting close now!
    Where comes this code from?

  11. Jami Gibbs
    Posted 5 years ago #

    I believe this to be the original author link:


    If you're asking where in the theme this function originated, I was calling it from my theme's function.php file.

  12. Jacob N. Breetvelt
    Plugin Author

    Posted 5 years ago #

    In the mean time, i now understand exactly what happens and goes wrong.
    I am pretty sure i will be able to fix this.
    This will take 2 or 3 days.
    I would appreciate it very much if you would test my solution when i am so far.

  13. Jami Gibbs
    Posted 5 years ago #

    I'm glad to help. Just post a message on this thread and I'll be alerted to you needing me to test it.

  14. Jacob N. Breetvelt
    Plugin Author

    Posted 5 years ago #

    I think i have it working.

    Do a re-install of a fresh download of the plugin.
    (See This documentation page for instructions).

    You need fix 004. It is there, i checked it.

    See if it is working, then re-install the facebook plugin code that you removed yesterday.
    It should work properly. I would like to see the site, tell here whats on and keep a link to a page with slideshow and rating anabled available for me.

  15. Jami Gibbs
    Posted 5 years ago #

    Hi opajaap,

    I reinstalled the plugin with fix 004, re-activated the Facebook function, and activated the rating system.

    Everything appears to be working brilliantly!


    Thank you for your efforts!

  16. Jacob N. Breetvelt
    Plugin Author

    Posted 5 years ago #

    Thank you for your help in supplying info and testing it.

    The fix works as follows:

    Rendering the %%wppa%% script commands into photo display is now initially disabled, until the action wp_head is performed.

    This means that the initial one time <input> tag (required to prevent spamming votes) is no longer removed by the facebook plugin: $text = addslashes( strip_tags($text) ); in the code above, causing the illegal vote attemp error message, and my first script tag (one time initializations of (translated) texts like 'Slideshow', 'Start' etc) does no longer appear in the last meta tag, that caused the 'Start Undefined' messages etc. In the meta tag (content=..) now comes

    [WPPA+ Photo display]

    a proof that the rendering is still off at that time.
    See below (a part of the source code as seen by the browser):

    <!-- Start of Facebook Meta Tags by shailan (http://shailan.com) -->
    	<meta property="og:title" content="Photo Gallery" />
    	<meta property="og:type" content="article" />
    	<meta property="og:url" content="http://scottpiro.com/photo-gallery/" />
    	<meta property="og:image" content="" />
    	<meta property="og:site_name" content="scottpiro.com" />
    	<meta property="og:description"
              content="[WPPA+ Photo display]" />
    <!-- End of Facebook Meta Tags -->
    <!-- WPPA+ Rendering enabled -->
    <!-- Main CSS -->

    When you see: <!-- WPPA+ Rendering enabled --> that is the place from where any %%wppa%% invocation will be rendered to the full html, including the input tag and the runtime style script.

  17. blueorange
    Posted 5 years ago #

    My site is having the same problem, although I don´t have a Facebook plugin. I´ve disabled the rating system but no go.

    Thanks again for the plugin.



  18. Jacob N. Breetvelt
    Plugin Author

    Posted 5 years ago #

    This last problem is fixed in 3.1.7

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WP Photo Album Plus
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic