• Resolved trishahdee

    (@trishahdee)


    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 https://mysite.com/site/ folder. If not, any other ideas?

    https://www.ads-software.com/extend/plugins/awesome-filterable-portfolio/

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author BriniA

    (@brinia)

    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.

    Thread Starter trishahdee

    (@trishahdee)

    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: https://www.ads-software.com/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.

    Plugin Author BriniA

    (@brinia)

    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.

    Thread Starter trishahdee

    (@trishahdee)

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

    Plugin Author BriniA

    (@brinia)

    Great! Thanks

    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
    https://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.

    Plugin Author BriniA

    (@brinia)

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

    Thread Starter trishahdee

    (@trishahdee)

    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 ??

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

    Plugin Author BriniA

    (@brinia)

    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.

    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
    https://localhost/post.php

    Hope this helps,
    And sorry for my language ??

    Best Regards.

    Plugin Author BriniA

    (@brinia)

    Thanks so much Hamza, this has been very helpful.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Errors as soon as I install’ is closed to new replies.