Giter VIP home page Giter VIP logo

superdesk / web-publisher Goto Github PK

View Code? Open in Web Editor NEW
95.0 23.0 56.0 35.77 MB

Superdesk Publisher - the next generation publishing platform for journalists and newsrooms.

License: GNU Affero General Public License v3.0

PHP 77.10% HTML 0.03% CSS 0.91% JavaScript 1.34% Gherkin 17.91% Dockerfile 0.10% VCL 0.25% Twig 2.35%
superdesk superdesk-publisher newsroom php journalists journalism symfony open-source news media publishing web-application symfony-application cms

web-publisher's Introduction

Superdesk Web Publisher

Superdesk Publisher - the next generation publishing platform for journalists and newsrooms.

The Superdesk Publisher is an API-centric delivery tool for digital platforms. Written from scratch in 2016, it builds on top of the knowledge gained from 16 years of delivering digital news at scale with Newscoop. The Publisher is designed to extend our newsroom management system Superdesk, providing complete, end to end digital publishing solution. Therefore, it allows independent development and maintenance of the editorial systems.

Documentation

Full documentation can be found here: http://superdesk-publisher.readthedocs.org

Requirements

See requirements for general information, and composer.json for always up to date libraries and extensions requirements.

Installation

We strongly recommend using Docker for local installation and testing.

There is an installation guide for setting up the required services and the Publisher manually.

License

See the complete license here.

Contributors

This project is a Sourcefabric z.ú. and contributors initiative.

List of all authors and contributors can be found here.

web-publisher's People

Contributors

actionless avatar ahilles107 avatar anna-leaf avatar danielhjames avatar dependabot-preview[bot] avatar dependabot-support avatar djbrd-sourcefabric avatar dsmackie avatar greg606 avatar hlmnrmr avatar ivanjelicsf avatar kottkrig avatar ljubar avatar m038 avatar mehdignu avatar mikeavena avatar mrhein avatar sbarut avatar scrutinizer-auto-fixer avatar shivharis avatar takeit avatar thnkloud9 avatar tomaszrondio avatar vanjakovacevicoptima avatar weaponman avatar zkabic avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

web-publisher's Issues

Improvements for tenant saas

  • introduce sites/organizations concept
    • domain
    • load specific cache with routes per site
    • doctrine filters for sites

[RFC] Remove the *.class parameters

Here is an issue describing why it was done: symfony/symfony#11881

All services in core define their classes as parameters. The convention is to create a foo.class parameter for the class of the foo service. This approach comes with several problems:

The parameters are dumped like any other one in the compiled class and it makes the file larger for no good reasons (read: it slows down your app for free).

When someone wants to change a service, just changing the class name is rarely enough: the new service probably have some different constructor arguments, ... Or put another way, overriding a service by just changing the class name of a service is a very rare use case.

Of course, if several bundles change the value of such a parameter, the "last" definition wins. Classic inheritance vs composition problem.

For all these reasons, I like to remove all those parameters for Symfony 3.0.

On a side note, it's now possible to easily replace a service by decorating it (see symfony/symfony#9003).

There is also a script that Fabien used to do it (for xml files) symfony/symfony#14070 (comment)

All those parameters have been removed already in Symfony 3.0.

Cannot access uploaded files

Hi,

I've created articles in Superdesk with attachments (e.g. pdfs) and pushed it to publisher, but when I try to access any of these files I reach a 404.

I want to embed a PDF in the article, but when I try this it just gives a frame with a 404 error in it. Is there also an easier way to embed the PDF? If I add the following:

<iframe id="iframepdf" src="myattachment.pdf "></iframe>

