Developer forum

Forum » Dynamicweb 10 » Cant create paragraph of specific Item Type

Cant create paragraph of specific Item Type

Rene Poulsen
Rene Poulsen
Reply

Hi,

I'm working on a Swift solution where I, on localhost, am able to create a paragraph of a specific item type (let's just call it "TestItem"). I've deployed this to a dev server, where I'm also able to create a paragraph of the same type. On the production site, where our customer works on the solution, I'm not able to create a paragraph of the same Item type. What I've done so far to try getting it to work is:

1) Deleted the xml file for the item type and adding it again. Makes no difference - I'm still not able to create a paragaph using that specific item

2) Deleted both the table in the database and the xml file, added the XML file againg, edited it and saved it. The table gets created again. Makes no difference

3) Created a backup of the databse from the solution where the item type is not working. Setup another test solution just to see if it works. And it does!

So how can I make the item work on the solution where it doesn't work? I'm just considering deleting the database entirely and restore it from the .bak file I created the backup to. But I'm not sure if this will make any difference?

Is there any other way to debug / test this. Is there any files I can delete to somehow refresh the items / database etc? Any suggestions are welcome as I've got no clue why this is not working on only one solution.

We're using a self-hosted runner on our servers to deploy items and templates btw. So everything is excactly the same on all solutions - local, dev, production, my new test solution.


Replies

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

Hi Rene

Start by checking these 2 settings - if they are the same in your environments:

If that is not it, it is probably related to your restrictions of the test item type.

You can send an email to partner support with a link to your production URL - then they can see if they can locate the issue.

 
Rene Poulsen
Rene Poulsen
Reply

@Nicolai they are the same. What does it has to do with a paragraph of a specific item type? I'm not using standard paragraphs, but only items types.

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

Item types can have restrictions related to regular pages and paragraphs - so if you do not share that setting between environments, that can have an impact.

I do not think it is the database. I am pretty sure it is item type restrictions - either allowed parent/child or website restrictions that is causing the issue.

E.g. if your root item type in production is not the same or if the websites have different ids and you are using website restrictions, this could happen.

 
Rene Poulsen
Rene Poulsen
Reply

I actually did try to set the allowed parents and allowed children of the item and the page where the item was supposed to be created. Had no effect either. And as mentioned earlier - all item types are deployed to the different environments through CI / CD and a self hosted runner.

When I use the database from the environment - where the item doesn't work - on another environtment, the item works.

So I've tried all possible settings related to the items. And as they are saved in XML and deployed from Git to the respectfull environments, they are exactly the same. The database on the respectfull environments all comes from the same local database back when I started the project.

 
Rene Poulsen
Rene Poulsen
Reply

Found the issue. The page item where the paragraph item was supposed to be created somehow was not updated with the correct settings even tough it is in my local environment and on the dev environment. I deleted the item xml file, added it again and the problem was solved.

One of my colleagues told me that he had a similar problem once and mentioned something about a scheme for the database, but he can't remember exactly what fixed the issue. It doesn't ring a bell in my ears. Maybe to you? :-)

 

You must be logged in to post in the forum