WordPress.org

Ready to get started?Download WordPress

Forums

WP Custom Fields Search
not working on wp3.5 ( error, unrecognized expression: #config-form-%i%-0 ) (8 posts)

  1. 3pepe3
    Member
    Posted 1 year ago #

    On this other thread (http://wordpress.org/support/topic/widgets-wont-expand-in-admin-to-display-settings?replies=15#post-3666766) clpro mention that he received the next error:
    Uncaught Error: Syntax error, unrecognized expression: #config-form-%i%-0

    So here is the solution : replace %i% by xxx on the next 2 files:
    - extra_search_fields.php
    - js/customsearch.js

    This bug comes from switching from jquery 1.7 to 1.8 (wp3.5 uses jquery1.8)

    http://wordpress.org/extend/plugins/wp-custom-fields-search/

  2. clpro
    Member
    Posted 1 year ago #

    Thanks 3pepe3

    I already tried this fix, but after change it I get the following error:

    Uncaught TypeError: Cannot set property 'results' of undefined CustomSearch.js:201

    I made these changes:
    extra_search_fields.php -> $args['number']='xxx';
    js/customsearch.js -> if(id !='xxx') ...

    Any idea?

  3. skapator
    Member
    Posted 1 year ago #

    this worked for me:

    Don't change %i% anywhere. Leave it as is.

    Then on the CustomSearch.js file

    remove on line 17: this.id=id;

    then on line 21 replace: if(id!='%i%') this.createFlexboxes();

    with:

    if(id !='%i%') {
      this.id=id;
      this.createFlexboxes();
    }

    it worked for me, hope it works for you guys.

  4. GetThereInTheEnd
    Member
    Posted 1 year ago #

    I'm struggling with this too.
    Attempting to install the wp Custom Fields Search Plugin in a new wp3.5 site.
    I tried it in a wp3.4 site I hadn't updated yet and the plugin works.
    With the new wp3.5 site I'm experiencing the same issues others have described, plus I can't see any front-end pages in any browser when the plugin is activated: the pages don't load and Chrome gives the following: "HTTP Error 500 (Internal Server Error): An unexpected condition was encountered while the server was attempting to fulfil the request."
    However, the admin area in Settings is there and seems to function
    I tried both the fixes described by skapator and 3pepe3; no luck there, neither made any difference.
    Has anyone got any more ideas or fixes for why this plugin doesn't work in wp3.5?

  5. GetThereInTheEnd
    Member
    Posted 1 year ago #

    Apologies to skapator

    The code changes he proposed work for me: I can now drag the widget in the widget admin area and the search appears on any page I put it (using short code).

    My issue was that this plug in clashes with a PremiumPress Theme I was using. I activated TwentyEleven and everything cleared up.

    Over to clpro to check if it works for their site.

    Now to find out what the clash is with my intended theme!

    Thanks again to skapator we'll get there in the end

  6. skapator
    Member
    Posted 1 year ago #

    GetThereInTheEnd,

    Can u give more info?

    What errors does it report?

  7. GetThereInTheEnd
    Member
    Posted 1 year ago #

    Thanks skapator for your interest and help
    Last night I got to the bottom of the issue.
    Believe it or not the theme I am using (a Premium Press Theme) already has the "wp custom fields search" already embedded in it: no wonder there was a clash! I only stumbled on this because the appropriate acknowledgement and Don's copyright is in the theme code.
    The reason I wasn't satisfied with the theme's advanced search was that I wanted to use checkboxes in the search and I'd found that "wp custom fields search" could be modified to do this and this can be found here

  8. http://colmb.com/2010/06/changes-to-wordpress-plug-in-custom-fields-search/
  9. I have contacted the theme author and suggested that the checkbox functionality be included in the theme. In the meantime I have disabled the Theme's Advanced search and have activated the plugin. I haven't fully tested it yet but it looks hopeful.
    The one downside it that I think the checkbox items are treated as logical OR and I'm looking for logical AND. I'm not a coder so if you or anyone else can point me in the right direction to achieve this it would be great!
    Without skapator's wp3.5 fix I wouldn't have got this far so I'm grateful. I also can't believe there aren't other plugins out there that allow the creation of customised search that search custom fields, and other areas, with dropdown boxes, checkboxes and combinations of these.Surely a universal problem for Directories, Listings and the like. Thank goodness for this plugin and the revised checkbox code.Cheers

  • GetThereInTheEnd
    Member
    Posted 1 year ago #

    skaptor can you help - or anyone else for that matter?

    The code modified by colmb at the link (referred to in earlier post)

  • http://colmb.com/2010/06/changes-to-wordpress-plug-in-custom-fields-search/
  • doesn't work with wp3.5.

    I did the changes that got the unmodified plugin to work but no joy.
    I assume there are some other js issues.

    Can you shed a light on this?

    Thanks

    Topic Closed

    This topic has been closed to new replies.

    About this Plugin

    About this Topic

    Tags

    No tags yet.