Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Notice: Undefined index: #12

Open
craigmdennis opened this issue Aug 28, 2014 · 2 comments
Open

Notice: Undefined index: #12

craigmdennis opened this issue Aug 28, 2014 · 2 comments

Comments

@craigmdennis
Copy link

Using Wordpress 3.9.2 on PHP Version 5.4.24

I installed the plugin and when I visit its dedicated page I get the following errors.

Notice: Undefined index: thumbnail in /Users/craigmdennis/Sites/localwhistler.com/content/plugins/manual-image-crop/lib/ManualImageCropSettingsPage.php on line 169

Notice: Undefined index: thumbnail in /Users/craigmdennis/Sites/localwhistler.com/content/plugins/manual-image-crop/lib/ManualImageCropSettingsPage.php on line 174

Notice: Undefined index: thumbnail in /Users/craigmdennis/Sites/localwhistler.com/content/plugins/manual-image-crop/lib/ManualImageCropSettingsPage.php on line 175

Notice: Undefined index: thumbnail in /Users/craigmdennis/Sites/localwhistler.com/content/plugins/manual-image-crop/lib/ManualImageCropSettingsPage.php on line 176

Notice: Undefined index: thumbnail in /Users/craigmdennis/Sites/localwhistler.com/content/plugins/manual-image-crop/lib/ManualImageCropSettingsPage.php on line 177

Notice: Undefined index: thumbnail in /Users/craigmdennis/Sites/localwhistler.com/content/plugins/manual-image-crop/lib/ManualImageCropSettingsPage.php on line 178

Notice: Undefined index: thumbnail in /Users/craigmdennis/Sites/localwhistler.com/content/plugins/manual-image-crop/lib/ManualImageCropSettingsPage.php on line 180

When using the 'crop' button in the media library I get the following errors:

Notice: Undefined index: thumbnail in /Users/craigmdennis/Sites/localwhistler.com/content/plugins/manual-image-crop/lib/ManualImageCropEditorWindow.php on line 48
Thumbnail
Notice: Undefined index: medium in /Users/craigmdennis/Sites/localwhistler.com/content/plugins/manual-image-crop/lib/ManualImageCropEditorWindow.php on line 48

Notice: Undefined index: large in /Users/craigmdennis/Sites/localwhistler.com/content/plugins/manual-image-crop/lib/ManualImageCropEditorWindow.php on line 48

Notice: Undefined index: media--featured in /Users/craigmdennis/Sites/localwhistler.com/content/plugins/manual-image-crop/lib/ManualImageCropEditorWindow.php on line 48

Notice: Undefined index: media--card in /Users/craigmdennis/Sites/localwhistler.com/content/plugins/manual-image-crop/lib/ManualImageCropEditorWindow.php on line 48

Notice: Undefined index: media--thumb in /Users/craigmdennis/Sites/localwhistler.com/content/plugins/manual-image-crop/lib/ManualImageCropEditorWindow.php on line 48
@Saxafrass
Copy link

Same issue on remote server. Also - when I added the plugin on my localhost it seems to work fine (no errors thrown) but the only cropping options I have are Thumbnail and My Custom Image.

@ialocin
Copy link

ialocin commented Nov 6, 2014

Seems like this is fixed for the ManualImageCropEditorWindow.php by adding:

if ( ! isset($sizesSettings[$s]) ) {
    $sizesSettings[$s] = array('label' => '', 'quality' => 80, 'visibility' => 'visible');
}

See in source

The problem persists for the ManualImageCropSettingsPage.php as there are not options set and ergo no options can be retrieved, it can easily be fixed by adding above code right after the foreach call on line 153 in ManualImageCropSettingsPage.php.

This should be part of the next plugin version as the settings page isn't usable otherwise.

tpow pushed a commit to tpow/wp-manual-image-crop that referenced this issue Oct 27, 2018
madebyreformat — Fix thick box bug in 4.7

* madebyreformat/master:
  Fix thick box bug in 4.7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants