Viewing 15 replies - 1 through 15 (of 20 total)
  • Plugin Author jwz

    (@jwz)

    What prefix URL are you trying to use exactly?

    Thread Starter LeoPanthera

    (@leopanthera)

    My blog is at https://www.davidglover.org/

    The default value is “https://davidglover.org/b/” and I get that error. I also get the same error for the following:

    https://www.davidglover.org/b/
    https://www.davidglover.org/
    https://www.davidglover.org/wordpress/ (which is where wordpress is actually installed).

    All give the “Oops!” error.

    Plugin Author jwz

    (@jwz)

    Yeah, nothing unusual there… that should work!

    What is ‘home’ set to? The result of get_option(‘home’). Maybe that’s confusing it…

    It’s going wrong inside b64sl_make_rewrite_rule but I’m not sure why.

    Thread Starter LeoPanthera

    (@leopanthera)

    Plugin Author jwz

    (@jwz)

    Ok, I think I see it. Can you change line 424 from

    if (!preg_match ('@^[a-z]+://([^/:]+)/(.*)[:\d]*(.*)$@i', $blog_base,$match))

    to

    if (!preg_match ('@^[a-z]+://([^/:]+)[:\d]*/?(.*)$@i', $blog_base,$match))

    and let me know if that works?

    Thanks!

    Plugin Author jwz

    (@jwz)

    Hey there, have you had a chance to give this a try yet?

    Thread Starter LeoPanthera

    (@leopanthera)

    Sorry for the delay.

    That did seem to fix it, yes. However, I have custom permalinks set. Does it only work if you have ?p=123 format permalinks? I can’t figure out how to tell what the short url of a post is, otherwise.

    Plugin Author jwz

    (@jwz)

    No, it should work regardless of your permalink format; this only sets the shortlink. That’s returned by wp_get_shortlink() and you can see it if you View Source on any post and look for <link rel=’shortlink’ href=’…’> That should be in the new format instead of in the ?p=123 format.

    Thread Starter LeoPanthera

    (@leopanthera)

    Ah yes, it does.

    That works great, thanks.

    Thread Starter LeoPanthera

    (@leopanthera)

    One final question:

    Why are my page slugs so long?

    For example:
    https://dg.gs/b/B1MAAAdT

    This seems to be much longer than the examples you give.

    Plugin Author jwz

    (@jwz)

    Well, that’s not right! The link should be just https://dg.gs/b/B1M. I’m not sure what’s going wrong. Can you save this as a PHP file on your server, load it, and send me the output? Also, what version of PHP and WordPress are you running?

    [Code moderated as per the Forum Rules. Please use the pastebin]

    Thread Starter LeoPanthera

    (@leopanthera)

    1: 1875
    2: =00=00=07S
    3: =00=00=07S
    4: =00=00=07S=00=00=07S
    5: AAAHUwAAB1M=
    6: =07S=00=00=07S
    7: 808453971
    7: 1875
    8: =07S
    9: 808464432
    9: 808453971

    WordPress 3.2.1
    PHP version 5.3.6-13ubuntu3.2

    Plugin Author jwz

    (@jwz)

    Damn, that got corrupted. Apparently you can’t type backslashes here. Change all the occurrences of “00” (zero zero) to be a backslash followed by three zeroes. Or send me email (jwz@jwz.org) and I’ll mail you the right version. Thanks!

    If things are going the way I expect, output should be

    1: 1875
    2: =00=00=00=00
    3: =00=00=07S
    4: =00=00=00=00=00=00=07S
    5: B1M=
    6: =07S=00=00=07S
    7: 1875
    7: 1875
    8: =07S
    9: 0
    9: 1875
    Plugin Author jwz

    (@jwz)

    Ok, let’s try this:

    <?
    print "<pre>\n";
    print (1875 >> 15) . "\n";
    print (1875 >> 16) . "\n";
    print (1875 >> 31) . "\n";
    print (1875 >> 32) . "\n";
    Thread Starter LeoPanthera

    (@leopanthera)

    0
    0
    0
    1875

Viewing 15 replies - 1 through 15 (of 20 total)
  • The topic ‘[Plugin: Base64 Shortlinks] "Oops something's wrong" error’ is closed to new replies.