Uncaught TypeError: Cannot read property 'opera'

Uncaught TypeError: Cannot read property 'opera' of undefined

I have a clean 7.1.4 install in a sub directory. I moved it to the root and now I get this JS error.

 

Quote · 25 Feb 2014

When you moved it, did you remember to edit the /inc/header.inc.php file to point to the proper root?

Geeks, making the world a better place
Quote · 25 Feb 2014

And did you empty the /cache, /cache_public, and /tmp directories (except the .htaccess files)?

BoonEx Certified Host: Zarconia.net - Fully Supported Shared and Dedicated for Dolphin
Quote · 25 Feb 2014

Yes, the header is pointing to right root. I emptied the cache several times. Error occurs when you click login on the home page. No popups.

Here is the URL adventurousbug.com 

Quote · 25 Feb 2014

 

Yes, the header is pointing to right root. I emptied the cache several times. Error occurs when you click login on the home page. No popups.

Here is the URL adventurousbug.com 

To be clear, did you empty those directories manually via FTP? Sometimes the administration panel doesn't do it.

 

If that didn't work, try disabling JavaScript compression (and possibly cache) from Administration -> Tools -> Cache -> Settings. This will rule out corruption from bad cache.

BoonEx Certified Host: Zarconia.net - Fully Supported Shared and Dedicated for Dolphin
Quote · 25 Feb 2014

I used the panel. I tried to disable the compression. then used the admin panel to clear. still the same.

If I was to delete the cache via FTP would be in the cache_public directory correct?

Quote · 25 Feb 2014

After I turned off the JS and CSS caching, I got this error

 

  1. Uncaught TypeError: Cannot read property 'opera' of undefined jquery.dolPopup.js:197
    1. (anonymous function)jquery.dolPopup.js:197
    2. x.extend.eachjquery.js:4
    3. x.fn.x.eachjquery.js:4
    4. $.fn.setToCenterjquery.dolPopup.js:192
    5. (anonymous function)jquery.dolPopup.js:148
    6. x.extend.eachjquery.js:4
    7. x.fn.x.eachjquery.js:4
    8. $.fn._dolPopupSetPositionjquery.dolPopup.js:138
    9. (anonymous function)jquery.dolPopup.js:52
Quote · 25 Feb 2014

 

I used the panel. I tried to disable the compression. then used the admin panel to clear. still the same.

If I was to delete the cache via FTP would be in the cache_public directory correct?

FTP in, delete all files in the /cache and /cache_public leaving the .htaccess file in place in each directory.  Clear cache all in admin a few times.

Geeks, making the world a better place
Quote · 25 Feb 2014

The directories are /cache, /cache_public, and /tmp. But it doesn't look like this is caused by cache now. Try replacing the contents of /inc/js with files from a fresh download that matches your version.

BoonEx Certified Host: Zarconia.net - Fully Supported Shared and Dedicated for Dolphin
Quote · 25 Feb 2014

deleted everything except the .htaccess file in cache, cache_public & tmp. Also replaced the inc/js directory from freshly downloaded 7.1.4  Still the same issue.

Weird everything else seems to work just fine.

New lines for errors

event.returnValue is deprecated. Please use the standard event.preventDefault() instead. jquery-1.10.2.js:5374
  1. Uncaught TypeError: Cannot read property 'opera' of undefined jquery.dolPopup.js:198
    1. (anonymous function)jquery.dolPopup.js:198
    2. x.extend.eachjquery-1.10.2.js:657
    3. x.fn.x.eachjquery-1.10.2.js:266
    4. $.fn.setToCenterjquery.dolPopup.js:193
    5. (anonymous function)jquery.dolPopup.js:149
    6. x.extend.eachjquery-1.10.2.js:657
    7. x.fn.x.eachjquery-1.10.2.js:266
    8. $.fn._dolPopupSetPositionjquery.dolPopup.js:139
    9. (anonymous function)jquery.dolPopup.js:53
Quote · 25 Feb 2014

I was going to point out the non-standard jQuery in your /plugins directory, but it looks to have been removed while I was in the middle of testing. I'm not seeing any problems on the site now.

BoonEx Certified Host: Zarconia.net - Fully Supported Shared and Dedicated for Dolphin
Quote · 25 Feb 2014

I edited the jquery.dolPopup.js and commented these lines out. The popup now works, but when I login the domain.com/member.php is blank. I have to go to the home page, refresh to show I am logged in then click the Account link and then domain.com/member.php displays my info.

I can't believe how fragile this framework is. You touch one thing and the wholesite is down.

//            if(!$.browser.opera) {
                iTop = ($(window).height() - $el.height()) / 2;
                iLeft = ($(window).width()  - $el.width()) / 2;
//            }
//            else {
//               iTop = (parseInt(window.innerHeight) - $el.height()) / 2;
//               iLeft = ($(window).width()  - $el.width()) / 2;
//            }

Quote · 25 Feb 2014

Try undoing those changes (or replacing the file). This looks like it was more likely caused by the extra jQuery being called. If you didn't delete it, I don't know who did.

 

For the blank page, that means a PHP error has occured. Check the error_log file under /public_html.

BoonEx Certified Host: Zarconia.net - Fully Supported Shared and Dedicated for Dolphin
Quote · 25 Feb 2014

Hi Nathan, can you give a bit more info on what you mean by "extra jQuery being called" ?

How would I go about tracking what is missing or what was deleted?

Thanks.

Quote · 25 Feb 2014

 

Hi Nathan, can you give a bit more info on what you mean by "extra jQuery being called" ?

How would I go about tracking what is missing or what was deleted?

Thanks.

Dolphin ships with jquery; it is used for many areas of the platform.  Dolphin already loads a version of jquery and loading it twice will cause errors.  If you add jquery code from the net, the instructions will usually tell you to load jquery; that is not needed as Dolphin has already loaded it.  When you load two copies or more, you will break jquery.

Geeks, making the world a better place
Quote · 25 Feb 2014

Could permissions on the directory be an issue? My sub directory was 755, the root is 750.

Quote · 25 Feb 2014

Note the date - it's from a few days ago. Do you have an error from today or yesterday? If you want, I can take a closer look - PM me the site and Plesk login (I'm guessing it's Plesk based on the path and timezone warning).

BoonEx Certified Host: Zarconia.net - Fully Supported Shared and Dedicated for Dolphin
Quote · 25 Feb 2014

Replaced the /inc & /plugins folder from my original installation download, deleted all the files in the /cache & /cache_public folders and it worked. I will do some more testing and will post my final result.

Thank you Nathan & Geek Girl.

Quote · 25 Feb 2014

All tested and working. This thread is closed.

Quote · 26 Feb 2014
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.