The article fails the validation test and I can't post it, the way I've been trying to get it to work is by uploading the file (and checking it's added to swp_file), then modifying the swp_article to add the following to the body:

<iframe id="iframepdf" src="/media/5b3b4c5ef31b6605a4f73c31.pdf"></iframe>

Clash name space in supervisor tasks

Supervisor tasks name space clash:

supervisor_content_push.conf should not be addressed as task

[program:publisher_analytics] -> [program:publisher_content_push]

Dependabot can't resolve your PHP dependency files

Dependabot can't resolve your PHP dependency files.

As a result, Dependabot couldn't update your dependencies.

The error Dependabot encountered was:

Dependabot's installed extensions didn't match those required by your application.

Please add the following extensions to the platform config in your composer.json to allow Dependabot to run: ext-zmq.

The full error raised was:

Your requirements could not be resolved to an installable set of packages.
  Problem 1
    - react/zmq dev-master requires ext-zmq * -> the requested PHP extension zmq is missing from your system.
    - react/zmq dev-master requires ext-zmq * -> the requested PHP extension zmq is missing from your system.
    - Installation request for react/zmq dev-master -> satisfiable by react/zmq[dev-master].

  To enable extensions, verify that they are enabled in your .ini files:
    - /etc/php/7.2/cli/php.ini
    - /etc/php/7.2/cli/conf.d/10-opcache.ini
    - /etc/php/7.2/cli/conf.d/10-pdo.ini
    - /etc/php/7.2/cli/conf.d/15-xml.ini
    - /etc/php/7.2/cli/conf.d/20-apcu.ini
    - /etc/php/7.2/cli/conf.d/20-bcmath.ini
    - /etc/php/7.2/cli/conf.d/20-calendar.ini
    - /etc/php/7.2/cli/conf.d/20-ctype.ini
    - /etc/php/7.2/cli/conf.d/20-curl.ini
    - /etc/php/7.2/cli/conf.d/20-dom.ini
    - /etc/php/7.2/cli/conf.d/20-exif.ini
    - /etc/php/7.2/cli/conf.d/20-fileinfo.ini
    - /etc/php/7.2/cli/conf.d/20-ftp.ini
    - /etc/php/7.2/cli/conf.d/20-gd.ini
    - /etc/php/7.2/cli/conf.d/20-gettext.ini
    - /etc/php/7.2/cli/conf.d/20-gmp.ini
    - /etc/php/7.2/cli/conf.d/20-iconv.ini
    - /etc/php/7.2/cli/conf.d/20-igbinary.ini
    - /etc/php/7.2/cli/conf.d/20-imagick.ini
    - /etc/php/7.2/cli/conf.d/20-intl.ini
    - /etc/php/7.2/cli/conf.d/20-json.ini
    - /etc/php/7.2/cli/conf.d/20-ldap.ini
    - /etc/php/7.2/cli/conf.d/20-mbstring.ini
    - /etc/php/7.2/cli/conf.d/20-mongodb.ini
    - /etc/php/7.2/cli/conf.d/20-msgpack.ini
    - /etc/php/7.2/cli/conf.d/20-pdo_sqlite.ini
    - /etc/php/7.2/cli/conf.d/20-phar.ini
    - /etc/php/7.2/cli/conf.d/20-posix.ini
    - /etc/php/7.2/cli/conf.d/20-readline.ini
    - /etc/php/7.2/cli/conf.d/20-redis.ini
    - /etc/php/7.2/cli/conf.d/20-shmop.ini
    - /etc/php/7.2/cli/conf.d/20-simplexml.ini
    - /etc/php/7.2/cli/conf.d/20-soap.ini
    - /etc/php/7.2/cli/conf.d/20-sockets.ini
    - /etc/php/7.2/cli/conf.d/20-sqlite3.ini
    - /etc/php/7.2/cli/conf.d/20-sysvmsg.ini
    - /etc/php/7.2/cli/conf.d/20-sysvsem.ini
    - /etc/php/7.2/cli/conf.d/20-sysvshm.ini
    - /etc/php/7.2/cli/conf.d/20-tokenizer.ini
    - /etc/php/7.2/cli/conf.d/20-wddx.ini
    - /etc/php/7.2/cli/conf.d/20-xdebug.ini
    - /etc/php/7.2/cli/conf.d/20-xmlreader.ini
    - /etc/php/7.2/cli/conf.d/20-xmlwriter.ini
    - /etc/php/7.2/cli/conf.d/20-xsl.ini
    - /etc/php/7.2/cli/conf.d/20-zip.ini
    - /etc/php/7.2/cli/conf.d/25-apcu_bc.ini
    - /etc/php/7.2/cli/conf.d/25-memcached.ini
  You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.

If you think the above is an error on Dependabot's side please don't hesitate to get in touch - we'll do whatever we can to fix it.

You can mention @dependabot in the comments below to contact the Dependabot team.

NonUniqueResultException

2018/05/26 05:04:17 [error] 13218#13218: *425 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught Doctrine\ORM\NonUniqueResultException: More than one result was found for query although one row or none was expected. in /var/www/publisher/vendor/doctrine/orm/lib/Doctrine/ORM/AbstractQuery.php:770
Stack trace:
#0 /var/www/publisher/src/SWP/Bundle/MultiTenancyBundle/Doctrine/ORM/TenantRepository.php(59): Doctrine\ORM\AbstractQuery->getOneOrNullResult()
#1 /var/www/publisher/src/SWP/Component/MultiTenancy/Resolver/TenantResolver.php(54): SWP\Bundle\MultiTenancyBundle\Doctrine\ORM\TenantRepository->findOneByDomain('139.162.61.246')
#2 /var/www/publisher/app/cache/prod/ContainerEfjtltv/TenantResolver_98081b0.php(13): SWP\Component\MultiTenancy\Resolver\TenantResolver->resolve('139.162.61.246')
#3 /var/www/publisher/src/SWP/Bundle/CoreBundle/Context/CachedTenantContext.php(74): TenantResolver_98081b0->resolve('139.162.61.246')
#4 /var/www/publisher/src/SWP/Bundle/MultiTenancyBundle/EventListener/TenantableListener.php(64): SWP\Bundle\CoreBundle\Context\CachedTenantCon" while reading response header from upstream, client: 14.143.15.70, server: , request: "GET / HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "139.162.61.246"

How to fix this issue?

Problem install superdesk publisher Ubuntu 16.04 (two servers)

Hello.
I want to install superdesk publisher. I using this manual.

http://superdesk-publisher.readthedocs.io/en/latest/manual/getting_started/superdesk-superdesk-publisher-setup.html

  1. I have two servers ubuntu 16.04 ( 1 server superdesk) (2 server superdesk publish)
  2. I install superdesk http://prntscr.com/k8zl34 and install superdesk publish http://prntscr.com/k8zl91
  3. I check all logs nginx,rabbitmq server, and supervisor+ config symphony. Not find, why server not working. I see this window http://prntscr.com/k8zlqn http://prntscr.com/k8zlv6
    I think superdesk publish not loading.
    I think superdesk server just using API http port 80. What problem?
    I testing docker this 100% not working.

If need I can send configs. Please help. Thanks.

[RFC] Tenant aware themes

Introduction

  • Load themes for current tenant. The repository should not collect all available themes belonging to other tenants - this will be the performance improvement when loading themes for the first time.

Proposal

The Sylius Theme Bundle has been refactored a lot, thus the below proposal is not valid anymore. See this RFC issue for more details:

  • disable ThemeRepository compiler pass in ThemeBundle
  • When creating a new tenant (e.g. tenant1) it should also create a new directory in app/themes/tenant1 where themes will be kept for given tenant. (the dir should be removed when tenant will be deleted)
  • In ActiveThemeListener Event listener (which will be created on our side) there should be TenantContext injected to get current tenant. Based on tenant's subdomain we will search in /app/themes/tenant1 dir for its available themes (worth to take a look into FilesystemConfigurationProvider from ThemeBundle)

Here we can extend Sylius RecursiveFileLocator where we will inject TenantContext and prefix the $paths array (https://github.com/Sylius/SyliusThemeBundle/blob/master/Locator/RecursiveFileLocator.php#L40) with current tenant, so it will read themes from app/themes/tenant1 in that case.

  • found themes should be then added to Sylius ThemeRepository
  • then in the ThemeRepository it should find the theme used by the current tenant and set it to active

Drawbacks

  • we should make it configurable to disable/enable ThemeRepositoryPass in Sylius ThemeBundle
  • remove 'final' from some classes to allow override in Sylius ThemeBundle
  • make sure the cache should not be cleared when uploading changing themes - ThemeBundle should take care about this? - research it.
  • dump assets for all themes, not only for current tenant

References

[Insight] Database queries should use parameter binding - in src/SWP/…/Loader/ArticleLoader.php, line 142

in src/SWP/Bundle/ContentBundle/Loader/ArticleLoader.php, line 142

If provided by the user, the value of $order[0] may allow an SQL injection attack. Avoid concatenating parameters to SQL query strings, and use parameter binding instead.

                            throw new \Exception('Order filter must have two parameters with second one asc or desc, e.g. order(id, desc)');
                        }
                        if ($order[0] === 'id') {
                            $order[0] = 'jcr:uuid';
                        }
                        $queryStr .= ' ORDER BY S.'.$order[0].' '.$order[1];
                    }

                    $query = $this->dm->createPhpcrQuery($queryStr, QueryInterface::JCR_SQL2);

                    if (isset($parameters['limit'])) {

Posted from SensioLabsInsight

Unable to add Publisher to superdesk

Have installed Superdesk and SuperDesk-Publisher on 2 different servers(ubuntu 16.04) using the steps in

https://superdesk-publisher.readthedocs.io/en/latest/manual/getting_started/superdesk-superdesk-publisher-setup.html#how-to-configure-superdesk-publisher-with-superdesk

After updating the config file (config.js and config.e34553.js) on Superdesk , Superdesk fails to load in the browser , the network tab of the Firebug shows "Module 'superdesk-publisher' is not available! "

The URLs of the set up are as follows :

Superdesk : http://ec2-13-233-253-231.ap-south-1.compute.amazonaws.com/
Superdesk-Publisher : http://ec2-13-233-89-104.ap-south-1.compute.amazonaws.com/

** on reverting back the config files to original Superdesk works fine.
Please help !!!
Thanks in Advance

Template Engine

We want to give easy to use and powerful tool for fetching content in WebPublisher templates. This for why we need context object.

Proposal

updated: 23.07.2015 15:08

Template

getters:
Get default data from context:

{{ gimme.article.title}} - print current article title
{{ gimme.user.name }} - print current user name

Get single custom object:

{% gimme ‘article’ {param: 1}  %}
     {{ article.name }} 
{% endgimme %}

Get collection of objects:

Tag gimmelist have two required parameter and four optional:

  • (required) Name of variable available inside block: article
  • (required) Keword :code:from and type of requested Meta's in collection: from articles
  • (optional) Keword :code:with and parameters for Meta Loader ex.: with {foo: 'bar', param1: 'value1'}
  • (optional) Keword if and expresion used for results filtering
  • (optional) Number of first item used in pagination of list: start=0
  • (optional) Collection limit used in pagination of list: limit=10

required parameters:

    {% gimmelist article from articles %}
        {{ dump(article)}}
        {{ article.title }}
    {% endgimmelist %}

all parameters:

    {% gimmelist article from articles with {foo: 'bar', param1: 'value1'} if article.is_public start=0 limit=10 %}
        {{ dump(article)}}
        {{ article.title }}
    {% endgimmelist %}

check if object is available

{% if gimme.article is defined %}
    ...
{% endif %}

Backend

Context will be determined by listeners based on current route, it can be filled also from controller level.

Example:

<?php


/**
 * @Context("article", class="WebRendere:Article", options={"id" = "article_id"})
 * @Route("/article/{article_id}")
 */
public function showArticleAction(Article $article)
{
    // this will also work
    $context->set('article', $article);
}

Objects exposed for templators.

Templator will not get access to internal entities or content repository objects - there will be special Meta class SWP/TemplateEngine/Meta.

Every meta object will be define and documented with special yml configuration file.

Example:

Article:
    properties:
        title:
            description: "Article title, max 160 characters, can't have any html tags"
            # optional custom getter
            getter: getArticle
        keywords:
            description: "Article keywords"

Based on this configuration, public properties will be added and filled with data from storage in SWP/TemplateEngine/Meta object available for templator under g.article

[WIP] [Proposal] Template containers system

Container - special twig block in templates witch can contain widgets (or default content). Container have his representation in database and provides api to change it - so it can be modified without changes in template file. Container is registered on first render or theme scanning.

Example code in template:

{{ container 'container_name' { 
    'width': 400, 
    'height': 500, 
    'styles': 'border: solid 1px red', 
    'class': 'css_class_name', 
    'data': {'custom-key': value}
}}}
Here is default content - if there is no widgets attached to container. 
{{ endcontainer }}

it would render smth like that

<div id="container_id" class="css_class_name" style="width: 400px; height: 500px; border: solid 1px red" data-custom-key="value">
Here is default content - if there is no widgets attached to container. 
</div>

Container Entity:

SWP\TemplateEngineBundle\Model\Container:
    type: entity
    table: null
    repositoryClass: SWP\TemplateEngineBundle\Repository\ContainerRepository
    id:
        id:
            type: integer
            id: true
            generator:
                strategy: AUTO
    fields:
        name:
            type: string
            length: 255
        type:
            type: integer
        width:
            type: integer
        height:
            type: integer
        styles:
            type: text
        class:
            type: string
            length: 255
        visible:
            type: boolean
    oneToMany:
        data:
            targetEntity: SWP\TemplateEngineBundle\Model\ContainerData
            mappedBy: container

Container Data Entity:

SWP\TemplateEngineBundle\Model\ContainerData:
    type: entity
    table: null
    repositoryClass: SWP\TemplateEngineBundle\Repository\ContainerDataRepository
    id:
        id:
            type: integer
            id: true
            generator:
                strategy: AUTO
    fields:
        key:
            type: string
            length: 255
        value:
            type: string
            length: 255
    manyToOne:
        container:
            targetEntity: SWP\TemplateEngineBundle\Model\Container
            joinColumn:
                name: container_id
                referencedColumnName: id

Container object (used by twig)

<?php

namespace SWP\TemplateEngine\Container;

class Container
{
   private $containerModel;

   /**
    * Renders container (div) with all parameters from $containerModel object, 
    * also foreach on all widgets in Container and renders them
    */
    private function render(){};
}

We need provide REST API to control containers

Method Endpoint Description
POST /api/container/{id} update container
GET /api/container/{id} get container
LINK/UNLINK /api/container/{id}/widget link unlink widgets to container

"Composer Install" with Composer version 1.7.3 2018-11-01 10:05:06 fails

When running "composer install" with today's Composer I get the following error:
Reading ./composer.lock
Warning: The lock file is not up to date with the latest changes in composer.json. You may be getting outdated dependencies. Run update to update them.
Resolving dependencies through SAT

Dependency resolution completed in 0.001 seconds
Your requirements could not be resolved to an installable set of packages.

Problem 1
- Installation request for symfony/symfony v3.4.14 -> satisfiable by symfony/symfony[v3.4.14].
- don't install symfony/dotenv v4.1.4|don't install symfony/symfony v3.4.14
- Installation request for symfony/dotenv v4.1.4 -> satisfiable by symfony/dotenv[v4.1.4].

[Request] Update installation instructions

Can you please provide more detailed instructions as to how to get the Publisher working? I have been trying on Ubuntu 16.04, on master branch, getting all sort of errors.

  • What is the suggested operating system?
  • The docker install instructions really confuse me. There's a build section, then a run section, then a pre-configuration, then an install, then a post-configuration. Please specify what is the order of these commands so that you can get the Publisher running
  • I tried the docker version and composer breaks with the following:
root@me:/tmp/markos/web-publisher/docker# docker-compose run php composer install
...
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - This package requires php ^7.1 but your PHP version (7.0.25) does not satisfy that requirement.
  Problem 2
    - Installation request for doctrine/annotations v1.5.0 -> satisfiable by doctrine/annotations[v1.5.0].
    - doctrine/annotations v1.5.0 requires php ^7.1 -> your PHP version (7.0.25) does not satisfy that requirement.
 ...
  • what is a way to deploy this, once it gets installed? The doc mentions
php app/console server:start publisher.dev

but it would be helpful if you added more information, is this for a dev environment only or can be used in production?

Happy to test any instructions and provide feedback

Regards,
Markos

Installation Issue Invalid type for path

Hi,
I am trying to install Superdesk Publisher following the guide found here: https://www.superdesk.org/news/installing-superdesk-publisher

However, after entering the following command:

HTTPDUSER=$(ps axo user,comm | grep -E '[a]pache|[h]ttpd|[_]www|[w]ww-data|[n]ginx' | grep -v root | head -1 | cut -d\ -f1) && sudo chown -R "$HTTPDUSER":"$HTTPDUSER" publisher/ && cd publisher && sudo -u www-data SYMFONY_ENV=prod composer install --no-dev --optimize-autoloader

I get this error:

Invalid type for path "fos_http_cache.proxy_client.varnish.http.servers". E xpected array, but got string Hint: Addresses of the hosts the caching proxy is running on. May be hostna me or ip, and with :port if not the default port 80.

Any help is appreciated.

[RFC] Device specific templates

This RFC is about porting part of liip/LiipThemeBundle feature: https://github.com/liip/LiipThemeBundle#device-specific-themestemplates

You can provide specific templates for different devices (like: desktop, tablet, phone, plain). Set option autodetect_device to true for setting current_device parameter based on the user agent:

# app/config/config.yml
sylius_theme:
    autodetect_device: true

Then in resource locator will use %%current_device%% parameter (with your device type as value)

New app resource path:

%%current_theme%%/%%current_device%%/%%template%%

New bundle resource path:

%%current_theme%%/%%current_device%%/%%current_bundle%%/%%template%%

Optionally autodetect_theme can also be set to a DIC service id that implements the DeviceDetectionInterface interface.

Unauthorized (user not found in Superdesk)

I have two servers; 1 x Superdesk, 1 x Superdesk Publisher. They are both configured as per the installation guides.

When logging in to the Superdesk administration page, the site does not display the Superdesk Publisher site that has been configured in config.js.

The API call to the publisher is failing as shown below;

image

The prod.log file shows the following;

[2019-02-28 22:32:53] request.ERROR: Uncaught PHP Exception Symfony\Component\HttpKernel\Exception\NotFoundHttpException: "No route found for "GET /api/sessions/5c77c6c65ab77e30ab0c38c1"" at /var/www/publisher/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/RouterListener.php line 139 {"exception":"[object] (Symfony\\Component\\HttpKernel\\Exception\\NotFoundHttpException(code: 0): No route found for \"GET /api/sessions/5c77c6c65ab77e30ab0c38c1\" at /var/www/publisher/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/RouterListener.php:139, Symfony\\Component\\Routing\\Exception\\ResourceNotFoundException(code: 0): None of the routers in the chain matched this request\nGET /api/sessions/5c77c6c65ab77e30ab0c38c1 HTTP/1.1\r\nAuthorization: Basic MDY2ODMyY2EtOWEwNi00ZWE3LTlmZjgtMDgxOGYyMzZlOWQ2Og==\r\nContent-Length: \r\nContent-Type: \r\nHost: 192.168.100.211\r\nPhp-Auth-Pw: \r\nPhp-Auth-User: 066832ca-9a06-4ea7-9ff8-0818f236e9d6\r\nUser-Agent: GuzzleHttp/6.3.3 curl/7.47.0 PHP/7.2.15-1+ubuntu16.04.1+deb.sury.org+1\r\nX-Php-Ob-Level: 1\r\n\r\n at /var/www/publisher/vendor/symfony-cmf/routing/src/ChainRouter.php:210)"} []

Since a recent build - "There is no extension able to load the configuration for "fidry_alice_data_fixtures""

Since one of the latest builds I can no longer use a production environment when trying to initialize anything on a fresh install. e.g. 'php app/console swp:organization:create my_org -e prod' gives:

In FileLoader.php line 168:
                                                                                                                                                                                            
There is no extension able to load the configuration for "fidry_alice_data_fixtures" (in /var/www/publisher/src/SWP/Bundle/CoreBundle/Resources/config/app/config.yml). Looked for namespac  
e "fidry_alice_data_fixtures", found "framework", "security", "twig", "monolog", "swiftmailer", "sensio_framework_extra", "jms_serializer", "sylius_theme", "doctrine", "fos_http_cache", "  
fos_rest", "fos_user", "knp_paginator", "twig_cache", "bazinga_hateoas", "nelmio_api_doc", "nelmio_cors", "stof_doctrine_extensions", "cmf_core", "cmf_routing", "doctrine_cache", "jms_tra  
nslation", "knp_menu", "oneup_flysystem", "burgov_key_value_form", "takeit_amp_html", "doctrine_migrations", "swp_storage", "swp_multi_tenancy", "swp_templates_system", "swp_bridge", "swp  
_content", "swp_analytics", "swp_rule", "swp_menu", "swp_content_list", "swp_facebook_instant_articles", "swp_revision", "swp_user", "swp_settings", "swp_webhook", "swp_output_channel", "  
swp_core", "fos_elastica", "swp_elastic_search", "old_sound_rabbit_mq", "gos_web_socket", "gos_pubsub_router", "sentry" in /var/www/publisher/src/SWP/Bundle/CoreBundle/Resources/config/ap  
p/config.yml (which is being imported from "/var/www/publisher/app/config/config.yml").                                                                                                      
                                                                                                                                                                                            

In YamlFileLoader.php line 704:
                                                                                                                                                                                            
There is no extension able to load the configuration for "fidry_alice_data_fixtures" (in /var/www/publisher/src/SWP/Bundle/CoreBundle/Resources/config/app/config.yml). Looked for namespac  
e "fidry_alice_data_fixtures", found "framework", "security", "twig", "monolog", "swiftmailer", "sensio_framework_extra", "jms_serializer", "sylius_theme", "doctrine", "fos_http_cache", "  
fos_rest", "fos_user", "knp_paginator", "twig_cache", "bazinga_hateoas", "nelmio_api_doc", "nelmio_cors", "stof_doctrine_extensions", "cmf_core", "cmf_routing", "doctrine_cache", "jms_tra  
nslation", "knp_menu", "oneup_flysystem", "burgov_key_value_form", "takeit_amp_html", "doctrine_migrations", "swp_storage", "swp_multi_tenancy", "swp_templates_system", "swp_bridge", "swp  
_content", "swp_analytics", "swp_rule", "swp_menu", "swp_content_list", "swp_facebook_instant_articles", "swp_revision", "swp_user", "swp_settings", "swp_webhook", "swp_output_channel", "  
swp_core", "fos_elastica", "swp_elastic_search", "old_sound_rabbit_mq", "gos_web_socket", "gos_pubsub_router", "sentry"                                                                      

In the dev environment it doesn't do this, but when I try to access the site I get the same PHP error as above logged to my nginx logs.

Error while database creation

telugram@localhost:/var/www/publisher$ sudo /etc/init.d/postgresql reload
[ ok ] Reloading postgresql configuration (via systemctl): postgresql.service.
telugram@localhost:/var/www/publisher$ SYMFONY_ENV=prod php app/console doctrine:database:create
10:29:24 ERROR [console] Error thrown while running command "doctrine:database:create". Message: "An exception occurred in driver: SQLSTATE[08006] [7] fe_sendauth: no password supplied" ["exception" => Doctrine\DBAL\Exception\ConnectionException { …},"command" => "doctrine:database:create","message" => "An exception occurred in driver: SQLSTATE[08006] [7] fe_sendauth: no password supplied"] []

In AbstractPostgreSQLDriver.php line 89:

An exception occurred in driver: SQLSTATE[08006] [7] fe_sendauth: no password supplied

In PDOConnection.php line 47:

SQLSTATE[08006] [7] fe_sendauth: no password supplied

In PDOConnection.php line 43:

SQLSTATE[08006] [7] fe_sendauth: no password supplied

Please help.

Tenant for host "127.0.0.1" could not be found!

In Database table swp_tenant has value 127.0.0.1 in domain field.
still getting following error.

2018/06/07 09:10:39 [error] 1105#1105: *33 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught SWP\Component\MultiTenancy\Exception\TenantNotFoundException: Tenant for host "127.0.0.1" could not be found! in /var/www/publisher/src/SWP/Component/MultiTenancy/Resolver/TenantResolver.php:58
Stack trace:
#0 /var/www/publisher/app/cache/prod/ContainerEfjtltv/TenantResolver_98081b0.php(13): SWP\Component\MultiTenancy\Resolver\TenantResolver->resolve('example.com')
#1 /var/www/publisher/src/SWP/Bundle/CoreBundle/Context/CachedTenantContext.php(74): TenantResolver_98081b0->resolve('127.0.0.1')
#2 /var/www/publisher/src/SWP/Bundle/MultiTenancyBundle/EventListener/TenantableListener.php(64): SWP\Bundle\CoreBundle\Context\CachedTenantContext->getTenant()
#3 /var/www/publisher/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/EventDispatcher.php(212): SWP\Bundle\MultiTenancyBundle\EventListener\TenantableListener->enable(Object(Symfony\Component\HttpKernel\Event\GetResponseEvent), 'kernel.request', Object(Symfony\Component\EventDispatcher\ContainerAware" while reading response header from upstream, client: 14.143.15.70, server: 127.0.0.1, request: "GET / HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "127.0.0.1"

In ExpressionLanguageExceptionFactory.php line 59:

php app/console doctrine:fixtures:load

ERROR

In ExpressionLanguageExceptionFactory.php line 59:

  The value "<paragraph(10)> <blockquote class="instagram-media" data-instgrm-captioned data-instgrm-version="7" style=" background:#FFF; border:0; border-radius:3px; box  
  -shadow:0 0 1px 0 rgba(0,0,0,0.5),0 1px 10px 0 rgba(0,0,0,0.15); margin: 1px; max-width:658px; padding:0; width:99.375%; width:-webkit-calc(100% - 2px); width:calc(100%  
   - 2px);"><div style="padding:8px;"> <div style=" background:#F8F8F8; line-height:0; margin-top:40px; padding:50.0% 0; text-align:center; width:100%;"> <div style=" bac  
  kground:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAMAAAApWqozAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAMUExURczMzPf399fX1+bm5mzY9AMAAADiSURBVDjLvZXbEs  
  MgCES5/P8/t9FuRVCRmU73JWlzosgSIIZURCjo/ad+EQJJB4Hv8BFt+IDpQoCx1wjOSBFhh2XssxEIYn3ulI/6MNReE07UIWJEv8UEOWDS88LY97kqyTliJKKtuYBbruAyVh5wOHiXmpi5we58Ek028czwyuQdLKPG1Bkb4N  
  nM+VeAnfHqn1k4+GPT6uGQcvu2h2OVuIf/gWUFyy8OWEpdyZSa3aVCqpVoVvzZZ2VTnn2wU8qzVjDDetO90GSy9mVLqtgYSy231MxrY6I2gGqjrTY0L8fxCxfCBbhWrsYYAAAAAElFTkSuQmCC); display:block; heig  
  ht:44px; margin:0 auto -44px; position:relative; top:-22px; width:44px;"></div></div> <p style=" margin:8px 0 0 0; padding:0 4px;"> <a href="https://www.instagram.com/p  
  /BNaM68Cj7kD/" style=" color:#000; font-family:Arial,sans-serif; font-size:14px; font-style:normal; font-weight:normal; line-height:17px; text-decoration:none; word-wra  
  p:break-word;" target="_blank">Meet Enzo (right), a #Doogler at our Palo Alto office who loves hosting his pal Olive for campus tours (and striking a few poses).</a></p  
  > <p style=" color:#c9c8cd; font-family:Arial,sans-serif; font-size:14px; line-height:17px; margin-bottom:0; margin-top:8px; overflow:hidden; padding:8px 0 7px; text-al  
  ign:center; text-overflow:ellipsis; white-space:nowrap;">Zdjęcie zamieszczone przez użytkownika Google (@google) <time style=" font-family:Arial,sans-serif; font-size:1  
  4px; line-height:17px;" datetime="2016-11-29T21:37:32+00:00">29 Lis, 2016 o 1:37 PST</time></p></div></blockquote> <script async defer src="//platform.instagram.com/en_  
  US/embeds.js"></script> <paragraph(10)> <iframe src="https://www.facebook.com/plugins/post.php?href=https%3A%2F%2Fwww.facebook.com%2Ffacebook%2Fposts%2F1015459756710672  
  9%3A0&width=500" width="500" height="608" style="border:none;overflow:hidden" scrolling="no" frameborder="0" allowTransparency="true"></iframe> <br><paragraph(10)>" con  
  tains an unclosed function.

