Wagtail editor deletes content - wagtail

An intern created a Wagtail site at our company. I am in charge to fill a page with our Terms And Conditions. This is hard because Wagtail is deleting or skipping content. There is a pattern to this behavior. Perhaps it gets triggered by the specific structure this content has. For now, being new to Wagtail, it does not feel very trustworthy if Wagtail randomly deletes content. Up to the pattern: There are articles that have the following structure:
A5.3 It's not allowed to use our Services for:
a. bla;
b. foo;
c. foo cookie jar;
A5.4 Regarding article
The a-c parts always get deleted by Wagtail. Sometimes it holds it quite some time but if I make a few edits, those a-c parts get erased.
Has anyone a clue why Wagtail is doing this?
Kind regards and thank you for helping me out.
Bram

Related

Rich text field is not showing the published (EVOQ) version of inner app

First off I would like to say your product is amazing! Has made the job of inheriting an old DNN instance a much more intuitive experience.
Apologies if this is really simple thing I'm missing but I'm at a dead end after scouring the docs and internet.
I'm using Evoq content and up until the start of the week the publishing workflow had been working fine rich text WISIWIG fields but it seems something has changed. Now when publishing changes any apps that are embedded in rich content fields display the demo item when not logged in.
I've recreated the issue on a smaller scale to illustrate the problem:
When logged in it looks as expected - on the left is a button that's placed directly onto the page, on the right is a button inside a rich text field:
logged in
And when logged out:
logged out
As you can see the button that is embedded as a rich text field is displaying the demo item.
I've gone through all of the content items and ensured that they are set to publish and not draft or hide and ensured the page is set to published in DNN.
Aldo I've double checked how the fields are setup but as this was working previously, I'm doubtful that this is the issue but for clarity here is how the fields look in the model:
Rich text field model
And it's rendered to the page using:
#{
var renderSvc = GetService<IRenderService>();
}
#renderSvc.All(Content, field: "BodyContentBlocks", merge: Content.Body)
I've been scouring the docs and internet for hints of what might be going on but the closest I could find was this thread on github but it doesn't seem to be quite the same issue.
Any help would be massively apricated as this issue has cropped up just before moving to our production server (as they always do!) after working as expected for a couple of months. Let me know if you need any more info from me and thanks for your time.
Evoq has a page-workflow feature which is technically undocumented. 2sxc got a sponsor a few years ago who paid for the implementation but there are limitations to it. Some background:
Some data in 2sxc can be clearly assigned to a module or page - such as content added directly
Other data cannot be assigned to a page - such as a blog post
Because of this, the logic is to first determine if something is partOfPage and if yes - and workflow is active - then it will be set to be a draft. This way the end users don't see it.
Upon page-publish, everything that is partOfPage will be published, so the draft will become the live data.
I assume the detection of this was never implemented for inner content - I think inner-content was actually developed later. Because of this, I assume the toolbars for the inner-content-item tell the UI it's part of the page (resulting in draft), but the publish cycle doesn't know about this, since it's internally a sub-entity (which is just like a tag on a blog - not part of a page).
This is difficult to fix. A proper fix would require 2sxc to be modified to make sure that inner-content is never seen as part-of-page, OR that it's taken into account when publishing. Both of these options would probably take ca. 3 days of dev on 2sxc side and would only happen if we have a sponsor.
A workaround is to disable the Evoq-integration so the page publishing wouldn't happen. I believe there is a feature for this - and AFAIK you don't even have to become a Patron (which I highly recommend to support our thousands of hours of work):
Or you could manually try to publish it, but that will be difficult. Note that most of us will be on x-mas vacation so we won't be answering questions till mid Jan.
Summary of options
Avoid inner content for now
Disable Evoq Page Workflow in 2sxc
Manually publish the items (very difficult, needs super-user permissions because it's an unusual thing to publish)
Get some budget ca. 3 days to sponsor the feature https://2sxc.org/contact but wait till end of January
A mix of short-term solution + sponsoring
Sorry for the delay on this, I've been waiting for a decision. I'm going to close the question as we have been able to work around the issue for now with the help of your last comment. Avoiding inner content is working well enough for our use case. Thanks for your time and help and for making an amazing product!

WP: How to delete unused taxonomies and terms from the DB?

while working on my basic website and creating a custom plugin to add different taxonomies and custom post types, I ended up with several entries in the database that are not useful anymore.
I'm wondering if there's a nice way of deleting them.
Using plugins to clean up the database doesn't work, because these search for orphaned contents. But these taxonomies do exist along with their terms, and I guess there is no reason to consider them orphaned.
They were created with "register_taxonomy" and afterwards added the terms manually.
Thanks a lot!

Best Headless CMS for relational content?

TLDR: Looking for a headless CMS that does the following:
Allows you to create new relational models (Songs) for a content type in the UI for creating that content type (Post)
First class slug support by slugifying the title automatically
First class author support by attaching the author who is signed in automatically to content types
GraphQL
I've been trying to find a good headless CMS, and the options that I've looked at are lacking in one way or another. This will be for a music blog, and each post will have an array of Songs and each Song has an Artist (all of which I'd like to be relational).
I tried Strapi and Prismic and both don't seem to allow you to add a related Song to Post unless the Song was previously created. Similarly, you can't add an Artist to a Song without the Artist previously being created. This makes creating a Post a very cumbersome thing to set up all of the other content types before being able to create a Post.
Anyone know of any good options that will pop up a modal or some other good UX if you need to create relational data on the fly when creating another content type? I tried GraphCMS which got me VERY close, but doesn't seem to have first-class support for some other things I'd like (automatic slug generation and automatic Author linking to content types they created).
You are right, with Prismic you need to create the related documents (for instance your Artist) in order to be able to refer to him/her in their Songs.
I noted that as a feature request for the Product team, but the editing experience might become unclear for Editors if you start creating new documents from a document that you are editing...
Maybe you could just open another tab to create the linked Artist, then attach it to the song when you finished on that tab?
About Author: We recommend to create Authors as entities that you make a Content Relationship to in your Post document.
This is because it's hard to assign an Author to a document (is it the person who published the last version of the article, or the one who last edited the document before it was published, or the one who create the first published version of the documents (the other might just have corrected a few typos)
Also, it allows you to add more meta-data about the Author: Have an Avatar image, Role, Team, etc.
Other than that, on the Prismic side, it seems to fit your other requirements. Let us know which tool you chose eventually!

Find where and how objects are used in Salesforce.com

I have recently taken up salesforce.com and i have very little idea about its workings and stuff. Recently i was going through some of the stuff and i had a doubt...
Is there any way through which i can find out where an particular field/ object/ visualforce page has been used in an application. For example lets say i have a field labeled Sales, i want to be able to find where that particular field is used, under which object, and the object in which visualforce page/ Apex class, and the visualforce page/ Apex class is used in which application.
Hope i have made my Q clear.
Thanking everyone for their help
It's not really a programming question, you might be better off asking about administrative stuff like that on salesforce.stackexchange.com.
If you have a test environment (sandbox) - you could always try deleting the field there ;) I'm kidding but if you'll try it the page should display you a list where the field is being used.
Similar thing could be achieved by creating a changeset, adding that field to it and then checking dependencies.
But probably the best way would require some preparations upfront. Read about Force.com IDE (or Eclipse IDE) and how to use it to download files that represent your object definitions, page layouts, classes, visualforce pages, reports... This is great as backup but also will let you search the files (Ctrl+H in Eclipse or just use whatever you want once you have the files locally). Search for API name of the field (similar to My_Custom_Field__c should be most effective.
Pretty old thread but adding another option. I have a free and open source app that scans the fields in your Org and returns the components it's used in (Workflows, Processes, Page Layouts, Apex etc).
Keep in mind that returning fields in Apex and VF is not 100% accurate, as a field with the same API name on different objects would return as being found in a class, even though it might not (as others have mentioned).
Also, it can take quite a while to run on large Orgs.
App: http://schemalister.herokuapp.com/
Source Code: https://github.com/benedwards44/schemalister

HABTM association not being saved?

I'm attempting to create a simple 'tags' type of setup, allowing admins to 'tag' an image so it shows up in certain places. I've only started development and wanted to tackle this portion first. I literally just finished running bake, so everything at the moment is standard and I haven't touched any of the generated code.
I have three tables - Tags, Images, and Images_Tags. When I hit /images/add I see the tags I've created listed in a nice multi-select box. I enter the info, select some tags, hit submit. Once saved, I'm redirected to the index and I noticed there are no tags listed for the image I just created. Digging deeper, there are no records in the Images_tags table either.
I'm thinking something is off with my model, or I have a bad database column name somewhere that's borking the default methodology.
Any ideas where I could look? I'm a newbie to cakePHP, go easy on me :)
Here are a couple of things to look at.
From the sounds of things, the images are not being saved. This means that if images are not being saved, nothing will appear in the images_tags table. So the images create/save feature needs to be looked at more closely.
To troubleshoot this, since you have not touched the code, use scaffolding:
var $scaffold;
in the top of the controller and try adding the image again. See if that will allow you to add images. Typically, when something like this happens, its because the schema for the table has changed after baking all of the functionality for the table.

Resources