Aug
1
2013
 

WP-Property & WordPress 3.6 – Broken Widgets

If you are using the WP-Property plugin, you will most likely be experiencing an unusable widget area after you update your WordPress installation to version 3.6.

Now don’t let this keep you from updating your install as I am a firm believer in keeping your WordPress core up to date. But I’m guessing that since you’re reading this you’ve already upgraded and are looking for a way to fix things.

The fix is easy pretty painless, if you don’t mind editing a little bit of code. The problem is that WordPress 3.6 uses a newer version of jQuery and in that version there is no select method for jQuery UI Tabs. ???What is that you ask??? Don’t worry, this isn’t meant to be a complete education.

First, you will need to use some sort of code or text editor and FTP to get access to the file that needs to be fixed. I’ll assume you know how to get to and open the file that we’re going to fix.

Find and open the file named wp-property-admin-widgets.js located in wp-content > plugins > wp-property > js. Once you have it opened, look for the block of code that looks like this. In my code editor it’s lines 23 through 29.

var set_group_or_ungroup = function() {
    if(jQuery( "input.wpp_toggle_attribute_grouping", e ).is(":checked")) {
      jQuery(".wpp_subtle_tabs", e ).tabs('select',1);
    } else {
      jQuery(".wpp_subtle_tabs", e ).tabs('select',0);
    }
  }

Now change ‘select’ in lines 25 and 27 to “option”, “active” and save your file. Now lines 23 through 29 should look like this:

var set_group_or_ungroup = function() {
    if(jQuery( "input.wpp_toggle_attribute_grouping", e ).is(":checked")) {
      jQuery(".wpp_subtle_tabs", e ).tabs("option", "active",1);
    } else {
      jQuery(".wpp_subtle_tabs", e ).tabs("option", "active",0);
    }
  }

If you made these changes on your local machine, upload the fixed file to your server. If you made the changes to the live version of the file, you are done and your problems should be fixed now.

Caveat, these instructions involve changing a core WP-Property file and will be overwritten when updated unless the folks over there get this fix into their code before then 🙂

Comments
11 Comments
  1. design diva August 2, 2013 at 7:58 am #

    You are a STAR, thanks for sharing this. I upggraded WordPress this morning and I’m tearing my hair out already, wondered where all of the widget’s had disappeared to. Your fix worked a treat, top bloke!

    • gsibert August 2, 2013 at 8:03 am #

      Glad I could help!

  2. cdreimer August 2, 2013 at 8:04 am #

    I’m seeing this problem on all three of my WP blogs. However, I don’t have wp-property folder in any of them.

    • gsibert August 2, 2013 at 8:21 am #

      My guess is your theme or a plugin is adding widget functionality and is causing this. If I were to troubleshoot this I would start by switching to an up to date default WP theme. If the problem goes away then it’s in your theme’s js files somewhere. If you still have a problem then disable plugins until you get functionality back. That will help you isolate which plugin it might be.

      After you narrow down where the issue is you can look for the same .tabs (‘select’, in your js files. On a mac you can search the files in the suspect directory for that text and it should narrow things down… You’ll need a local copy of the files.

      • cdreimer August 2, 2013 at 5:43 pm #

        The Section Widget was causing the problem. I simply removed for it now.

        • gsibert August 2, 2013 at 10:46 pm #

          Ah, that plugin has a different problem. It uses the length method which was also deprecated in jQuery 1.10 http://jqueryui.com/upgrade-guide/1.9/#deprecated-length-method. I don’t have a fix for that plugin but if I get a chance in the next day or so I’ll check it out.

        • gsibert August 5, 2013 at 8:39 am #

          Hello, if you unzip this download and use the contained file to replace section-widget-admin.js, it should fix up Section Widget for you. https://tummel.me/wp-content/uploads/section-widget-admin.js.zip

          • gsibert August 5, 2013 at 8:53 am #

            I should add for others reading this that this file has nothing to do with WP-Property, rather the plugin Section Widget.

  3. Birthdayyh Allt August 2, 2013 at 9:28 am #

    how come for error like “Parse error: syntax error, unexpected T_FUNCTION in /home/admin101/domains/xn--12c2bh2avf4eb5a2b5iqdes.com/public_html/wp-content/plugins/wp-property/core/ud_api.php on line 1381”

    • gsibert August 2, 2013 at 10:27 am #

      What’s your domain and when did you experience this? After updating to WP 3.6? After making the code change mentioned in this fix? Or has it always been there? My experience with that type of error is it is usually due to the PHP version you are running, PHP 5.2 and earlier doesn’t support closures and could be the reason you are seeing this error. Do you know what PHP version your running?

      • Birthdayyh Allt August 2, 2013 at 11:18 am #

        Yes, i fixed already. I don’t sure for version of PHP. and i’ve uninstalled WP 3.6. Thank you for your help. lets you know, if i have any problem about plug in.

Leave a Reply