Portfolio field problem

Discussion in 'Subrion CMS Plugins Discussion' started by anton.boersma78, Apr 26, 2018.

  1. anton.boersma78

    anton.boersma78 New Member

    I have a fresh installed Subrion cms 4.2.0
    Fresh installed portfolio plugin

    The problem is:
    Fields are not showing up in create a new category see attachment.
    Database error in add a new portfolio entry
    Code (Text):

    [INDENT]User Warning: Unknown column 'title_en' in 'field list' INSERT INTO `sbr420_portfolio` SET `status` = 'active', `member_id` = '1', `title_en` = 'my port', `body_en` = '
    test

    \r\n', `gallery` = 'a:1:{i:0;a:3:{s:4:\"path\";s:8:\"a/admin/\";s:4:\"file\";s:16:\"pf_caracter2.png\";s:4:\"size\";i:813381;}}', `category_id` = '1', `title_alias` = 'my-port', `date_added` = '2018-04-26 06:37:20', `date_modified` = '2018-04-26 06:37:20'
    [I] on line [B]178[/B] in file includes/classes/ia.core.mysqli.php[/I]
    [B][I]Backtrace[/I][/B] [12]

    Notice: Undefined index: title [I]
    on line [B]134[/B] in file modules/portfolio/admin/index.php[/I]
    [B][I]Backtrace[/I][/B] [6][/INDENT]
     
    scr-001.PNG
  2. anton.boersma78

    anton.boersma78 New Member

    Problem solved there where more problems to get the portfolio working.

    Solution was in the database:
    Add column 'title_en', 'body_en', 'gallery' to table 'prefix_portfolio' to the database.
    Change in 'prefix_fields' column 'item' portfolio title from portfolio_categ to portfolio_categs.
    Change in 'prefix_fields_groups colomn 'item' portfolio general from portfolio_categ to portfolio_categs.
    Change in prefix_hooks portfolio adminDatabaseConsistency colomn 'filname' from module:portfolio/hook.db-consistency to module:portfolio/hook.db-consistency.tpl.
    Change in prefix_hooksportfolio phpCoreBeforePageDisplay colomn 'filname' from modules/portfolio/includes/hook.blocks-load to modules/portfolio/includes/hook.blocks-load.php.

    To get the links working again i had to change:
    file /modules/portfolio/templates/front/list-portfolio.tpl.
    From:

    Code (Text):

    <div class="col-md-3">
        <div class="ia-item ia-item--card m-b">
            {if $entry.gallery}
                <a href="{$entry.link}" class="ia-item__image">
                    {ia_image file=$entry.gallery|array_shift type='thumbnail' title=$entry.title|escape}
                </a>
            {/if}

            <div class="ia-item__content">
                <h4 class="ia-item__title text-center">
                    <a href="{$entry.link}">{$entry.title|escape}</a>
                </h4>
            </div>
        </div>
    </div>
     
    To:

    Code (Text):

    <div class="col-md-3">
        <div class="ia-item ia-item--card m-b">
            {if $entry.gallery}
                <a href="{$smarty.const.IA_URL}portfolio/{$entry.id}-{$entry.title_alias}" class="ia-item__image">
                    {ia_image file=$entry.gallery|array_shift type='thumbnail' title=$entry.title|escape}
                </a>
            {/if}

            <div class="ia-item__content">
                <h4 class="ia-item__title text-center">
                    <a href="{$smarty.const.IA_URL}portfolio/{$entry.id}-{$entry.title_alias}">{$entry.title|escape}</a>
                </h4>
            </div>
        </div>
    </div>
     
    file /modules/portfolio/templates/front/view.tpl.
    arround line 28

    From:

    Code (Text):

    <p><span class="fa fa-folder-open"></span> <a href="{$category.link}">{$category.title|escape}</a></p>
     
    To:

    Code (Text):

    <p><span class="fa fa-folder-open"></span> <a href="{$smarty.const.IA_URL}portfolio/{$category.title_alias}">{$category.title|escape}</a></p>
     
    Now the plugin is working again.
    Last edited: Apr 26, 2018
  3. Dayir_A.

    Dayir_A. Staff Member

    Hello @anton.boersma78,

    Glad to see you have resolved the issue on your own.
    Be aware that Events plugin is not yet updated for the 4.2 version of Subrion CMS
    When the plugin will be updated this issues will be resolved.

    Thanks.
  4. keni1966

    keni1966 New Member

    I'm not getting the error but there is no place to add a category...

Share This Page