Giter Club home page Giter Club logo

intranet's Introduction

MoJ logo
Intranet

Standards Icon License Icon



This is a project used by Ministry of Justice UK and agencies. https://intranet.justice.gov.uk/

Features

  • Based on roots/bedrock
  • Dependency management with Composer
  • Enhanced password hashing using bcrypt
  • Builds into a docker image
  • Docker-compose is used to run as a local development server

Requirements

Getting Started

  1. Clone this repo to your local machine and change directories.

    git clone [email protected]:ministryofjustice/intranet.git .
    cd intranet/
  2. Build the project locally. This will install composer dependencies on your local filesystem.

    make build

    If you experience any errors at this point, it may be due to being unable to access the private composer repository. More details here.

  3. Start the dory proxy, if it's not already running.

    dory up

    If you get an error message when trying to start dory, make sure you have docker running.

  4. Build and run the docker image.

    make run
  5. Launch the website in your default browser.

    make launch
  6. If this is a new install you may get a development replica by executing the WASM utility.

    wasm migrate intranet2:dev .

    The WordPress admin area will be accessible at /wp-admin.

Access points

The application

http://intranet.docker/

Mailcatcher

http://mail.intranet.docker/

phpMyAdmin

http://phpmyadmin.intranet.docker:9191/

Elasticsearch

http://elasticsearch.intranet.docker/

Kibana

http://kibana.intranet.docker/

Composer + WordPress plugins

The installation of WordPress core and plugins is managed by composer.

See composer.json for the required packages.

Plugins in the WordPress plugin repository are available from WordPress Packagist (wpackagist).

Premium and custom plugins used by MOJ are available in the private composer repository composer.wp.dsd.io.

WordPress Packagist plugins

Wpackagist plugins are named by their slug on the WordPress plugin repository, prefixed with the vendor wpackagist-plugin.

Some examples:

Plugin name WordPress plugin URL URL slug package name
Akismet https://wordpress.org/plugins/akismet/ akismet wpackagist-plugin/akismet
Hello Dolly https://wordpress.org/plugins/hello-dolly/ hello-dolly wpackagist-plugin/hello-dolly
Yoast SEO https://wordpress.org/plugins/wordpress-seo/ wordpress-seo wpackagist-plugin/wordpress-seo

Example: Installing Akismet plugin

Run the following command:

composer require "wpackagist-plugin/akismet" "*"

This will install the latest version of Akismet using the corresponding wpackagist package.

Private composer repository

The private composer repository composer.wp.dsd.io contains premium and custom WordPress plugins.

Access to this repository is restricted. Refer to internal documentation for further details.

Building theme assets

Theme assets can be built as part of the docker image. Add required commands to bin/build.sh.

Configure the default theme

Set your theme as the default by adding the following line to config/application.php:

WP_DEFAULT_THEME = 'clarity';

WP-CLI

The WordPress CLI is a useful tool for running commands against your WordPress installation.

To use WP-CLI, your docker container must already be running. (This will probably be running in a separate terminal session/tab.)

  1. Run:

    make bash

    A bash session will be opened in the running container.

  2. The WP-CLI will be available as wp.

    For example, to list all users in the install:

    wp user list

Email delivery

When running locally for development, emails sent by WordPress are not delivered. Instead they are captured by mailcatcher.

To see emails, go to http://mail.`SERVER_NAME` (i.e. the hostname set in your .env file) in your browser. e.g. http://mail.example.docker

This will load a webmail-like interface and display all emails that WordPress has sent.

Make commands

There are several make commands configured in the Makefile. These are mostly just convenience wrappers for longer or more complicated commands.

