Closed andreasciamanna closed 5 years ago
It looks like the content of the warning is used to populate taxonomy terms (???):
+1 Ran into the same issue just now from master
. I might try to dig into this later.
+1 Same issue for me, would be great if anyone can fix it
The taxonomy terms are populated with text generated by this tool, no longer working: https://setgetgo.com/randomword/get.php
So this is my fix, replace the function get_term() in line 495 of generate-posts.php with this:
private function get_term() { $request = wp_safe_remote_get( 'http://www.filltext.com/?rows=1&text={lorem|'.rand(1,2).'}' ); if ( is_wp_error( $request ) ) { WP_CLI::warning( sprintf( 'Error getting a random word for a term: %s', $request->get_error_message() ) ); return ''; } $json = json_decode(str_replace(array('[',']'), '', $request['body'])); return $json->{'text'}; }
The terms generated are randomly 1-2 words get using http://www.filltext.com API
This is resolved with the latest release, sorry everyone!
As promised in #9, I'm going to report an issue with generating posts.
The used command is
wp jw-random generate 10 --featured-image --tax=category,post_tag --tax-n=15 --img-type=abstract
.This produces a bunch of warnings (more than the number of generated posts):
Warning: Received an error inserting The resource you are looking for has been removed, had its name changed, or is temporarily unavailable. term into the post_tag taxonomy: A term with the name provided already exists in this taxonomy.