Comments (4)
Because TV content is stored in a separate table, this is indeed not happening by default. We'll likely throw in a bit of magic soon to handle TVs alongside the generic resource content.
from gitify.
In my own branch I am successfully extracting/building all tv content. The problem appears to be with rebuilding the migx_config, migx_formtabs, and migx_formtab_fields tables from the extracted .yaml.
One issue I noticed is the handling of multidimensional arrays In GitifyBuild::buildSingleObject()
. It seems I need to iterate at least one level deep in the $data
array and manually convert to json any values that are arrays, for example:
foreach( $data as $key => $val ) {
if( is_array($val) ) {
$data[$key] = ($this->modx->toJSON($val));
}
}
This doesn't appear to be enough to solve the problem, as there are still differences in my source modx_migx_configs
table and target one. When I export my source modx_migx_configs
table directly from phpMyAdmin, and import into target, it appears to work as expected (assuming the related TVs have been correctly built).
from gitify.
The latest master now has built-in support for TVs.
It may still be requiring the double json encoding because of this line: https://github.com/modmore/Gitify/blob/master/src/Command/ExtractCommand.php#L214
Pretty sure this is related to #12 as well.
The reason that line is there is to make embedded JSON a bit more editable from the files, however it's a bit tricky to undo that in the build.. there's no telling wether an array in YAML used to be JSON, or an actual array in the php object before.
Maybe the trick here is to not expand the json like it's doing now, but instead simply prettifying the JSON in a way that doesn't affect how it's parsed during the build.
from gitify.
This should be fixed with 961f466 as well. You'll need to do a new extract for it to rewrite the files. If it's still broken after that commit, please reopen the issue and I'll do more digging.
from gitify.
Related Issues (20)
- Getting YAML error on server but on local HOT 2
- Unable to run Gitify 1.0 HOT 3
- Can not install Gitify HOT 1
- Composer install of v2 : minimum stability issue HOT 2
- v1.x and PHP 8 compatibility issue (Symfony Yaml) HOT 7
- Error "Duplicate key" with ver. 2.0-alpha while build HOT 5
- Automatic adding(deleting) new line after <?php tag every "gitify build"
- Restore command fails with MODX 3 HOT 6
- errors when installing package in MODX3 HOT 4
- Unable to (re)set tinyint values to 0
- [MODX3] Error when extract MediaSource HOT 3
- PHP warning: Undefined array key "service" HOT 1
- modx:install command fails HOT 3
- New .gitify dump-method writes "api_key" and omits original "credential_file"-location HOT 1
- Comments in .gitify file are stripped out HOT 2
- modTemplateVarTemplate are getting overwritten by each other HOT 3
- Collections 4.0.0-pl not extractable any more HOT 4
- MODX could not create your database. Please manually create your database and then try again. HOT 2
- Unable to initialize project HOT 6
- Duplicates detected for modDashboardWidgetPlacement but no duplicates in database
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gitify.