• Problem Solving – verse 16 – The correct version?

    Problem Solving – verse 16 – The correct version?
    5. Now think again more carefully.
    Try not to get annoyed
    "The code that you are running,
    is that what you deployed?" 
    

    TRAC #29714-1 User is allowed to list SitesTRAC #29714-1 User is allowed to list Sites

    TRAC #29714-2 You do not have sufficient permissions to access this pageTRAC #29714-2 You do not have sufficient permissions to access this page

    TRAC #29714-3 User is shown site listTRAC #29714-3 User is shown site list

    At the wrap up meeting for WordCamp London contributor day, Jenny Wong asked

    What have you done today that you’re proud of

    I replied

    I’ve done something that I am not proud of… I’ve spent an hour testing the wrong version of code.

    My machine is set up with multiple WordPress installations running under Apache 2.4.

    I was working on WordPress TRAC #29714.

    It’s a problem that I discovered in WordPress 4.0. I had a workaround for the problem and a fix. By commenting out or un-commenting a single line of code from either the workaround or the fix I was able to reproduce and then fix the problem. I could easily demonstrate the workaround on WordPress 3.9.3, but couldn’t get the workaround to work on WordPress 4.1-beta2.

    I’ve recently started using symlinks, to enable me to change code in one place and test it in another environment. It turned out that I’d not created a symlink for the code that contained the workaround. So when I changed my workaround code in my WordPress 4.0 environment the effect toggled; but it didn’t make a blind bit of difference on the 4.1 environment, since I hadn’t actually changed the code.

    I corrected this on the train back from London, and was able to confirm that my workaround and the patch I’d developed both work on WordPress 4.1-beta2.

    Which means that I can happily upgrade to 4.1 when it goes live and continue to use my workaround if the TRAC is destined for a future release.

    My challenge now is to develop a unit test that will only pass when the patch is applied.

    See also


    ,

    Published:

    Last updated:

    November 23, 2014

Categories

Tide times from tidetimes.org.uk

Tide Times & Heights for Langstone Harbour on
28th May 2023
06:01 High Tide ( 3.76m )
12:14 Low Tide ( 1.97m )
19:24 High Tide ( 3.99m )

Tide times from tidetimes.org.uk

Tide Times & Heights for Northney on
28th May 2023
06:20 High Tide ( 3.46m )
12:05 Low Tide ( 1.67m )
19:03 High Tide ( 3.66m )
WordPress version:6.2.1
Gutenberg version:15.8.0

Summary file