HOW TO FIXED THIS ERROR?

Performance measurement

Log performance (time, memory) on configured % of users. Save data on kernel.terminate event to database. Requests with special query parameter and value should be logged also. Add special profiler tab with logged informations.

Feature flag system

Backend wizzard for:

  • creating feature filters
    • enable feature for people with special cookie
    • special ip range
    • special user agent
    • etc...
  • creating features like
    • use special template instead original one
    • log some data (like performance measurement)
    • activate some plugins
    • etc...

Command error while installing dependencies

Install Superdesk Publisher source code dependencies:

HTTPDUSER=$(ps axo user,comm | grep -E '[a]pache|[h]ttpd|[_]www|[w]ww-data|[n]ginx' | grep -v root | head -1 | cut -d\ -f1) && sudo chown -R "$HTTPDUSER":"$HTTPDUSER" publisher/ && cd publisher && sudo -u www-data SYMFONY_ENV=prod composer install --no-dev --optimize-autoloader

error code: cut: the delimiter must be a single character

After try with some ' ' fix, below problems are facing.

HTTPDUSER=$(ps axo user,comm | grep -E '[a]pache|[h]ttpd|[_]www|[w]ww-data|[n]ginx' | grep -v root | head -1 | cut -d ' ' -f1) && sudo chown -R "$HTTPDUSER":"$HTTPDUSER" publisher/ && cd publisher && sudo -u www-data SYMFONY_ENV=prod composer install --no-dev --optimize-autoloader
Cannot create cache directory /home/telugram/.composer/cache/repo/https---packagist.org/, or directory is not writable. Proceeding without cache
Cannot create cache directory /home/telugram/.composer/cache/files/, or directory is not writable. Proceeding without cache
Loading composer repositories with package information
Installing dependencies from lock file
Your requirements could not be resolved to an installable set of packages.

