Comments (4)
Could you share your startup code. If you have this line in your startup:
https://github.com/PiranhaCMS/piranha.core/blob/master/examples/RazorWeb/Program.cs#L66
And you remove the old PageTypes from the content type sync, they are considered orphans and will be deleted. Deleting PageTypes will effectively cascade the pages based on those.
Best regards
from piranha.core.
Yes, I have exactly as it was originally (as in the link above).
However, previously I made several pagetypes, but I added a new that did never show up and I consequently removed that last one. Before I removed that pagetype, I also tried to add it by adding the line with .AddType(typeof(PageTypeModel) without success.
All tables that start with Piranha_Pages*, except Piranha_PageTypes got empty as well as the tables that start with Piranha_Content*.
Piranha_BlockFields and Piranha_Blocks still have the data.
from piranha.core.
Since there's no code in the framework that deletes pages (unless explicitly calling api.Pages.DeleteAsync(...)
besides removing PageTypes
, the only explanation is that you at some point during the testing removed all PageTypes except the new one, thus deleting them. Then you reverted your code which inserted the old PageTypes again, but then the pages had already been deleted. I suggest that you remove the call to DeleteOrphans()
until you've set up your solution.
Please also share your page type so we can take a look at why it's not importing correctly, this is usually due to some attribute missing on the class itself.
Regards
from piranha.core.
Ok, now I get it :)
If I remove the call DeleteOrphans()
, this cannot happen again?
I don't have that pagetype left as I removed it. It was a very simple type, like a FAQ page. I could use existing blocks, but I wanted something that made difference in the front end.
It was like:
[PageType(Title = "FAQ page")]
public class FaqPageType : Page<FaqPageType>
{
public class FaqRegion
{
[Field(Title = "Question")]
public StringField Question { get; set; }
[Field(Title = "Answer")]
public StringField Answer { get; set; }
}
[Region(ListTitle = "List of FAQ")]
public IList<FaqRegion> Faqs { get; set;}
}
Thank you for your prompt answers!
from piranha.core.
Related Issues (20)
- Piranha Initialize issue
- Localization support .NET 5 PiranhaCMS
- Protected Pages HOT 5
- Field settings for regions are not always provided in JSON
- Regions in my SiteContent don't show up in the settings editors HOT 4
- Fetching custom regions via the api HOT 1
- Generic Content Search items (Content Groups) HOT 2
- Copied child pages don't show up in the pages overview
- WebApi can't get subpages via slug HOT 2
- Raw HTML Cant't Save Twitter Embedded View HOT 2
- Webp images are being processed and come out 10x larger HOT 5
- when I deploy the app into linux server, how to link the database ? HOT 1
- Moving to the new .NET Foundation CLA service
- Manager not showing Site Types HOT 2
- Accessing IDb instance from model class HOT 2
- Post.IsPublished is false even when post has been published. HOT 4
- figured it, can close
- Exclude controllers/endpoints from caching HOT 1
- Search only works for root level pages in Page dialog HOT 4
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 piranha.core.