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

Deploy doesn't trigger on article update #2

Open
robinmetral opened this issue May 9, 2019 · 20 comments
Open

Deploy doesn't trigger on article update #2

robinmetral opened this issue May 9, 2019 · 20 comments

Comments

@robinmetral
Copy link

Hey @iamtimsmith, I've stumbled on this plugin from your Gatsby and WordPress series. Thanks for building it!

I've successfully installed it on my WordPress endpoint and configurated my Netlify hook & status links.

However I've tried to update one of my existing articles, but the build wasn't triggered on the Netlify endpoint.

Am I doing it wrong?

@iamtimsmith
Copy link
Owner

@robinmetral What are you putting in for your settings within the WordPress admin?

@robinmetral
Copy link
Author

robinmetral commented May 9, 2019

Thanks for your blazing fast reply 😉

I'm using the URL from my Netlify site settings (I created a hook), which looks like this in the console:

netlify-console-screenshot-with-hook-url

(the end of the endpoint is cropped)

And I'm using the image URL and status URL for the Netlify status badge. I think these are OK, they're for status not for triggering the build, right?

@robinmetral
Copy link
Author

There might be a small bug: I've been getting this update on my Admin panel since I updated the plugin settings. It's not going away, even after signing out and in again.

wordpress-admin-screenshot-saying-your-settings-have-been-updated

@iamtimsmith
Copy link
Owner

@robinmetral No, the statuses shouldn't have any bearing on the build. I'll take a look into that message and see if I can figure out what's going on.

@robinmetral
Copy link
Author

Thanks a lot @iamtimsmith! Let me know if I can do anything to help (although I'm not very familiar with the WordPress ecosystem).

Also I just made sure that my hook works with a curl request from my CLI: it does ✔️

@re1
Copy link

re1 commented May 12, 2019

It seems like I am having the same issue here. I too followed all instructions and curl works as excepted.

@robinmetral
Copy link
Author

Thanks @re1, good to know this was reproduced

@iamtimsmith
Copy link
Owner

@robinmetral @re1 Okay, so I've been looking into this. As far as the notice is concerned, this is a problem within WordPress so this will take some work to function as expected.

I did a fresh install in a local docker environment, pasted in the webhook URL and the urls for badge and link. I'm seeing it trigger a build when I update a blog post. While it fails (I think because it's a local docker environment), it does trigger the build. My followup questions are:

  • Are you seeing it fail or not seeing it trigger anything at all?
  • Are you updating blog posts, pages, or a custom content type?

@robinmetral
Copy link
Author

Thanks @iamtimsmith for looking into this!

When I first opened this issue, updating a blog post didn't trigger anything (no error message, nothing).

BUT I tested things again today and:

  • Updating a page triggered a build 🎉
  • Updating a post triggered a build 🎉

So as far as I'm concerned, this issue is solved. I'm thinking it might have been the hooks taking some time to get set up on either the WordPres or Netlify end.

The only problem that remains for me is this:

I've been getting this update on my Admin panel since I updated the plugin settings. It's not going away, even after signing out and in again.

wordpress-admin-screenshot-saying-your-settings-have-been-updated

I'm still getting this message at all times, where I think I should instead get notifications saying a build was triggered.

Do you want me to open a new issue for this?

@iamtimsmith
Copy link
Owner

Awesome! I'm glad it's working for you. @re1 Is this working for you now as well?

@re1
Copy link

re1 commented May 15, 2019

Hi @iamtimsmith. Sadly it still does not work for me. I am running WordPress on latest version using the following docker compose file:

version: '3.7'

services:
  db:
    image: mysql:5.7
    container_name: mysql
    restart: always
    environment:
      MYSQL_DATABASE: wordpress
      MYSQL_USER: wordpress
      MYSQL_PASSWORD: ${DB_PASSWORD}
      MYSQL_ROOT_PASSWORD: ${DB_PASSWORD}
    volumes:
      - db:/var/lib/mysql

  wordpress:
    depends_on:
      - db
    image: wordpress
    container_name: wordpress
    restart: always
    environment:
      WORDPRESS_DB_HOST: db:3306
      WORDPRESS_DB_USER: root
      WORDPRESS_DB_PASSWORD: ${DB_PASSWORD}
      WORDPRESS_DB_NAME: wordpress
      VIRTUAL_HOST: ${WP_URL}
      LETSENCRYPT_HOST: ${WP_URL}
      LETSENCRYPT_EMAIL: ${WP_EMAIL}
    volumes:
      - ./wp-content:/var/www/html/wp-content/
      - ./uploads.ini:/usr/local/etc/php/conf.d/uploads.ini

  nginx-proxy:
    image: jwilder/nginx-proxy
    container_name: nginx-proxy
    ports:
      - 80:80
      - 443:443
    volumes:
      - /var/run/docker.sock:/tmp/docker.sock:ro
      - ./nginx.conf:/etc/nginx/nginx.conf
      - nginx-vhosts:/etc/nginx/vhost.d
      - nginx-certs:/etc/nginx/certs
      - nginx-html:/usr/share/nginx/html

  letsencrypt-nginx-proxy-companion:
    image: jrcs/letsencrypt-nginx-proxy-companion
    container_name: nginx-proxy-letsencrypt
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock:ro
      - nginx-vhosts:/etc/nginx/vhost.d
      - nginx-certs:/etc/nginx/certs
      - nginx-html:/usr/share/nginx/html
    environment:
      NGINX_PROXY_CONTAINER: nginx-proxy

volumes:
  db: {}
  nginx-certs: {}
  nginx-vhosts: {}
  nginx-html: {}

@lukebennett88
Copy link

I'm also having problems getting the plugin to trigger a new build.
Clean WordPress install on DigitalOcean using the Ubuntu WordPress on 18.04 droplet.
Tested the build hook using curl just like @robinmetral and @re1 — works for me also.

@iamtimsmith
Copy link
Owner

@lukebennett88 @re1 I'm still looking into this. @lukebennett88 Are you also using docker within the droplet? I'm wondering if it's a problem with docker containers and webhooks. I can't get mine to work when using it in a docker container either, but I've tried it from a live WordPress site and it works no problem.

@lukebennett88
Copy link

@iamtimsmith I don't believe so (unless it uses Docker under the hood) just the WordPress droplets here: https://marketplace.digitalocean.com/apps/wordpress

@re1
Copy link

re1 commented May 25, 2019

I also tested https://github.com/lightstrike/wp-gatsby and https://github.com/lukethacoder/wp-webhook-deploy-netlify without success. As WordPress deploys are not my main concern at the moment it might take a while for me to actually do some in-depth tests..

@iamtimsmith
Copy link
Owner

@re1 @lukebennett88 Sorry I haven't gotten back to this sooner. I have come up with a possible solution. I've created a separate branch called WPTNB-2 with the change in WordPress hooks. It needs to be tested further. If you could give the code in that branch a try and let me know how it works, that'd be great!

@lukebennett88
Copy link

Hey @iamtimsmith just installed the plugin from the WPTNB-2, but unfortunately it's still not triggering a new build for me 😭

@re1
Copy link

re1 commented Jun 7, 2019

@iamtimsmith @lukebennett88 Same here. Also downloaded the plugin from WPTNB-2 branch. I might be able to work on this myself next week.

@iamtimsmith
Copy link
Owner

@re1 I've ended up being pretty busy over the last few weeks, so it may be a bit before I can dedicate time to this. If you want to take a look and see if you can figure it out, that would be awesome!

@CHEWX
Copy link

CHEWX commented Jun 13, 2019

Yep, can confirm it's not working for me either.

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

5 participants