Problem 1
- Installation request for layershifter/tld-database 1.0.56 -> satisfiable by layershifter/tld-database[1.0.56].
- layershifter/tld-database 1.0.56 requires ext-curl * -> the requested PHP extension curl is missing from your system.
Problem 2
- Installation request for marc1706/fast-image-size v1.1.4 -> satisfiable by marc1706/fast-image-size[v1.1.4].
- marc1706/fast-image-size v1.1.4 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
Problem 3
- Installation request for php-amqplib/php-amqplib v2.7.2 -> satisfiable by php-amqplib/php-amqplib[v2.7.2].
- php-amqplib/php-amqplib v2.7.2 requires ext-bcmath * -> the requested PHP extension bcmath is missing from your system.
Problem 4
- Installation request for react/zmq dev-master -> satisfiable by react/zmq[dev-master].
- react/zmq dev-master requires ext-zmq * -> the requested PHP extension zmq is missing from your system.
Problem 5
- Installation request for sentry/sentry 1.8.4 -> satisfiable by sentry/sentry[1.8.4].
- sentry/sentry 1.8.4 requires ext-curl * -> the requested PHP extension curl is missing from your system.
Problem 6
- Installation request for symfony/symfony v3.4.6 -> satisfiable by symfony/symfony[v3.4.6].
- symfony/symfony v3.4.6 requires ext-xml * -> the requested PHP extension xml is missing from your system.
Problem 7
- symfony/symfony v3.4.6 requires ext-xml * -> the requested PHP extension xml is missing from your system.
- willdurand/hateoas-bundle 1.4.0 requires symfony/framework-bundle ~2.3 || ~3.0 || ~4.0 -> satisfiable by symfony/symfony[v3.4.6].
- Installation request for willdurand/hateoas-bundle 1.4.0 -> satisfiable by willdurand/hateoas-bundle[1.4.0].

