Users running a non-download version of Vanilla (pulled from github), on branch release/2019.016 or master from the last 2 weeks should upgrade to release/2019.017 or latest master for security reasons. Downloaded official open sources releases are not affected.

Articles 1.2.0 Released

This discussion is related to the Articles addon.
ShadowdareShadowdare Moderator
edited November 2017 in Feedback

Articles 1.2.0 has been released and fully supports Vanilla 2.3.1.

Major changes in v1.2.0 since v1.1.1:
- Category-based permission model.
- AttributionUserID column gone; now using InsertUserID.
- Bug fixes and style improvements. See full commit history via the GitHub repository.

Caveat of v1.2.0:
- Old global Articles permissions will not get transferred over to each category; any customized permissions in previous versions of Articles will have to be reconfigured per category in v1.2.0.


How to install:
*This add-on is an application, not a plugin.

  1. Extract this download to your Vanilla installation's /applications folder. It should have a folder named articles inside of it now.
  2. Enable the Articles application via the "Applications" page in your Vanilla's dashboard.

How to upgrade:
*If you're upgrading to Articles 1.2.0 from an older version and have modified the role permissions related to Articles, you must reconfigure your permissions since global permissions have been replaced with category-based permissions.

  1. Extract this download to your Vanilla installation's /applications folder. Overwrite old application files.
  2. Go to the "Applications" page in your Vanilla's dashboard and then disable and re-enable the Articles application for updates to apply.

Add Pages to Vanilla with the Basic Pages app

R_JrbrahmsonharyonoK17Flower420
«1

