creativecommons / wp-plugin-creativecommons

Official Creative Commons plugin for licensing your content. With Creative Commons licenses, keep your copyright AND share your creativity.
https://wordpress.org/plugins/creative-commons/
GNU General Public License v2.0
154 stars 105 forks source link

Warning: getimagesize: failed to open stream #187

Closed brylie closed 3 months ago

brylie commented 3 years ago

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

mimi-tech commented 3 years ago

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

brylie commented 3 years ago

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

mimi-tech commented 3 years ago

@brylie, Alright, thanks so much

mimi-tech commented 3 years ago

@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.

brylie commented 3 years ago

Make sure you have debug enabled in your WordPress installation:

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

mimi-tech commented 3 years ago

Alright, thanks a lot.

mimi-tech commented 3 years ago

@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

brylie commented 3 years ago

@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.

cillacode commented 3 years ago

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

brylie commented 3 years ago

@cillacode, great reproduction :-)

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

cillacode commented 3 years ago

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?

brylie commented 3 years ago

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

cillacode commented 3 years ago

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

brylie commented 3 years ago

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

Vickyaryan33 commented 1 year ago

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

MrMK0R commented 1 year ago

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!

71521rav commented 9 months ago

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

ArchanRD commented 8 months ago

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