Your username here MUST MATCH your XenForo username (connected to your XF license).

    Once you have registered here, then you need to start a conversation at xenforo.com w/Bob and provide the following:
    1. Your XenForo License Validation Token
    2. The Domain Name associated with the License
    NOTE: Your account will be validated once ALL requirements are verified/met. Thank you for your patience.

Converting Threads to Articles 1.6.0

Discussion in 'AMS Support' started by CMGupdates, Aug 23, 2017.

  1. CMGupdates

    CMGupdates New Member AMS Premium RMS Premium Showcase

    I'm testing in a localhost an new install of XF, XFMG, & AMS.

    I get this error when I convert a thread to an article
    Mysqli prepare error: Unknown column 'xfmg_media_ids' in 'field list'

    I wasn't aware of XFMG having anything to do with AMS...I'm guessing the new integration might have something to do with it I'm not aware of?
  2. Bob

    Bob Developer Staff Member

    AMS, Showcase, RMS and UBS all have XenForo Media Gallery integration built in (its been several years). I just enhanced the integration in AMS 1.6.0 however.

    Have you had AMS installed on that instance before (particularly in the Database)? The reason I ask is that the installer checks for existing tables and if you had existing ams article table in place from a previous version, it would have skipped that and therefor would not have the new fields.

    Do you have phpmyadmin installed for your local host? If possible, I'd like to know the table schema of the xf_nflj_ams_article table.
  3. CMGupdates

    CMGupdates New Member AMS Premium RMS Premium Showcase

    I notice that the xfmg_media_ids isn't listed in the schema.

    here is the zip.

    Attached Files:

  4. Bob

    Bob Developer Staff Member

    Ya, that is an OLDER Schema. You are missing several fields in the article table. The cause of this is most likely that you had AMS installed at some point and it wasn't properly uninstalled.

    Here is the INSTALLER code for the articles table, as you can see, it has the field xfmg_media_ids varbinary(100) NOT NULL DEFAULT '' as part of it (and there are also several other fields included that are missing in your older schema). This also tells me that several other tables are probably in the same state (missing fields due to existing legacy tables in place).

    $tables['xf_nflj_ams_article'] = "
                CREATE TABLE IF NOT EXISTS xf_nflj_ams_article (
                    article_id int(10) unsigned NOT NULL AUTO_INCREMENT,
                    category_id int(10) unsigned NOT NULL,
                    user_id int(10) unsigned NOT NULL,
                    username varchar(50) NOT NULL,
                    title varchar(150) NOT NULL DEFAULT '',
                    meta_description varchar(160) NOT NULL,
                    description text NOT NULL,
                    article_state enum('visible','moderated','deleted','awaiting','draft') NOT NULL DEFAULT 'visible',
                    article_open tinyint(3) unsigned NOT NULL DEFAULT '1',
                    message mediumtext NOT NULL,
                    publish_date int(10) unsigned NOT NULL DEFAULT '0',
                    publish_date_timezone varchar(50) NOT NULL DEFAULT 'Europe/London',
                    last_update int(10) unsigned NOT NULL DEFAULT '0',
                    edit_date int(10) unsigned NOT NULL DEFAULT '0',
                    likes int(10) unsigned NOT NULL,
                    like_users blob,
                    attach_count smallint(5) unsigned NOT NULL DEFAULT '0',
                    article_view_count int(10) unsigned NOT NULL DEFAULT '0',
                    article_page_count int(10) unsigned NOT NULL DEFAULT '0',
                    rating_count int(10) unsigned NOT NULL DEFAULT '0',
                    rating_sum int(10) unsigned NOT NULL DEFAULT '0',
                    rating_avg float unsigned NOT NULL DEFAULT '0',
                    rating_weighted float unsigned NOT NULL DEFAULT '0',
                    review_count int(10) unsigned NOT NULL DEFAULT '0',
                    comment_count int(10) unsigned NOT NULL DEFAULT '0',
                    series_part_id int(10) unsigned NOT NULL DEFAULT '0',
                    featured tinyint(3) unsigned NOT NULL DEFAULT '0',
                    cover_image_id int(10) unsigned NOT NULL DEFAULT '0',
                    cover_image_header tinyint(3) unsigned NOT NULL DEFAULT '1',
                    thread_id int(10) unsigned NOT NULL DEFAULT '0',
                    custom_article_fields mediumblob NOT NULL,
                    prefix_id int(10) unsigned NOT NULL DEFAULT '0',
                    last_comment_date int(10) unsigned NOT NULL DEFAULT '0',
                    last_review_date int(10) unsigned NOT NULL DEFAULT '0',
                    about_author tinyint(3) unsigned NOT NULL DEFAULT '1',
                    xfmg_album_id int(10) UNSIGNED NOT NULL DEFAULT '0',
                    xfmg_media_ids varbinary(100) NOT NULL DEFAULT '',
                    xfmg_video_ids varbinary(100) NOT NULL DEFAULT '',
                    author_rating float unsigned NOT NULL DEFAULT '0',
                    tags mediumblob NOT NULL,
                    comments_open tinyint(3) unsigned NOT NULL DEFAULT '1',
                    last_edit_date int(10) unsigned NOT NULL DEFAULT '0',
                    last_edit_user_id int(10) unsigned NOT NULL DEFAULT '0',
                    edit_count int(10) unsigned NOT NULL DEFAULT '0',
                    cover_image_cache BLOB NOT NULL,
                    image_attach_count INT(10) UNSIGNED NOT NULL DEFAULT '0',
                    file_attach_count INT(10) UNSIGNED NOT NULL DEFAULT '0',
                    article_location VARCHAR(255) NOT NULL DEFAULT '',
                    original_source MEDIUMBLOB NOT NULL,
                    warning_id int(10) unsigned NOT NULL DEFAULT '0',
                    warning_message varchar(255) NOT NULL DEFAULT '',
                    ip_id INT(10) UNSIGNED NOT NULL DEFAULT '0',
                    PRIMARY KEY (article_id),
                    KEY category_id (category_id),
                    KEY user_id (user_id),
                    KEY prefix_id (prefix_id),
                    KEY thread_id (thread_id),
                    KEY category_last_update (category_id,last_update),
                    KEY user_id_last_update (user_id,last_update),
                    KEY last_update (last_update),
                    KEY category_rating_weighted (category_id,rating_weighted),
                    KEY rating_weighted (rating_weighted),
                    KEY category_author_rating (category_id,author_rating),
                    KEY author_rating (author_rating),
                    KEY publish_date (publish_date),
                    KEY category_id_publish_date (category_id,publish_date),               
                    KEY user_id_publish_date (user_id,publish_date)
                ) ENGINE=InnoDB  DEFAULT CHARSET=utf8
    What you need to do is UNINSTALL AMS. Then check the Database to make sure all of the xf_nflj_ams tables have been removed. If not, then manually remove all the AMS tables. This way the installer will create new tables with the correct fields for the current version.

    Then (just for checks and balances), go to your customer account, download the latest version of AMS again, upload the files, then install AMS again. Once installed, check to make sure the articles table schema is correct this time.
  5. CMGupdates

    CMGupdates New Member AMS Premium RMS Premium Showcase

    Yeah, I reinstalled XF, but it didn't erase the local AMS. (doh!)

    Appreciate the help Bob!
    Bob likes this.
  6. Bob

    Bob Developer Staff Member

    I'll be around all day (10:30 AM here), so if you need help fast, I should be able to get back to you rather quickly :)
    CMGupdates likes this.
  7. CMGupdates

    CMGupdates New Member AMS Premium RMS Premium Showcase

    So I've been testing this a bit further - install etc all works.

    Have you ever seen the convert to article be completely empty?
  8. Bob

    Bob Developer Staff Member

    Have not had anyone report that yet. Not sure how that could happen unless the first post didn't contain ANY text and maybe only had an embedded attachment.
  9. CMGupdates

    CMGupdates New Member AMS Premium RMS Premium Showcase

    I tested with a new thread for converting...worked.
    So I rebuilt all threads and posts with the counter box checked. Worked afterwards.

    I blame it on the full moon.
    Bob likes this.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.