• Resolved daskilor

    (@daskilor)


    Hellos and thanks. I have 2 errors with your plugin.
    Wp: 5.0.1
    Php: 5.3 or 7

    Errors:
    1.- (Show Excerpt?) Notice: Trying to get property of non-object in /home/sdwwe/public_html/wp-includes/post-template.php on line 298

    2.- Notice: wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.) in /home/sdwwe/public_html/wp-includes/functions.php on line 4204

    How could we solve it?

    thanks and regards

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Paul Jura

    (@pauljura)

    Hi, I can’t seem to reproduce your error.

    Could you provide some more detail regarding how you get this error, such as which options do you use, and a sample of the content you are trying to display? A link to your website might help.

    Also, are you using the latest version of the plugin? I had problems with show_excerpt and wp_enqueue_script in old versions, that have been fixed. Try updating if you haven’t already.

    Hi, chiming in here because I am encountering the wp_enqueue_style and wp_enqueue_script errors.

    Running WordPress 4.9.8 on PHP 7.2
    PJ News Ticker 1.5.2 diplaying the titles of 3 posts by placing

    <?php if (shortcode_exists('pj-news-ticker')) {
    echo do_shortcode('[pj-news-ticker]');
    } ?>

    in the template

    Settings:

    Number of Posts:	5
    Post Type: post
    Category of Posts:	newsticker
    Show Label?	True 
    Label Text	Newsticker
    Label Text Colour	#fff
    Label Background Colour	#3e5039
    Ticker Background Colour #fff
    No Content Text	 Nothing found!
    Show Excerpt?	False 
    Speed	100
    Font Size	100%
    Link Target	_self
    Gap Between Cycles?	True 
    Plugin Author Paul Jura

    (@pauljura)

    Hi, I’m still unable to reproduce the error. I created a test site with WordPress 4.9.8, PHP 7.2, and PJ News Ticker 1.5.2, just like yours, and no errors.

    How exactly are you adding the ticker to your site? Which theme are you using? Are you modifying any theme files, or core WordPress PHP files? Do you have any other plugins installed that might be relevant?

    Hi, thanks for looking into this.

    One important thing about my website you may have missed; WP_DEBUG is on. If I turn it off, the notices disappear.

    In case you didn’t miss WP_DEBUG;

    What do you mean by ‘how am I adding it to my site’?
    I’ve ‘added’ it to the site by downloading it from the WordPress Repo, accessed though the admin dashboard.
    I’m ‘adding’ it to the page by echo’ing the shortcode in my cpt’s content-template (_s/template-parts/content-cpt.php)

    I’m using a custom template with SCSS and Bootstrap based on Underscores_, so yes, I’ve heavily modified those theme-files.
    No core files were touched though.

    I’ve tried loading the page with the news ticker on it with all other plugins loaded and with no other plugins loaded, in both cases the notices appear, reloading the page with just the news ticker plugin turned off and everything else on does not generate messages. Are there any specific plugins you think may be conflicting?

    Plugin Author Paul Jura

    (@pauljura)

    Hi,

    Thanks, that was enough info to help me resolve the problem.

    Please check out latest version 1.5.3, I believe it’s fixed now.

    Cheers,
    Paul

    Happy to help, thanks for the fix!
    I like my debug logs as empty as possible! ^^
    I’ve updated and can confirm the notices are gone.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘I have 2 errors with your plugin’ is closed to new replies.