Forum

Thread tagged as: Question, Problem, Blog

Webmentions Failing

Hi,

I'm struggling to get webmentions working on a blog.

My post URLS are like this: https://northyorkshireforestschool.co.uk/blog/2017-12-29-welcome-to-north-yorkshire-forest-school

In Settings my website URL is set to: https://northyorkshireforestschool.co.uk/

My Blog Post Page Path is set to: https://northyorkshireforestschool.co.uk/blog/{postSlug}

I have this in my post page header:

<?php perch_blog_post_webmention_endpoint(perch_get('s')); ?>

And this after my post content:

<?php perch_blog_post_ping_form(perch_get('s')); ?>

The form generated includes the full post URL, as follows:

<form id="form1_ping" class="comment-form" action="https://northyorkshireforestschool.co.uk/blog/2017-12-29-welcome-to-north-yorkshire-forest-school" method="post">
    <fieldset>
       <legend>Posted a response? Enter the URL</legend>
        <div>
            <label for="form1_commentURL">Article URL</label>
            <input id="form1_source" name="source" placeholder="https://" type="url">
        </div>
        <div>
            <input id="form1_pid" name="pid" value="1" type="hidden">
            <input id="form1_target" name="target" value="https://northyorkshireforestschool.co.uk/blog/2017-12-29-welcome-to-north-yorkshire-forest-school" type="hidden">
            <input id="form1_submitPing" name="submitPing" value="Submit" type="submit"><input type="hidden" name="cms-form" value="cGluZzpwZXJjaF9ibG9nOi90ZW1wbGF0ZXMvYmxvZy9waW5nX2Zvcm0uaHRtbDoxNTM5NDIwNjI2">
        </div>

    </fieldset>


</form>