Comments

  • K17K17 Unkorneglosk - Français / French Paris, France ✭✭✭

    Great :D You did an awesome work and you continue :D I think we're al happy to have you here :D

    Shadowdare
  • Great! But an issues with the default mobile themes for opensource.
    Can only see the articles and categories but can't creat one.

    Hope you could fix this mate! Great app for vanilla

    Shadowdare
  • ShadowdareShadowdare Moderator
    edited December 2017

    @K17, you're welcome and thank you! :)

    @Ewap, I put mobile theme links/compatibility on the list of issues to look at.

    Since Vanilla 2.5 has just been released, I will test the app out with it and see how it works. If anyone else is already using Articles with Vanilla 2.5, let me know if there's any issues with compatibility.

    Add Pages to Vanilla with the Basic Pages app

    K17
  • (V2.5) When trying to enable the Articles application from the dashboard I get a "Specified key was too long; max key length is 767 bytes" error.

  • "Specified key was too long; max key length is 767 bytes" error.

    Apparently an InnoDB/MySQL v 5.6 problem. Circumvated for now by changing varchar(255) to varchar(191) in the two unique columns instructure.php.

    Now the app is enabled from the dashboard.

    ShadowdareR_J
  • If I edit a category the app will give me an error "The specified URL code is already in use by another category." when trying to save the changes.

  • ShadowdareShadowdare Moderator
    edited January 2018

    @stackmouse said:

    "Specified key was too long; max key length is 767 bytes" error.

    Apparently an InnoDB/MySQL v 5.6 problem. Circumvated for now by changing varchar(255) to varchar(191) in the two unique columns instructure.php.

    Now the app is enabled from the dashboard.

    Thank you for testing that!

    This is probably related to Vanilla's recent change from utf8 to utf8mb4 database character encoding. I would like to keep the unique keys with the Article and ArticleCategory tables' UrlCode columns, so I'll go with your varchar(191) fix.

    I'm not sure if reducing the varchar max length would cause long UrlCode values to be truncated or just error out. Most article names aren't that long anyway.

    @stackmouse said:
    If I edit a category the app will give me an error "The specified URL code is already in use by another category." when trying to save the changes.

    I haven't seen this error in my testing so far.

    Add Pages to Vanilla with the Basic Pages app

  • test

  • Can't enable it in Vanilla 3.2. I get:

    "Specified key was too long; max key length is 1000 bytes".

    Can't seem to roll it back either. Still get that message when I restore the old code base.

    No articles for me 🤕.

  • Follow-up on above post:

    Odd. The Applications page in my dashboard is not picking up the version number change.

  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

    Me again... 😀


    I get the same error (only with 767 bytes).

    @Shadowdare The problem is the encoding of databases. utf8mb4 allows varchar values of maximum 191 and Articles is using up to 500. Either all of this values should be reduced to 191 or VARCHAR should be replaced by TEXT.

    @toolsmythe open /applications/articles/settings/structure.php and search for all occurances of "varchar(X)": whenever the X is greater 191, make it 191 (for your db encoding changing only the varchar(500) to varchar(255) would be sufficient, but making all values max. 191 is future proof)




    The best way to update a plugin is:

    1. disable it
    2. copy the new plugin/addon files wot the folder (even better: delete old files first)
    3. delete /cache/addon.php (that might happen automatically)
    4. re-enable the plugin



    Shadowdare
  • ShadowdareShadowdare Moderator
    edited September 19

    @toolsmythe: if you go to the /utility/structure page, do you get an error about Vanilla's Category Description column as well? For the Articles app, does it show information on which columns exceed the max key length or just a general error message? I haven't tested it on Vanilla 3.2 yet as I've had a full plate lately, but will do soon.

    @R_J: thank you! The only thing with a large varchar like 500 is the ArticleCategory Description column, which is what Vanilla's Category Description column uses too. I'll look into changing the length or type soon. Does Vanilla enforce utf8mb4 now though?

    Add Pages to Vanilla with the Basic Pages app

  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

    As far as I know a board with other encodings will have problems e.g. if an emoji is used in a discussion title. Try what's happening on your forum with a discussion title like that "Merry ☃ Christmas".

    At least that has been a problem (also here on this forum) in the past.


    Shadowdare
  • Sorry @Shadowdare, not much for you ...

    /utility/structure doesn't shed much light on this; it does not reference Category Description at all:

    update `GDN_User` `User`
    set `Permissions` = ''
    where `Permissions` <> '';
    
    insert `GDN_UserMeta` 
    (`UserID`, `Name`, `Value`) 
    values ('0', 'stubcontent.record.locale', 'en');
    

    The message is as I posted; no specifics on tables or columns.

    I was using Articles as a sort of site wiki and the content is several releases out of date so I'm not really hurting for it.

    While you are in there, if you can get the menu item to appear in the drop-down menu as opposed to it tacking onto the main menu as an <li>, that would be awesome.

    My 3.2 upgrade is a bit problematic right now. From a user perspective it's functional but I see some issues as an Admin that my users are insulated from. I've been needing a parallel sandbox environment for a long time anyway so I think I'll set one up this weekend. I took a full site/database backup before upgrading (I was at 2.6) so I'll restore that and re-do the upgrade and see where that takes me. I'll let you know if that yields any insights.

    Thanks for the prompt response!

    Shadowdare
  • I set up my test environment and restored my pre-3.2 site (I upgraded from 2.6).

    It seems this was not working in 2.6. I disabled Articles and it refused to enable. So this is not an artifact of the 3.2 upgrade; this was broken as far back as 2.6. I honestly cannot tell if that was the breaking release or if it pre-dates 2.6.

    Sorry I can't be of more help.

    Let me know if you have any follow up questions,

  • ShadowdareShadowdare Moderator
    edited September 26

    @toolsmythe, would you be able to post a quick mockup (MS Paint is ok) please of what the drop-down menu feature you're requesting might look like? I think it may be theme-dependent and could be a unique requirement. What theme are you using?

    For the max key length error, please feel free to open /applications/articles/settings/structure.php and change line 26 from:

    ->column('Description', 'varchar(500)', true)
    

    to

    ->column('Description', 'text', true)
    

    And re-enable the app. Text type to avoid truncation for those that might have long descriptions (if Vanilla let them enable the app and MySQL allowed it).

    I'll probably push this fix along with a release containing the Vanilla 2.5+ compatibility changes I've committed for the Articles app. What has been holding that release back is updating the design/views and controller routing issues.

    Add Pages to Vanilla with the Basic Pages app

    toolsmythe
  • @Shadowdare -

    Sorry for the delay. Thanks for working on this.

    I'll work on your request this weekend and send you the screen shots.

  • @Shadowdare -

    Here we go ...

    Let me preface this by saying that I'm hindered by not being able to enable your app in Vanilla 3.2, so you'll need to apply a little imagination. The good news is there is another app that I use (Easy Memberlist) that has the same problem but has a configuration option that gets me around it.

    This first screen cap is the Keystone Theme:

    Your menu item shows up as a bullet point to the left of that far right icon group. Unfortunately (I know this because the app was enabled when I upgraded and it was there,) the text was the same color as the header backgound so it wasn't visible.

    My preference would be to see it in the dropdown (visible above) or in the site menu like Easy Member List does.


    As I mentioned, Easy Memberlist has the same problem. Here it is, rendered in the Baseline+ Theme:

    When Articles is enabled, it shows two bullet points, each on their own line, separating the "Favorites" Icon from the "Settings" Icon.

    I can, however suppress the Member List bullet point via an Easy Memberlist setting:

    In the image above you can see the first two checkboxes:

    • Show members list link in menu
    • Show members list link in account option flyout

    With the first box checked, I get Members list in the site menu.

    With the second box UNchecked, I can suppress it from being rendered as a bullet point in the user menu.

    So even though Members List has missed getting it in the flyout correctly, I can simply turn that part off and all's well.


    Hope that gives you what you need.


    Sorry I missed the work-around you sent me for enabling the app till just now. I can go back and do it and re-shoot the screen shots if you need me to, but for now I'll assume that the above is adequate.

    I WILL apply your work-around and if anything is different I'll follow up with you.

    Also I'll be happy to beta test for you if you'd like. Let me know.


    Thanks again!


    JP

  • ShadowdareShadowdare Moderator
    edited September 29

    @toolsmythe, perhaps the other columns exceeding varchar(191) need to be lowered to 191 or changed to another text type accordingly. What collation is your Vanilla's database set to and what collation are your tables and columns (choose any table as an example) set to? I'm using Adminer to check this, but you could use HeidiSQL or phpMyAdmin to check this also. I wonder if your MySQL logs would show more detailed errors after trying to enable the app?

    I have not been able to see the error with either installing Vanilla or enabling Articles in my environments so other columns than just the ArticleCategory Description might need to be adjusted too. My databases are set to latin1_swedish_ci (default) and the tables and columns are set to utf8mb4_unicode_ci. Even after changing the database to utb8mb4_unicode_ci, I can still have "large" key lengths like varchar(255) on columns. There could be something different with my MySQL config since I'm using MariaDB 10.3.13 to reflect my own website's hosting environment. I found this page on the innodb_large_prefix setting that could be related. What version of MySQL are you using and what variant (MySQL, Percona, MariaDB)?

    As for the menu, thank you for taking the time to make your reply. You're looking to have a menu link called "Articles" linking to "/articles" (articles index) in the MeMenu flyout? (1) With Keystone theme: show it under the "user avatar icon's menu." (2) With Baseline+, as its own bulleted link, or perhaps an icon and drop-down menu, before the "settings cog icon"? Currently, it does have a feature to show a link to "Articles" (/articles) in the top menu and also shows "Articles Dashboard" in the MeMenu flyout for those with permission.

    Let's try to fix the database issue first and we'll see if the menu feature can be implemented later on and if other users find it useful for their site, otherwise it would be a special use case. Once we fix the database issue, the Articles app should be usable, but the current public release isn't updated for the new dashboard and theme design yet.

    Add Pages to Vanilla with the Basic Pages app

  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

    @toolsmythe use the attached file as the /applications/articles/settings/structure.php file



    toolsmytheShadowdare
Sign In or Register to comment.