Command Description
make build Run the build script to install application dependencies and build theme assets. This will typically involve installing composer packages and compiling SASS stylesheets.
make clean Alias of git clean -xdf. Restore the git working copy to its original state. This will remove uncommitted changes and ignored files.
make docker-clean Launches an assistive script to remove docker image caches and persistent data during development. Options: v = Clean volumes. vr = Clean volumes, rebuild and run. n = Nuke all local Docker images
make run Alias of docker-compose up. Launch the application locally using docker-compose.
make down Alias of docker-compose down.
make bash Open a bash shell on the WordPress docker container. The WP-CLI is accessible as wp. The application must already be running (e.g. via make run) before this can be used.
make launch Checks if the intranet docker instance is running; if not, launch docker in the background and open the site in the systems default browser
make test Run tests on the application. Out of the box this will run PHP CodeSniffer (code linter).
make test-fixes Fix issues found during make test

IP whitelisting

The Intranet manages IP whitelisting in a different way to most other deployments. In March 2020 authentication via IdP was introduced to present access to the MoJ wider network and as a result, IP whitelists moved to AWS ALB listener rules.

To help manage ALB rule creation 2 scripts are available in the JotW LastPass account.

Bedrock

This project is based on Bedrock. Therefore, much of the Bedrock documentation will be applicable. Bedrock documentation is available at https://roots.io/bedrock/docs/.

intranet's People

Contributors

bnewing avatar brown-a2 avatar cinqdev avatar digitalali-moj avatar digitalronin avatar earthlingdavey avatar emilyhazlehurst avatar iruneitoiz avatar jaikoo avatar kyriakosoikonomakos avatar lores avatar marcincichon avatar maxf avatar meenamodhvadia avatar ollietreend avatar pmarques avatar robertwdlowe avatar roblowemoj avatar rohanssalunkhe avatar tatyree avatar vinhnguyen0429 avatar wilson1000 avatar wilson1000-moj avatar zheileman avatar

Stargazers

 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

Forkers

uk-gov-mirror

intranet's Issues

Incorrect arguments being passed to in_array() in /bedrock/web/wp/wp-admin/post.php

We are seeing this occasionally on production

E_WARNING
/wp/wp-admin/post.php

9:52 am

TIME

9005a14c38d2(MoJ Intranet Production)

INSTANCE

2

COUNT

Previous error
4 similar errors to this
in the last 30 minutes
Error message
E_WARNING: in_array() expects parameter 2 to be array, null given

Sample stack trace
… at /bedrock/web/app/themes/mojintranet/inc/taxonomies/
agency-terms-walker.php (45)
…Agency_Terms::end_el called at /bedrock/web/wp/wp-includes/
class-wp-walker.php (171)
…ker::display_element called at /bedrock/web/wp/wp-includes/
class-wp-walker.php (243)
in Walker::walk called at /bedrock/web/wp/wp-admin/includes/template.php (166)
…led at /bedrock/web/app/themes/mojintranet/inc/taxonomies/
content-category.php (90)
…tom_category_meta_box called at /bedrock/web/wp/wp-admin/includes/
template.php (1063)
in do_meta_boxes called at /bedrock/web/wp/wp-admin/edit-form-advanced.php (707)
in include called at /bedrock/web/wp/wp-admin/post.php (174)

A branch protection setting is not enabled: codeowners require reviews

Hi there
The default branch protection setting called codeowners require review is not enabled for this repository
This option affects a pull request, i.e a PR will need to be reviewed and approved by a CODEOWNER before it can be merged.
See repository settings/Branches/Branch protection rules
Either add a new Branch protection rule or edit the existing branch protection rule and select the Require review from Code Owners option
Create a .github/CODEOWNERS file
Add a or multiple entries of @ministryofjustice/team_name to the CODEOWNERS file
The team_name shall be a team from within the MoJ teams: https://github.com/orgs/ministryofjustice/teams
See GH Codeowners documentation: https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners
See the repository standards: https://github.com/ministryofjustice/github-repository-standards
See the report: https://operations-engineering-reports.cloud-platform.service.justice.gov.uk/github_repositories
Please contact Operations Engineering on Slack #ask-operations-engineering, if you need any assistance

Broken links from legacy bucket

