wp-plugin-creativecommons icon indicating copy to clipboard operation
wp-plugin-creativecommons copied to clipboard

Warning: getimagesize: failed to open stream

Open brylie opened this issue 3 years ago • 18 comments

When installing this plugin in a local WordPress 5.8 development environment, the following error is displayed when rendering the license:

Warning: getimagesize(http://localhost:8888/wp-content/plugins/wp-plugin-creativecommons/includes/images/by.png): failed to open stream: Cannot assign requested address in /var/www/html/wp-content/plugins/wp-plugin-creativecommons/includes/class-creativecommons.php on line 1128

Steps to reproduce

  1. set up WordPress 5.8 (locally or on a server) in development mode
  2. install the latest version of the code from this repository in the WordPress plugins directory
  3. Go to Settings -> Creative Commons
  4. configure the desired license
  5. make sure to select "Display license as:" "widget"
  6. go to Appearance -> Widgets
  7. add a "Legacy Widget" and select "CC License" widget
  8. save the widget settings
  9. view the site and notice the Warning in the widget area

Task

  • [ ] reproduce the issue as described above
  • [ ] determine the severity of the notices
  • [ ] if needed, fix fhe issue so the notices no longer display

brylie avatar Oct 11 '21 09:10 brylie

Hi , I am an Outreachy candidate. I will like to work on this issue. Thank you.

mimi-tech avatar Oct 12 '21 17:10 mimi-tech

@mimi-tech, thanks! I'll assign you to the issue.

brylie avatar Oct 13 '21 07:10 brylie

@brylie, Alright, thanks so much

mimi-tech avatar Oct 13 '21 09:10 mimi-tech

@brylie, Hope your day is going well?

I have followed the steps mentioned above. I have viewed the site as well. I am using MAMP server but I can't find the error. Can you please give me more guidelines. Thank you.

mimi-tech avatar Oct 13 '21 10:10 mimi-tech

Make sure you have debug enabled in your WordPress installation:

https://wordpress.org/support/article/debugging-in-wordpress/

brylie avatar Oct 13 '21 11:10 brylie

Alright, thanks a lot.

mimi-tech avatar Oct 13 '21 13:10 mimi-tech

@BjornW , These are the errors I am getting. It is different from the error mentioned above. Please can you explain to me how to solve the error or is it from the way I installed the plugin. Thank you.

[13-Oct-2021 18:58:04 UTC] called site [13-Oct-2021 18:58:04 UTC] single site, get site license or else default settings [13-Oct-2021 18:58:04 UTC] get license for the frontend [13-Oct-2021 18:58:04 UTC] called site [13-Oct-2021 18:58:04 UTC] single site, get site license or else default settings [13-Oct-2021 18:58:04 UTC] called site [13-Oct-2021 18:58:04 UTC] single site, get site license or else default settings [13-Oct-2021 18:59:41 UTC] called site [13-Oct-2021 18:59:41 UTC] single site, get site license or else default settings [13-Oct-2021 18:59:41 UTC] get license for the frontend [13-Oct-2021 18:59:41 UTC] called site [13-Oct-2021 18:59:41 UTC] single site, get site license or else default settings [13-Oct-2021 18:59:41 UTC] called site [13-Oct-2021 18:59:41 UTC] single site, get site license or else default settings [13-Oct-2021 19:05:51 UTC] called site [13-Oct-2021 19:05:51 UTC] single site, get site license or else default settings [13-Oct-2021 19:05:51 UTC] get license for the frontend [13-Oct-2021 19:05:51 UTC] called site [13-Oct-2021 19:05:51 UTC] single site, get site license or else default settings [13-Oct-2021 19:05:51 UTC] called site [13-Oct-2021 19:05:51 UTC] single site, get site license or else default settings [13-Oct-2021 19:12:50 UTC] called site [13-Oct-2021 19:12:50 UTC] single site, get site license or else default settings [13-Oct-2021 19:12:50 UTC] get license for the frontend [13-Oct-2021 19:12:50 UTC] called site [13-Oct-2021 19:12:50 UTC] single site, get site license or else default settings [13-Oct-2021 19:12:50 UTC] called site [13-Oct-2021 19:12:50 UTC] single site, get site license or else default settings

mimi-tech avatar Oct 13 '21 19:10 mimi-tech

@mimi-tech, I'm not sure what is generating the errors you are seeing. Please open a separate issue for those errors, since they are not related to this issue.

brylie avatar Oct 14 '21 07:10 brylie

hi @brylie can i comment on this issue? i replicated the steps and saw the error and its in relation to the issue #186 image

cillacode avatar Oct 26 '21 12:10 cillacode

@cillacode, great reproduction :-)

Next, we should determine if/how to get rid of the notice.

brylie avatar Oct 26 '21 12:10 brylie

Thats fine but i will want to know if the notice has an after effect on the widget functionality, or by getting rid of the notice solves the issue?

cillacode avatar Oct 26 '21 12:10 cillacode

Those are the questions this GitHub issue is intended to explore.

brylie avatar Oct 26 '21 12:10 brylie

I am certain with a better understanding of issue #186 and fixing the notice we can ascertain the after effect of this issue.

cillacode avatar Oct 26 '21 13:10 cillacode

OK, let's focus on #186 for now.

brylie avatar Oct 27 '21 09:10 brylie

I want to work on this issues please assign me this issues @ brylie

Vickyaryan33 avatar Mar 14 '23 07:03 Vickyaryan33

Hey there!

I have found a fix, however this is my first git issue I've worked. I would really appreciate some help to get things flowing.

Thanks!

MrMK0R avatar Nov 25 '23 13:11 MrMK0R

Hi , I am a beginner candidate. I will like to work on this issue. Thank you.

71521rav avatar Feb 20 '24 15:02 71521rav

@possumbilities @brylie I've created a PR for this issue. Please check it out!

ArchanRD avatar Mar 10 '24 14:03 ArchanRD