Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement: Support for Custom Fields / Advanced Custom Fields Plugin #46

Closed
jambox opened this issue Dec 20, 2014 · 7 comments
Closed

Comments

@jambox
Copy link

jambox commented Dec 20, 2014

Hey there. I'm a WP dev and I'm trying to expand my toolkit and also think about site performance...this led me to trying your plugin/CLI and thinking about integrating it into some sort of build script or deploy sequence or something. Anyway...a big part of what I focus on is the admin section of WP and, to that end, I use the ACF plugin and custom post types on most of my sites. Out of the box, this plugin doesn't support ACF...it outputs all the custom fields as converted meta in YAML (I think...I dug around your code a bit) and I can't begin to think how to capture the output.

Are you familiar with ACF and/or handling custom fields within templates? I see that you're ignoring certain meta fields which makes me think that somewhere around those lines in the code, it could detect whether the meta is an Advanced Custom Field (based on the post_type column) and save them for output later or something.

It'd be really great to hear your thoughts of how a site using custom fields and custom templates could output as markdown or at least static HTML files. Thanks in advance!

@benbalter
Copy link
Owner

@jambox are you still interested in this? Is there a clean way to get a list of the ACF fields for a given post?

@jambox
Copy link
Author

jambox commented Jan 11, 2016

@benbalter In theory I'm still interested in this feature, sure, but the last few times I tried to use this plugin in the past 6-8 months or so, the only result is a corrupt zip file, as outlined in this issue. Definitely a bigger roadblock for me than the ACF stuff at this point...

But in terms of the tech, yes, there are ways of isolating the ACF-specific post_meta fields. If the plugin can work on a basic level for me at some point, I can try to team up with you to figure out the best way to return a clean json object or whatever you need to generate the proper output. Keep me in the loop if you're interested!

@benbalter
Copy link
Owner

but the last few times I tried to use this plugin in the past 6-8 months or so, the only result is a corrupt zip file, as outlined in this issue

If you have a chance, I believe 2.1.1 should resolve many of those issues on most environments.

@jambox
Copy link
Author

jambox commented Jan 11, 2016

Thanks for the follow up. Just tried installing via git clone and exporting and the same kind of infinite .zip <> .cpgz issue is happening

Also, just saw an issue where I can't de/activate the plugin via WP CLI...any way this is tied to some sort of runtime error?

@benbalter
Copy link
Owner

and exporting and the same kind of infinite .zip <> .cpgz issue is happening

Have you tried deactivating all other plugins? I'm starting to suspect caching or some other mechanism is corrupting the zip.

@jambox
Copy link
Author

jambox commented Jan 11, 2016

Just tried deactivating everything and running your plugin and the same thing happened. I did rename, and thereby ostensibly remove, a few some drop-in plugin files related to caching plugins which helped a bit because now I can see a fatal error in my debug trace. Seems related to Spyc (which I saw in another thread) and/or composer/autoload:

[11-Jan-2016 18:42:44 UTC] PHP Fatal error:  Cannot redeclare class Spyc in /Applications/MAMP/htdocs/{REDACTED_PATH}/wp-content/plugins/wordpress-to-jekyll-exporter/vendor/mustangostang/spyc/Spyc.php on line 57
[11-Jan-2016 18:42:44 UTC] PHP Stack trace:
[11-Jan-2016 18:42:44 UTC] PHP   1. {main}() /Users/{REDACTED_USER}/.wp-cli/bin/wp:0
[11-Jan-2016 18:42:44 UTC] PHP   2. include() /Users/{REDACTED_USER}/.wp-cli/bin/wp:4
[11-Jan-2016 18:42:44 UTC] PHP   3. include() phar:///Users/{REDACTED_USER}/.wp-cli/bin/wp/php/boot-phar.php:5
[11-Jan-2016 18:42:44 UTC] PHP   4. WP_CLI\Runner->start() phar:///Users/{REDACTED_USER}/.wp-cli/bin/wp/php/wp-cli.php:21
[11-Jan-2016 18:42:44 UTC] PHP   5. WP_CLI\Runner->load_wordpress() phar:///Users/{REDACTED_USER}/.wp-cli/bin/wp/php/WP_CLI/Runner.php:697
[11-Jan-2016 18:42:44 UTC] PHP   6. require() phar:///Users/{REDACTED_USER}/.wp-cli/bin/wp/php/WP_CLI/Runner.php:736
[11-Jan-2016 18:42:44 UTC] PHP   7. include_once() phar:///Users/{REDACTED_USER}/.wp-cli/bin/wp/php/wp-settings-cli.php:289
[11-Jan-2016 18:42:44 UTC] PHP   8. require_once() /Applications/MAMP/htdocs/{REDACTED_PATH}/wp-content/plugins/wordpress-to-jekyll-exporter/jekyll-exporter.php:31
[11-Jan-2016 18:42:44 UTC] PHP   9. ComposerAutoloaderInitf3a896456a2c29b2d298527963f263df::getLoader() /Applications/MAMP/htdocs/{REDACTED_PATH}/wp-content/plugins/wordpress-to-jekyll-exporter/vendor/autoload.php:7

Unfortunately this is all the time I have today to help debug. Also, it might be good to move this thread to issue #70 as its less pertinent to the ACF situation. Thanks!

@stale stale bot added the wontfix label Apr 6, 2017
@stale
Copy link

stale bot commented Apr 6, 2017

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot closed this as completed Apr 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants