• Resolved George

    (@subscriptiongroup)


    After the latest updates (v1.5.8), we started getting the message “This doesn’t appear to be a valid number.” on the configuration page.

    Upon investigation, this is caused because we had define(‘WP_REDIS_MAXTTL’, ‘600’); set as a string and the is_int was failing in admin-page.php

    Changing to define(‘WP_REDIS_MAXTTL’, 600); removed the notice.

    Many pages recommend to use the TTL as string. For example the first result if you google “WP_REDIS_MAXTTL” (https://www.tinywp.in/recommend-redis-object-cache-plugin-settings/) has it in string.

    My question is whether having it as string will have any adverse effects and/or cause the keys to never expire, or it’s just an issue with the notice.

    • This topic was modified 4 years, 6 months ago by George.
Viewing 7 replies - 1 through 7 (of 7 total)
  • I have the same error and we go as low as TTL 30 for indexing otherwise our mobile PWA does not update but now I get that pesky message “This doesn’t appear to be a valid number.”

    Also, we have a Redis server with Google Cloud Platform but now I have an added message, that I can deal with…

    Redis Cache Pro
    Your site does not meet the system requirements for the Pro version:

    The PhpRedis extension is not installed.

    lol

    I’ve set it up to 900 an dover still getting the same message “This doesn’t appear to be a valid number.” and getting save errors “Updating failed. Unexpected token < in JSON at position 0” and i have a feeling it’s connected.

    In the plugin this is what triggers it:

    if ( ! is_int( $redisMaxTTL ) && ! ctype_digit( $redisMaxTTL ) !== 0

    • This reply was modified 4 years, 6 months ago by tripledm.
    Thread Starter George

    (@subscriptiongroup)

    To supress the notice, you need to define the TTL as following
    define(‘WP_REDIS_MAXTTL’, 600);
    instead of
    define(‘WP_REDIS_MAXTTL’, 600);
    Notice the removed quotes around the number.

    I’m not sure how the plugin author plans to resolve the issue.

    The issue you report is unrelated and you’ve probably added an extra “<” somewhere in your code.

    Thank you George that is awesome! Did not even spot that and not sure why it was changed but removing it worked for me thank you!

    Plugin Author Till Krüss

    (@tillkruess)

    I’ll fix that shortly on GitHub.

    The notice doesn’t affect the cache in any way ????

    Plugin Author Till Krüss

    (@tillkruess)

    Thanks Till! And no it does not affect cache.

    • This reply was modified 4 years, 6 months ago by tripledm.
Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘This doesn’t appear to be a valid number.’ is closed to new replies.