Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Content ID conflict resolving while ".gitify: data.content.where" is used #230

Open
zeves095 opened this issue May 25, 2018 · 0 comments
Open

Comments

@zeves095
Copy link

zeves095 commented May 25, 2018

Summary

Conflict resolving does not take into account - $criteria
Gitify check ids only for $criteria part in _data and in DB . But if in DB some other objects (out of criteria) have same ID ,so while gitify build --no-cleanup i get xPDO (sql) error.

Step to reproduce

  1. .gitify file:
    data_directory: _data/ backup_directory: _backup/ data: content: type: content where: - 'class_key:IN': ['modDocument','modWebLink','CollectionContainer']

on production server create new msProduct
on dev server create, for instance` webDocument
p.s. they will have same ID.

  1. on dev server gitify extract content
  2. copy _data to production server
  3. on production gitify build --no-cleanup content
    --> ERROR

Observed behavior

In my case i got:
(ERROR @ /home/user/site/www/core/xpdo/om/xpdoobject.class.php : 1452) Error 23000 executing statement: INSERT INTO modx_site_content (id, type, contentType, pagetitle, longtitle, description, alias, link_attributes, published, pub_date, unpub_date, parent, isfolder, introtext, content, richtext, template, menuindex, searchable, cacheable, createdby, createdon, editedby, editedon, deleted, deletedon, deletedby, publishedon, publishedby, menutitle, donthit, privateweb, privatemgr, content_dispo, hidemenu, class_key, context_key, content_type, uri, uri_override, hide_children_in_tree, show_in_tree, properties, products, products_counted`) VALUES (56660, 'document', 'text/html', 'Инстаграм', '', '', 'instagram', '', 1, 0, 0, 0, 1, '', '"MySiteName" - bla-bla-bla-bla.', 0, 70, 21, 0, 1, 1, 1526383501, 1, 1526891655, 0, 0, 0, 1526383500, 1, '', 0, 0, 0, 0, 1, 'CollectionContainer', 'web', 1, 'instagram', 1, 0, 1, '{"ms2gallery":{"media_source":"3"}}', 0, 0)
Array
(
[0] => 23000
[1] => 1062
[2] => Duplicate entry '56660' for key 'PRIMARY'
)

  • Could not save new resource from uri: instagram`

Expected behavior

create resourse with new id and gitify extracting (as it work while id conflict inside criteria)

Environment

Gitify version 0.12.0,
MODX version 2.6.2,
Debian x86_64 GNU/Linux,
MySQL version - 5.5,
PHP 5.6.30

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant