Fork me on GitHub

upgrading Pagesetter to PageMaster  Bottom

Go to page 1 - 2 [+1]:

  • I have PageMaster 0.4.1 installed on Zikula 1.2.3. and try to import Pagesetter 6.3.0 publications. Starting with the lists, I get this kind of error message:

    Unknown column 'pn_pagesetter_lists.pg_id' in 'field list' SELECT pn_pagesetter_lists.pg_id AS "id" ...

    After upgrading from Pagesetter 6.3.0 to 6.3.1 (gettext version) I still get the same error messages.

    Do I need to use Pagesetter 6.3.0.1 to make the import work?
  • I'm not a Pagesetter expert,
    but to not have the pg_id column on your table looks weird icon_confused
    dunno if someone lacks of that columns as you do.

    This may need a custom check to see if we can consider your tables on the import script.
    Please open a ticket on the PageMaster tracker, attaching a SQL Dump of your Pagesetter tables (structure only) to know the details.

    Greetings

    --
    - Mateo T. -
    Mis principios... son mis fines
  • Quote

    but to not have the pg_id column on your table looks weird icon_confused

    The pg_id column is there but it seems that it is not recognized
  • Quote

    Do I need to use Pagesetter 6.3.0.1 to make the import work?


    Using Pagesetter 6.3.0.1 the import works in principle, but has issues concerning some field types:

    1. Import Lists => no issue
    2. Import Publication types => Error! Unsupported field type [Mediashare].
    Error! Unsupported field type [relation].
    Error! Unsupported field type [mediasharealbum].
    3. Create the database tables => no issues
    4. Import Data => Exit handler:Exiting after SQL-error =>
    Unknown column 'Docnum' in 'field list'
  • Quote

    Using Pagesetter 6.3.0.1 the import works in principle, but has issues concerning some field types:

    After converting the unsupported field types into "string" fields in Pagesetter all data were actually imported into Pagemaster.

    Observations:
    - List import: my Pagesetter lists items are translated into multiple languages. The Pagemaster list import has correctly created the "Localized output" value for the English translation but not for any other language. I will place a feature request for this issue.
    - Work-flows: the Pagesetter work-flow names were imported though they don't exist in Pagemaster. Pagemaster actually created a second line for them so they were invisible in the Admin interface (showing only "none.xml") and I had to delete them manually from within the database.
  • thanks for the info thilowitt. I'm going to have to go through the same thing and it scares the hell outa me
  • Quote

    The Pagemaster list import has correctly created the "Localized output" value for the English translation but not for any other language.

    I am trying to also get the other languages imported as "Localized output". Therefore I am changing the session language from within the import function. Example: for French I use:

    Code

    SessionUtil::setVar('language', 'fr');
    After the list import is done, the page indeed shows in French but the "Localized output" is still in the language of the browser (English in this case).
    Any suggestions?



    Edited by thilowitt on Jul 16, 2010 - 11:10 AM.
  • Well
    it seems that the pnimportapi.php is currently coded to only import the default site language. See in the PageMaster_importapi_importps1 function, that when the Categories are created, a one-dimensional array is created only:

    Code

    $cat->setDataField('display_name', array($lang => guppy_translate($list['title'])));
    $cat->setDataField('display_desc', array($lang => guppy_translate($list['description'])));
    I will need to see the title and descriptions of your Pagesetter lists to see how to extend the guppy_translate function.

    --
    - Mateo T. -
    Mis principios... son mis fines
  • Your help is much appreciated, Mateo!
    I have created an array for the languages I use that imports titles and fullTitles into their "Localized output" fields:

    Code

    $cat->setDataField('display_name', array(en => guppy_translate2($item['title'],'en'),
    es => guppy_translate2($item['title'],'es'),
    fr => guppy_translate2($item['title'],'fr'),
    it => guppy_translate2($item['title'],'it'),
    pt => guppy_translate2($item['title'],'pt'),
    de => guppy_translate2($item['title'],'de')));
    $cat->setDataField('display_desc', array(en => guppy_translate2($item['fullTitle'],'en'),
    es => guppy_translate2($item['fullTitle'],'es'),
    fr => guppy_translate2($item['fullTitle'],'fr'),
    it => guppy_translate2($item['fullTitle'],'it'),
    pt => guppy_translate2($item['fullTitle'],'pt'),
    de => guppy_translate2($item['fullTitle'],'de')));

    The translation is done by a modified guppy_translate function as to switch the language from within the import function:

    Code

    function guppy_translate2($str,$str2)
        {
        SessionUtil::setVar('language', $str2);
            if (strlen($str) > 0 && $str[0] != '_') {
                return $str;
            }
            if (constant($str) <> false) {
                return constant($str);
            }
            return $str;
        }

    The "Localized output" fields get populated for all these languages, but my guppy_translate2 function seems to ignore the language switch and always translates into the default site language.

    Quote

    I will need to see the title and descriptions of your Pagesetter lists to see how to extend the guppy_translate function.

    I have lists like "Country" with item titles like "_ESPAŅA", that in Pagesetter translate into "SPAIN" for English and "ESPAŅA" for Spanish. The import function however inserts "SPAIN" into the "es" "Localized output" field.



    Edited by thilowitt on Jul 17, 2010 - 10:42 AM.
  • Something to the first problem: Unknown column 'pn_pagesetter_lists.pg_id' in 'field list' SELECT ...

    I figured out that the error comes from

    Code

    function PageMaster_importapi_importps2()
    ...
    // import the DB Structure

        $pubtypes = DBUtil::selectObjectArray('pagesetter_pubtypes');


    Maybe someone knows where to look next ...
  • Solution for the 'Unknown column ...' problem is:

    Edit the pntables.php from Pagesetter and replace in every line the $tableName . '. with '

    Original

    Code

    $pntable['pagesetter_pubtypes_column'] = array('id'    => $tableName . '.pg_id',
                                                   'title' => $tableName . '.pg_title',
                                                   'filename' => $tableName . '.pg_filename',
    ...


    After replacement

    Code

    $pntable['pagesetter_pubtypes_column'] = array('id'    => 'pg_id',
                                                   'title' => 'pg_title',
                                                   'filename' => 'pg_filename',
    ...


    Now import again and everything should be fine. After the import you can roll back your changes to pntables.php.
    That worked for me.
  • Cool
    and BTW, the guppy_translate stuff needs to be handled different, processing the titles and fulltitles with special care. The SessionUtil::setVar doesn't do the trick here.

    Now I'm implementing the Relations for the 0.9 milestone, after fix and improve many nice things for the next version icon_cool

    --
    - Mateo T. -
    Mis principios... son mis fines
  • Quote

    Now I'm implementing the Relations for the 0.9 milestone, after fix and improve many nice things for the next version

    Mateo, you are my hero.

    --
    Harness Technology
  • icon_smile Well, I enjoy this art piece,
    and such cool combination with the Zikula 1.3 new stuff

    I've reworked a lot of stuff, even the method names, and thanks to Carsten the forms looks AWESOME now icon_cool

    --
    - Mateo T. -
    Mis principios... son mis fines
  • Quote

    the guppy_translate stuff needs to be handled different, processing the titles and fulltitles with special care. The SessionUtil::setVar doesn't do the trick here.

    Ok, would be nice to see something to handle this included in the 0.9 release!

    By the way, what will be the procedure for importing into Pagemaster 0.9 or higher when Pagesetter is no more be available as a module (Zikula 1.3)? Will it be possible to run the import from the leftover Pagesetter tables without Pagesetter intervention?

Go to page 1 - 2 [+1]:

  • 0 users

This list is based on users active over the last 60 minutes.