WordPress.org

Forums

Short URL
[resolved] Import External URL (6 posts)

  1. aghilmort
    Member
    Posted 11 months ago #

    Can't get import URL file format correct for importing external URLs. The importer simply keeps converting them to non-links. Please advise.

    https://wordpress.org/plugins/shorten-url/

  2. Sed Lex
    Member
    Plugin Author

    Posted 11 months ago #

    What do you mean by non link ?
    Do you have a test file that I can test ?

  3. aghilmort
    Member
    Posted 11 months ago #

    Suppose we manually added some external URLs. If we then click the export button, we download a text file which reads something like:

    1,1,OHxr4,,
    2,,7MwF3,,
    0,,Igaj0,http://www.azsos.gov/business_services/tnt/tnt_name_search_instructions.htm,Arizona
    0,1,MDfuk,http://www.commerce.state.ak.us/CBP/Main/CBPLSearch.aspx?mode=Corp,Alaska
    0,2,eKrYd,http://www.sos.state.al.us/vb/inquiry/inquiry.aspx?area=Business%20Entity,Alabama

    However, suppose we want to add some external URLs for bulk upload purposes, say like this.

    1,1,OHxr4,,
    2,,7MwF3,,
    0,,Igaj0,http://www.azsos.gov/business_services/tnt/tnt_name_search_instructions.htm,Arizona
    0,1,MDfuk,http://www.commerce.state.ak.us/CBP/Main/CBPLSearch.aspx?mode=Corp,Alaska
    0,2,eKrYd,http://www.sos.state.al.us/vb/inquiry/inquiry.aspx?area=Business%20Entity,Alabama
    0,,Fk1o8,http://www.sos.arkansas.gov/corps/search_all.php,Arkansas
    0,,aZoj2,http://kepler.sos.ca.gov/,California

    If we attempt to upload this file, we simply receive a bunch of warnings saying line 282 is expecting two parameters and only received one and none of the external URLs are added. Furthermore, if we then download the updated list of URLs using the export button, it looks like this:

    1,1,OHxr4,,
    2,,7MwF3,,
    0,0,,,
    0,0,,,
    [... bunch more 0,0,,, rows, one per external URL we imported]
    0,,Igaj0,http://www.azsos.gov/business_services/tnt/tnt_name_search_instructions.htm,Arizona
    0,1,MDfuk,http://www.commerce.state.ak.us/CBP/Main/CBPLSearch.aspx?mode=Corp,Alaska
    0,2,eKrYd,http://www.sos.state.al.us/vb/inquiry/inquiry.aspx?area=Business%20Entity,Alabama

    What we don't know is if we're somehow using the wrong file format for the import process or if there's a glitch in the code, or if it's something such as the file must be encoded in some specific format such as Unicode, UTF-8, etc. Thoughts?

  4. Sed Lex
    Member
    Plugin Author

    Posted 11 months ago #

    I have to look at this problem... as I am quite busy these time, I will look at it in one week ... is that ok ?

  5. aghilmort
    Member
    Posted 11 months ago #

    Sounds good. thanks!

  6. Sed Lex
    Member
    Plugin Author

    Posted 11 months ago #

    Find the issue ... I used mysqli_escape_string instead of esc_sql ...

    Sorry !

    The next release will be issued in couple of hours

Reply

You must log in to post.

About this Plugin

  • Short URL
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.