To enable extensions, verify that they are enabled in your .ini files:
- /etc/php/7.2/cli/php.ini
- /etc/php/7.2/cli/conf.d/10-opcache.ini
- /etc/php/7.2/cli/conf.d/10-pdo.ini
- /etc/php/7.2/cli/conf.d/20-calendar.ini
- /etc/php/7.2/cli/conf.d/20-ctype.ini
- /etc/php/7.2/cli/conf.d/20-exif.ini
- /etc/php/7.2/cli/conf.d/20-fileinfo.ini
- /etc/php/7.2/cli/conf.d/20-ftp.ini
- /etc/php/7.2/cli/conf.d/20-gettext.ini
- /etc/php/7.2/cli/conf.d/20-iconv.ini
- /etc/php/7.2/cli/conf.d/20-json.ini
- /etc/php/7.2/cli/conf.d/20-phar.ini
- /etc/php/7.2/cli/conf.d/20-posix.ini
- /etc/php/7.2/cli/conf.d/20-readline.ini
- /etc/php/7.2/cli/conf.d/20-shmop.ini
- /etc/php/7.2/cli/conf.d/20-sockets.ini
- /etc/php/7.2/cli/conf.d/20-sysvmsg.ini
- /etc/php/7.2/cli/conf.d/20-sysvsem.ini
- /etc/php/7.2/cli/conf.d/20-sysvshm.ini
- /etc/php/7.2/cli/conf.d/20-tokenizer.ini
You can also run php --ini inside terminal to see which files are used by PHP in CLI mode.

