WordPress.org

Ready to get started?Download WordPress

Forums

Awesome Filterable Portfolio
[resolved] Errors as soon as I install (12 posts)

  1. trishahdee
    Member
    Posted 1 year ago #

    Immediately after installing your plugin I get the following errors:

    Notice: Undefined index: which in /home/myname/public_html/mysite.com/site/wp-content/plugins/awesome-filterable-portfolio/afp.php on line 466
    
    Notice: Undefined index: which in /home/myname/public_html/mysite.com/site/wp-content/plugins/awesome-filterable-portfolio/afp.php on line 485
    
    Notice: Undefined index: which in /home/myname/public_html/mysite.com/site/wp-content/plugins/awesome-filterable-portfolio/afp.php on line 506
    
    Notice: Undefined index: which in /home/myname/public_html/mysite.com/site/wp-content/plugins/awesome-filterable-portfolio/afp.php on line 514

    Could this be happening because this is a production site that is not currently live? IOW, it's in http://mysite.com/site/ folder. If not, any other ideas?

    http://wordpress.org/extend/plugins/awesome-filterable-portfolio/

  2. BriniA
    Member
    Plugin Author

    Posted 1 year ago #

    I have seen you have a lot of posts about other plugins not working. The problem could be related to your WordPress installation.

    The plugin was tested on WP and works very fine.

  3. trishahdee
    Member
    Posted 1 year ago #

    Thank you for the reply, however, I had one other problem with a plugin not working upon install. I told the author of this problem and he updated his plugin to fix it. See: http://wordpress.org/support/topic/errors-as-soon-as-i-install

    Yes it is strange that I got two plugins in a row to throw errors upon install, but the warnings from both are different errors.

    I would appreciate it if you could give me some insight into the errors I am getting as it is only happening with your plugin.

  4. BriniA
    Member
    Plugin Author

    Posted 1 year ago #

    This is weird. Again the plugin was tested on different WordPress versions and using different themes and worked as expected. I don't know what kind of issue you have with your WordPress site, so I really can't help much. Make sure you have the latest version of WP and the plugin.

  5. trishahdee
    Member
    Posted 1 year ago #

    Both are latest versions. I'll talk to my go-to people to look into this and post back with what I find out...

  6. BriniA
    Member
    Plugin Author

    Posted 1 year ago #

    Great! Thanks

  7. Hamza Bahlaouane
    Member
    Posted 1 year ago #

    Everything is ok on your side Trishah,
    Your php configuration is configured by defaut to show notice errors
    in your php.ini file i think you will have the error_reporting set to:
    Default Value: E_ALL & ~E_NOTICE

    there's other values it can take
    Development Value: E_ALL | E_STRICT
    Production Value: E_ALL & ~E_DEPRECATED

    More details can be found here
    http://php.net/manual/en/function.error-reporting.php

    but anyway, the developper of the plugin should verify if the variable exist first before using it, it's only natural

    in line 466
    if($_POST['which']=='new_portfolio_item'){

    it should be
    if(isset($_POST['which']) && $_POST['which']=='new_portfolio_item'){

    You can do the same for the rest,

    There's another way to solve this but i don't recommend it,
    put this
    error_reporting(E_ERROR | E_WARNING | E_PARSE);
    right after <?php at the beginning of the file

    it will omit the notice errors but as i said i don't recommend it, it's better to fix them

    Hope it helps.

  8. BriniA
    Member
    Plugin Author

    Posted 1 year ago #

    Ok I see, when you tried that, was the plugin working for you?

  9. trishahdee
    Member
    Posted 1 year ago #

    Hello BriniA,

    I did as Hamza suggested and replaced the 4 error lines with his solution, swapping out the terms that were being called, and I was able to activate the plugin without any errors :D

    Thank you Hamza for the solution. I hope this solution will be added to the next release/update.

  10. BriniA
    Member
    Plugin Author

    Posted 1 year ago #

    Ok that's terrific. I will add this in a new update. Hamza, could you explain why it didn't worked particularly for trishahdee? Just curious about that, since I tested my self the plugin on different servers and configurations.

  11. Hamza Bahlaouane
    Member
    Posted 1 year ago #

    Sure of course,
    I'm using XAMPP on windows,
    in the C:\xampp\php\php.ini file
    i have the error reporting set by default to :
    error_reporting = E_ALL & ~E_NOTICE & ~E_DEPRECATED

    This will show all errors, except for notices and coding standards warnings (Code that will not work in future versions of PHP)

    The show the notices use this:
    error_reporting = E_ALL | E_STRICT

    create a file on your www ( htdocs ) folder and write

    <?php
    if($_GET['t'])
    echo "Hello World!";
    ?>

    you should get this
    Notice: Undefined index: t in C:\xampp\htdocs\post.php on line 2

    when visiting
    http://localhost/post.php

    Hope this helps,
    And sorry for my language :D

    Best Regards.

  12. BriniA
    Member
    Plugin Author

    Posted 1 year ago #

    Thanks so much Hamza, this has been very helpful.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic