Coder Social home page Coder Social logo

Comments (12)

syntaxseed avatar syntaxseed commented on July 19, 2024

Hi. Do you have the Dokuwiki version that you're running?

Also... it has been known to conflict with some other plugins. You might try disabling the others then re-enable one by one and see if one is conflicting.

from dokucrypt2.

mghinch avatar mghinch commented on July 19, 2024

My system is on Greebo (!!). Having JUST downloaded it, I was assuming it was at least on Hogfather. To avoid changing too many things at once, I'm going to delay updating to Igor RC2 (my only choice using the updater plugin) until I hear from you. FWIW, I'm on a Digital Ocean droplet running Debian 11; PHP version 7.4.30

I turned off all plugins I could (12 of them) except Dokucrypt2, refreshed the page and attempted an edit. No change -- still no button.

from dokucrypt2.

syntaxseed avatar syntaxseed commented on July 19, 2024

Ok, a few ideas....

First, it has a known conflict with aceeditor & fastwiki (the latter of which does the exact problem of the Decrypt Secret button vanishing.

Second, I'm not sure if you have any comfort with coding... but this issue was fixed in the past for Hogfather.... with this commit: e46591a

You might try reversing that to revert to the Greebo version. Wait... lemme find a tag for you...

from dokucrypt2.

syntaxseed avatar syntaxseed commented on July 19, 2024

This is the code before that Hogfather fix:

https://github.com/syntaxseed/dokucrypt2/tree/3fd12325fb8b133313aebcfbaacdc54030274e88

from dokucrypt2.

syntaxseed avatar syntaxseed commented on July 19, 2024

Note that the plugin is NOT tested on Igor yet. I have been waiting on full PHP 8 support.

from dokucrypt2.

mghinch avatar mghinch commented on July 19, 2024

Thanks for the additional info.

I am using neither aceeditor nor fastwiki.

I'm good with coding and will look into it. However...
Other issues (performance related -- nothing functional that would seem to overlap with this problem) compelled me to move forward to Igor. No change -- DecryptSecret button is still missing. FYI - I'm still on PHP7.4. And more bad news -- on Igor I can no longer decrypt text. When I hit "Decrypt Text" the popup no longer asks for a password, it just says "Broken"...

I have not looked at the code at all -- do you have any logging/debugging in there I can turn on? How can I help?

from dokucrypt2.

syntaxseed avatar syntaxseed commented on July 19, 2024

Hi,

Thanks for the additional info. Unfortunately it does not have any logging. I basically took over a plugin written by someone else and have just been patching it since then.

A frequent cause of issues is that the plugin puts the wiki text into a hidden input and then moves the original textarea out of the form just before submission. (in script.js ~ line 62). This is to try to make sure that the unencrypted text isn't accidentally submitted. In the past this was moved when the edit textarea was first initialized. Which caused issues. Not likely the cause of this issue, but is some good context.

Happy to have any debugging help possible. I will also be away on family vacay soon but will prioritize a upgrade to Igor and test of all my plugins when I return (mid Aug).

My own instance of DW is on Release 2020-07-29 "Hogfather". On PHP 7.4.

from dokucrypt2.

syntaxseed avatar syntaxseed commented on July 19, 2024

Related to the 'Broken' alert you're getting... it's happening here in script.js:

function toggleCryptDiv(elemid,lock,ctext) {
   var elem=null, atab=null, key="", ptext="";
   var ctStr="Decrypt Encrypted Text", ptStr="Hide Plaintext";
   elem=document.getElementById(elemid);
   atag=document.getElementById(elemid + "_atag");
   if(elem===null || atag===null) {
      alert("failed to find element id " + elemid);
   }
   if(atag.innerHTML==ptStr) {
      // encrypt text (set back to ctext, and forget key)
      elem.innerHTML=ctext;
      atag.innerHTML=ctStr;
      crypt_keys[lock]=undefined;
   } else if (atag.innerHTML==ctStr) {
      // decrypt text
      if((ptext=verifyDecrypt(ctext,lock,false))===false) {
         alert("unable to find key for lock " + lock);
         return;
      }
      elem.innerHTML=ptext;
      atag.innerHTML=ptStr;
      // make it visible
      elem.style.visibility="visible";
      elem.style.position="relative";
   } else { alert("Broken"); return; }
}

It is relying on reading the text of the link and whether it says "Decrypt Encrypted Text" or "Hide Plaintext". That tells it whether we are encrypting on decrypting inline.

Is it possible that you are using anything that is translating the website or on-page text into another language?

from dokucrypt2.

syntaxseed avatar syntaxseed commented on July 19, 2024

There's also a typo on the first line of that function. The initialization of atab=null should be atag=null. Don't know if this would fix it.

Ooof the original author sure didn't like meaningful variable names or nice formatting. :(

from dokucrypt2.

mghinch avatar mghinch commented on July 19, 2024

I'm travelling at the moment, so give me a week or so to follow-up on the above...

from dokucrypt2.

syntaxseed avatar syntaxseed commented on July 19, 2024

I have updated my own instance to Release 2022-07-31 "Igor" and to PHP 8.1. Tested DokuCrypt 2 fully and seems to be working fine. Can't reproduce error. Maybe a on-page translation issue.

from dokucrypt2.

syntaxseed avatar syntaxseed commented on July 19, 2024

Closed due to can't reproduce and no corroboration.

from dokucrypt2.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.