Site icon

Yourls: Can't add new urls to database (endless spinner)

I've been using an older version of Yourls for a few years. I tried to upgrade to v1.5 a few times but always hit a problem with adding new URLs to the database: it acts like it's adding the URLs but really doesn't Sometimes the 'thinking' icon spins forever, other times it says it completed but the URL does not work and refreshing the screen erases the new entry.

I was able to edit existing records and I could add records directly, using MySQL GUI. I just couldn't add new URLs using the interface.

I found various hacks around the Internet that was supposed to fix it but nothing worked. I'm not using a cheap host, the site is self-hosted on a Windows 2008 server I'm an admin on.

When I tried to add more URLs tonight, using a newer MySQL GUI, it wouldn't let me paste all the rows at once. 🙁 In fact, it wouldn't let me insert any records as it had the database marked read only, due to the lack of a primary key. I tried making the keyword column the primary key but the site stopped working. Oops.

That got me to thinking… was the primary key the problem and would it work correctly if I made a new data base? I had the data in a CSV file, so rebuilding the database wasn't an issue. The answer: I can now add new records. Adding URLs is slower than with the older version of Yourls… but the URL is added and it works, I don't add new URLs to this database all that often anyway.

** It's slower because it has a title field and goes out to the long URLs page to get the title. It looks nice… I might upgrade my other 2 Yourls sites.

Exit mobile version