Installation Issue - fe_sendauth: no password supplied

Hello,

I'm trying to install Superdesk Publisher on a clean install of Ubuntu 16.04. I was able to complete all the installation steps from https://superdesk-publisher.readthedocs.io/en/latest/manual/getting_started/superdesk-superdesk-publisher-setup.html up until step 4 (Create the database and update the scheme). With the first database command I get the error 'SQLSTATE[08006] [7] fe_sendauth: no password supplied'. Here is my parameters.yml file:

parameters:
    locale: en
    env(DATABASE_HOST): 127.0.0.1
    env(DATABASE_PORT): null
    env(DATABASE_NAME): publisher
    env(DATABASE_USER): postgres
    env(DATABASE_PASSWORD): postgres
    env(DATABASE_SERVER_VERSION): 9
    mailer_transport: smtp
    mailer_host: 127.0.0.1
    mailer_user: null
    mailer_password: null
    env(SYMFONY_SECRET): SuperSecretTokenPleaseChangeIt
    swp_updater.version.class: SWP\Bundle\CoreBundle\Version\Version
    env(SWP_DOMAIN): 45.33.84.234
    cache_servers:
        - 45.33.84.234
    doctrine_cache_driver: array
    sentry.dsn: false
    session_memcached_host: localhost
    session_memcached_port: 11211
    session_memcached_prefix: sess
    session_memcached_expire: 3600
    test_env: doctrine
    allow_origin_cors: 'http://localhost'
    superdesk_servers:
        - 'https://superdesk.dev'
    env(ELASTICA_HOST): localhost
    env(ELASTICA_PORT): 9200
    env(ELASTICA_INDEX_NAME): swp_index
    env(RABBIT_MQ_HOST): 127.0.0.1
    env(RABBIT_MQ_PORT): 5672
    env(RABBIT_MQ_USER): guest
    env(RABBIT_MQ_PASSWORD): guest
    env(WEBSOCKET_PORT): 8080
    env(WEBSOCKET_HOST): 127.0.0.1
    env(PAYWALL_SERVER_URL): null
    env(PAYWALL_SERVER_USERNAME): null
    env(PAYWALL_SERVER_PASSWORD): null
    env(SUBSCRIPTIONS_CACHE_LIFETIME): 86400
    fixtures_type: '%env(FIXTURES_TYPE)%'
    env(FIXTURES_TYPE): dev
    JWT_PASS_PHRASE: null
    FS_MAIN_ADAPTER: local_adapter
    env(FS_AWS_S3_VERSION): null
    env(FS_AWS_S3_REGION): null
    env(FS_AWS_S3_KEY): null
    env(FS_AWS_S3_SECRET): null
    env(FS_AWS_S3_PREFIX): null
    env(FS_AWS_S3_BUCKET): null

