From 270f9770081e7f0c5a03f729395fd9554379688e Mon Sep 17 00:00:00 2001 From: Yorkie Chadwick Date: Tue, 5 Nov 2019 16:47:43 +0100 Subject: [PATCH 01/18] add networking/init-cms-bundle recipe --- .../config/packages/networking_init_cms.yaml | 97 +++++++++++++ .../config/routes/networking_init_cms.yaml | 3 + networking/init-cms-bundle/4.0/manifest.json | 17 +++ .../init-cms-bundle/4.0/post-install.txt | 18 +++ .../4.0/serializer/Entity.Page.yaml | 77 ++++++++++ .../init-cms-bundle/4.0/src/Entity/Page.php | 132 ++++++++++++++++++ .../init-cms-bundle/4.0/src/Entity/User.php | 40 ++++++ 7 files changed, 384 insertions(+) create mode 100644 networking/init-cms-bundle/4.0/config/packages/networking_init_cms.yaml create mode 100644 networking/init-cms-bundle/4.0/config/routes/networking_init_cms.yaml create mode 100644 networking/init-cms-bundle/4.0/manifest.json create mode 100644 networking/init-cms-bundle/4.0/post-install.txt create mode 100644 networking/init-cms-bundle/4.0/serializer/Entity.Page.yaml create mode 100644 networking/init-cms-bundle/4.0/src/Entity/Page.php create mode 100644 networking/init-cms-bundle/4.0/src/Entity/User.php diff --git a/networking/init-cms-bundle/4.0/config/packages/networking_init_cms.yaml b/networking/init-cms-bundle/4.0/config/packages/networking_init_cms.yaml new file mode 100644 index 00000000..52963c15 --- /dev/null +++ b/networking/init-cms-bundle/4.0/config/packages/networking_init_cms.yaml @@ -0,0 +1,97 @@ +imports: + - { resource: "@NetworkingInitCmsBundle/Resources/config/cms/doctrine.yaml" } + - { resource: "@NetworkingInitCmsBundle/Resources/config/cms/fos_ck_editor.yaml" } + - { resource: "@NetworkingInitCmsBundle/Resources/config/cms/fos_user.yaml" } + - { resource: "@NetworkingInitCmsBundle/Resources/config/cms/mopa_bootstrap.yaml" } + - { resource: "@NetworkingInitCmsBundle/Resources/config/cms/oneup_flysystem.yaml" } + - { resource: "@NetworkingInitCmsBundle/Resources/config/cms/oneup_uploader.yaml" } + - { resource: "@NetworkingInitCmsBundle/Resources/config/cms/sonata_admin.yaml" } + - { resource: "@NetworkingInitCmsBundle/Resources/config/cms/sonata_block.yaml" } + - { resource: "@NetworkingInitCmsBundle/Resources/config/cms/sonata_core.yaml" } + - { resource: "@NetworkingInitCmsBundle/Resources/config/cms/sonata_doctrine_admin.yaml" } + - { resource: "@NetworkingInitCmsBundle/Resources/config/cms/sonata_formatter.yaml" } + - { resource: "@NetworkingInitCmsBundle/Resources/config/cms/sonata_media.yaml" } + - { resource: "@NetworkingInitCmsBundle/Resources/config/cms/sonata_notification.yaml" } + - { resource: "@NetworkingInitCmsBundle/Resources/config/cms/sonata_user.yaml" } + - { resource: "@NetworkingInitCmsBundle/Resources/config/cms/stof_doctrine_extensions.yaml" } + - { resource: "@NetworkingInitCmsBundle/Resources/config/cms/symfony_cmf_routing_extra.yaml" } +# Default security configuration +# - { resource: "@NetworkingInitCmsBundle/Resources/config/cms/security.yaml" } + +# Set templating to twig. FOSUserBundle requires templating to be setup +framework: + templating: { engines: ['twig'] } + +# Set up the serializer to read config file for App Page and User entities +jms_serializer: + metadata: + directories: + NetworkingSonataMediaBundle: + namespace_prefix: "Sonata\\MediaBundle" + path: "@NetworkingInitCmsBundle/Resources/config/serializer" + app: + namespace_prefix: "App" + path: "%kernel.project_dir%/config/serializer" + +# Translation bundle configuration, swap environment variables if mange_locales_only option set to false +lexik_translation: + fallback_locale: '%env(LOCALE)%' # (required) default locale to use + managed_locales: [ '%env(LOCALE)%'] # !IMPORTANT: Change to strings and not environment variables + resources_registration: + type: all # all | files | database + managed_locales_only: false # set to true to only include managed_locales + + +networking_init_cms: + # Set a cookie in the fronted end for language. If disabled, the URL will be prefixed with the locale + allow_locale_cookie: true + + # Simple php based cache for caching the rendered HTML in the frontend + cache: + activate: true #default false + cache_time: 86400 #default value + cache_service_class: 'Networking\InitCmsBundle\Lib\PhpCache' #default value + + # Show admin toolbar when in the frontend + admin_toolbar: + toolbar: true #Default is activated + position: 'top' #Choices are 'top' or 'bottom' + translation_fallback_route: 'initcms_404' #Default fallback to 404 page + no_translation_template: '@NetworkingInitCms/no_translation_found.html.twig' # + 404_template: '@NetworkingInitCms/error_404.html.twig' #Fallback to a 404 page included + # Tag tree for use in the media manager + show_tag_tree: true #Default is true + multiple_media_tags: true #Default is true + + # Language set up, label is used in the default frontend language switcher menu + languages: + - {label: 'Deutsch', locale: 'de'} + - {label: 'English', locale: 'en'} + + # Add content types here + content_types: + - { name: 'Text' , class: 'Networking\InitCmsBundle\Entity\Text'} + - { name: 'Gallery Viewer' , class: 'Networking\InitCmsBundle\Entity\GalleryView'} + + # Classes to be used for the page and user entities + class: + page: "App\\Entity\\Page" + user: "App\\Entity\\User" + + # Default template settings to get you started + templates: + 'app_single_column': + template: "@NetworkingInitCms/sandbox/page/one_column.html.twig" + name: "Single Column" + icon: "bundles/networkinginitcms/img/template_header_one_column.png" + zones: + - { name: header, class: 'col-md-12' } + - { name: main_content, class: 'col-md-12'} + 'app_two_column': + template: "@NetworkingInitCms/sandbox/page/two_column.html.twig" + name: "Two Column" + icon: "bundles/networkinginitcms/img/template_header_two_column.png" + zones: + - { name: header , class: 'col-md-12'} + - { name: left , class: 'col-md-3'} + - { name: right , class: 'col-md-9'} diff --git a/networking/init-cms-bundle/4.0/config/routes/networking_init_cms.yaml b/networking/init-cms-bundle/4.0/config/routes/networking_init_cms.yaml new file mode 100644 index 00000000..66940470 --- /dev/null +++ b/networking/init-cms-bundle/4.0/config/routes/networking_init_cms.yaml @@ -0,0 +1,3 @@ +networking_init_cms: + resource: "@NetworkingInitCmsBundle/Resources/config/routing/routing.yaml" + prefix: / diff --git a/networking/init-cms-bundle/4.0/manifest.json b/networking/init-cms-bundle/4.0/manifest.json new file mode 100644 index 00000000..b5b084e0 --- /dev/null +++ b/networking/init-cms-bundle/4.0/manifest.json @@ -0,0 +1,17 @@ +{ + "bundles": { + "Networking\\InitCmsBundle\\NetworkingInitCmsBundle": ["all"] + }, + "copy-from-recipe": { + "config/": "%CONFIG_DIR%/", + "serializer/": "%CONFIG_DIR%/serializer/", + "src/": "%SRC_DIR%/" + }, + "env": { + "LOCALE": "en" + }, + "composer-scripts": { + "ckeditor:install --clear=drop": "symfony-cmd", + "assets:install %PUBLIC_DIR%": "symfony-cmd" + } +} diff --git a/networking/init-cms-bundle/4.0/post-install.txt b/networking/init-cms-bundle/4.0/post-install.txt new file mode 100644 index 00000000..96a5f7a1 --- /dev/null +++ b/networking/init-cms-bundle/4.0/post-install.txt @@ -0,0 +1,18 @@ + + What's next? + + + * The InitCmsBundle imports many configuration files, such as doctrine.yaml, security.yaml etc. In order + to ensure your app will work please do the following: + 1. Check that all files imported via the networking_init_cms.yaml file are not overwritten with a similar + configuration file in your /config/packages folder. !IMPORTANT the doctrine.yaml and security.yaml must be either + deleted, or configured along the lines of the provided default doctrine and security configs provided in the + bundle + 2. Check that the Page and User entities were copied to the correct entity folder, and are configured correctly + 3. Clear the cache again so that the new config files are loaded correctly. + 4. Back up your database. + 5. Update your database bin/console doctrine:schema:update or using the doctrine migrate commands + 6. Use the command networking:initcms:install to install setup the DB install fixtures and create a superuser admin + 7. OR you can use the networking:initcms:data-setup if you just want to install the data structure and fixtures + 8. Enable or copy the security configuration file that is commented out in the networking_init_cms.yaml file + 9. Set up your managed languages for the lexik translation bundle diff --git a/networking/init-cms-bundle/4.0/serializer/Entity.Page.yaml b/networking/init-cms-bundle/4.0/serializer/Entity.Page.yaml new file mode 100644 index 00000000..86f06af2 --- /dev/null +++ b/networking/init-cms-bundle/4.0/serializer/Entity.Page.yaml @@ -0,0 +1,77 @@ +App\Entity\Page: + properties: + id: + type: integer + createdAt: + type: DateTime + updatedAt: + type: DateTime + pageName: + type: string + metaTitle: + type: string + url: + type: string + path: + type: string + level: + type: integer + metaKeyword: + type: string + metaDescription: + type: string + parent: + accessor: + getter: convertParentToInteger + type: integer + alias: + accessor: + getter: convertAliasToInteger + type: integer + parents: + accessor: + getter: convertParentsToArray + type: array + children: + accessor: + getter: convertChildrenToIntegerArray + type: array + allChildren: + exclude: true + layoutBlock: + type: ArrayCollection + menuItem: + exclude: true + accessor: + getter: prepareMenuItemsForSerialization + type: ArrayCollection + isHome: + type: boolean + status: + type: string + visibility: + type: string + activeFrom: + type: DateTime + activeTo: + type: DateTime + locale: + type: string + translations: + accessor: + getter: convertTranslationsToIntegerArray + type: array + originals: + accessor: + getter: convertOriginalsToIntegerArray + type: array + snapshots: + exclude: true + snapshotClassType: + type: string + oldTitle: + exclude: true + tags: + exclude: true + contentRoute: + exclude: true diff --git a/networking/init-cms-bundle/4.0/src/Entity/Page.php b/networking/init-cms-bundle/4.0/src/Entity/Page.php new file mode 100644 index 00000000..cb6786e3 --- /dev/null +++ b/networking/init-cms-bundle/4.0/src/Entity/Page.php @@ -0,0 +1,132 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + + +namespace App\Entity; + +use Doctrine\Common\Collections\ArrayCollection; +use Gedmo\Mapping\Annotation as Gedmo; +use Networking\InitCmsBundle\Entity\BasePage; +use Doctrine\ORM\Mapping as ORM; +use Networking\InitCmsBundle\Model\ContentRoute; + +/** + * + * @author Yorkie Chadwick + * + * @ORM\Entity + * @ORM\Table(name="page", + * uniqueConstraints={@ORM\UniqueConstraint(name="path_idx", columns={ + * "path", "locale" + * })} + * ) + * @ORM\HasLifecycleCallbacks() + */ +class Page extends BasePage{ + + /** + * @var integer $id + * + * @ORM\Column(type="integer") + * @ORM\Id + * @ORM\GeneratedValue(strategy="IDENTITY") + */ + protected $id; + + /** + * @var ContentRoute + * @ORM\OneToOne( + * targetEntity = "Networking\InitCmsBundle\Entity\ContentRoute", + * cascade={"remove", "persist"} + * ) + * @ORM\JoinColumn(name="content_route_id", referencedColumnName="id") + */ + protected $contentRoute; + + /** + * @ORM\OneToMany(targetEntity="Networking\InitCmsBundle\Entity\LayoutBlock", + * mappedBy="page", + * cascade={"remove", "persist"}, + * orphanRemoval=true + * ) + * @ORM\OrderBy({"sortOrder" = "ASC"}) + */ + protected $layoutBlock; + + /** + * @ORM\OneToMany(targetEntity="Networking\InitCmsBundle\Entity\MenuItem", + * mappedBy="page", + * cascade={"remove"}, + * orphanRemoval=true + * ) + */ + protected $menuItem; + + /** + * @ORM\OneToMany(targetEntity="Networking\InitCmsBundle\Entity\PageSnapshot", + * mappedBy="page", + * cascade={"remove"}, + * orphanRemoval=true + * ) + * @ORM\OrderBy({"version" = "DESC"}) + */ + protected $snapshots; + + /** + * @ORM\OneToMany(targetEntity="App\Entity\Page", + * mappedBy="parent" + * ) + */ + protected $children; + + /** + * @var Page + * @ORM\ManyToOne(targetEntity="App\Entity\Page" ) + * @ORM\JoinColumn(name="alias_id", referencedColumnName="id", onDelete="SET NULL") + */ + protected $alias; + + /** + * @var Page + * @ORM\ManyToOne(targetEntity="App\Entity\Page", inversedBy="children", cascade="persist" ) + * @ORM\JoinColumn(name="parent_id", referencedColumnName="id", onDelete="SET NULL") + * @Gedmo\TreeParent + */ + protected $parent; + + /** + * @var ArrayCollection $originals + * @ORM\ManyToMany( + * targetEntity="App\Entity\Page", + * inversedBy="translations", + * cascade={"persist"} + * ) + * @ORM\JoinTable( + * name="page_translation", + * joinColumns={ + * @ORM\JoinColumn(name="translation_id", referencedColumnName="id") + * }, + * inverseJoinColumns={ + * @ORM\JoinColumn(name="original_id", referencedColumnName="id") + * } + * ) + */ + protected $originals; + + /** + * @var ArrayCollection $translations + * @ORM\ManyToMany( + * targetEntity="App\Entity\Page", + * mappedBy="originals", + * cascade={"persist"} + * ) + */ + protected $translations; +} diff --git a/networking/init-cms-bundle/4.0/src/Entity/User.php b/networking/init-cms-bundle/4.0/src/Entity/User.php new file mode 100644 index 00000000..81045b68 --- /dev/null +++ b/networking/init-cms-bundle/4.0/src/Entity/User.php @@ -0,0 +1,40 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + + +namespace App\Entity; + +use Networking\InitCmsBundle\Entity\BaseUser; +use Doctrine\ORM\Mapping as ORM; + +/** + * User + * + * @ORM\Table(name="fos_user_user") + * @ORM\Entity() + */ +class User extends BaseUser{ + + /** + * @var int + * + * @ORM\Column(name="id", type="integer") + * @ORM\Id + * @ORM\GeneratedValue(strategy="AUTO") + */ + protected $id; + + /** + * @var \Networking\InitCmsBundle\Model\AdminSettings + * @ORM\Column(name="admin_settings", type="object", nullable=true) + */ + protected $adminSettings; + +} From fbe13a35652dc69bfcd86a3e9ffc7711ea9743dc Mon Sep 17 00:00:00 2001 From: Yorkie Chadwick Date: Tue, 5 Nov 2019 17:06:08 +0100 Subject: [PATCH 02/18] add mysql driver as default to env --- networking/init-cms-bundle/4.0/manifest.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/networking/init-cms-bundle/4.0/manifest.json b/networking/init-cms-bundle/4.0/manifest.json index b5b084e0..3d18fe02 100644 --- a/networking/init-cms-bundle/4.0/manifest.json +++ b/networking/init-cms-bundle/4.0/manifest.json @@ -8,7 +8,8 @@ "src/": "%SRC_DIR%/" }, "env": { - "LOCALE": "en" + "LOCALE": "en", + "DATABASE_DRIVER": "mysql" }, "composer-scripts": { "ckeditor:install --clear=drop": "symfony-cmd", From 8074a6042a17f72cda050fd06c2c3005093fb8fa Mon Sep 17 00:00:00 2001 From: Yorkie Chadwick Date: Tue, 5 Nov 2019 17:37:31 +0100 Subject: [PATCH 03/18] update post install text --- networking/init-cms-bundle/4.0/post-install.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/networking/init-cms-bundle/4.0/post-install.txt b/networking/init-cms-bundle/4.0/post-install.txt index 96a5f7a1..618c3c05 100644 --- a/networking/init-cms-bundle/4.0/post-install.txt +++ b/networking/init-cms-bundle/4.0/post-install.txt @@ -10,7 +10,7 @@ bundle 2. Check that the Page and User entities were copied to the correct entity folder, and are configured correctly 3. Clear the cache again so that the new config files are loaded correctly. - 4. Back up your database. + 4. Check your database configuration, and back up your database if you haven't done so already. 5. Update your database bin/console doctrine:schema:update or using the doctrine migrate commands 6. Use the command networking:initcms:install to install setup the DB install fixtures and create a superuser admin 7. OR you can use the networking:initcms:data-setup if you just want to install the data structure and fixtures From 720c21408e484eee2e94f173903d9194b40dda11 Mon Sep 17 00:00:00 2001 From: Yorkie Chadwick Date: Tue, 5 Nov 2019 18:00:58 +0100 Subject: [PATCH 04/18] clarify post install process --- .../init-cms-bundle/4.0/post-install.txt | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/networking/init-cms-bundle/4.0/post-install.txt b/networking/init-cms-bundle/4.0/post-install.txt index 618c3c05..e847862e 100644 --- a/networking/init-cms-bundle/4.0/post-install.txt +++ b/networking/init-cms-bundle/4.0/post-install.txt @@ -6,13 +6,12 @@ to ensure your app will work please do the following: 1. Check that all files imported via the networking_init_cms.yaml file are not overwritten with a similar configuration file in your /config/packages folder. !IMPORTANT the doctrine.yaml and security.yaml must be either - deleted, or configured along the lines of the provided default doctrine and security configs provided in the - bundle - 2. Check that the Page and User entities were copied to the correct entity folder, and are configured correctly - 3. Clear the cache again so that the new config files are loaded correctly. - 4. Check your database configuration, and back up your database if you haven't done so already. - 5. Update your database bin/console doctrine:schema:update or using the doctrine migrate commands - 6. Use the command networking:initcms:install to install setup the DB install fixtures and create a superuser admin - 7. OR you can use the networking:initcms:data-setup if you just want to install the data structure and fixtures - 8. Enable or copy the security configuration file that is commented out in the networking_init_cms.yaml file - 9. Set up your managed languages for the lexik translation bundle + deleted, or update/extended with the configuration as proposed in the doctrine.yaml and security.yaml files + included with the CMS. + 2. Check that the Page and User entities were copied to the correct entity folder, and are configured correctly. + 3. Configure your languages in the networking_init_cms.yaml file, for multi-language support. + 4. Clear the cache again so that the new config files are loaded correctly. + 5. Check your database configuration, and back up your database if you haven't done so already. + 6. Update your database bin/console doctrine:schema:update or using the doctrine migrate commands + 7. Use the command networking:initcms:install to install the DB install fixtures and create a superuser admin. + ALTERNATIVELY you can use the networking:initcms:data-setup if you just want to install the data structure and fixtures From ec4f3360b086415b86eaeda7732038510c63f7ea Mon Sep 17 00:00:00 2001 From: Yorkie Chadwick Date: Wed, 6 Nov 2019 10:06:01 +0100 Subject: [PATCH 05/18] default use symlink for asset deployment --- networking/init-cms-bundle/4.0/manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/networking/init-cms-bundle/4.0/manifest.json b/networking/init-cms-bundle/4.0/manifest.json index 3d18fe02..99902eb5 100644 --- a/networking/init-cms-bundle/4.0/manifest.json +++ b/networking/init-cms-bundle/4.0/manifest.json @@ -13,6 +13,6 @@ }, "composer-scripts": { "ckeditor:install --clear=drop": "symfony-cmd", - "assets:install %PUBLIC_DIR%": "symfony-cmd" + "assets:install --symlink %PUBLIC_DIR%": "symfony-cmd" } } From ddac8ed79bd0b0cca51d25621082cac264e0920a Mon Sep 17 00:00:00 2001 From: Yorkie Chadwick Date: Wed, 6 Nov 2019 10:06:23 +0100 Subject: [PATCH 06/18] remove old package comments --- networking/init-cms-bundle/4.0/src/Entity/Page.php | 10 ---------- networking/init-cms-bundle/4.0/src/Entity/User.php | 9 --------- 2 files changed, 19 deletions(-) diff --git a/networking/init-cms-bundle/4.0/src/Entity/Page.php b/networking/init-cms-bundle/4.0/src/Entity/Page.php index cb6786e3..efa22bcf 100644 --- a/networking/init-cms-bundle/4.0/src/Entity/Page.php +++ b/networking/init-cms-bundle/4.0/src/Entity/Page.php @@ -1,14 +1,4 @@ - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - - namespace App\Entity; use Doctrine\Common\Collections\ArrayCollection; diff --git a/networking/init-cms-bundle/4.0/src/Entity/User.php b/networking/init-cms-bundle/4.0/src/Entity/User.php index 81045b68..ab1ff686 100644 --- a/networking/init-cms-bundle/4.0/src/Entity/User.php +++ b/networking/init-cms-bundle/4.0/src/Entity/User.php @@ -1,13 +1,4 @@ - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - namespace App\Entity; From 9dabf39efdbfeb0d917f3d0610e4593393efce8b Mon Sep 17 00:00:00 2001 From: Yorkie Chadwick Date: Wed, 13 Nov 2019 11:18:37 +0100 Subject: [PATCH 07/18] added config for page caching --- .../4.0/config/packages/dev/networking_init_cms.yaml | 3 +++ .../4.0/config/packages/networking_init_cms.yaml | 3 +++ 2 files changed, 6 insertions(+) create mode 100644 networking/init-cms-bundle/4.0/config/packages/dev/networking_init_cms.yaml diff --git a/networking/init-cms-bundle/4.0/config/packages/dev/networking_init_cms.yaml b/networking/init-cms-bundle/4.0/config/packages/dev/networking_init_cms.yaml new file mode 100644 index 00000000..7e7445a9 --- /dev/null +++ b/networking/init-cms-bundle/4.0/config/packages/dev/networking_init_cms.yaml @@ -0,0 +1,3 @@ +networking_init_cms: + cache: + activate: false \ No newline at end of file diff --git a/networking/init-cms-bundle/4.0/config/packages/networking_init_cms.yaml b/networking/init-cms-bundle/4.0/config/packages/networking_init_cms.yaml index 52963c15..135b0453 100644 --- a/networking/init-cms-bundle/4.0/config/packages/networking_init_cms.yaml +++ b/networking/init-cms-bundle/4.0/config/packages/networking_init_cms.yaml @@ -21,6 +21,9 @@ imports: # Set templating to twig. FOSUserBundle requires templating to be setup framework: templating: { engines: ['twig'] } + pools: + page.cache: + adapter: cache.app # Set up the serializer to read config file for App Page and User entities jms_serializer: From 2a9986859c393eb8384b2601e37f9569d1729755 Mon Sep 17 00:00:00 2001 From: Yorkie Chadwick Date: Wed, 13 Nov 2019 11:21:10 +0100 Subject: [PATCH 08/18] added new line --- .../4.0/config/packages/dev/networking_init_cms.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/networking/init-cms-bundle/4.0/config/packages/dev/networking_init_cms.yaml b/networking/init-cms-bundle/4.0/config/packages/dev/networking_init_cms.yaml index 7e7445a9..6d6eae8b 100644 --- a/networking/init-cms-bundle/4.0/config/packages/dev/networking_init_cms.yaml +++ b/networking/init-cms-bundle/4.0/config/packages/dev/networking_init_cms.yaml @@ -1,3 +1,4 @@ networking_init_cms: cache: - activate: false \ No newline at end of file + activate: false + \ No newline at end of file From d765e0c8a8f73a1096209e644cf083797e64027c Mon Sep 17 00:00:00 2001 From: Yorkie Chadwick Date: Wed, 13 Nov 2019 11:22:13 +0100 Subject: [PATCH 09/18] remove tabs --- .../4.0/config/packages/dev/networking_init_cms.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/networking/init-cms-bundle/4.0/config/packages/dev/networking_init_cms.yaml b/networking/init-cms-bundle/4.0/config/packages/dev/networking_init_cms.yaml index 6d6eae8b..c83c82ca 100644 --- a/networking/init-cms-bundle/4.0/config/packages/dev/networking_init_cms.yaml +++ b/networking/init-cms-bundle/4.0/config/packages/dev/networking_init_cms.yaml @@ -1,4 +1,3 @@ networking_init_cms: cache: activate: false - \ No newline at end of file From d46dd86b8719b2c68eaf2aaba890c73970ce6f29 Mon Sep 17 00:00:00 2001 From: Yorkie Chadwick Date: Wed, 13 Nov 2019 11:25:27 +0100 Subject: [PATCH 10/18] fix framework cache configuration --- .../4.0/config/packages/networking_init_cms.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/networking/init-cms-bundle/4.0/config/packages/networking_init_cms.yaml b/networking/init-cms-bundle/4.0/config/packages/networking_init_cms.yaml index 135b0453..7bf30b2b 100644 --- a/networking/init-cms-bundle/4.0/config/packages/networking_init_cms.yaml +++ b/networking/init-cms-bundle/4.0/config/packages/networking_init_cms.yaml @@ -21,9 +21,10 @@ imports: # Set templating to twig. FOSUserBundle requires templating to be setup framework: templating: { engines: ['twig'] } - pools: - page.cache: - adapter: cache.app + cache: + pools: + page.cache: + adapter: cache.app # Set up the serializer to read config file for App Page and User entities jms_serializer: From 8606ac034734611ada67cbcc51ea9c678ec4f116 Mon Sep 17 00:00:00 2001 From: Yorkie Chadwick Date: Wed, 13 Nov 2019 12:11:38 +0100 Subject: [PATCH 11/18] change default cache service class --- .../4.0/config/packages/networking_init_cms.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/networking/init-cms-bundle/4.0/config/packages/networking_init_cms.yaml b/networking/init-cms-bundle/4.0/config/packages/networking_init_cms.yaml index 7bf30b2b..0e5e3311 100644 --- a/networking/init-cms-bundle/4.0/config/packages/networking_init_cms.yaml +++ b/networking/init-cms-bundle/4.0/config/packages/networking_init_cms.yaml @@ -54,7 +54,7 @@ networking_init_cms: cache: activate: true #default false cache_time: 86400 #default value - cache_service_class: 'Networking\InitCmsBundle\Lib\PhpCache' #default value + cache_service: 'Networking\InitCmsBundle\Cache\PageCache' #default value # Show admin toolbar when in the frontend admin_toolbar: From fb985e38c9843a63cc4af24c6efe2558d56eecf2 Mon Sep 17 00:00:00 2001 From: Yorkie Chadwick Date: Wed, 13 Nov 2019 12:28:19 +0100 Subject: [PATCH 12/18] added comments trigger rebuild in travis. Still installing old version of init-cms-bundle --- .../4.0/config/packages/networking_init_cms.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/networking/init-cms-bundle/4.0/config/packages/networking_init_cms.yaml b/networking/init-cms-bundle/4.0/config/packages/networking_init_cms.yaml index 0e5e3311..116b49ac 100644 --- a/networking/init-cms-bundle/4.0/config/packages/networking_init_cms.yaml +++ b/networking/init-cms-bundle/4.0/config/packages/networking_init_cms.yaml @@ -24,7 +24,7 @@ framework: cache: pools: page.cache: - adapter: cache.app + adapter: cache.app #Setup page cache using template from cache.app # Set up the serializer to read config file for App Page and User entities jms_serializer: From e94659ead5db82d06b82d1286a6d70f99955f9d2 Mon Sep 17 00:00:00 2001 From: Yorkie Chadwick Date: Wed, 13 Nov 2019 12:32:20 +0100 Subject: [PATCH 13/18] added info about new cache system --- networking/init-cms-bundle/4.0/post-install.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/networking/init-cms-bundle/4.0/post-install.txt b/networking/init-cms-bundle/4.0/post-install.txt index e847862e..c1367702 100644 --- a/networking/init-cms-bundle/4.0/post-install.txt +++ b/networking/init-cms-bundle/4.0/post-install.txt @@ -15,3 +15,4 @@ 6. Update your database bin/console doctrine:schema:update or using the doctrine migrate commands 7. Use the command networking:initcms:install to install the DB install fixtures and create a superuser admin. ALTERNATIVELY you can use the networking:initcms:data-setup if you just want to install the data structure and fixtures + 8. Enable or disable full page caching by setting networking_init_cms.cache.activate to true/false From 415d0885d4d9e70355e337e160e956af4c60c398 Mon Sep 17 00:00:00 2001 From: Yorkie Chadwick Date: Wed, 13 Nov 2019 14:08:06 +0100 Subject: [PATCH 14/18] remove assets:install command. Inserted by framework bundle --- networking/init-cms-bundle/4.0/manifest.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/networking/init-cms-bundle/4.0/manifest.json b/networking/init-cms-bundle/4.0/manifest.json index 99902eb5..f54d3d45 100644 --- a/networking/init-cms-bundle/4.0/manifest.json +++ b/networking/init-cms-bundle/4.0/manifest.json @@ -12,7 +12,6 @@ "DATABASE_DRIVER": "mysql" }, "composer-scripts": { - "ckeditor:install --clear=drop": "symfony-cmd", - "assets:install --symlink %PUBLIC_DIR%": "symfony-cmd" + "ckeditor:install --clear=drop": "symfony-cmd" } } From 920ca22cdf7a2b796b80dba04730605242afd488 Mon Sep 17 00:00:00 2001 From: Yorkie Chadwick Date: Mon, 9 Dec 2019 17:22:18 +0100 Subject: [PATCH 15/18] remove configuration overrides --- .../config/packages/networking_init_cms.yaml | 82 ++++++++----------- .../init-cms-bundle/4.0/post-install.txt | 11 +-- 2 files changed, 40 insertions(+), 53 deletions(-) diff --git a/networking/init-cms-bundle/4.0/config/packages/networking_init_cms.yaml b/networking/init-cms-bundle/4.0/config/packages/networking_init_cms.yaml index 116b49ac..048c4787 100644 --- a/networking/init-cms-bundle/4.0/config/packages/networking_init_cms.yaml +++ b/networking/init-cms-bundle/4.0/config/packages/networking_init_cms.yaml @@ -18,14 +18,6 @@ imports: # Default security configuration # - { resource: "@NetworkingInitCmsBundle/Resources/config/cms/security.yaml" } -# Set templating to twig. FOSUserBundle requires templating to be setup -framework: - templating: { engines: ['twig'] } - cache: - pools: - page.cache: - adapter: cache.app #Setup page cache using template from cache.app - # Set up the serializer to read config file for App Page and User entities jms_serializer: metadata: @@ -37,52 +29,14 @@ jms_serializer: namespace_prefix: "App" path: "%kernel.project_dir%/config/serializer" -# Translation bundle configuration, swap environment variables if mange_locales_only option set to false -lexik_translation: - fallback_locale: '%env(LOCALE)%' # (required) default locale to use - managed_locales: [ '%env(LOCALE)%'] # !IMPORTANT: Change to strings and not environment variables - resources_registration: - type: all # all | files | database - managed_locales_only: false # set to true to only include managed_locales - networking_init_cms: - # Set a cookie in the fronted end for language. If disabled, the URL will be prefixed with the locale - allow_locale_cookie: true - - # Simple php based cache for caching the rendered HTML in the frontend - cache: - activate: true #default false - cache_time: 86400 #default value - cache_service: 'Networking\InitCmsBundle\Cache\PageCache' #default value - - # Show admin toolbar when in the frontend - admin_toolbar: - toolbar: true #Default is activated - position: 'top' #Choices are 'top' or 'bottom' - translation_fallback_route: 'initcms_404' #Default fallback to 404 page - no_translation_template: '@NetworkingInitCms/no_translation_found.html.twig' # - 404_template: '@NetworkingInitCms/error_404.html.twig' #Fallback to a 404 page included - # Tag tree for use in the media manager - show_tag_tree: true #Default is true - multiple_media_tags: true #Default is true - - # Language set up, label is used in the default frontend language switcher menu - languages: - - {label: 'Deutsch', locale: 'de'} - - {label: 'English', locale: 'en'} - - # Add content types here - content_types: - - { name: 'Text' , class: 'Networking\InitCmsBundle\Entity\Text'} - - { name: 'Gallery Viewer' , class: 'Networking\InitCmsBundle\Entity\GalleryView'} - - # Classes to be used for the page and user entities + #Base classes to be used for the page and user entities class: page: "App\\Entity\\Page" user: "App\\Entity\\User" - # Default template settings to get you started + # Bootstrap some template settings to get you started templates: 'app_single_column': template: "@NetworkingInitCms/sandbox/page/one_column.html.twig" @@ -99,3 +53,35 @@ networking_init_cms: - { name: header , class: 'col-md-12'} - { name: left , class: 'col-md-3'} - { name: right , class: 'col-md-9'} + - + #Set a cookie in the fronted end for language. If disabled, the URL will be prefixed with the locale + #allow_locale_cookie: true + + #Simple php based cache for caching the rendered HTML in the frontend + cache: + activate: true #enable for product, false in dev config + # cache_time: 86400 #default value + # cache_service: 'Networking\InitCmsBundle\Cache\PageCache' #default value + + #Show admin toolbar when in the frontend + #admin_toolbar: + # toolbar: true #Default is activated + # position: 'top' #Choices are 'top' or 'bottom' + + #translation_fallback_route: 'initcms_404' #Default fallback to 404 page + #no_translation_template: '@NetworkingInitCms/no_translation_found.html.twig' # + #404_template: '@NetworkingInitCms/error_404.html.twig' #Fallback to a 404 page included + + # Tag tree for use in the media manager + #show_tag_tree: true #Default is true + #multiple_media_tags: true #Default is true + + #Language set up, label is used in the default frontend language switcher menu + #languages: + # - {label: 'Deutsch', locale: 'de'} + # - {label: 'English', locale: 'en'} + + #Add content types here + #content_types: + # - { name: 'Text' , class: 'Networking\InitCmsBundle\Entity\Text'} + # - { name: 'Gallery Viewer' , class: 'Networking\InitCmsBundle\Entity\GalleryView'} \ No newline at end of file diff --git a/networking/init-cms-bundle/4.0/post-install.txt b/networking/init-cms-bundle/4.0/post-install.txt index c1367702..0d96c9c9 100644 --- a/networking/init-cms-bundle/4.0/post-install.txt +++ b/networking/init-cms-bundle/4.0/post-install.txt @@ -10,9 +10,10 @@ included with the CMS. 2. Check that the Page and User entities were copied to the correct entity folder, and are configured correctly. 3. Configure your languages in the networking_init_cms.yaml file, for multi-language support. - 4. Clear the cache again so that the new config files are loaded correctly. - 5. Check your database configuration, and back up your database if you haven't done so already. - 6. Update your database bin/console doctrine:schema:update or using the doctrine migrate commands - 7. Use the command networking:initcms:install to install the DB install fixtures and create a superuser admin. + 4. Configure the lexik translation bundles fallback_local and managed_locales parameters to support DB based translations. + 5. Clear the cache again so that the new config files are loaded correctly. + 6. Check your database configuration, and back up your database if you haven't done so already. + 7. Update your database bin/console doctrine:schema:update or using the doctrine migrate commands + 8. Use the command networking:initcms:install to install the DB install fixtures and create a superuser admin. ALTERNATIVELY you can use the networking:initcms:data-setup if you just want to install the data structure and fixtures - 8. Enable or disable full page caching by setting networking_init_cms.cache.activate to true/false + 9. Enable or disable full page caching by setting networking_init_cms.cache.activate to true/false From 7cdfc79ed732356b96c281ed93f310a0d6f63b2f Mon Sep 17 00:00:00 2001 From: Yorkie Chadwick Date: Mon, 9 Dec 2019 17:23:31 +0100 Subject: [PATCH 16/18] added new line to end of file --- .../4.0/config/packages/networking_init_cms.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/networking/init-cms-bundle/4.0/config/packages/networking_init_cms.yaml b/networking/init-cms-bundle/4.0/config/packages/networking_init_cms.yaml index 048c4787..e9c298f1 100644 --- a/networking/init-cms-bundle/4.0/config/packages/networking_init_cms.yaml +++ b/networking/init-cms-bundle/4.0/config/packages/networking_init_cms.yaml @@ -84,4 +84,4 @@ networking_init_cms: #Add content types here #content_types: # - { name: 'Text' , class: 'Networking\InitCmsBundle\Entity\Text'} - # - { name: 'Gallery Viewer' , class: 'Networking\InitCmsBundle\Entity\GalleryView'} \ No newline at end of file + # - { name: 'Gallery Viewer' , class: 'Networking\InitCmsBundle\Entity\GalleryView'} From 2d420b31c7943b59aef2a5d1f80c2fd616e6359e Mon Sep 17 00:00:00 2001 From: Yorkie Chadwick Date: Mon, 9 Dec 2019 18:31:21 +0100 Subject: [PATCH 17/18] Extra line in template zone removed. Introduced by mistake --- .../4.0/config/packages/networking_init_cms.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/networking/init-cms-bundle/4.0/config/packages/networking_init_cms.yaml b/networking/init-cms-bundle/4.0/config/packages/networking_init_cms.yaml index e9c298f1..7d69c145 100644 --- a/networking/init-cms-bundle/4.0/config/packages/networking_init_cms.yaml +++ b/networking/init-cms-bundle/4.0/config/packages/networking_init_cms.yaml @@ -53,7 +53,7 @@ networking_init_cms: - { name: header , class: 'col-md-12'} - { name: left , class: 'col-md-3'} - { name: right , class: 'col-md-9'} - - + #Set a cookie in the fronted end for language. If disabled, the URL will be prefixed with the locale #allow_locale_cookie: true From 37520e1a467e27934343705a97cf3372076470b1 Mon Sep 17 00:00:00 2001 From: Yorkie Chadwick Date: Tue, 10 Dec 2019 08:51:06 +0100 Subject: [PATCH 18/18] remove example config, provide link to documentation --- .../config/packages/networking_init_cms.yaml | 31 ++----------------- 1 file changed, 2 insertions(+), 29 deletions(-) diff --git a/networking/init-cms-bundle/4.0/config/packages/networking_init_cms.yaml b/networking/init-cms-bundle/4.0/config/packages/networking_init_cms.yaml index 7d69c145..71e4d363 100644 --- a/networking/init-cms-bundle/4.0/config/packages/networking_init_cms.yaml +++ b/networking/init-cms-bundle/4.0/config/packages/networking_init_cms.yaml @@ -53,35 +53,8 @@ networking_init_cms: - { name: header , class: 'col-md-12'} - { name: left , class: 'col-md-3'} - { name: right , class: 'col-md-9'} - - #Set a cookie in the fronted end for language. If disabled, the URL will be prefixed with the locale - #allow_locale_cookie: true - - #Simple php based cache for caching the rendered HTML in the frontend cache: activate: true #enable for product, false in dev config - # cache_time: 86400 #default value - # cache_service: 'Networking\InitCmsBundle\Cache\PageCache' #default value - #Show admin toolbar when in the frontend - #admin_toolbar: - # toolbar: true #Default is activated - # position: 'top' #Choices are 'top' or 'bottom' - - #translation_fallback_route: 'initcms_404' #Default fallback to 404 page - #no_translation_template: '@NetworkingInitCms/no_translation_found.html.twig' # - #404_template: '@NetworkingInitCms/error_404.html.twig' #Fallback to a 404 page included - - # Tag tree for use in the media manager - #show_tag_tree: true #Default is true - #multiple_media_tags: true #Default is true - - #Language set up, label is used in the default frontend language switcher menu - #languages: - # - {label: 'Deutsch', locale: 'de'} - # - {label: 'English', locale: 'en'} - - #Add content types here - #content_types: - # - { name: 'Text' , class: 'Networking\InitCmsBundle\Entity\Text'} - # - { name: 'Gallery Viewer' , class: 'Networking\InitCmsBundle\Entity\GalleryView'} + # For more information regarding configuration of the CMS Bundle, please visit the following documentation + # https://github.com/networking/init-cms-bundle/blob/master/doc/configuration.md