Fmstrat / shorten

A URL Shortening and Privacy Tool for ownCloud
31 stars 14 forks source link

Undefined index: curUrl for goo.gl ownCloud 8.2.1 (stable) #22

Open asolopovas opened 8 years ago

asolopovas commented 8 years ago

Hi, I am getting this error. Undefined index: curUrl at /apps/shorten/lib/makeurl.php#52

floooat commented 8 years ago

same here!

norganna commented 8 years ago

In js/script.js replace all instances of #linkText with .linkText (just do a search and replace).

You may have to clear the assets folder if you are using asset-pipeline.enabled

ladiko commented 8 years ago

sudo sed -i 's/#linkText/.linkText/g' script.js didn't help for me.

tombou commented 8 years ago

Same here, I tried to replace the instances, I even tried this solution: https://github.com/stevenmirabito/shorten/commit/4b55986eaf59b5c41b67104bd34106bf8a315ff7

So far, nothing works... It reverts to the long sharing system.

owncloud 8.2.2 (stable) yourls 1.7.1 shorten 0.0.14

edit: after some retries and debugging, there is a double issue at least with yourls. You have to enter the server without /yourls-api.php and also, you have to modify the file js/script.js with stevenmirabito update. replace replaceUrl2(view.$el.find('#linkText')); with replaceUrl2($('#linkText-' + view.cid));

cs39 commented 8 years ago

Thank you very much to stevenmirabito & tombou. Your edits and instructions got it working for me.

nlsbln commented 8 years ago

@tombou you mean, you have to change $url = $root."/yourls-api.php"; to $url = $root; in lib/class.yourls.php? sorry, i`m just a user :-)

tombou commented 8 years ago

@nlsbln I mean that in the admin config panel, you have to enter only the domain without /yourls-api.php after. In my attemps, I tried http://sho.rt/yourls-api.php with the api key from yourls and didn't work. Just enter http://sho.rt in the URL field, the api key and make the change in js/script.js to make it work on 8.2.2. Nothing more, nothing less ;) Hope it helps.

nlsbln commented 8 years ago

@tombou ok, this was actually the way I installed the plugin. I also updated with the "stevenmirabito update". Nothing happens.