ACF with GeoDirectory
This topic contains 13 replies, has 3 voices, and was last updated by MC1171611 7 years, 10 months ago.
We have moved to a support ticketing system and our forums are now closed.
Open Support TicketTagged: acf custom post types
-
AuthorPosts
-
April 28, 2017 at 12:25 am #375851
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?
April 28, 2017 at 1:02 am #375852Hi,
it is not and performance wise ACF will make thing worst, not better if you want to manage custom fields within listings.
Thanks
April 28, 2017 at 1:05 am #375853GD 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?
April 28, 2017 at 11:00 am #375912If you can explain the problems you are facing and your requirements i will give you some advice.
Thanks,
Stiofan
April 28, 2017 at 1:11 pm #375921We 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.
April 29, 2017 at 3:34 pm #376119Of 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
May 2, 2017 at 2:26 am #376466Hi 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 TABLEwp_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.
May 2, 2017 at 5:47 am #376476The 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.
May 2, 2017 at 4:55 pm #376576text 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
May 2, 2017 at 10:17 pm #376632This reply has been marked as private.May 4, 2017 at 9:34 am #376846I 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
May 10, 2017 at 7:50 pm #377797Thanks 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.
May 11, 2017 at 1:33 pm #377890I just would not recommend ACF at all in this situation, you would need to contact a developer if you want that ability.
Stiofan
May 11, 2017 at 8:18 pm #377980Yes 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.
-
AuthorPosts
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket