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

OwnYourGram errors #223

Closed
stephenpieper opened this issue Sep 17, 2018 · 20 comments
Closed

OwnYourGram errors #223

stephenpieper opened this issue Sep 17, 2018 · 20 comments

Comments

@stephenpieper
Copy link

stephenpieper commented Sep 17, 2018

I’m testing the latest master version and the following error is occuring for any photo imported from OwnYourGram. The photos don’t get shown.
Notice: Object of class WP_Post could not be converted to int in …/wp-includes/functions.php on line 3808

@stephenpieper stephenpieper changed the title Filed an Issue dshanske/indieweb-post-kinds (GitHub) adds support for responding to and interacting with other... OwnYourGram errors Sep 17, 2018
@dshanske
Copy link
Owner

Great, will get on this.

@dshanske
Copy link
Owner

Is that the only line of errors? I'm trying to track what called that function.

@stephenpieper
Copy link
Author

I checked the debug log and this error is also apearing there:

PHP Warning: array_merge(): Argument #2 is not an array in .../wp-content/plugins/indieweb-post-kinds-master/includes/class-kind-view.php on line 129

@dshanske
Copy link
Owner

That is certainly an error checking bug, but it doesn't explain the issue. I'm thinking that the issue is the image is there, but isn't displaying. I did change how the code displays it to try and fix double display issues.

@dshanske
Copy link
Owner

If that is so, pushing a change should address the issue.

@dshanske
Copy link
Owner

@stephenpieper Try it now.

@stephenpieper
Copy link
Author

I'm getting a whole bunch of errors now. It's only for that type of post (imported OwnYourGram photos). Everything else is fine.

@dshanske
Copy link
Owner

Can you post them?

@stephenpieper
Copy link
Author

Here they are:

Warning: parse_url() expects parameter 1 to be string, array given in ...wp-includes/media.php on line 3918

Warning: strpos() expects parameter 1 to be string, array given in ...l/wp-includes/media.php on line 3925

Warning: preg_match() expects parameter 2 to be string, array given in ...wp-admin/includes/media.php on line 868

Notice: Object of class WP_Error could not be converted to int in .../wp-includes/post.php on line 5239

Warning: parse_url() expects parameter 1 to be string, array given in ...wp-includes/media.php on line 3918

Warning: strpos() expects parameter 1 to be string, array given in .../wp-includes/media.php on line 3925

Notice: wpdb::prepare was called incorrectly. Unsupported value type (array). Please see Debugging in WordPress for more information. (This message was added in version 4.8.2.) in .../wp-includes/functions.php on line 4161

Notice: wpdb::prepare was called incorrectly. The query only expected one placeholder, but an array of multiple placeholders was sent. Please see Debugging in WordPress for more information. (This message was added in version 4.9.0.) in .../wp-includes/functions.php on line 4161

Notice: Array to string conversion in ...wp-content/plugins/indieweb-post-kinds-master/parse-this/class-mf2-post.php on line 523

Notice: Array to string conversion in .../wp-content/plugins/indieweb-post-kinds-master/parse-this/class-mf2-post.php on line 523

Notice: Array to string conversion in .../wp-content/plugins/indieweb-post-kinds-master/parse-this/class-mf2-post.php on line 523

@dshanske
Copy link
Owner

Well, back to the drawing board

@dshanske
Copy link
Owner

I added some additional checks on this if you want to update. I think I found a few errors.

@stephenpieper
Copy link
Author

Sorry for the delayed reply. The errors are still there after the latest updates. I'm using the Sempress theme so I'm wondering if anyone else can replicate this.

@dshanske
Copy link
Owner

I keep trying to solve the problem of duplicate photos and have ended up here

@dshanske
Copy link
Owner

Did the errors appear exactly the same as above?

@stephenpieper
Copy link
Author

Yes. Just the same.

@dshanske
Copy link
Owner

Can you do me a favor? Install a plugin called post meta inspector, which should show you the metadata attached to the post, and paste it here?

@stephenpieper
Copy link
Author

This is from one the posts showing errors:

Key. Value
micropub_auth_response 'a:8:{s:10:"token_type";s:6:"Bearer";s:5:"scope";s:6:"create";s:2:"me";s:26:"https://stephenpieper.net/";s:9:"issued_by";s:53:"https://stephenpieper.net/wp-json/indieauth/1.0/token";s:9:"client_id";s:24:"https://ownyourgram.com/";s:9:"issued_at";i:1536009777;s:4:"user";i:2;s:13:"last_accessed";i:1536023424;}'

mf2_type 'a:1:{i:0;s:7:"h-entry";}'

mf2_content 'a:1:{i:0;s:50:"Garcia Peoples - Cash Crisis #vinyl #onmyturntable";}'

mf2_category 'a:3:{i:0;s:5:"vinyl";i:1;s:13:"onmyturntable";i:2;s:9:"instagram";}'

mf2_published 'a:1:{i:0;s:25:"2018-09-03T17:04:57+00:00";}'

mf2_syndication 'a:1:{i:0;s:40:"https://www.instagram.com/p/BnRY3F0lA29/";}'

mf2_photo 'a:2:{s:4:"type";a:1:{i:0;s:6:"h-cite";}s:10:"properties";a:1:{s:3:"url";a:1:{i:0;s:167:"https://scontent-sjc3-1.cdninstagram.com/vp/4e1c53b0601b663a4b28f91a337c7a66/5C19B9B1/t51.2885-15/fr/e15/s1080x1080/39604606_2064934336852984_7799574108894658560_n.jpg";}}}'

_edit_lock '1537957702:2'

_edit_last '2'

mf2_mp-syndicate-to 'a:1:{i:0;s:4:"none";}'

_bridgy_backlink 'true'

geo_weather 'a:2:{s:5:"units";s:1:"C";s:4:"icon";s:4:"none";}'

geo_public '1'

_jetpack_related_posts_cache 'a:1:{s:32:"8f6677c9d6b0f903e98ad32ec61f8deb";a:2:{s:7:"expires";i:1536540382;s:7:"payload";a:3:{i:0;a:1:{s:2:"id";i:2910;}i:1;a:1:{s:2:"id";i:2574;}i:2;a:1:{s:2:"id";i:3347;}}}}'

@dshanske
Copy link
Owner

That is exactly what I needed to know. This doesn't match up with the notation on how OYG loads photos, so I didn't account for it.

@dshanske
Copy link
Owner

dshanske commented Oct 3, 2018

The new version moves citation data for photos into the attachment, instead of storing it inside the post itself. It also replaces selection using a URL with selection using the WordPress media selector. Still some improvements to be made, but it should address the issue if you want to try, @stephenpieper

@stephenpieper
Copy link
Author

I tested it today with a new photo and it was imported correctly. Thanks.

@dshanske dshanske closed this as completed Oct 3, 2018
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