can't delete a couple short urls #1645
Replies: 9 comments 1 reply
-
Turns out I have duplicates from an import. So I have two of each and I can delete one, but not the remaining one. |
Beta Was this translation helpful? Give feedback.
-
What do you mean by this? Does it throw some kind of error?
Did you specify some specific domain when importing? Can you share a screenshot with the information in the database for some of those URLs that are "duplicated"? |
Beta Was this translation helpful? Give feedback.
-
No error, just doesn't do anything. Either in the web UI or CLI. I did specify a specify a domain during import, and different than the main domain at the time. Can you tell me what table to find what you need to share? |
Beta Was this translation helpful? Give feedback.
-
I think I found the issue. The short_urls table has missing domain_id for many entries and most are missing author_api_key_id. |
Beta Was this translation helpful? Give feedback.
-
That's expected. Those are not mandatory fields.
Shlink allows the same "short URL" (or the same short code/custom slug to be more precise) to be used on multiple domains. This means you can have Later, Shlink allows you to create another URL with custom slug If you try to interact with those via API or CLI, and do not specify the domain, Shlink will always fall back to the first one, which was created for the default domain (so, no domain specifically provided). This is a common mistake when interacting with Shlink's CLI. However, shlink-web-client should know if it has to provide the domain, so there might be a bug there. No likely that the bug is in the server. That's why I was asking to get a screenshot of some of those "duplicated" short URLs, because, specially when importing, multiple meta-values are set in internal columns. Getting a screenshot of the domains table would also help. Also, please, make sure you provide all the info from the bug issue template, as you skipped everything and that helps me reproduce potential bugs. Ultimately, take a look at these pages, which provide a bit more clarity on some of the behaviors involved here: |
Beta Was this translation helpful? Give feedback.
-
When I first imported from another Shlink instance to the new instance and with a new base domain, I had 500 urls with domain.info. I then imported from a csv file and specified a domain of domain.link. So ended up with 500 urls with base domain of domain.info and 500 of domain.link. I then changed the DEFAULT_DOMAIN and SHLINK_SERVER_URL to domain.link from domain.info. After this, I had duplicate links all using base domain of domain.link. But 500 seemed to respond to domain.info. And domain.link and domain.info has identical DNS records. I'll provide screenshots shortly. |
Beta Was this translation helpful? Give feedback.
-
I sent attachments to your gmail. Let me know if you prefer other direct method. Thanks |
Beta Was this translation helpful? Give feedback.
-
Any more ideas on how I might fix these issues? |
Beta Was this translation helpful? Give feedback.
-
Circling back on this - is there any way I can delete these URLs? |
Beta Was this translation helpful? Give feedback.
-
I"m running the latest version of Shlink on Docker and using PostgreSQL database. I have a couple short urls I'm unable to delete in the webui or the CLI. I can see them and they work, but the CLI doesn't even seem to know they exist when I try to view it using short-url:parse. Probably database corruption based on the recent work I was doing. Any ideas to clean this up, I can access the database with pgadmin.
Beta Was this translation helpful? Give feedback.
All reactions