Multiple add - crashes Firefox

Phoca Gallery - image gallery extension
cr33
Phoca Newbie
Phoca Newbie
Posts: 5
Joined: 14 May 2009, 22:05

Re: Multiple add - crashes Firefox

Post by cr33 »

Hi there - the "Multiple Add" page crashes FF3 here as well. But what is odd is that I used it just a few days ago to upload about 8 pics.

Today, I uploaded one pic and it gave me the success message about upload, BUT FF hung up completely. Force-quit and restarted FF, went back to "Multiple Add", it hung up again. At this point the one pic I uploaded did not show in the list of Images. So, I fired up a VM (win XP), opened the page in IE7 and was able to go to "Multiple Add", assign the one pic to a category, and it worked as expected.

So, I went back to FF3, and the "Multiple Add" page loads OK. Scrolled down to the bottom, uploaded one pic - same result. I get the "Upload Success" message, but FF hangs completely.

I'm going to investigate further, but any and all suggestions are welcome. Flash upload is disabled, and I'm not using the Java upload either. Info about my browser:
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.10) Gecko/2009042523 Ubuntu/8.10 (intrepid) Firefox/3.0.10

EDIT: this is not related to extensions - I can reproduce the hang-up in safe mode (no add-ons). Also - the size of the image does not seem to be a factor...

Thanks,
Chris
cr33
Phoca Newbie
Phoca Newbie
Posts: 5
Joined: 14 May 2009, 22:05

Re: Multiple add - crashes Firefox

Post by cr33 »

OK - this is somehow related to the java uploader. By disabling java in FF I can use all of the upload sections of PhocaGallery.

So, I've almost got a solution. I decided to hide the Java upload tab if the setting enable_java is set to 0. But when I do that, it seriously messes up the layout of the upload page.

In /administrator/components/com_phocagallery/views/phocagalleryi/tmpl/default.php I added an 'if' like so (line 46):

Code: Select all

        if ($params->get( 'enable_java' ) == 1){
                echo $pane->startPanel( JHTML::_( 'image.site', 'components/com_phocagallery/assets/images/icon-16-upload-java.png','', '', '', '', '') . ' '.JText::_('Java Upload'), 'votes' );
                echo $this->loadTemplate('javaupload');
                echo $pane->endPanel();
        }
And in /administrator/components/com_phocagallery/views/phocagalleryi/view.html.php I added another like so (line 76):

Code: Select all

                // JAVA UPLOAD
                if ($params->get( 'enable_java') == 1){
                        $tmpl['currenttab']['javaupload'] = $tmpl['displaytabs'];
                        $tmpl['displaytabs']++;
                }
But this seriously destroys the layout. What am I missing?

Thanks,
Chris
cr33
Phoca Newbie
Phoca Newbie
Posts: 5
Joined: 14 May 2009, 22:05

[SOLVED] Multiple add - crashes Firefox

Post by cr33 »

This works for me:

Code: Select all

                // JAVA UPLOAD
                if ($params->get( 'enable_java') == 1){
                        $tmpl['enable_java'] = 1;
                        $tmpl['currenttab']['javaupload'] = $tmpl['displaytabs'];
                        $tmpl['displaytabs']++;
                } else {
                        $tmpl['enable_java'] = 0;
                }
and:

Code: Select all

        if ($this->tmpl['enable_java'] == 1){
                echo $pane->startPanel( JHTML::_( 'image.site', 'components/com_phocagallery/assets/images/icon-16-upload-java.png','', '', '', '', '') . ' '.JText::_('Java Upload'), 'votes' );
                echo $this->loadTemplate('javaupload');
                echo $pane->endPanel();
        }
You need to make changes in /administrator/components/com_phocagallery/views/phocagalleryi and /administrator/components/com_phocagallery/views/phocagallerym. in phocagalleryi, edit view.html.php and tmpl/default.php. In phocagallerym, edit view.html.php and tmpl/form.php.

Hope this helps someone else ;)

Chris
Post Reply