Closed jgmac1106 closed 5 years ago
Correct, the endpoint is not required for sending webmentions.
I just tried manually using cURL and it showed up on WebmentionRocks - so the error must be with the sending indeed.
Not sure what could be the reason; I am aware of at least three websites that use the current version of the plugin and sending them just fine. How is your blueprint organized? Is the text with that outgoing hyperlink stored in the standard text
field? The plugin currently only renders URLs that are within that main content field; URLs in other fields are not parsed (it's on the roadmap...).
To rule out server issues, it is a good idea to try with a fresh Kirby Starterkit for debugging: just the plain default theme and this plugin (this helps eliminate any interference by other modifications; as you can see from the webmentions on https://webmention.rocks/test/1 I just did that from my own test site and it all works as designed).
Please don't hesitate to follow up if any additional evidence appears how this might be an issue in the plugin itself.
Here is a link to my blueprint for my notes: https://github.com/jgmac1106/gregkirbyv3/blob/master/site/blueprints/pages/note.yml and note: https://github.com/jgmac1106/gregkirbyv3/blob/master/site/blueprints/pages/notes.yml
I added the section to the notes page.
I would not doubt that this isn't a server problem. I have never not had a server problem with webmentions.
Will try a vanilla install.
I just had a thought: the plugin should (if everything works as designed) create a hidden .sendmentions.json
file in the same folder as your content file (i.e. where the note.txt
file is located). This file is also created in case of an error (e.g. HTTP code 400), with the error code stored in that JSON; this is the same data that should be shown in your panel view (where you placed the ping
section).
Currently, webmentions are not sent again if a URL is already in the JSON. Dealing with resending webmentions is on the roadmap, but in this case might affect your test if the first run caused a 40x error (e.g. if your site was password-protected when you first tried). This does however not affect new content; i.e. if you create a new note, webmentions should be sent.
Will go back to trying a clean install. I think I will once again run into a shared hosting problem.
Here was my next attempt: http://testkirby.jgregorymcverry.com/notes/kirbynote11
I checked my server no .sendmentions.json file exists in testkirby.jgregorymcverry.com/content/2_notes/20190618_kirbynote11
I got a vanilla site up that I will try though I doubt any changes to my header or CSS would mess things up.
Here is the vanilla install it did not register the ping either: https://kirbytest.jgregorymcverry.com/notes/webmention-test
there is also no json file here either
Here is a video file of everything I did trying to send from my site and the vanilla site: https://archive.org/details/tryingtobuildbloggingtemplate/Kirbyvideo5.mp4 if you are super bored.
I noticed from your repo that your plugin folder name contains the -master
at the end, but after a quick test can assure that is not the problem. It works just as well if I change the folder name on my server accordingly.
Any hints in the PHP error log? The fact that no JSON file is created hints at a more fundamental issue. Could this have to do with the relative references within my plugin code, as it references other files? I am aware that is not consistent; could imagine that to cause trouble in some environments? But that should definitely leave "file not found" or similar errors in your server's PHP logs...
Here are my error logs but my index.php looks the same as Starter Kit
[18-Jun-2019 09:54:17 UTC] PHP Parse error: syntax error, unexpected end of file in /home/jgregory/testkirby.jgregorymcverry.com/index.php on line 6
[18-Jun-2019 09:54:21 UTC] PHP Parse error: syntax error, unexpected end of file in /home/jgregory/testkirby.jgregorymcverry.com/index.php on line 6
[18-Jun-2019 09:54:23 UTC] PHP Parse error: syntax error, unexpected end of file in /home/jgregory/testkirby.jgregorymcverry.com/index.php on line 6
[18-Jun-2019 09:54:47 UTC] PHP Parse error: syntax error, unexpected end of file in /home/jgregory/testkirby.jgregorymcverry.com/index.php on line 6
Had an idea, what happens if I manually add the the txt file? Should we try? If so how should I set it up?
The sending of webmentions is triggered by Kirby's page.update:after hook, i.e. only when the content is updated via Panel or API. Changing the content manually in the txt file will not trigger the sending of webmentions.
I downloaded your gregkirbyv3 repo and ran it on my local server: when creating a note that contains a link to https://webmention.rocks/test/1 the ping is sent correctly, the .sendmentions.json
file is created and the URL and HTTP code are immediately displayed in the panel.
I also investigated my earlier hunch that this may have to do with the way I reference files within the plugin. The PHP file containing the event hook was indeed referenced without using the __DIR__
constant. This is now fixed - please try with the latest version of this repo to see if it fixes the issue?
okay will do!! and thanks for all your work on this!
Well gave it a try to no avail: http://testkirby.jgregorymcverry.com/notes/kirbynote15 Thanks for trying to help.
Sorry, I am out of ideas for now re what could be the underlying issue. I'd be happy to re-open this issue and investigate further, but would need some kind of log/error message or other evidence that indicates where the sending process fails on your server.
Hey @sebastiangreger I tried a few webmentions but did not send any, you can see some examples here: http://testkirby.jgregorymcverry.com/notes/
I noticed I do not have an endpoint in my header but I assume that will come when i add and set up the second plugin.
Will check my error log to see if anything registered.