Any idea what I might be doing wrong?

500 server error while register user - web-publisher

http://139.162.61.246/app_dev.php/api/v1/users/register/

Request headers:
Host: 139.162.61.246
User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0
Accept: /
Accept-Language: en-GB,en;q=0.5
Accept-Encoding: gzip, deflate
Referer: http://139.162.61.246/politics/implemented-disintermediate-concept
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
X-Requested-With: XMLHttpRequest
Content-Length: 209
Cookie: SUPERDESKPUBLISHER=7h764j7sn5pgsmfr6iil5g7e2h
Connection: keep-alive

Response headers:
HTTP/1.1 500 Internal Server Error
Server: nginx/1.10.3 (Ubuntu)
Date: Thu, 24 May 2018 13:44:12 GMT
Content-Type: text/html; charset=UTF-8
Transfer-Encoding: chunked
Connection: keep-alive

Form Data
user_registration[email] | [email protected]
user_registration[plainPassword][first] | ****
user_registration[plainPassword][second] | ***
user_registration[username] | jvkirank

Response:
Whoops, looks like something went wrong.

(1/1) ClassNotFoundException
Attempted to load class "DoctrineFixturesBundle" from namespace "Doctrine\Bundle\FixturesBundle".
Did you forget a "use" statement for another namespace?
in AppKernel.php line 72
at AppKernel->registerBundles()in Kernel.php line 494
at Kernel->initializeBundles()in Kernel.php line 134
at Kernel->boot()in Kernel.php line 197
at Kernel->handle(object(Request))in app_dev.php line 30

Unable to find template "index.html.twig"

Hi
How i can change the path of the them directory, i got this error because the system is searching in the wrong path
Unable to find template "index.html.twig" (looked into: /var/www/publisher/app/Resources/views, /var/www/publisher/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Resources/views/Form, /var/www/publisher/vendor/knplabs/knp-menu/src/Knp/Menu/Resources/views).

but the path for the them in app/themes/Tenant-name

Can you help me with this issue please

Thanks in Advance

Dependabot needs permission to see phpunit-bridge

Dependabot couldn't resolve your project's dependencies as it couldn't access phpunit-bridge.

You can provide additional git credentials in your Dependabot dashboard by clicking into the account menu (in the top right) and selecting 'Config variables'. If you use a custom token for the host github.com make sure it has read access to this repo, too.

You can mention @dependabot in the comments below to contact the Dependabot team.

[RFC] Consider dropping PHP 5.6 - support PHP >= 7

The idea here is to drop support for PHP 5 at all and support only 7. Most of the libraries already support PHP 7, thus it's an adventage for us. We are developing a new project so we should consider using the latest technologies - PHP 7 in this case.

Pros:

