ycloudyusa / yusaopeny_gated_content
Y USA 开放 Y 虚拟 Y 内容
Requires
- ext-json: *
- ext-zlib: *
- cboden/ratchet: ^0.4.4
- drupal/csv_serialization: ^2.0 || ^3.0
- drupal/date_recur: ^2.0 || ^3.0
- drupal/date_recur_modular: ^2.0 || ^3.0
- drupal/jsonapi_image_styles: ^2.0.0 || ^3.0
- drupal/recurring_events: ^2.0@RC || ^2.0
- drupal/simple_recaptcha: ^1.0
- drupal/state_machine: ^1.4
- drupal/views_data_export: ^1.0
- ycloudyusa/yusaopeny: *
- ymcatwincities/daxko_sso: *
- dev-master
- dev-main
- 1.9.2
- 1.9.1
- 1.9.0
- 1.8.22
- 1.8.21
- 1.8.20
- 1.8.19
- 1.8.18
- 1.8.17
- 1.8.16
- 1.8.15
- 1.8.14
- 1.8.13
- 1.8.12
- 1.8.11
- 1.8.10
- 1.8.9
- 1.8.8
- 1.8.7
- 1.8.6
- 1.8.5
- 1.8.4
- 1.8.3
- 1.8.2
- 1.8.1
- 1.8.0
- 1.7.3
- 1.7.2
- 1.7.1
- 1.7.0
- 1.6.14
- 1.6.13
- 1.6.12
- 1.6.11
- 1.6.10
- 1.6.9
- 1.6.8
- 1.6.7
- 1.6.6
- 1.6.5
- 1.6.4
- 1.6.3
- 1.6.2
- 1.6.1
- 1.6
- 1.5.2
- 1.5.1
- 1.5
- 1.4.1
- 1.4
- 1.3
- 1.2.4
- 1.2.3
- 1.2.2
- 1.2.1
- 1.2
- 1.1.3
- 1.1.2
- 1.1.1
- 1.1
- 1.0.1
- 1.0
- 0.16
- 0.15
- 0.14
- 0.13
- 0.12
- 0.11
- 0.10
- 0.9
- 0.7
- 0.6
- 0.5
- 0.4
- 0.3
- 0.2
- 0.1
- dev-gc-custom-auth-fix
- dev-recurring_events
- dev-snyk-upgrade-1f9718cdd5795d74f0cdfeca6fe80d88
- dev-snyk-upgrade-7c95da50b241ad181a9fb5a076b21ed6
- dev-snyk-upgrade-7ed20d2be7f671c2f4bff0c765dce541
- dev-snyk-upgrade-4cf03370d84367180f67f998bc72a602
- dev-snyk-upgrade-3345da0982ec2e5941e0386b0440aeae
- dev-snyk-upgrade-a139608cdffb5f93ea9bc559fb81b15f
- dev-anpolimus-patch-1
- dev-filesystem
- dev-snyk-upgrade-147a85a8de550abc19f3708680b8ade5
- dev-docs
- dev-prefer_stable
- dev-jsonapi_image_styles
- dev-csv_serialization
- dev-rename
- dev-oficial_repo
This package is auto-updated.
Last update: 2024-09-14 12:49:39 UTC
README
虚拟 Y 是一个用于 Open Y 的包,包含组织 Y 客户受保护内容的所需功能。
当前开发活动正在进行于 YUSA 分支。请将拉取请求提交到那里。一旦审核和发布,它们将被拉入此仓库。
服务器要求
为了工作,虚拟 Y 需要 HTTP 服务器允许
- GET
- POST
- DELETE http 方法。
子模块
- 认证系统 - 用于不同认证类型的插件系统。
- 演示 - 一组迁移,用于在虚拟 Y 的初始步骤中安装演示内容
- 存储 - 用于虚拟 Y 的实体集
- 日志 功能,用于跟踪虚拟 Y 用户的操作。
- 共享内容 - 允许您从共享网络下载内容的模块
- 共享内容服务器 - 用于 shared.openy.org 服务器的模块
安装
请参阅这些说明的视频版本 。这假设您已经 构建了 Open Y 网站 并已启动它。
- 将此模块添加到您的代码库中。
- 通过 composer:
composer require ycloudyusa/yusaopeny_gated_content
- 不使用 composer:不推荐这样做。
- 通过 composer:
- 启用模块
- 通过 UI
- 访问工具栏中的 扩展。
- 选择 "Virtual Y Base","Open Y Virtual YMCA Storage" 和 "Open Y Virtual YMCA Auth Example"。
- 安装并选择 "是" 以添加所有必需的依赖项。
- 通过 drush:
drush en openy_gated_content openy_gc_auth_example -y
- 通过 UI
- 通过 结构 > 分类法 添加这些词汇表中的至少一个项目
- 虚拟 Y 类别
- 虚拟 Y 设备
- 虚拟 Y 级别
- 创建一个 落地页面 并将 虚拟 Y 内容 段落添加到 内容区域。
- 从工具栏转到 虚拟 Y > 视频 > 添加视频 并添加一段视频内容。
- 访问您创建的落地页面,点击登录,观察您的新虚拟 Y。
升级路径
已知问题
如果您遇到
[error] Configuration <em class="placeholder">user.role.anonymous</em> depends on configuration (<em class="placeholder">rest.resource.openy_gc_auth_custom, rest.resource.openy_gc_auth_custom_confirm</em>) that will not exist after import.
看起来之前的更新失败了。如果您不使用自定义认证提供程序,请禁用该模块,这应该会有所帮助。如果您使用它,请尝试手动删除该配置并再次尝试
drush cdel rest.resource.openy_gc_auth_custom_confirm
另一个
Drupal\Component\Plugin\Exception\PluginNotFoundException while adding Views handlers for field Parts of day on index Default: The "" plugin does not exist. Valid plugin IDs for Drupal\search_api\DataType\DataTypePluginManager are: boolean, date, integer, decimal, string, text in
这个错误是因为其中一个服务位于自定义文件夹中。尝试分析哪个服务已损坏并修复它。
开发
在开发过程中,您可能希望启用一组模块。使用 openy_gc_demo
模块来实现此目的。指定您想要启用的模块作为此模块的依赖项。CI 配置会自动启用此模块及其所有依赖项。
编码标准
PHPCS
请查看 .phpcs.xml
中的 PHPCS 配置。
要使用此配置,只需在模块目录中运行 phpcs
。
您可以将此脚本添加到 .git/hooks/pre-commit 中,以便在 git commit
时运行 phpcs 和 phpcbf。
PROJECT=`php -r "echo dirname(dirname(dirname(realpath('$0'))));"` cd $PROJECT echo "Running phpcs and phpcbf..." phpcs . if [ $? != 0 ] then phpcbf . exit 1 fi
eslint
请查看 js/gated-content/.eslintrc.js
中的 eslintrc 配置。
要执行检查,请运行 npm install && npm lint-no-fix
。有关详细信息,请参阅 js/gated-content/package.json
。
使用 npm lint
可提供自动代码修复功能。
使用 docksal for openy
用于构建 PR 构建的 docksal 配置 https://github.com/fivejars/docksal-for-openy/tree/openy-gc-builds 被用于构建。
要使用它,您必须安装 Docksal。
按照以下说明获取提供 4 个本地网站(每个基础主题一个,且尚未安装 Open Y)的工作本地环境。
mkdir vymca
cd vymca
git clone --branch openy-gc-builds \
git@github.com:fivejars/docksal-for-openy.git .docksal
git clone git@github.com:fivejars/yusaopeny_gated_content.git
mkdir -p docroot/libraries docroot/sites/default/config/staging
wget -N https://raw.githubusercontent.com/fivejars/yusaopeny-project/8.2.x-gated-content-ci/composer.json
docker volume create --name=composer_cache
fin init
Vimeo 私有视频
对于通过“特定域名”嵌入保护的视频,您可能会遇到缩略图下载到 Drupal 媒体的错误。在这种情况下 - 为 Drupal 核心应用补丁。
- patches/OEmbed_vimeo_private_videos.patch - 使用核心媒体时
- patches/video_embed_field_vimeo_private_videos.patch - 使用 video_embed_field 模块时
需要 JSON API 补丁的 Drupal 8.7
{ "extra": { "patches": { "drupal/core": { "JSONAPI wont install (8.7-specific)": "https://www.drupal.org/files/issues/2019-05-23/jsonapi_2996114.patch" } } } }
迁移说明
如果您有错误
TypeError: Argument 6 passed to __construct() must be an instance of EntityTypeManagerInterface
将补丁应用到 composer.json
{ "extra": { "patches": { "drupal/paragraphs": { "3079627": "https://www.drupal.org/files/issues/2019-09-06/3079627-4.paragraphs.Argument-6-passed-to-construct.patch" } } } }