ACF with GeoDirectory

This topic contains 13 replies, has 3 voices, and was last updated by  MC1171611 7 years ago.

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

Open Support Ticket
  • Author
    Posts
  • #375851

    MC1171611
    Full Member
    Post count: 180

    Hi guys,

    We’ve run into a major problem with our (admittedly very complicated) project, and now we need to off-load some of the custom fields into ACF. I’m seeing some responses that GD is incompatible with ACF, and I wanted to see if that was still the official response. We’re really dead in the water with all this project’s requirements if we are unable to get the database overhead on the GD table reduced.

    Is GD compatible with ACF?

    #375852

    Paolo
    Site Admin
    Post count: 31206

    Hi,

    it is not and performance wise ACF will make thing worst, not better if you want to manage custom fields within listings.

    Thanks

    #375853

    MC1171611
    Full Member
    Post count: 180

    GD simply won’t do what we need it to do. The custom fields table in the database is far too big, and it’s breaking critical functions of our setup. What can be done to make it work?

    #375912

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    If you can explain the problems you are facing and your requirements i will give you some advice.

    Thanks,

    Stiofan

    #375921

    MC1171611
    Full Member
    Post count: 180

    We have a significant number of custom fields that are necessary to display all of the data our client requires, and the massive database table is causing all sorts of problems, basically breaking the site. We *have to* have the various data available, but right now GD custom fields isn’t working and you don’t provide compatibility with ACF, so I’m apparently out of options.

    #376119

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Of what type are the custom fields, what sort of info are you trying to store?
    If you explain fully i can give better advice.

    Stiofan

    #376466

    MC1171611
    Full Member
    Post count: 180

    Hi Stiofan,

    Let me know what you think of this. I think I found a possible solutions. We can limit the character limit for a lot of the fields and maybe combine a few of the fields where possible.
    http://stackoverflow.com/questions/2009694/is-there-an-advantage-to-varchar500-over-varchar8000https://wpgeodirectory.com/support/topic/suddenly-unable-to-sort-custom-fields/

    We have over 50 custom fields. It’s even causing problems now when we try to update a post. But specifically we are running into more problems and getting the error when we try to Broadcast the post fields to one of our subsites. We have almost 100 columns on that restaurant custom post type.

    This is triggering the error.
    WordPress database 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 for query ALTER TABLE

    wp_7_geodir_gd_restaurant_detail

    ADD

    post

    VARCHAR( 255 ) NOT NULL /*

    Many of the fields only require less than 10 characters, so I think reducing the overhead might be possible.

    Let me know please. Thanks for your help.

    #376476

    MC1171611
    Full Member
    Post count: 180

    The reason we were looking to use ACF was to try to offload some of the fields to it because of the maximum row size. It looks like by using a couple of the previously mentioned techniques we may be able decrease the row size preventing the error.

    #376576

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    text fields are not stored on the table so should take up less room, than a varchar 255 for example.

    Can you give me wp-admin and phpMyAdmin access and i’ll see if i can spot anywhere you can change things.

    Thanks,

    Stiofan

    #376632

    MC1171611
    Full Member
    Post count: 180
    This reply has been marked as private.
    #376846

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    I would first try changing some of the var(255) to TEXT in the DB, try to do this only for fields you don’t plan on making searchable, this should let you add more to the table.

    Let me know how you get on.

    Thanks,

    Stiofan

    #377797

    MC1171611
    Full Member
    Post count: 180

    Thanks for the help, we are making progress.

    I’ve updated a lot of the fields to text and it seems to have fixed the error.

    For a long term solution I was thinking that instead of offloading some of the fields to ACF we could create another supporting custom post type and store the data there.

    Let’s say Custom Post Type “Things” and then pull in that data to the detail pages, it wouldn’t be searchable which is ok.

    If we had a field in the supporting custom post type that was (main custom post type name or post id) and (goedir_things_custom_field) was the data we want to pull into our main custom post type. What would a query look like that might pull that into the detail page for the other custom post type?

    if (isset($post->geodir_things_custom_field)

    This works but pulls in the current $post ,We would need to pull in the data linked from the other supporting custom post type.

    Ideas?

    Thanks for your help Stiofan.

    #377890

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    I just would not recommend ACF at all in this situation, you would need to contact a developer if you want that ability.

    Stiofan

    #377980

    MC1171611
    Full Member
    Post count: 180

    Yes Stoifan I understand using ACF isn’t a good idea.

    With that thinking I was going to create another geodirectory custom post type and try to offload some of the data there.

    Just not sure about the best way to link the 2 post types, and then the function to pull in the data fields from the new GD custom post type into the existing GD custom post type.

    Thanks for your help.

Viewing 14 posts - 1 through 14 (of 14 total)

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

Open Support Ticket