Limitations of custom fields in advanced search

This topic contains 18 replies, has 3 voices, and was last updated by  Kiran 6 years, 2 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #411985

    David Sirius
    Expired Member
    Post count: 163

    Hi,

    I have c. 30-40 custom fields (Place settings -> Custom fields). These should be options for users to choose from if they wish so via advanced options. I have actived all of them to be part of the advanced search, basically just following your guide (6. filter with custom fields https://wpgeodirectory.com/docs/gd-search/)

    However, at some point I got an error message saying “too many culomns” (see screenshot) and when I dont went to the tab “advanced search” I’m missing a number of custom fields there.

    I never read anywhere that there is a limitiation on custom fields. Hence, I’m not sure if this is a bug? In any case I need to get the advanced search to work without limitations for all custom fields.

    Could you please help?

    Many thanks
    David

    #412014

    Kiran
    Moderator
    Post count: 7069

    Hi David,

    It seems there is a problem in running database query during custom field save, may be SQL permissions or DB table structure.
    Let us provide admin, FTP and database credentials so we can review there. Also let us know how we can replicate that error from our side.

    Thanks,
    Kiran

    #412025

    David Sirius
    Expired Member
    Post count: 163

    Hi Kiran,

    Thank you for looking into this. I’m currently running the site on my localhost but I’ll upload the website today so you can have a look (this was overdue anyway).

    You can replicate the error by creating 40 custom fields (Im using type checkbox) in GD -> Place Settings -> Custom fields that you all make eligible for the advanced search via each setting of the custom field. When getting to c 30 you should start getting the same error message and these custom fields will even disappear but reappear when you refresh.

    Now most of your custom fields will appear in the advanced search tab (still GD -> Place Settings), however you will notice some are missing, ie those you got the error message for.

    I presume the easiest way for you to check this and track each custom field would be to just give numerical names to the custom fields of 1-40.

    I believe the error may stem from the advanced search tab that can only handle a limited number of custom fields.

    I will provide you with logins to my site later today.

    Thanks,
    David

    #412027

    Kiran
    Moderator
    Post count: 7069

    Hi David,

    Thanks for your reply. I have tested in my test site with 42 fields and there is no problem there.

    In past we have fixed same problem https://wpgeodirectory.com/support/search/?bbp_search=you+have+too+many+columns
    So in your case reason could be plugin/site/server/database specific.

    Once we get details of your live we will check there to find exact cause.

    Thanks,
    Kiran

    #412122

    David Sirius
    Expired Member
    Post count: 163

    Hi Kiran,

    I believe I may have the same problem as Stephen https://wpgeodirectory.com/support/topic/geodirectory-multi-select-field-cannot-handle-many-select-options/ i.e. many checkboxes.

    So perhaps I could just try to fix the database on my localhost as opposed to uploading the website (it’s more complicated than I thought it would be). However, I dont understand where he made the changes, also because his replies started to become private and its hard to follow the thread.

    I had a look in my database (myphpadmin) but cannot find any such details tab -see screenshot.

    Could you explain the required change in detail so I can try resolve it on my localhost?

    Many thanks
    David

    #412152

    Kiran
    Moderator
    Post count: 7069

    Hi David,

    Sorry but it is hard to explain without checking your database. We need to check each field structure of DB tables custom fields and detail table. 🙂

    Kiran

    #413026

    David Sirius
    Expired Member
    Post count: 163
    This reply has been marked as private.
    #413086

    Kiran
    Moderator
    Post count: 7069
    This reply has been marked as private.
    #413088

    David Sirius
    Expired Member
    Post count: 163
    This reply has been marked as private.
    #413095

    Kiran
    Moderator
    Post count: 7069
    This reply has been marked as private.
    #413186

    David Sirius
    Expired Member
    Post count: 163
    This reply has been marked as private.
    #413217

    Alex Rollin
    Moderator
    Post count: 27815

    Hello,

    Is this still an issue? The front page has adv search enabled and several field are visible.

    Can you create a page that will scroll so all the options are visible?

    Then you can check to see which options are not available to see if this is still an issue.

    You can look into it yourself by verifying the settings on the db field.

    Thanks

    #413242

    Kiran
    Moderator
    Post count: 7069

    Hi David,

    I have managed to check database structure via Database Browser plugin.

    During debugging it shows error “Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs”
    It means your table row size becomes too large because you have too many fields. I have changed data type for some fields from VARCHAR to TEXT and now create/update custom fields works fine.

    In case if you face this issue again then just change data type VARCHAR to TEXT for some fields, it will fix the issue.

    Thanks,
    Kiran

    #413282

    David Sirius
    Expired Member
    Post count: 163

    @kiran thank you very much!!

    i will try this evening if I can now call the remaining custom fields from place settings tab to the adanvces search tab, so that they appear in the advanced search option field on the search page.

    When you have a chance, could you explain how one changes the data type from VARCHAR to TEXT?

    Will this problem be solved in V2?

    Thank you
    Best
    David

    #413284

    Kiran
    Moderator
    Post count: 7069

    Hello,

    When you have a chance, could you explain how one changes the data type from VARCHAR to TEXT?

    You can change data type via running below query (replace tablename=TABLE NAME & replace columnname =COLUMN NAME)

    ALTER TABLE tablename MODIFY columnname TEXT;

    Will this problem be solved in V2?

    Yes

    Kiran

Viewing 15 posts - 1 through 15 (of 19 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket