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

Receiving a webmention renders a post invisible for builtin search #2490

Open
nekr0z opened this issue Jul 11, 2019 · 9 comments

Comments

@nekr0z
Copy link
Contributor

commented Jul 11, 2019

While trying to do this:

  1. Create a post with at least one non-ASCII character in it.
  2. Observe how in can be searched via builtin search functionality.
  3. Webmention the post or wait for someone else to send a webmention to it.
  4. Try to search for it again.

I encountered this error:

The post can no longer be searched.

Some other notes:

The search field in "entities" database table goes blank for the post in this case.

Give us some context:

  • It'd also be really handy if you could tell us the contents of your version.known file
    version = '0.12.11'
    build = '2019071002'
    (current master)

  • What database are you using? (e.g. mongo, mysql, postgres)
    MySQL

  • Any warnings or errors in your admin/diagnostics page?

  • If this is a programming bug, can you include examples of any Micropub / API calls / webhook pings you make? Otherwise please don't worry about what this means!

  • Bonus points - are you able to illustrate the issue with a unit test? If so, submit it as a pull request!

@mapkyca

This comment has been minimized.

Copy link
Member

commented Jul 11, 2019

Liked via the web interface or a web mention?

@nekr0z

This comment has been minimized.

Copy link
Contributor Author

commented Jul 11, 2019

Only tested with webmention so far.

@nekr0z

This comment has been minimized.

Copy link
Contributor Author

commented Jul 13, 2019

Testing further revealed that the issue doesn't affect posts that are ASCII-only. Posts that contain at least one UTF character (i.e. cyrillic letters) are affected.

@nekr0z nekr0z changed the title Receiving a like renders a post invisible for builtin search Receiving a webmention renders a post invisible for builtin search Jul 13, 2019

@mapkyca

This comment has been minimized.

Copy link
Member

commented Jul 13, 2019

Interesting - that sort of implies an mbstring issue.

@nekr0z

This comment has been minimized.

Copy link
Contributor Author

commented Jul 13, 2019

Seeing as how initially the posts are searchable, and Edit&&Publish makes them searchable again, I suspect that the post gets saved in some broken way when processing webmentions. Spent 3 hours this morning trying to make sense of /Idno/Common/Entity.php's inner workings, but my lack of PHP knowledge shows.

@mapkyca

This comment has been minimized.

Copy link
Member

commented Jul 21, 2019

Hmm... I can't see any obvious difference in the object save mechanisms for a web mention vs a regular save.

The search field is constructed by the low level *SQL data concierge class (mongo doesn't need one), and this is done via the object's fields, which given that the rest of the contents are there and annotations are appearing, has to be being saved correctly.

I reckon it's got to be a db encoding issue, but I can't see what. It'd be great to have a failing test to demonstrate this, but I'm a bit short on time at the moment.

@nekr0z

This comment has been minimized.

Copy link
Contributor Author

commented Jul 21, 2019

I reckon it's got to be a db encoding issue

Colud be. I notice quite a bunch of hiccups with non-ascii language support in Known, and seemingly encoding-related, such as database tags field always being empty or posts always showing "1 min read" no matter how long they are...

@mapkyca

This comment has been minimized.

Copy link
Member

commented Jul 21, 2019

Please report those when you find them - I don't routinely use non-ascii, and neither does Ben. But tags and min-read is probably the same problem in that the low level functions aren't mb safe

@nekr0z

This comment has been minimized.

Copy link
Contributor Author

commented Jul 21, 2019

Please report those when you find them

I wasn't sure about whether tags field was supposed to contain anything at all until I looked at code; that's why I haven't reported it up until now.

@benwerd benwerd self-assigned this Jul 29, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.