Forum Replies Created

Viewing 26 posts - 1 through 26 (of 26 total)
  • Author
    Posts
  • in reply to: Disappearing cron event #16330
    szepe.viktor
    Participant

    My post vanishes.

    in reply to: Disappearing cron event #16329
    szepe.viktor
    Participant

    If someone is looking for a workaround.

    
    #!/bin/bash
    #
    # Keep sending newsletters. Restore schedule if missing.
    
    export WP_CLI_CONFIG_PATH="/home/user/public_pm2/wp-cli.yml"
    
    if ! /usr/local/bin/wp --quiet cron event run newsletter \
        && ! /usr/local/bin/wp eval "wp_schedule_event(time() + 5*60, 'newsletter', 'newsletter');"; then
        echo "cron-newsletter ERROR." >&2
        exit 1
    fi
    
    in reply to: Disappearing cron event #16328
    szepe.viktor
    Participant

    If someone is loking for a workaround

    
    #!/bin/bash
    #
    # Keep sending newsletters. Restore schedule if missing.
    
    export WP_CLI_CONFIG_PATH="/home/***/public_pm2/wp-cli.yml"
    
    if ! /usr/local/bin/wp --quiet cron event run newsletter \
        && ! /usr/local/bin/wp eval "wp_schedule_event(time() + 5*60, 'newsletter', 'newsletter');"; then
        echo "cron-newsletter ERROR." >&2
        exit 1
    fi
    
    in reply to: Disappearing cron event #15793
    szepe.viktor
    Participant

    You just mentioned

    Crons are not on database are runtime rescheduled by plugins.

    and I’ve missunderstood as “Crons anre not on database. (period)” But they are.
    Now I understand that WP core fails to reschedule them:

    A fatal error while executing a cron or an out of memory can block wordpress to reschedule a periodic cron.

    Do you mean by “an out of memory can block wordpress to reschedule a periodic cron” that a not-rescheduled cron will disappear from the database?
    I think it will stay sceduled for a time in the past. The entry itself won’t be deleted.

    in reply to: Disappearing cron event #15764
    szepe.viktor
    Participant

    I understand.
    Could you make the event fixed. I think it is a more WP-like approach.

    in reply to: Disappearing cron event #15761
    szepe.viktor
    Participant

    I only have suhosin alerts (a PHP extension for security) but it is disabled for CLI.
    Do you think a PHP error could remove the event from the database?

    in reply to: Disappearing cron event #15753
    szepe.viktor
    Participant

    Thank you.
    The thing is wp-cli a WP console tool. It is able to list events.
    See: http://wp-cli.org/commands/cron/event/list/

    Do you have any code in your plugin that removes that event?

    in reply to: Disappearing cron event #15746
    szepe.viktor
    Participant

    > Check if wp cli has that event active.

    What does it mean that wp cli has it event active?

    This simply runs the “newsletter” event.

    wp cron event run "newsletter"

    I do not understand.

    in reply to: Disappearing cron event #15740
    szepe.viktor
    Participant

    When logging into WP as an admin it is recreated.
    Please advise.

    in reply to: Continously deleted 'newsletter' cron event #14916
    szepe.viktor
    Participant

    Oh! And the run thing.

    You can set skip-plugins in wp-cli config thus running WordPress faster from CLI.

    in reply to: Continously deleted 'newsletter' cron event #14915
    szepe.viktor
    Participant

    wp-cli is – I quote –

    a set of command-line tools for managing WordPress installations.

    I prefer runnig background job (mail sending, backup, cache preload etc.) from CLI thus not putting load on the webserver. That is why wp-cron is disabled.
    Now I run your main wp-cron event separately because Newsletter demands a more frequent run than other things (twice in an hour for others).

    wp --quiet --url=http://www.domain.hu/ --path=/home/user/path-to-wordpress cron event run newsletter

    See: http://wp-cli.org/commands/cron/event/run/

    • This reply was modified 8 years, 2 months ago by szepe.viktor.
    • This reply was modified 8 years, 2 months ago by szepe.viktor.
    in reply to: Continously deleted 'newsletter' cron event #14892
    szepe.viktor
    Participant

    I am very sorry. Your plugin was excluded from wp-cli run.

    • This reply was modified 8 years, 2 months ago by szepe.viktor.
    in reply to: Continously deleted 'newsletter' cron event #14891
    szepe.viktor
    Participant

    The schedule is missing:

    wp cron schedule list
    +---------------------------+------------------------------------------------+----------+
    | name                      | display                                        | interval |
    +---------------------------+------------------------------------------------+----------+
    | w3_cdn_cron_queue_process | [W3TC] CDN queue process (every 900 seconds)   | 900      |
    | w3_pgcache_prime          | [W3TC] Page Cache prime (every 900 seconds)    | 900      |
    | hourly                    | Óránként                                       | 3600     |
    | w3_cdn_cron_upload        | [W3TC] CDN auto upload (every 3600 seconds)    | 3600     |
    | w3_pgcache_cleanup        | [W3TC] Page Cache file GC (every 3600 seconds) | 3600     |
    | twicedaily                | Naponta kétszer                                | 43200    |
    | daily                     | Naponta egyszer                                | 86400    |
    | w3_minify_cleanup         | [W3TC] Minify file GC (every 86400 seconds)    | 86400    |
    +---------------------------+------------------------------------------------+----------+
    
    in reply to: friendly urls, no .php ending #10735
    szepe.viktor
    Participant

    Click on the link above then on the anchor text “3 times”

    in reply to: friendly urls, no .php ending #10733
    szepe.viktor
    Participant

    (click on the link 3 times )

    in reply to: friendly urls, no .php ending #10732
    szepe.viktor
    Participant
    in reply to: friendly urls, no .php ending #10731
    szepe.viktor
    Participant

    You can see here all WP files that reference wp-load:

    in reply to: friendly urls, no .php ending #10729
    szepe.viktor
    Participant

    Sorry! Those (the nice URL approach and the admin-post.php call) were mixed in my head.

    in reply to: friendly urls, no .php ending #10727
    szepe.viktor
    Participant

    As for the GETs:

    http://www.website.net/newsletter/unsubscribe?n=TOKENBASE64
    http://www.website.net/newsletter/clicktrack?n=TOKENSTRING
    The URL path has the static part: the action,
    the GET contains the dynamic part: the user’s token.

    Please consider using a real (secret) token instead of base64 encoded actual data.

    Let’s see: http://wordpress.stackexchange.com/questions/138610/how-to-handle-post-reqests-the-wordpress-way-without-including-admin-api

    in reply to: friendly urls, no .php ending #10722
    szepe.viktor
    Participant

    The rewritten URLs would be only for the user. These URLs won’t trigger anything.
    This short Codex page is about handling POST requests:
    http://codex.wordpress.org/Plugin_API/Action_Reference/admin_post_%28action%29
    So the forms’ action are always wp-admin/admin-post.php

    As far as I am concerned in PHP security, it is pretty dangerous “to open up” own php files for user interaction.
    All plugin files should begin with

    if (false === defined('ABSPATH')) {
        die();
    }

    or similar.
    I hope that helps making your plugin(s) better.
    Do you need a demo plugin that does POST-ing from a nice URL?

    in reply to: GIF in open.php #8118
    szepe.viktor
    Participant

    I think your 1×1.gif is a RED dot,
    this one is a transparent.
    Maybe I am wrong.

    in reply to: GIF in open.php #8100
    szepe.viktor
    Participant

    Thank you!

    in reply to: no tag replacement on "pages" #7817
    szepe.viktor
    Participant

    I was the one unsubscribing myself before viewing the “page” but after receiving the email.

    in reply to: no tag replacement on "pages" #7776
    szepe.viktor
    Participant

    …the reason could be: I’ve unsubscribed my email address meanwhile

    Sorry.

     

    in reply to: export failure #7620
    szepe.viktor
    Participant

    sorry 🙁

    there had been a brake-in on this website and therefore is a rewrite rule:

    RewriteEngine On
    RewriteCond %{REQUEST_URI} !^/wp-admin/
    RewriteCond %{REQUEST_URI} !^/wp-include/
    RewriteCond %{REQUEST_URI} !^/wp-login\.php
    RewriteRule ^(.*/)[^/]*\.php$ $1 [L,R=permanent]

    now I added a new exception:

    RewriteCond %{REQUEST_URI} !^/wp-content/plugins/newsletter/users

    I am sorry.

     

    in reply to: export failure #7619
    szepe.viktor
    Participant

    on another blog it downloads the csv

    I think it is a migration problem from v2.

    Do you have anything for me to check?

     

Viewing 26 posts - 1 through 26 (of 26 total)