https://www.pivotaltracker.com/story/show/152748468

In Brief:

The majority of the links could not be conclusively attributed to either an agency or an editor. These were imported by Marcin and then updated by Jeremy. In order to avoid any kind of further hacked/kludged solution, I have restored a backup of all files to the moj-wp-prod bucket on the peoplefinder account. See the README in this bucket for further details.

Argument error in foreach call in /bedrock/web/index.php

We are seeing these consistently throughout the day on the production environment.

E_WARNING
/index.php

10:08 am

TIME

5f06f300e02d(MoJ Intranet Production)

INSTANCE

1

COUNT

Previous error
18 similar errors to this
in the last 30 minutes
Next error
Error message
E_WARNING: Invalid argument supplied for foreach()

Stack trace
…_index called at /bedrock/web/app/themes/mojintranet/modules/api/
page_tree.php (81)
…_index called at /bedrock/web/app/themes/mojintranet/modules/api/
page_tree.php (32)
…:route called at /bedrock/web/app/themes/mojintranet/modules/api/
page_tree.php (11)
…ree_API::__construct called at /bedrock/web/app/themes/mojintranet/
service.php (23)
in Service::load_api called at /bedrock/web/app/themes/mojintranet/service.php (12)
in Service::main called at /bedrock/web/app/plugins/dw-mvc/Controller.php (57)
in MVC_controller::run called at /bedrock/web/app/plugins/dw-mvc/dw-mvc.php (100)
in DW_MVC::action_route called at /bedrock/web/wp/wp-includes/class-wp-hook.php (286)
…WP_Hook::apply_filters called at /bedrock/web/wp/wp-includes/
class-wp-hook.php (310)
in WP_Hook::do_action called at /bedrock/web/wp/wp-includes/plugin.php (515)
in do_action_ref_array called at /bedrock/web/wp/wp-includes/class-wp.php (726)
in WP::main called at /bedrock/web/wp/wp-includes/functions.php (960)
in wp called at /bedrock/web/wp/wp-blog-header.php (16)
in require called at /bedrock/web/index.php (5)

Release notes

Design changes have been made across the site based on feedback from Jan homepage changes and design recommendations.

Upgraded Wordpress & plugins
Upgraded Wordpress to the latest version 5.2.0 . Upgraded select plugins classic-editor, co-authors-plus and regenerate-thumbnails.

Change homepage notification banner to Gov style
Notification banner style has changed. It is now constant with GovUK banner styling.

Restyled agency switcher list per design specs
More simple accessible list of agencies on the switcher page.

Increase line spacing of external header links
Improve accessibility and readability of links now that they are underlined.

Add underlines to external link section in header
Designer recommendations. As per GovUK links are now underlined.

Add dates to homepage posts
Requested feature added back in after Jan homepage feedback and analytics.

Modify single blog post page layout
Single blog pages now have a 2/3 width and a secondary right-hand column with recent blogs listed. Similar to single new pages. This was implemented as part of designer recommendations and for better readability.

Add data and blog name to homepage blog listing
Name and date have been added back onto the homepage following from Jan homepage redesign.

Smoketest docker containers do not connect as they should when run on Travis

smoketest_tests |   Scenario: Test Environment    # features/happypath/00_check_environment.feature:4
smoketest_tests |   ---> Seeding test users <---
smoketest_tests |   [[], ["PHP Warning:  mysqli_real_connect(): (HY000/2002): Connection refused in /bedrock/web/wp/wp-includes/wp-db.php on line 1538\nWarning: mysqli_real_connect(): (HY000/2002): Connection refused in /bedrock/web/wp/wp-includes/wp-db.php on line 1538\n", "Error: Error establishing a database connection. This either means that the username and password information in your `wp-config.php` file is incorrect or we can\xE2\x80\x99t contact the database server at `mariadb`. This could mean your host\xE2\x80\x99s database server is down.\n"], 1]
smoketest_tests |   undefined method `strip!' for nil:NilClass (NoMethodError)
smoketest_tests |   /features/support/users_helper.rb:51:in `create_user!'
smoketest_tests |   /features/support/users_helper.rb:27:in `add_user!'
smoketest_tests |   /features/support/hooks.rb:5:in `Before'
smoketest_tests |     Given I show my environment # eatures/step_definitions/common.rb:6
smoketest_tests | 
smoketest_tests | Failing Scenarios:
smoketest_tests | cucumber features/happypath/00_check_environment.feature:4 # Scenario: Test Environment
smoketest_tests | 

