How to install along with Superdesk?
  • How to install Superdesk Web Publisher, along with Superdesk, so it appears on the backend as "Web Site Management" option? (as in this sc screen)
    image
  • 21 Comments sorted by
  • Hi Nalyk,

    in order to see Web Site Management (lately it has been renamed to "Publisher") menu item, you need to install Superdesk from sdsite branch (https://github.com/superdesk/superdesk/tree/sdsite). 

    Once it will be installed, this menu item will be available for you automatically.

    For now we keep it in a separate branch that's why it is not available in master branch.
  • Hello again, and thank you for your quick reply.

    I did a fresh install of Superdesk (sdsite branch) on http://desk.unimedia.info. I did not make any config changes, but I already have some errors on main.log. Is it a warning or a config error? Could you please tell me if I can move forward with configuration?

    Thank you.

    Attached you have a fragment from main.log
  • I can not add a site into the Publisher section of Superdesk, i press on save and nothing happens, still i have no hint on the error on main.log.

    image

  • From the console, i see that Superdesk is trying to access localhost, allthoug i have these settings in superdesk.config.js:

            publisher: {
                protocol: 'http',
                tenant: 'beta',
                domain: 'unimedia.info',
                base: 'api/v1'
            },

    image
  • Hi,

    it can be installed on different servers, it doesn't matter.

    On the Superdesk side:

    1. log in to Superdesk
    2. check via Chrome console what command window.superdeskConfig.publisher is returning
    In your case it should be: 

    1. base:"api/v1"
    2. domain:"unimedia.info"
    3. protocol:"https" // or http if you run on http
    4. tenant:"beta"
    5.  
    6. You can set those values here: https://github.com/superdesk/superdesk/blob/sdsite/client/superdesk.config.js, once it is set you need to install superdesk with those vars so it can build.

     You can also set PUBLISHER_API_SUBDOMAIN env var set to "beta" and PUBLISHER_API_DOMAIN env var set to "unimedia.info" while deploying/installing Superdesk so it will automatically set proper env vars for you without a need to change the above config.

    On the Publisher side (assuming you already have it installed): 

    1. Run command php app/console swp:organization:create Unimedia

    This command will create a a proper organization if you didn't create it.

    2. Run command php app/console swp:tenant:create <organization_code_generated_by_the_above_command> unimedia.info Unimedia beta

    This command will create a a proper tenant if you didn't create it.

    3. You can install theme and its assets see: 
    https://github.com/superdesk/web-publisher/blob/master/install.md#local-installationBut I saw you already did that.
    So this is what should be done in order to connect Superdesk with Publisher so it can work together properly.
  • Rafał,

    Thank you again for your time.

    Following Superdesk Web Publisher local installation I got an error on:
    php app/console doctrine:migrations:migrate

    But as I understand, those are duplicated values that are already present in the database.

    Next, I created the Organization and the tenant as you specified.

    Then I executed:

    php app/console swp:theme:install <tenant> src/SWP/Bundle/FixturesBundle/Resources/themes/DefaultTheme/ -f

    I replaced <tenant> with the tenant code, generated in the previous step.

    Finally, I executed:
    php app/console sylius:theme:assets:install

    The site gives me an Error 500 with the following output on error.log

    2017/07/05 12:19:19 [error] 4565#0: *2858 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught Twig_Error_Loader: Unable to find template "index.html.twig" (looked into: /var/www/beta.unimedia.info/htdocs/app/Resources/views, /var/www/beta.unimedia.info/htdocs/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Resources/views/Form, /var/www/beta.unimedia.info/htdocs/vendor/knplabs/knp-menu/src/Knp/Menu/Resources/views). in /var/www/beta.unimedia.info/htdocs/vendor/twig/twig/lib/Twig/Loader/Filesystem.php:247

    P.S.: As for the Superdesk configuration - it all went well after I made the config (and rebuild - I never did rebuild after reconfiguring) for the client side. Although in the console I get some cors error:
    image
    In parameters.yml for SWP, the setting is:
    allow_origin_cors: 'http://desk.unimedia.info'
  • Looks like the theme name is not set for current tenant (probably a bug let me know pls). Check in swp_tenant table if the tenant has swp/default-theme (this name is from theme.jsonset in theme_name column.


    Set
    allow_origin_cors param to '*' and remove cache folder: rm -rf /var/www/beta.unimedia.info/htdocs/cache/*
  • You were right: there was no value for the theme_name for the tenant in the swp_tenant table. I did the change on the table (added: swp/default-theme). Now it loads, but i guess there is something wrong with the assets (style.css and all.js).

    Loaded layout (http://beta.unimedia.info):
    image

    Here is a screen from console:
    image

    P.S.: Unfortunately the allow_origin_cors setting does nothing, as I get the same error:

    image
    Post edited by Nalyk Calmis at 2017-07-05 06:54:02
  • For assets run command php app/console sylius:theme:assets:install it should do the trick. To be sure run rm -rf /var/www/beta.unimedia.info/htdocs/cache/*

    For cors issue, have you changed in it /var/www/beta.unimedia.info/htdocs/app/config/parameters.yml?

    Please, check also var/www/beta.unimedia.info/htdocs/app/logs/prod.log file if there are any issues with /auth/superdesk endpoint
  • I did it step by step:

    image

    I have the same type/set of errors.

    As for prod.log - the only issue with /auth/superdesk endpoint is a "Method not allowed" error:
    No route found for \"GET /api/v1/auth/superdesk/\
  • For the assets, it is a template "error" (although it is more like a misconfiguration). The answer is here:


    Is still got auth issues and origin cors issues as i wrote above, so i still can not "bind" Superdesk with Superdesk Publisher




  • Ok about the issue with auth endpoint. What is the value set in parameters.yml for superdesk_servers param? Could be that the wrong host is set here - it should point to Superdesk API
  • Rafał, I had a productive morning :) The issue with auth endpoint was because there was not a role set for the user (my user, might be a bug). I created a role and assigned it to me and now everything is fine.

    I managed to solve CORS problem with the help of Nginx configuration, adding the needed header there.

    image

    Now the saga is to bring the menu I created in the Superdesk to the default theme. I browsed through the templating documentation and sadly I did not found much info.

    image

    Your help is really priceless. Thank you.


    UPDATE

    I copied and replaced the menu invocation tag from the theme-dailyNews and placed it in the base.html.twig -> Now I see the menu.

    I still did not manage to bypass the auth issues. On the SWP site, i get this error in the console:
    image

    Might it be related?

    Post edited by Nalyk Calmis at 2017-07-07 06:04:09
  • Vote Up0Vote Down Paweł MikołajczukPaweł Mikołajczuk
    Posts: 72Member, Sourcefabric Team
    This auth issue is known theme bug, we will fix it soon. 
  • Vote Up0Vote Down Paweł MikołajczukPaweł Mikołajczuk
    Posts: 72Member, Sourcefabric Team
    It's fixed in latest master. 
  • Thank you, i will reinstall on dev server. By the way, what is the correct upgrade procedure/instructions for Superdesk Web Publisher? 
  • Friend, could you please help me with the following:
    I installed Superdesk together with Publisher, but when I'm going to test Publish an article the Publishing Menu DOES NOT GIVE ME THE OPTION TO PUBLISH IN MORE THAN ONE SITE, as shown in the following figure01 ...

    I ask, what should I do to have access to the Publication menu like figure02 attached ...

    Thanks in advance.
    1360 x 768 - 211K
    1440 x 900 - 151K
  • Vote Up0Vote Down Paweł MikołajczukPaweł Mikołajczuk
    Posts: 72Member, Sourcefabric Team
    @Nalyk - For publisher you can just fetch new commits from git and run composer install and dcotrine:migrations:migrate command. 
  • Pawel, thank you.

    Offtopic: Anyway things are very confusing. There is no clear info anywhere on how to install no docker Superdesk to work along with SWP.

    Same confusion persists when adding two (or more) `ouptut` sites (SWPs), because, for example, in instructions, you hardcode Publisher's settings in superdesk.config.js. That is for ONE Publisher. I added a seccond site, and it appears in Dashboard, but not always. Sometimes it is displayd only the seccond SWP i added, but after a refresh - the firtst SWP ("hardcoded" in config) - also appears.

    There is still that info that "Custom fields will be added to SD Site", but as i understand it was not done, and "it will be done in a future release".

    I searched for a way to feed the Superdesk through Content API  (or through ANY API) - same "success" on finding clear info in Sourcefabric documentation.

    I understand that your business model forces you to play and be adequate in support and documentation with big players and publishers - but if you (the ones that created this beautiful piece of software) don't provide such information and care, who should?

    I understand that Superdesk and SWP are not "next->netx->next>installed" type of a product, but... c'mon.

    P.S.: In this context, articles on your blog like "Why Open Source is Good News for the News Media" and the ones about how many big publishers are joining Superdesk adventure smells like trolling.


  • Vote Up0Vote Down Paweł MikołajczukPaweł Mikołajczuk
    Posts: 72Member, Sourcefabric Team
    Hey, 

    About Publisher config in Superdesk UI: You need to configure there your first organization tenant there. It will use this host for controlling this organization and all of it's tenants. 

    Custom fields are already supported.

    About feeding superdesk with content - you should use INGEST feature and fetch (import content) to SD. 

    We know that Superdesk documentation is not so easy to discover (we work on this). Publisher Docs can be found here: http://superdesk-publisher.readthedocs.io/en/latest/

    About installation. We just published new post with steps required to install SD + Publisher: https://www.superdesk.org/news/installing-superdesk-publisher&nbsp;
  • Pawel, thanks, it was an... old opinion, meanwhile, i concentrated on Superdesk only, writing my own solution for the news site (which uses Superdesk as a "backend", of course). With the help of Petr Jasek we will launch the beta site on Monday (if it all goes well). But that's one site for one publisher. I still got to make a second site for this publisher, and another one for my own company, so, thanks for the update, as I will give it a try as soon as possible.