naboo/craft-siteduplicate 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

naboo/craft-siteduplicate

最新稳定版本:1.1.1

Composer 安装命令:

composer require naboo/craft-siteduplicate

包简介

Site Duplicate let's you duplicate entries across Sites in Craft CMS.

README 文档

README

Site Duplicate let's you duplicate entries across Sites in Craft CMS. It even works when section entries aren't set to propagate across site sections making it easy to duplicate entry data between Sites.

Screenshot

Contents

License

This plugin is licensed for free under the MIT License. Please see the LICENSE file for details.

Requirements

This plugin requires Craft CMS 3.0.0 or later.

Installation

To install Site Duplicate, follow these steps:

  1. Install with Composer via composer require naboo/craft-siteduplicate
  2. Install plugin in the Craft Control Panel under Settings > Plugins

You can also install Site Duplicate via the Plugin Store in the Craft Control Panel.

How It Works

The plugin enables you to add a sidebar widget to selected sections for which you would like to be able to duplicate entries across Sites. The widget will display available Sites for the current section.

Screenshot

Notice! Some limitations need to be kept in mind - please see the Known limitations section for more info.

Issues

Please report any bugs/issues you find to the Issues page.

Known limitations

There are some things to keep in mind when duplicating entries across Site sections.

Here's a list of known limitations - and potential workarounds - to keep in mind before duplicating.

1. Issues with element relations

If the Site you are duplicating to is set to not have its entries propagated scross site sections the Site might not be able to have the same type of relations as the Site you are duplicating from.

For example you might want to duplicate an entry from Site A which has an Entries relations field. The field might have a relation to another entry in Site A. When duplicating the entry to Site B the relation isn't available in Site B since the related entry exists only in Site A (this goes for all relations, entries, assets, categories...). This will cause Craft to throw a validation error when duplicating the entry, leaving the duplicated entry in Site A.

But there is a workaround. Before duplicating the entry from Site A you can remove/disable the relation since the plugin will actually duplicate what's on the screen - not what's in the database. So let's say you want to duplicate an entry that has a relation - before duplicating the entry you'll just remove/disable the relation (only on screen - you don't need to save the entry in Site A) like this:

Screenshot

... then you duplicate the entry and Craft will be able to duplicate the entry data to another Site.

2. Parent entries (structures) aren't supported when duplicating

Another limitation is that all entries being duplicated will always duplicate to the root level of the section. So if the section you are duplicating within is a Structure and sits at level 2 in Site A the duplicated entry will always duplicate to the root level in Site B. This is to prevent Craft from throwing errors if the section hasn't the same entry setup between Sites. It's almost the same logic as the limitation with relations. If the relation isn't there - it can't be duplicated.

Credits

Brought to you by Johan Strömqvist

Big thanks to Pixel&Tonic for making an amazing CMS. Site Duplicate also uses a lot of code from Craft core.

naboo/craft-siteduplicate 适用场景与选型建议

naboo/craft-siteduplicate 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 20.28k 次下载、GitHub Stars 达 4, 最近一次更新时间为 2019 年 02 月 28 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「cms」 「site」 「duplicate」 「sites」 「Craft」 「craftcms」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 naboo/craft-siteduplicate 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 naboo/craft-siteduplicate 我们能提供哪些服务?
定制开发 / 二次开发

基于 naboo/craft-siteduplicate 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 20.28k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 4
  • 点击次数: 9
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 4
  • Watchers: 2
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-02-28