This is working fine on local containers.

Using it under docker

`$ docker compose up -d --build
[+] Running 56/5
✔ phpmyadmin 18 layers [⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿] 0B/0B Pulled 18.0s
✔ kibana 13 layers [⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿] 0B/0B Pulled 51.7s
✔ mysql 8 layers [⣿⣿⣿⣿⣿⣿⣿⣿] 0B/0B Pulled 17.6s
✔ mailcatcher 6 layers [⣿⣿⣿⣿⣿⣿] 0B/0B Pulled 14.6s
✔ elasticsearch 6 layers [⣿⣿⣿⣿⣿⣿] 0B/0B Pulled 50.2s
[+] Building 33.0s (10/10) FINISHED docker:default
=> [wordpress internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 458B 0.0s
=> [wordpress internal] load metadata for docker.io/ministryofjustice/intranet-base:latest 2.3s
=> [wordpress auth] ministryofjustice/intranet-base:pull token for registry-1.docker.io 0.0s
=> [wordpress internal] load .dockerignore 0.0s
=> => transferring context: 74B 0.0s
=> [wordpress internal] load build context 0.3s
=> => transferring context: 52.54MB 0.3s
=> [wordpress 1/5] FROM docker.io/ministryofjustice/intranet-base:latest@sha256:c5c1ee14d1c5573ff5c3c26ad219f38eebaeb3933659c36a19557af1ed4e3fd0 22.5s
=> => resolve docker.io/ministryofjustice/intranet-base:latest@sha256:c5c1ee14d1c5573ff5c3c26ad219f38eebaeb3933659c36a19557af1ed4e3fd0 0.0s
=> => sha256:ca448c2d211cc83cb51cae1878c4e5ef8574860e7b3659b2258a23e2f1a32516 11.28kB / 11.28kB 0.0s
=> => sha256:1c87975145eecf0193b9ed0a5affccc1e1c22c7c540155eeca9ad11fd581c451 4.09kB / 4.09kB 0.0s
=> => sha256:2b55860d4c667a7200a0cb279aec26777df61e5d3530388f223ce7859d566e7a 30.43MB / 30.43MB 1.8s
=> => sha256:c5c1ee14d1c5573ff5c3c26ad219f38eebaeb3933659c36a19557af1ed4e3fd0 2.38kB / 2.38kB 0.0s
=> => sha256:8e058277d049672ae8bcf8ab552c3062972fc8aa5796eea147e4642a9aff1709 15.21kB / 15.21kB 0.8s
=> => sha256:cac814e1eefde971c99c23b7f5ed84e427a693244cc9be90521ccb7ba9c410c5 53.97MB / 53.97MB 10.9s
=> => sha256:7973af5aec3655bb21c50e8decfe2eeee119d033467527912bd52c75688ab0cc 282.26MB / 282.26MB 15.6s
=> => sha256:7e863d092a5ad5ffa0c016951f91f03d32ab91c9b653f6049b2f892e625d9bf4 699.42kB / 699.42kB 2.5s
=> => extracting sha256:2b55860d4c667a7200a0cb279aec26777df61e5d3530388f223ce7859d566e7a 0.6s
=> => extracting sha256:8e058277d049672ae8bcf8ab552c3062972fc8aa5796eea147e4642a9aff1709 0.0s
=> => sha256:8ce37feaab37e5420d19fe91d07ca5fc91f9a1b443dd77e16c7a96c673ad975b 124.08kB / 124.08kB 3.1s
=> => sha256:1012105fb646e2fb01c39d534ef60800cb7999244409d064ca8e7e456cd007dd 1.44MB / 1.44MB 3.9s
=> => sha256:77f5118a534af1be22b08590ea86a66fe06e5127614daa1879aae8e5be107959 27.59MB / 27.59MB 7.0s
=> => sha256:37b70bc744994942a1df04b60f70387bd2e86e3755e22a1f56cc9211f8d66325 33.05kB / 33.05kB 7.6s
=> => sha256:743c08e3a366490e0a59da341032a1bc4aa0e3d1932f694acb93e90dec555429 1.13kB / 1.13kB 8.6s
=> => sha256:e416b513396c7fd105515e0fba27d7f0668704853518c96dbf3a901ac254ebc5 701B / 701B 9.4s
=> => sha256:51f79ba91c4c26a52e31b1ac7f8041d948219e7618c1605f8e36fce52e4f3820 498B / 498B 10.6s
=> => sha256:bc6d1d2c60b287e5b112b8aa536be72f98cd6bf73123feca3dc8f8d8f874dfd9 3.11kB / 3.11kB 10.9s
=> => extracting sha256:cac814e1eefde971c99c23b7f5ed84e427a693244cc9be90521ccb7ba9c410c5 1.0s
=> => sha256:e00c63e0fcfbc74ffdf2613f798ffb62728544f2a1d7d5eb8716552a877a10d1 489B / 489B 11.5s
=> => sha256:0c42ed8cc2b8870b7d1aaf7458fe829506947c4d98b3fe932b304a85a323d824 29.65kB / 29.65kB 11.8s
=> => sha256:bd7593b9ded326698e6880bb1fa13737fd338cd4c13214fdee58401de80d8ea6 3.42kB / 3.42kB 12.2s
=> => sha256:23da015f7c16e8544f3a53d7d49ddfa39dd6f0fde4bdcd539509add2ee32fd8c 1.88kB / 1.88kB 12.4s
=> => sha256:de91aa45071aa9074b0966b78672a56d1615de51c9d91e1abe186901bad62092 1.05kB / 1.05kB 12.8s
=> => sha256:3a6cf7fb2d7aa53a3ba14f57088a54c7f4a20a0630db8f7e8854e867e79f4d63 321.26kB / 321.26kB 13.1s
=> => sha256:e25fb78d48fb861fb0bf98fbc0b79b9f9c84b739f039558b4f8d014c581205d0 97B / 97B 13.5s
=> => extracting sha256:7973af5aec3655bb21c50e8decfe2eeee119d033467527912bd52c75688ab0cc 5.7s
=> => extracting sha256:7e863d092a5ad5ffa0c016951f91f03d32ab91c9b653f6049b2f892e625d9bf4 0.0s
=> => extracting sha256:8ce37feaab37e5420d19fe91d07ca5fc91f9a1b443dd77e16c7a96c673ad975b 0.0s
=> => extracting sha256:1012105fb646e2fb01c39d534ef60800cb7999244409d064ca8e7e456cd007dd 0.0s
=> => extracting sha256:77f5118a534af1be22b08590ea86a66fe06e5127614daa1879aae8e5be107959 0.7s
=> => extracting sha256:37b70bc744994942a1df04b60f70387bd2e86e3755e22a1f56cc9211f8d66325 0.0s
=> => extracting sha256:743c08e3a366490e0a59da341032a1bc4aa0e3d1932f694acb93e90dec555429 0.0s
=> => extracting sha256:e416b513396c7fd105515e0fba27d7f0668704853518c96dbf3a901ac254ebc5 0.0s
=> => extracting sha256:51f79ba91c4c26a52e31b1ac7f8041d948219e7618c1605f8e36fce52e4f3820 0.0s
=> => extracting sha256:bc6d1d2c60b287e5b112b8aa536be72f98cd6bf73123feca3dc8f8d8f874dfd9 0.0s
=> => extracting sha256:0c42ed8cc2b8870b7d1aaf7458fe829506947c4d98b3fe932b304a85a323d824 0.0s
=> => extracting sha256:e00c63e0fcfbc74ffdf2613f798ffb62728544f2a1d7d5eb8716552a877a10d1 0.0s
=> => extracting sha256:bd7593b9ded326698e6880bb1fa13737fd338cd4c13214fdee58401de80d8ea6 0.0s
=> => extracting sha256:23da015f7c16e8544f3a53d7d49ddfa39dd6f0fde4bdcd539509add2ee32fd8c 0.0s
=> => extracting sha256:de91aa45071aa9074b0966b78672a56d1615de51c9d91e1abe186901bad62092 0.0s
=> => extracting sha256:3a6cf7fb2d7aa53a3ba14f57088a54c7f4a20a0630db8f7e8854e867e79f4d63 0.0s
=> => extracting sha256:e25fb78d48fb861fb0bf98fbc0b79b9f9c84b739f039558b4f8d014c581205d0 0.0s
=> [wordpress 2/5] ADD . /bedrock 0.9s
=> [wordpress 3/5] WORKDIR /bedrock 0.0s
=> [wordpress 4/5] RUN mv docker/conf/nginx/server.conf /etc/nginx/sites-available/ 0.2s
=> ERROR [wordpress 5/5] RUN chmod +x bin/* && sleep 1 && bin/composer-auth.sh && make build && rm -f auth.json 6.9s

[wordpress 5/5] RUN chmod +x bin/* && sleep 1 && bin/composer-auth.sh && make build && rm -f auth.json:
1.427 bin/build.sh
1.493 Composer plugins have been disabled for safety in this non-interactive session. Set COMPOSER_ALLOW_SUPERUSER=1 if you want to allow plugins to run as root/super user.
1.493 Do not run Composer as root/super user! See https://getcomposer.org/root for details
1.544 Installing dependencies from lock file (including require-dev)
1.547 Verifying lock file contents can be installed on current platform.
1.560 Package operations: 64 installs, 0 updates, 0 removals
1.561 - Downloading johnpbloch/wordpress-core-installer (2.0.0)
1.561 - Downloading koodimonni/composer-dropin-installer (1.4)
1.562 - Downloading composer/installers (v1.12.0)
1.562 - Downloading php-http/discovery (1.19.2)
1.562 - Downloading acf/advanced-custom-fields-pro (6.1.6)
1.562 - Downloading ralouphie/getallheaders (3.0.3)
1.563 - Downloading psr/http-message (2.0)
1.563 - Downloading psr/http-factory (1.0.2)
1.563 - Downloading guzzlehttp/psr7 (2.6.2)
1.563 - Downloading firebase/php-jwt (v6.10.0)
1.564 - Downloading alphagov/notifications-php-client (5.0.0)
1.564 - Downloading symfony/polyfill-mbstring (v1.28.0)
1.564 - Downloading mtdowling/jmespath.php (2.7.0)
1.564 - Downloading guzzlehttp/promises (2.0.2)
1.564 - Downloading symfony/deprecation-contracts (v3.4.0)
1.565 - Downloading psr/http-client (1.0.3)
1.565 - Downloading guzzlehttp/guzzle (7.8.1)
1.565 - Downloading aws/aws-crt-php (v1.2.4)
1.565 - Downloading aws/aws-sdk-php (3.295.8)
1.565 - Downloading clue/stream-filter (v1.7.0)
1.565 - Downloading johnpbloch/wordpress-core (6.4.2)
1.565 - Downloading johnpbloch/wordpress (6.4.2)
1.566 - Downloading koodimonni-language/core-en_gb (6.4.2)
1.566 - Downloading ministryofjustice/like-button-for-wordpress (dev-main a67d6e0)
1.566 - Downloading ministryofjustice/notify-for-wordpress (dev-main 832ae0c)
1.566 - Downloading ministryofjustice/php-markdown-extra (dev-main af8e1dd)
1.566 - Downloading ministryofjustice/wp-moj-components (3.5.1)
1.566 - Downloading ministryofjustice/wp-moj-elasticsearch (2.3.3)
1.566 - Downloading ministryofjustice/wp-rewrite-media-to-s3 (dev-php8-code-update 693cd89)
1.566 - Downloading symfony/polyfill-ctype (v1.28.0)
1.567 - Downloading oscarotero/env (v1.2.0)
1.567 - Downloading php-http/promise (1.3.0)
1.567 - Downloading phpstan/phpstan (1.10.55)
1.567 - Downloading rector/rector (0.15.25)
1.567 - Downloading roots/wp-password-bcrypt (1.1.0)
1.567 - Downloading psr/container (2.0.2)
1.567 - Downloading symfony/service-contracts (v3.4.1)
1.568 - Downloading symfony/http-client-contracts (v3.4.0)
1.568 - Downloading psr/log (3.0.0)
1.568 - Downloading symfony/http-client (v7.0.2)
1.568 - Downloading symfony/polyfill-php80 (v1.28.0)
1.568 - Downloading symfony/options-resolver (v7.0.0)
1.568 - Downloading http-interop/http-factory-guzzle (1.2.0)
1.568 - Downloading php-http/message-factory (1.1.0)
1.568 - Downloading php-http/message (1.16.0)
1.568 - Downloading php-http/httplug (2.4.0)
1.569 - Downloading php-http/client-common (2.7.1)
1.569 - Downloading php-http/guzzle7-adapter (1.0.0)
1.569 - Downloading jean85/pretty-package-versions (2.0.5)
1.569 - Downloading sentry/sentry (3.22.1)
1.569 - Downloading squizlabs/php_codesniffer (3.8.0)
1.570 - Downloading vlucas/phpdotenv (v2.6.9)
1.570 - Downloading wpackagist-plugin/classic-editor (1.6.3)
1.570 - Downloading wpackagist-plugin/cms-tree-page-view (1.6.8)
1.570 - Downloading wpackagist-plugin/co-authors-plus (3.5.15)
1.570 - Downloading wpackagist-plugin/debug-bar (1.1.4)
1.570 - Downloading wpackagist-plugin/debug-bar-elasticpress (3.1.0)
1.570 - Downloading wpackagist-plugin/elasticpress (5.0.1)
1.570 - Downloading wpackagist-plugin/ewww-image-optimizer (7.2.3)
1.570 - Downloading wpackagist-plugin/query-monitor (3.15.0)
1.571 - Downloading wpackagist-plugin/simple-301-redirects (2.0.9)
1.571 - Downloading wpackagist-plugin/totalpoll-lite (4.9.9)
1.571 - Downloading wpackagist-plugin/wp-document-revisions (3.5.0)
1.584 0/63 [>---------------------------] 0%
2.615 11/63 [====>-----------------------] 17%
2.756 16/63 [=======>--------------------] 25% Failed to download ministryofjustice/wp-moj-components from dist: The 'https://composer.wp.dsd.io/dist/ministryofjustice/wp-moj-components/ministryofjustice-wp-moj-components-bc735aaab6ee2d67e6afed2fad6399ecf9accf05-zip-447db5.zip' URL could not be accessed (HTTP 403): HTTP/2 403
2.794 Now trying to download from source
2.796 Failed to download ministryofjustice/wp-moj-elasticsearch from dist: The 'https://composer.wp.dsd.io/dist/ministryofjustice/wp-moj-elasticsearch/ministryofjustice-wp-moj-elasticsearch-9bfb7e185fb3adeafd26ed3ae96d67e22523f2fc-zip-80fb6b.zip' URL could not be accessed (HTTP 403): HTTP/2 403
2.796 Now trying to download from source
2.903
2.903 21/63 [=========>------------------] 33%
3.204 27/63 [============>---------------] 42%
3.607 34/63 [===============>------------] 53%
3.909 38/63 [================>-----------] 60%
4.312 47/63 [====================>-------] 74%
4.881 51/63 [======================>-----] 80%
5.809 58/63 [=========================>--] 92%
6.809 63/63 [============================] 100%
6.857 In AuthHelper.php line 205:
6.857
6.857 The 'https://composer.wp.dsd.io/dist/acf/advanced-custom-fields-pro/acf-adv
6.857 anced-custom-fields-pro-6.1.6.zip' URL could not be accessed (HTTP 403): HT
6.857 TP/2 403
6.857
6.857
6.857 install [--prefer-source] [--prefer-dist] [--prefer-install PREFER-INSTALL] [--dry-run] [--download-only] [--dev] [--no-suggest] [--no-dev] [--no-autoloader] [--no-progress] [--no-install] [--audit] [--audit-format AUDIT-FORMAT] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--apcu-autoloader-prefix APCU-AUTOLOADER-PREFIX] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--] [...]
6.857
6.882 make: *** [Makefile:5: build] Error 255


failed to solve: process "/bin/sh -c chmod +x bin/* && sleep 1 && bin/composer-auth.sh && make build && rm -f auth.json" did not complete successfully: exit code: 2
$ docker --version
Docker version 25.0.3, build 4debf41
$ cat /etc/os-release
PRETTY_NAME="Ubuntu 22.04.3 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.3 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy
$ uname -a
Linux ikigai 6.5.0-18-generic #18~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Feb 7 11:40:03 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
$ `

