I see this error in my error logs 3 or 4 times a day. It is caused by guests and spiders.
Apply Filter: Only show the error messages of this URL
http://xxx.com/index.php?action=gallery;sa=view;pic=75
Apply Filter: Only show the errors with the same message
8: Undefined index: id
Apply Filter: Only show the errors from this file
File: /home/content/43/12118843/html/Sources/Gallery2.php
Line: 1010
I did a bit of looking around and don't see anything here on this error so I thought I might ask. It has been going on since I installed the Pro Gallery. I did convert from the Lite Gallery if that has any bearing on the issue.
Here is the lines of code from the file with Line: 1010
990:
991:
// Delete All Pictures
992:
$smcFunc['db_query']('', "DELETE FROM {db_prefix}gallery_pic WHERE id_cat = $catid");
993:
994:
// Finally delete the category
995:
$smcFunc['db_query']('', "DELETE FROM {db_prefix}gallery_cat WHERE id_cat = $catid LIMIT 1");
996:
997:
// Last Recount the totals
998:
RecountFileQuotaTotals(false);
999:
1000:
redirectexit('action=admin;area=gallery;sa=admincat');
1001: }
1002:
1003: function ViewPicture()
1004: {
1005:
global $context, $mbname, $sourcedir, $smcFunc, $modSettings, $gallerySettings, $user_info, $scripturl, $boardurl, $txt;
1006:
1007:
isAllowedTo('smfgallery_view');
1008:
1009:
// Get the picture ID
==>1010:
$id = (int) $_REQUEST['id'];
1011:
if (empty($id))
1012:
fatal_error($txt['gallery_error_no_pic_selected'],false);
1013:
1014: if ($user_info['is_guest'])
1015: {
1016: if (!empty($gallerySettings['gallery_set_onlyregcanviewimage']))
1017: {
1018: fatal_error($txt['gallery_set_onlyregcanviewimage'],false);
1019: }
1020: }
1021:
1022:
// Do we need to show the visual verification image?
1023:
$context['require_verification'] = $user_info['is_guest'];
1024:
if ($context['require_verification'])
1025:
{
1026:
require_once($sourcedir . '/Subs-Editor.php');
1027:
$verificationOptions = array(
1028:
'id' => 'post',
1029:
);
1030:
$context['require_verification'] = create_control_verification($verificationOptions);
I have noted that when I click on a picture to view with
Gallery Pro the URL reads...
index.php?action=gallery;sa=view;id=408
On my test forum with
Gallery Lite the URL is...
index.php?action=gallery;sa=view;pic=1
Difference being
pic=xxx versus
id=XXXThe URLs that seem to log errors are all
pic=XXX like the error above in the quote box which was
http://xxx.com/index.php?action=gallery;sa=view;pic=75I thought since maybe spiders were causing these errors that maybe my old site map was to blame since I had not updated it since the upgrade to Pro. I did a new site map about two weeks ago and still see these errors at the same low rate. The new site map should have taken out all references to URLs from the Gallery Lite which used
view;pic=xxx.
Any help is appreciated. Everything else is fine. The Pro version I am using is Version: 6.5.1. BTW, I had these errors with the previous version before 6.5.1. I am also aware that you have 6.5.2 available but I thought I would solve this before updating again.
Otherwise, this is a great product!!