User Control Panel "Delete" Not Working

Phoca Gallery - image gallery extension
sharon_stewart
Phoca Member
Phoca Member
Posts: 12
Joined: 08 Jul 2016, 01:27

User Control Panel "Delete" Not Working

Post by sharon_stewart »

I've got users created with all permissions I can find. I can access the User Control Panel and the user's photos show up under Images and I can Edit the image to change the title. However, none of the photos show any delete icons. Also when I try to upload a new photo from here it says Select Category. I select the category (which is the users name) and it switches quickly to the category and then back to the default "Select Category".

I have tried this logged on as Super User also and it doesn't work. I have also created a new User, uploaded a few images through the frontend category and then went from there to the User Control Panel and it still doesn't work.

Any ideas would be greatly appreciated. I'm using current versions of Joomla and Phoca Gallery. This is a fairly new install.
sharon_stewart
Phoca Member
Phoca Member
Posts: 12
Joined: 08 Jul 2016, 01:27

Re: User Control Panel "Delete" Not Working

Post by sharon_stewart »

Tested this in Mozilla Firefox and the "Select Category" works but still no Delete icon.

I found this thread that is almost exactly the same problem. Was there a solution.
viewtopic.php?f=31&t=28826

Thanks.
sharon_stewart
Phoca Member
Phoca Member
Posts: 12
Joined: 08 Jul 2016, 01:27

Re: User Control Panel "Delete" Not Working

Post by sharon_stewart »

Was able to track down the issue with the delete icons not showing up. On the Phoca Gallery Options page under General I had to change the Bootstrap 3 Icon to "no".

Now I need to find out why when I try to Select Category (for image upload purposes on the UCP) it won't stay on the Category but flips back over to "Select Category".

Any ideas?
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49144
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: User Control Panel "Delete" Not Working

Post by Jan »

Hi, try to check the javascript console, if there is no error when selecting the category:

https://www.phoca.cz/documents/16-joomla ... -conflicts

Jan
If you find Phoca extensions useful, please support the project
sharon_stewart
Phoca Member
Phoca Member
Posts: 12
Joined: 08 Jul 2016, 01:27

Re: User Control Panel "Delete" Not Working

Post by sharon_stewart »

Select Category seems to work using both Firefox and Chrome. I've noticed in the forum and online that a lot of people have had this same problem with at least Internet Explorer 11 for quite some time now. I tried to run the javascript debugger but couldn't find an issue that I could see but I'm not an experienced programmer. I have this installed on a localhost and online server with different install copies of Joomla and can't get it to work any place on any computer running IE11. I have very few external plugins or modules installed and can't seem to find any of them causing the problem.

Thank you for your help. If you have any other ideas that would be great.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49144
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: User Control Panel "Delete" Not Working

Post by Jan »

Hi, try to see this file:
components\com_phocagallery\views\user\tmpl\default_images.php (select box in image list, not in subcategory list)

there you will find this code:
<button class="btn tip hasTooltip" type="button" onclick="document.getElementById('phocagalleryimagesearch').value='';document.phocagalleryimageform.submit();" title="<?php echo JText::_( 'COM_PHOCAGALLERY_CLEAR' ); ?>"><i class="icon-remove glyphicon glyphicon-remove"></i></button>
Try to replace:

FROM:
document.phocagalleryimageform.submit();
TO:
document.getElementById("phocagalleryimageform").submit();
And let me know, if this will work in all standard browser, I will take a look at it - to implement it for next version
If you find Phoca extensions useful, please support the project
sharon_stewart
Phoca Member
Phoca Member
Posts: 12
Joined: 08 Jul 2016, 01:27

Re: User Control Panel "Delete" Not Working

Post by sharon_stewart »

Unfortunately, the fix did not work.

I edited the components\com_phocagallery\views\user\tmpl\default_images.php file. My finished code is below. Let me know if I did anything wrong. Thanks for your help and hopefully you can find a fix soon. Other then that I really like the program.


<div class="btn-group pull-left hidden-phone">
<button class="btn tip hasTooltip" type="submit" onclick="this.form.submit();" title="<?php echo JText::_( 'COM_PHOCAGALLERY_SEARCH' ); ?>"><i class="icon-search glyphicon glyphicon-search"></i></button>
<button class="btn tip hasTooltip" type="button" onclick="document.getElementById('phocagalleryimagesearch').value='';document.getElementById("phocagalleryimageform").submit();" title="<?php echo JText::_( 'COM_PHOCAGALLERY_CLEAR' ); ?>"><i class="icon-remove glyphicon glyphicon-remove"></i></button>
</div>
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49144
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: User Control Panel "Delete" Not Working

Post by Jan »

Hi, no, sorry this is not the right place.

Try to open:
components\com_phocagallery\views\user\view.html.php

line cca. 354

FROM:

Code: Select all

$javascript     = 'class="inputbox" size="1" onchange="document.phocagalleryimageform.submit();"'; 
TO:

Code: Select all

//$javascript     = 'class="inputbox" size="1" onchange="document.phocagalleryimageform.submit();"';
$javascript     = 'class="inputbox" size="1" onchange="document.getElementById(\'phocagalleryimageform\').submit();"'; 
Jan
If you find Phoca extensions useful, please support the project
sharon_stewart
Phoca Member
Phoca Member
Posts: 12
Joined: 08 Jul 2016, 01:27

Re: User Control Panel "Delete" Not Working

Post by sharon_stewart »

Sorry, still doesn't work. Following is the code I ended up with after replacing Line 354.

$categoriesImage = $model->getCategoryList($user->id);
if (!empty($categoriesImage)) {
//$javascript = 'class="inputbox" size="1" onchange="document.phocagalleryimageform.submit();"';
$javascript = 'class="inputbox" size="1" onchange="document.getElementById
(\'phocagalleryimageform\').submit();"';
$tree = array();
$text = '';
$tree = PhocaGalleryCategory::CategoryTreeOption($categoriesImage, $tree,0, $text, -1);

Should I have done both changes you suggested or only this one.

Any other suggestions would be appreciated. Thank you.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49144
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: User Control Panel "Delete" Not Working

Post by Jan »

Hi, no, only the last one, try to see if the changes you made are really set. See the html source code of the site, if the form includes:

document.getElementById(\'phocagalleryimageform\').submit();
instead of:
document.phocagalleryimageform.submit();

Jan
If you find Phoca extensions useful, please support the project
Post Reply