Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

chore: Add curated democontent #75

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

Open
mrbazzan wants to merge 1 commit into django-cms:main
base: main
Choose a base branch
Loading
from mrbazzan:democontent

Conversation

@mrbazzan
Copy link
Collaborator

@mrbazzan mrbazzan commented Sep 4, 2025
edited
Loading

JSON data from this page

Copy link
Collaborator Author

mrbazzan commented Sep 4, 2025

@fsbraun
On data import from blog.json, the Picture/Image plugin in the TextPlugin
does not render (It appears in the structure board but not in the actual plugin).

PS: The one that is encoded as <cms-plugin alt=\"Picture / Image - Image (274)\" title=\"Picture / Image - Image (274)\" id=\"274\"></cms-plugin>

Copy link
Member

fsbraun commented Sep 4, 2025
edited
Loading

@mrbazzan Interesting! Indeed, for text plugins the id of the child plugin also has to be changed within the text'S body field (i.e., the 274 be replaced by the actual pk of the child plugin everywhere inside <cms-plugin></cms-plugin>. Would that need to be done here or in djangocms-transfer?

Could be a task for regex.

Copy link
Collaborator Author

mrbazzan commented Sep 4, 2025

@fsbraun
That would mean finding the new pk; I'd like to think that's something djangocms-transfer should do?

Could this be done with the import and export processing setting in djangocms-transfer?

Copy link
Member

fsbraun commented Sep 4, 2025

@mrbazzan Probably this needs to be done at the import - where it is already done for other pk references, e.g., plugin parents.

Copy link
Collaborator Author

mrbazzan commented Sep 10, 2025
edited
Loading

where it is already done for other pk references, e.g., plugin parents.

@fsbraun On further search, I found djangocms-transfer require plugins that serialize references
to other plugin in its data needs to define a do_post_copy method that does the conversion.

TextPlugin already defines the do_post_copy method but it doesn't add the attribute hook, _has_do_post_copy which
allows djangocms-transfer to use the method. Instead of using the hook (which is undocumented I think), we could check if each plugin class has "do_post_copy" and call it?

fsbraun reacted with thumbs up emoji

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@fsbraun fsbraun fsbraun approved these changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

AltStyle によって変換されたページ (->オリジナル) /