Cons:

  • we might stuck with some libraries that don't support PHP 7
  • some extensions like imagick, gearman are not supporting PHP 7 fully yet (see Extensions catalogue

What needs to be done to fully switch to PHP 7:

  • use PHP ^7.0 in Web Publisher composer.json file
  • use PHP ^7.0 in all of our bundles (composer.json)
  • update travis.yml config
  • re-check Docker configuration
  • migrate code from PHP 5.6 to 7 (see http://php.net/manual/en/migration70.php) - tests are passing on PHP 7 so it's not needed.
  • re-check documentation

Reference:

Please, add your feedback here.

"No 'Access-Control-Allow-Origin' header is present on the requested resource." Despite correctly setting CORS?

When I go to the Publisher section of Superdesk I keep getting:

Failed to load http://18.217.179.35/api/v1/auth/superdesk/: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://52.15.65.25' is therefore not allowed access. The response had HTTP status code 401.

My parameters.yml file has:

allow_origin_cors: '*'

I'm not sure why it's not working.

Superdesk published items are not sync in wordpress site

Hi,
I've setup web-publisher in example.com and wordpress site in wp.example.com.
After i activate superdesk-wordpress-plugin in wordpress site,

i Filled following details:
SD content api url : superdesk.com/contentapi
client id: no idea, which value should i put here.
username: superdesk login username
password: superdesk login password

is that correct, or anything missing from superdesk or publisher component.
can someone pls help on this.

Thanks in advance.

Js Error: Cannot read property 'getElementsByTagName' of null

Hi,

I just followed the install instruction from
https://superdesk-publisher.readthedocs.io/en/latest/manual/getting_started/superdesk-superdesk-publisher-setup.html

I am on master branch
master 1030783 [origin/master] AWS file storage (#626)

I get the JS error in
blueimp.Gallery(document.getElementById("links").getElementsByTagName("a"), { container: "#blueimp-gallery-carousel", carousel: !0 })

Uncaught TypeError: Cannot read property 'getElementsByTagName' of null

There is no elements links on the page
Is it a javascript file to update or a problem with the theme?

Thanks

Superdesk Publisher installation fails

When following the instructions at https://www.superdesk.org/news/installing-superdesk-publisher the installation fails.

Step 2 of Completing the Superdesk Publisher installation;

HTTPDUSER=$(ps axo user,comm | grep -E '[a]pache|[h]ttpd|[_]www|[w]ww-data|[n]ginx' | grep -v root | head -1 | cut -d\ -f1) && sudo chown -R "$HTTPDUSER":"$HTTPDUSER" publisher/ && cd publisher && sudo -u www-data SYMFONY_ENV=prod composer install --no-dev --optimize-autoloader

Error:

  Problem 1
    - Installation request for react/zmq dev-master -> satisfiable by react/zmq[dev-master].
    - react/zmq dev-master requires ext-zmq * -> the requested PHP extension zmq is missing from your system.

Get error at "Populate database with test data"

i installed superdesk. after that, i faced to below error on run php app/console doctrine:fixtures:load

The value "<paragraph(10)> <blockquote class="instagram-media" data-instgrm-captioned data-instgrm-version="7" style=" background:#FFF; border:0; border-ra dius:3px; box-shadow:0 0 1px 0 rgba(0,0,0,0.5),0 1px 10px 0 rgba(0,0,0,0.15); margin: 1px; max-width:658px; padding:0; width:99.375%; width:-webkit-calc(10 0% - 2px); width:calc(100% - 2px);"><div style="padding:8px;"> <div style=" background:#F8F8F8; line-height:0; margin-top:40px; padding:50.0% 0; text-align :center; width:100%;"> <div style=" background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAMAAAApWqozAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHO kAAAAMUExURczMzPf399fX1+bm5mzY9AMAAADiSURBVDjLvZXbEsMgCES5/P8/t9FuRVCRmU73JWlzosgSIIZURCjo/ad+EQJJB4Hv8BFt+IDpQoCx1wjOSBFhh2XssxEIYn3ulI/6MNReE07UIWJEv8UEO WDS88LY97kqyTliJKKtuYBbruAyVh5wOHiXmpi5we58Ek028czwyuQdLKPG1Bkb4NnM+VeAnfHqn1k4+GPT6uGQcvu2h2OVuIf/gWUFyy8OWEpdyZSa3aVCqpVoVvzZZ2VTnn2wU8qzVjDDetO90GSy9mVL qtgYSy231MxrY6I2gGqjrTY0L8fxCxfCBbhWrsYYAAAAAElFTkSuQmCC); display:block; height:44px; margin:0 auto -44px; position:relative; top:-22px; width:44px;"></di v></div> <p style=" margin:8px 0 0 0; padding:0 4px;"> <a href="https://www.instagram.com/p/BNaM68Cj7kD/" style=" color:#000; font-family:Arial,sans-serif; font-size:14px; font-style:normal; font-weight:normal; line-height:17px; text-decoration:none; word-wrap:break-word;" target="_blank">Meet Enzo (right), a #Doogler at our Palo Alto office who loves hosting his pal Olive for campus tours (and striking a few poses).</a></p> <p style=" color:#c9c8cd; font-famil y:Arial,sans-serif; font-size:14px; line-height:17px; margin-bottom:0; margin-top:8px; overflow:hidden; padding:8px 0 7px; text-align:center; text-overflow :ellipsis; white-space:nowrap;">Zdjęcie zamieszczone przez użytkownika Google (@google) <time style=" font-family:Arial,sans-serif; font-size:14px; line-he ight:17px;" datetime="2016-11-29T21:37:32+00:00">29 Lis, 2016 o 1:37 PST</time></p></div></blockquote> <script async defer src="//platform.instagram.com/en _US/embeds.js"></script> <paragraph(10)> <iframe src="https://www.facebook.com/plugins/post.php?href=https%3A%2F%2Fwww.facebook.com%2Ffacebook%2Fposts%2F10 154597567106729%3A0&width=500" width="500" height="608" style="border:none;overflow:hidden" scrolling="no" frameborder="0" allowTransparency="true"></ifram e> <br><paragraph(10)>" contains an unclosed function.

how can i fix it?

Undefined index: first_name when accessing Publisher API from Superdesk

I'm trying to connect Superdesk to webpublisher.
The POST request goes to http://example.com/api/v1/auth/superdesk/
Request body:
{"auth_superdesk":{"session_id":"5be2dae0e45e323786b26d7a","token":"Basic NWViMDcyNGUtZmNiNy00ZTFjLThkMTYtZjQ2MDRlZDU2ZmRmOg=="}}

The response I get is {"code":500,"message":"Notice: Undefined index: first_name"} and at the same time I get the following in the logs:
[2018-11-07 07:36:12] doctrine.DEBUG: SELECT t0.username AS username_1, t0.username_canonical AS username_canonical_2, t0.email AS email_3, t0.email_canonical AS email_canonical_4, t0.enabled AS enabled_5, t0.salt AS salt_6, t0.password AS password_7, t0.last_login AS last_login_8, t0.confirmation_token AS confirmation_token_9, t0.password_requested_at AS password_requested_at_10, t0.roles AS roles_11, t0.id AS id_12, t0.created_at AS created_at_13, t0.updated_at AS updated_at_14, t0.first_name AS first_name_15, t0.last_name AS last_name_16, t0.about AS about_17, t0.organization_id AS organization_id_18 FROM swp_user t0 WHERE t0.username_canonical = ? LIMIT 1 ["admin"] []

[2018-11-07 07:36:12] request.CRITICAL: Uncaught PHP Exception Symfony\Component\Debug\Exception\ContextErrorException: "Notice: Undefined index: first_name" at /var/www/webpublisher/src/SWP/Bundle/CoreBundle/Controller/AuthController.php line 151 {"exception":"[object] (Symfony\Component\Debug\Exception\ContextErrorException(code: 0): Notice: Undefined index: first_name at /var/www/webpublisher/src/SWP/Bundle/CoreBundle/Controller/AuthController.php:151)"} []

No tenant for host

I followed the "local" install instructions, i created default tenant as well as another tenant. I installed the theme for respective tenant/organisation, but i get a:

==> /var/log/nginx/unimedia.altfel.md.error.log <== 2017/06/27 14:18:48 [error] 8481#0: *11325 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught SWP\Component\MultiTenancy\Exception\TenantNotFoundException: Tenant for host "unimedia.altfel.md" could not be found! in /var/www/unimedia.altfel.md/htdocs/app/cache/prod/classes.php:7705

can you please give me more details on what am i doing wrong and how can i fix it? thank you.

can't install default theme

following the guide... when I do this:

sudo -u www-data SYMFONY_ENV=prod php app/console swp:theme:install 7wde3e src/SWP/Bundle/FixturesBundle/Resources/themes/DefaultTheme/ -f --activate -p

i get this:

Theme could not be installed, files are reverted to previous version!
Error message: Error in one or more bulk request actions:

index: /swp_index/package/2 caused Rejecting mapping update to [swp_index] as the final mapping would have more than 1 type: [package, article]

and when I do this:

sudo -u www-data php app/console swp:theme:install 7wde3e src/SWP/Bundle/FixturesBundle/Resources/themes/DefaultTheme/ -f --activate -p

I get this:

PHP Fatal error:  Uncaught Symfony\Component\Debug\Exception\ClassNotFoundException: Attempted to load class "DoctrineFixturesBundle" from namespace "Doctrine\Bundle\FixturesBundle".
Did you forget a "use" statement for another namespace? in /var/www/publisher/app/AppKernel.php:19
Stack trace:
#0 /var/www/publisher/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php(488): AppKernel->registerBundles()
#1 /var/www/publisher/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php(132): Symfony\Component\HttpKernel\Kernel->initializeBundles()
#2 /var/www/publisher/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php(64): Symfony\Component\HttpKernel\Kernel->boot()
#3 /var/www/publisher/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php(148): Symfony\Bundle\FrameworkBundle\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#4 /var/www/publisher/app/console(30): Symfony\Component in /var/www/publisher/app/AppKernel.php on line 19

how to resolve? I'm working the latest master as of Mar 26 2019.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.