When I submit something via the pingback form (like this https://twitter.com/jackbarber/status/1050872453583568897) the perch3_blog_webmention_queue table is populated with a row. The entrySource is the URL of my tweet, the entryTarget is the exact URL of my post (as above). The entryType is post and the entryFK is 1.

I have PERCH_DEBUG on and have run the /perch/core/scheduled/run.php script to see the output, which is as follows:

 Time   Δ   Debug Message - Perch 3.1.2
0.0126  0   [30] SELECT DISTINCT settingID, settingValue FROM perch3_settings WHERE userID=0
0.0156  0.003   [1] SHOW TABLES LIKE "perch3_scheduled_tasks"
0.0161  0.0005  [3] SELECT taskApp, taskKey, MAX(taskStartTime) AS t FROM perch3_scheduled_tasks WHERE taskApp IN ('perch_blog') GROUP BY taskApp, taskKey
0.0164  0.0003  INSERT INTO perch3_scheduled_tasks(taskApp,taskKey,taskStartTime,taskResult,taskMessage) VALUES('perch_blog','publish_posts','2018-10-13 08:51:14','FAILED','Task failed to complete, or is still running.')
0.0165  0.0001  [1] SELECT * FROM perch3_scheduled_tasks WHERE taskID='60' LIMIT 1
0.0175  0.0009  [nil] SELECT tbl.* FROM ( SELECT idx.itemID, main.*, idx2.indexValue as sortval FROM perch3_blog_index idx JOIN perch3_blog_posts main ON idx.itemID=main.postID AND idx.itemKey='postID' JOIN perch3_blog_index idx2 ON idx.itemID=idx2.itemID AND idx.itemKey='postID' AND idx2.indexKey='_id' WHERE 1=1 AND idx.itemID=idx2.itemID AND idx.itemKey=idx2.itemKey GROUP BY idx.itemID, idx2.indexValue, postID ) as tbl WHERE (postStatus='Published' AND postDateTime<='2018-10-13 08:51:00' AND postIsPublished=0) GROUP BY itemID, sortval ORDER BY sortval ASC
0.0183  0.0008  UPDATE perch3_scheduled_tasks SET taskApp='perch_blog', taskKey='publish_posts', taskStartTime='2018-10-13 08:51:14', taskEndTime='2018-10-13 08:51:14', taskResult='OK', taskMessage='0 posts published.' WHERE taskID='60'
0.0185  0.0002  INSERT INTO perch3_scheduled_tasks(taskApp,taskKey,taskStartTime,taskResult,taskMessage) VALUES('perch_blog','process_webmentions','2018-10-13 08:51:14','FAILED','Task failed to complete, or is still running.')
0.0186  0.0001  [1] SELECT * FROM perch3_scheduled_tasks WHERE taskID='61' LIMIT 1
0.0191  0.0005  [1] SELECT * FROM perch3_blog_webmention_queue ORDER BY entryCreated ASC LIMIT 1
0.0192  0.0001  DELETE FROM perch3_blog_webmention_queue WHERE entryID=13
0.0194  0.0001  Processing webmention for https://twitter.com/jackbarber/status/1050872453583568897
0.0236  0.0043  Target URL does not exist in source
0.0237  0   UPDATE perch3_blog_comments SET commentStatus='REJECTED' WHERE postID=1 AND commentURL='' AND webmention=1
0.0238  0.0002  [1] SELECT * FROM perch3_blog_webmention_queue ORDER BY entryCreated ASC LIMIT 1
0.024   0.0002  UPDATE perch3_scheduled_tasks SET taskApp='perch_blog', taskKey='process_webmentions', taskStartTime='2018-10-13 08:51:14', taskEndTime='2018-10-13 08:51:14', taskResult='OK', taskMessage='1 webmention processed.' WHERE taskID='61'
0.0242  0.0002  [3] SELECT taskApp, taskKey FROM perch3_scheduled_tasks GROUP BY taskApp, taskKey
0.0244  0.0002  DELETE FROM perch3_scheduled_tasks WHERE taskID IN (SELECT * FROM ( SELECT taskID FROM perch3_scheduled_tasks WHERE taskApp='perch_blog' AND taskKey='delete_spam_comments' ORDER BY taskStartTime DESC LIMIT 10, 9999999 ) AS tmp)
0.0247  0.0003  DELETE FROM perch3_scheduled_tasks WHERE taskID IN (SELECT * FROM ( SELECT taskID FROM perch3_scheduled_tasks WHERE taskApp='perch_blog' AND taskKey='process_webmentions' ORDER BY taskStartTime DESC LIMIT 10, 9999999 ) AS tmp)
0.0249  0.0002  DELETE FROM perch3_scheduled_tasks WHERE taskID IN (SELECT * FROM ( SELECT taskID FROM perch3_scheduled_tasks WHERE taskApp='perch_blog' AND taskKey='publish_posts' ORDER BY taskStartTime DESC LIMIT 10, 9999999 ) AS tmp)
0.0251  0.0002  [1] OPTIMIZE TABLE perch3_scheduled_tasks

The issue seems to be 'Target URL does not exist in source' - but I cannot find a reason for this!

I've attempted to do everything mentioned https://forum.grabaperch.com/forum/07-17-2017-webmentions-not-displayed-in-perch-admin but the problem persists. Is there anything else I should try?

Here's my full diagnostic report:

Perch information

    Perch: 3.1.2
    Production mode: (PERCH_PRODUCTION)
    Installed apps: content (3.1.2), assets (3.1.2), categories (3.1.2), perch_blog (5.6.1), chirp_seo (1.2.1)
    DB driver: PDO
    DB tables: perch3_blog_authors (1), perch3_blog_comments (0), perch3_blog_index (47), perch3_blog_posts (1), perch3_blog_posts_to_tags (0), perch3_blog_sections (4), perch3_blog_tags (1), perch3_blog_webmention_queue (1), perch3_blogs (1), perch3_categories (0), perch3_category_counts (0), perch3_category_sets (1), perch3_chirp_seo (2), perch3_chirp_seo_scores (18), perch3_content_index (96), perch3_content_items (56), perch3_content_regions (12), perch3_menu_items (10), perch3_navigation (0), perch3_navigation_pages (0), perch3_page_templates (1), perch3_pages (13), perch3_resource_log (145), perch3_resource_tags (0), perch3_resources (50), perch3_resources_to_tags (0), perch3_scheduled_tasks (21), perch3_settings (30), perch3_user_passwords (0), perch3_user_privileges (37), perch3_user_role_privileges (2), perch3_user_roles (2), perch3_users (1)
    Users: 1
    App runtimes:

    <?php
        $apps_list = [ 
            'chirp_seo',
            'perch_blog'
        ];

    Scheduled tasks for perch_blog: delete_spam_comments (1440 mins), publish_posts (1 mins), process_webmentions (1 mins)
    Editor plug-ins:
    H1: 19b2522b612ed993b0322b5997e20e49
    L1: 66cc91b3cd9da170fedfc178f2e88d14
    F1: 3b606135b33e6a102526838f4152a807
    headerColour: #ffffff
    content_singlePageEdit: 1
    helpURL:
    hideBranding: 0
    content_collapseList: 1
    lang: en-gb
    installedAt: 3.0.11
    update_3.0.11: done
    headerScheme: light
    chirp_seo_license_key: G5OPX-YLTWS-F88MX-LTFIZ
    dashboard: 0
    sidebar_back_link: 0
    hide_pwd_reset: 0
    keyboardShortcuts: 0
    content_hideNonEditableRegions: 0
    content_frontend_edit: 0
    content_skip_region_list: 0
    assets_restrict_buckets: 0
    chirp_update: 1.2.1
    siteURL: https://northyorkshireforestschool.co.uk/
    perch_blog_update: 5.6
    perch_blog_site_name: North Yorkshire Forest School
    perch_blog_slug_format: %Y-%m-%d-{postTitle}
    perch_blog_akismet_key:
    perch_blog_max_spam_days: 0
    perch_blog_comment_notify: 0
    perch_blog_webmention_tx: 1
    perch_blog_webmention_rx: 1
    update_3.1.2: done
    perch_blog_post_url: https://northyorkshireforestschool.co.uk/blog/{postSlug}
    PERCH_DEVELOPMENT: 10
    PERCH_STAGING: 50
    PERCH_PRODUCTION: 100
    PERCH_DB_USERNAME: northyorkshirefo
    PERCH_DB_SERVER: localhost
    PERCH_DB_DATABASE: northyorkshireforestschool
    PERCH_DB_PREFIX: perch3_
    PERCH_TZ: UTC
    PERCH_EMAIL_FROM:
    PERCH_EMAIL_FROM_NAME: Jack Barber
    PERCH_LOGINPATH: /perch
    PERCH_PATH: /srv/northyorkshireforestschool.co.uk/public/htdocs/perch
    PERCH_CORE: /srv/northyorkshireforestschool.co.uk/public/htdocs/perch/core
    PERCH_RESFILEPATH: /srv/northyorkshireforestschool.co.uk/public/htdocs/perch/resources
    PERCH_RESPATH: /perch/resources
    PERCH_HTML5: 1
    PERCH_SCHEDULE_SECRET: genesis
    PERCH_PRODUCTION_MODE: PERCH_PRODUCTION
    PERCH_DEBUG: 1
    PERCH_RUNWAY:
    PERCH_ERROR_MODE: DIE
    PERCH_DATE_LONG: %d %B %Y
    PERCH_DATE_SHORT: %d %b %Y
    PERCH_TIME_SHORT: %H:%M
    PERCH_TIME_LONG: %H:%M:%S
    PERCH_RUNWAY_ROUTED:
    PERCH_STRONG_PASSWORDS:
    PERCH_ASSET_VERSION: 6738d5d5f5664f7c5e34
    PERCH_PREVIEW_ARG: preview
    PERCH_TEMPLATE_PATH: /srv/northyorkshireforestschool.co.uk/public/htdocs/perch/templates
    PERCH_TEMPLATE_FILTERS:
    PERCH_DEFAULT_DOC: index.php
    PERCH_DEFAULT_EXT: .php
    PERCH_XHTML_MARKUP:
    PERCH_RWD: 1
    PERCH_HTML_ENTITIES:
    PERCH_SSL:
    PERCH_STRIPSLASHES:
    PERCH_PROGRESSIVE_FLUSH: 1
    PERCH_PARANOID:
    PERCH_FORCE_SECURE_COOKIES:
    PERCH_DEFAULT_BUCKET: default
    PERCH_TRANSLATION_ASSIST:
    PERCH_PASSWORD_MIN_LENGTH: 6
    PERCH_MAX_FAILED_LOGINS: 10
    PERCH_AUTH_LOCKOUT_DURATION: 1 HOUR
    PERCH_VERIFY_UPLOADS:
    PERCH_PRIV_ASSIST:
    PERCH_CUSTOM_EDITOR_CONFIGS:
    PERCH_ENABLE_EXIF: 1
    PERCH_AUTH_PLUGIN:
    PERCH_DB_CHARSET: utf8
    PERCH_DB_PORT:
    PERCH_DB_SOCKET:
    PERCH_APPS_EDITOR_PLUGIN: markitup
    PERCH_APPS_EDITOR_MARKUP_LANGUAGE: markdown

Hosting settings

    PHP: 5.6.38-0+deb8u1
    Zend: 2.6.0
    OS: Linux
    SAPI: apache2handler
    Safe mode: not detected
    MySQL client: 5.5.60
    MySQL server: 5.5.60-0+deb8u1-log
    Free disk space: 64.21 GB
    Extensions: Core, date, ereg, libxml, openssl, pcre, zlib, bcmath, bz2, calendar, ctype, dba, dom, hash, fileinfo, filter, ftp, gettext, SPL, iconv, mbstring, session, posix, Reflection, standard, shmop, SimpleXML, soap, sockets, Phar, exif, sysvmsg, sysvsem, sysvshm, tokenizer, wddx, xml, xmlreader, xmlwriter, zip, apache2handler, PDO, curl, gd, imagick, imap, json, mcrypt, mysql, mysqli, pdo_mysql, readline, xmlrpc, mhash, Zend OPcache
    GD: Yes
    ImageMagick: Yes
    PHP max upload size: 100M
    PHP max form post size: 30M
    PHP memory limit: 128M
    Total max uploadable file size: 30M
    Resource folder writeable: Yes
    Session timeout: 24 minutes
    Native JSON: Yes
    Filter functions: Yes
    Transliteration functions: No
    GEOIP_ADDR: 212.159.23.98
    HTTPS: on
    SSL_TLS_SNI: northyorkshireforestschool.co.uk
    HTTP_HOST: northyorkshireforestschool.co.uk
    HTTP_USER_AGENT: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:62.0) Gecko/20100101 Firefox/62.0
    HTTP_ACCEPT: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
    HTTP_ACCEPT_LANGUAGE: en-GB,en;q=0.5
    HTTP_ACCEPT_ENCODING: gzip, deflate, br
    HTTP_COOKIE: PHPSESSID=6hab1p1j7t5evj1umh562v0fq0; cmsa=1
    HTTP_CONNECTION: keep-alive
    HTTP_UPGRADE_INSECURE_REQUESTS: 1
    PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
    SERVER_SOFTWARE: Apache
    SERVER_NAME: northyorkshireforestschool.co.uk
    SERVER_ADDR: 212.110.173.84
    SERVER_PORT: 443
    REMOTE_ADDR: 212.159.23.98
    DOCUMENT_ROOT: /srv/northyorkshireforestschool.co.uk/public/htdocs/
    REQUEST_SCHEME: https
    CONTEXT_DOCUMENT_ROOT: /srv/northyorkshireforestschool.co.uk/public/htdocs/
    SERVER_ADMIN: [no address given]
    SCRIPT_FILENAME: /srv/northyorkshireforestschool.co.uk/public/htdocs/perch/core/settings/diagnostics/index.php
    REMOTE_PORT: 50352
    GATEWAY_INTERFACE: CGI/1.1
    SERVER_PROTOCOL: HTTP/1.1
    REQUEST_METHOD: GET
    QUERY_STRING: extended
    REQUEST_URI: /perch/core/settings/diagnostics/?extended
    SCRIPT_NAME: /perch/core/settings/diagnostics/index.php
    PHP_SELF: /perch/core/settings/diagnostics/index.php
    REQUEST_TIME_FLOAT: 1539420221.516
    REQUEST_TIME: 1539420221
Jack Barber

Jack Barber 0 points

  • 2 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

If you look at the rejected webmention, what does it look like?

Hi Drew,

It's just a tweet - I just copied the link to the tweet into the ping form, the URL is https://twitter.com/jackbarber/status/1050872453583568897 - and this is the URL which was entered into the DB as the entrySource item in the item row.

Is that what you mean?

Thanks!

Drew McLellan

Drew McLellan 2638 points
Perch Support

Yes, I think that's what I mean. I'm just looking for data points.

I'm not quite sure how to debug this remotely - I've not seen this go wrong before. Is there anything in the server error log?