A branch protection setting is not enabled: administrators require review

Hi there
The default branch protection setting called administrators require review is not enabled for this repository
See repository settings/Branches/Branch protection rules
Either add a new Branch protection rule or edit the existing branch protection rule and select the Require a pull request before merging option
See the repository standards: https://github.com/ministryofjustice/github-repository-standards
See the report: https://operations-engineering-reports.cloud-platform.service.justice.gov.uk/github_repositories
Please contact Operations Engineering on Slack #ask-operations-engineering, if you need any assistance

WP Admin menu duplicate

Create a new post for agency admins has "news" twice. One for news posts but one is for regional news posts. It needs to be relabeled and display permissions apply only to HMCTS.

Mark down issue

Relating to the issue Dianne raised. Mark down issues have in the past been caused by WP plugin DW Markdown or our Draft plugin and the process in which the editor saves the page.

A branch protection setting is not enabled: Include administrators

Hi there
The default branch protection setting called Include administrators is not enabled for this repository
See repository settings/Branches/Branch protection rules
Either add a new Branch protection rule or edit the existing branch protection rule and select the Include administrators option
This will enable the branch protection rules to admin uses as well
See the repository standards: https://github.com/ministryofjustice/github-repository-standards
See the report: https://operations-engineering-reports.cloud-platform.service.justice.gov.uk/github_repositories
Please contact Operations Engineering on Slack #ask-operations-engineering, if you need any assistance

Default branch is not main

Hi there
The default branch for this repository is not set to main
See repository settings/settings/branches to rename the default branch to main and ensure the Branch protection rules is set to main as well
See the repository standards: https://github.com/ministryofjustice/github-repository-standards
See the report: https://operations-engineering-reports.cloud-platform.service.justice.gov.uk/github_repositories
Please contact Operations Engineering on Slack #ask-operations-engineering, if you need any assistance

Logging to STDOUT instead of file

@wilson1000 advised about not using the local file system, and he suggested to check the stout.

PHP error messages are sent to stout (along with a log of network requests), therefore I think it is probably better for WP_DEBUG_LOG to never be set.

I will document how to follow and possibly filter network requests from stout, this will be useful for debugging PHP functions locally.

Originally posted by @EarthlingDavey in #466 (comment)

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.