Admin Images Shortcode

Hello,

I’m trying to upload images to be used on Simple Pages via the Admin Images plugin. I’ve successfully uploaded one photo, and in the Admin Images plugin it specifically instructs:

If you are creating a simple page or otherwise entering HTML into omeka through your browser, you can use the shortcode "[admin_image id=999,size='fullsize']" to display your admin image.

So, I inserted the following shortcode into the body of one of our Simple Pages:

[admin_image id=1,size='fullsize']

But now when I try to view the page, I see this very lengthy error message:

Notice: Undefined index: id in /srv/sftp-chroot/classes/lis-462-ol-fa19/omeka-2.7/plugins/AdminImages/helpers/AdminImageFunctions.php on line 5

Notice: Trying to get property 'id' of non-object in /srv/sftp-chroot/classes/lis-462-ol-fa19/omeka-2.7/plugins/AdminImages/views/helpers/AdminImageTag.php on line 9

Fatal error: Uncaught Error: Call to a member function getUrl() on null in /srv/sftp-chroot/classes/lis-462-ol-fa19/omeka-2.7/plugins/AdminImages/views/helpers/AdminImageTag.php:10 Stack trace: #0 /srv/www/canary.simmons.edu/html/classes/lis-462-ol-fa19/omeka-2.7/application/libraries/Zend/View/Abstract.php(349): AdminImages_View_Helper_AdminImageTag->adminImageTag(NULL, 'fullsize') #1 /srv/sftp-chroot/classes/lis-462-ol-fa19/omeka-2.7/plugins/AdminImages/helpers/AdminImageFunctions.php(5): Zend_View_Abstract->__call('adminImageTag', Array) #2 /srv/www/canary.simmons.edu/html/classes/lis-462-ol-fa19/omeka-2.7/application/views/helpers/Shortcodes.php(80): admin_image_tag_shortcode(Array, Object(Omeka_View)) #3 [internal function]: Omeka_View_Helper_Shortcodes->handleShortcode(Array) #4 /srv/www/canary.simmons.edu/html/classes/lis-462-ol-fa19/omeka-2.7/application/views/helpers/Shortcodes.php(63): preg_replace_callback('/\\[(\\w+)\\s*([^\\...', Array, '<h1>About our P...') #5 /srv/www/canary.simmons.edu/html/classes/lis-462 in /srv/sftp-chroot/classes/lis-462-ol-fa19/omeka-2.7/plugins/AdminImages/views/helpers/AdminImageTag.php on line 10

I tried other ways of adding the image to the page, such as trying to directly insert an image and using the URL of the photo in Admin Images, but every time that I save changes to the page it deletes the image from the body. We’re using Omeka Classic 2.7.

The error looks like it’s saying that you didn’t pass an id argument to the shortcode. Could there just be a typo in the shortcode you actually inserted?

It was a dumb error. There needed to be a space between the id and size attributes. I copied and pasted from the Admin Images instructions which were misleading on that particular syntax: