• Resolved FebryanValdo

    (@valdo123)


    Hello,

    First of all, thanks for the great work, i really enjoy using your plugin on my site https://KangServer.id.

    As you can see, i rely my website with your plugin, but i found out that there is an inconsistency in the COPY BUTTON. Most of the times, the Copy Button doesn’t register the space, and also the line break.

    So whenever someone wanto to copy (hit the Copy Button) the text, there will be inconsistencies in terms of spacing, tab, and line break (enter). I don’t know what happened, but it just occurred to me recently.

    You can take a look on my site, use this post for example https://kangserver.id/benchmark-vps-avoro-2-cores-amd-8gb-ram-harga-10-euro-2023. You can scroll down until UnixBench or Yet Another Benchmark Script (YABS), try to hit Copy Button, and paste on your Notepad (that register tab and spacing) and see the result. You will know what i mean.

    Please, can you take a look at this issue. Looking forward for your reply. Thanks.


    FYI my current setup are;
    Stack: CyberPanel
    Webserver: OpenLiteSpeed
    PHP: 8.1
    MySQL: MariaDB 10.3.38

    The page I need help with: [log in to see the link]

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author Kevin Batdorf

    (@kbat82)

    Hey, thanks for reporting this. I can see what’s happening on your site, but I can’t reproduce it locally. My guess is there’s some special character in there confusing the parser.

    Have you tried going to one of the lines in question and manually deleting the newline and adding it back? Does that change anything?

    What language do you have set on those?

    Thread Starter FebryanValdo

    (@valdo123)

    Hello,

    What do you mean you cannot reproduce it locally? It’s used AppleScript with Material Darker theme.

    You can take a look at this example;
    https://kangserver.id/benchmark-vps-webhorizon-2-cores-amd-4gb-ram-harga-9-99-usd-v2-2023. I hit the Copy Button on UnixBench.

    This is the result;
    Rentry: Rentry.co
    Pastey: Pastey (kangserver.id)
    Hastebin: hastebin – (frocdn.com)

    Plugin Author Kevin Batdorf

    (@kbat82)

    What I meant was if I copy the code from your site, place it into the editor on my own site, publish the page, and copy it myself there it works. Let me try that theme/language combo and see if there’s a difference.

    Can you tell me how you get the output in there? are you copying it from somewhere else? Could you try my suggestion above and manually edit the problematic lines (pressing enter can result in different code than from copy/pasting a newline)?

    Thread Starter FebryanValdo

    (@valdo123)

    Hello,

    Forget to tell you, if i logged in and view the site while i still logged in, the Copy Button works fine, no problem at all, but when i’m not logging in, meaning i view it as normal visitor or in Incognito Mode (Private Mode), then the Copy Button got the problem.

    I got the output from my Terminal (SSH), i use xShell for Terminal in my Windows 11 OS. Thanks.

    • This reply was modified 2 years, 11 months ago by FebryanValdo.
    Plugin Author Kevin Batdorf

    (@kbat82)

    Hmm if the output is different when you’re logged out then that suggests another mechanism interacting with it, like a caching plugin, for example. Can you try disabling other plugins (and clear any cache) just to rule out a conflict? Even if the plugin seems unrelated it still may be doing something behind the scenes.

    I put your code on a temporary test page and here’s how it shows for me: https://tests.kevinbatdorf.com/367-2/

    Thread Starter FebryanValdo

    (@valdo123)

    Hello,

    Yeah, looks like LiteSpeed Cache (LSCache) caused the problem, when i deactivated it, the text that copied from Copy Button worked fine, but when i turned it ON again, it caused the problem. Now i don’t know what settings caused it. Thanks.

    Thread Starter FebryanValdo

    (@valdo123)

    Hello,

    It looks like i have to Turned OFF HTML Minify in the Page Optimization Setting of LSCache, now everything is working fine.

    https://live.staticflickr.com/65535/52990489002_b06d4d2cd3_o.png

    • This reply was modified 2 years, 11 months ago by FebryanValdo.
    Plugin Author Kevin Batdorf

    (@kbat82)

    That’s very strange. They may be attempting to optimize html files by minification and it’s parsing that section incorrectly. I’ll see if I can look into that as well this weekend, but I could end up no where. It might be worth contacting their support too as they are probably more equipped to investigate that issue than I would be.

    Thread Starter FebryanValdo

    (@valdo123)

    Hello,

    Sure, no problem, i don’t have to optimize my site more, it’s just HTML Minify Optimization, i have no problem turning it off, as my site already pretty fast.

    Plugin Author Kevin Batdorf

    (@kbat82)

    Ah right. Yeah I read your last reply after I sent mine 🙂 Glad it’s working now and thanks again for reporting this. I’m sure ti will come up again. I may make a note in the readme somewhere. Take care.

Viewing 10 replies - 1 through 10 (of 10 total)

The topic ‘Inconsistency in Copy Button’ is closed to new replies.