WordPress.org

Ready to get started?Download WordPress

Forums

WTI Like Post
[resolved] Notice: Undefined variable (11 posts)

  1. another-webmaster
    Member
    Posted 1 year ago #

    Working with wampserver 2.2 here and WP 3.5.2 alpha.
    Following keeps the plugin from working :(

    Debug noticed this:
    Notice: Undefined variable: wti_voted_message in \wp-content\plugins\wti-like-post\wti_like_post.php on line 765

    Any idea how to solve? Thanks in advance for time and effort.

    http://wordpress.org/extend/plugins/wti-like-post/

  2. webtechideas
    Member
    Plugin Author

    Posted 1 year ago #

    Open the plugin file wti_like_post.php in any text editor like Notepad++ and find out the function GetWtiVotedMessage.

    After the line global $wpdb;,

    add the following line $wti_voted_message = '';

    Note:
    If your site is live, then you should have NOTICE messages disabled.

  3. another-webmaster
    Member
    Posted 1 year ago #

    I appreciate the quick responce but this "solution" doesn't solve the problem at all.
    It seems "suppressing" the NOTICE ? but thats all. The plugin is still not working.

    Yes NOTICE disabled on a live site at least prevent nasty notices showing but is not solving any. The meaning of those notices are to see errors, and could help us find a solution why a plugin or some else is not working.

    Maybe the output below could help you some?
    Output is generated after a completely fresh (virgin) installation with only this plugin and nothing else!

    1	0.0003	  247816	{main}( ) ..\index.php:0
     2	0.0013	  251384	require( '\wordpress\wp-blog-header.php' ) ..\index.php:17
     3	0.2531	18590520	require_once( '\wordpress\wp-includes\template-loader.php' )	..\wp-blog-header.php:16
     4	0.2547	18602112	include( '\wordpress\wp-content\themes\twentytwelve\page.php' )	..\template-loader.php:47
     5	0.2748	18670696	get_template_part( )	..\page.php:21
     6	0.2748	18671520	locate_template( )	..\general-template.php:128
     7	0.2749	18671656	load_template( )	..\template.php:383
     8	0.2758	18688080	require( '\wordpress\wp-content\themes\twentytwelve\content-page.php' )	..\template.php:409
     9	0.2764	18689160	the_content( )	..\content-page.php:17
    10	0.2765	18690384	apply_filters( )	..\post-template.php:166
    11	0.2774	18693728	call_user_func_array ( )	..\plugin.php:173
    12	0.2774	18693760	PutWtiLikePost( )	..\plugin.php:173
    13	0.2774	18693952	GetWtiLikePost( )	..\wti_like_post.php:699
    14	0.2791	18694104	GetWtiVotedMessage( )	..\wti_like_post.php:658

    Thanks in advance for used time and effort.
    Looking forward to find a solution because it is a nice plug-in.

  4. webtechideas
    Member
    Plugin Author

    Posted 1 year ago #

    Can you please share your site url. I want to have a look at that.

  5. another-webmaster
    Member
    Posted 1 year ago #

    @webtechideas,

    clicking on the gravatar gives the link to the demo site.
    I would appreciate to hear a solution.

    Thanks in advance for all the time and effort.

  6. webtechideas
    Member
    Plugin Author

    Posted 1 year ago #

    Probably this is an issue with wamp server, I will have to check this. I assume you have added the code as I have mentioned above. Also can you please disable notice messages?

  7. another-webmaster
    Member
    Posted 1 year ago #

    Disabled notice msg and also added code as mentioned by you.
    Url (behind gravatar)is a live -semi production- demo to show the issue online to you.

    ALthough notices are suppressed now and the code added it is still not working as you can see.

    The wamp msg is not that important at the moment but for the live server it would be great to solve so your plug-in can be used on the other live servers.

    Thanks in advance for all the time and effort.

  8. webtechideas
    Member
    Plugin Author

    Posted 1 year ago #

    When I checked using firebug net tab, I got warning and fatal error messages when I clicked on the thumb images. The plugin script is unable to find out the wp-config file which is required for processing the request. So probably you are not using a standard WordPress set up. If you are not familiar with using firebug, then give me some time and I will share a screenshot showing the error.

  9. another-webmaster
    Member
    Posted 1 year ago #

    Hmm what to say about that, moved (wp-config.php) it to main installation folder and it works.
    The issue exist because we don't have wordpress installed in the main root but in a sub folder. One of many imho "must have" simple security precautions.
    Is it possible to make it so that this great plugin is (also) able to work with setups like ours? (wordpress installed in sub folder)

    I am sorry that I didn't mention it. (not being aware it could have impact like this)
    If you think it is not possible or it takes to many of your time I understand and will mark this topic as solved so at least others know the why and how.

  10. webtechideas
    Member
    Plugin Author

    Posted 1 year ago #

    It should not be a problem even when you have WordPress installed on a subfolder but there is something different in your set up. It means the path to wp-config file is different. This is fine from security point of view but many don't do this. I had tested on such folder structure and never had the problem.

    Anyway a security release will come up in less than a month's time which will take care of such scenarios. You can continue using the current version and later easily upgrade when the new version becomes available.

  11. another-webmaster
    Member
    Posted 1 year ago #

    Thanks for the time and effort you have taken, looking forward to the next release.

    Note: One of the setups we use: wordpress installation in subfolder, moving wp-config back to the root (one level) and a copy of index and .htaccess (incl. some editing code) also to main root. Works like a charm but in rare cases (like this one) causing a problem.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic