Update a block with code
Permalink
Hi,
I'm trying to update the content of a content block with php code in the dashboard. I'm using the save-function of the ContentBlockController class for this. The update seems to work, because when I check the database table btContentLocal I can see the changes. But when I watch the page with the updated block I do not always see the changes. Also when I try to load the content in my update form I don't see the changes.
What is the problem here? Does it have something to do with block caching? Or with page approval? I can't find it. Please help me.
I'm trying to update the content of a content block with php code in the dashboard. I'm using the save-function of the ContentBlockController class for this. The update seems to work, because when I check the database table btContentLocal I can see the changes. But when I watch the page with the updated block I do not always see the changes. Also when I try to load the content in my update form I don't see the changes.
What is the problem here? Does it have something to do with block caching? Or with page approval? I can't find it. Please help me.
As you can see if you look closely the page object in the block and in the area are different (the attribute news_body). How is that possible?
And another strange thing: When I watch the page in the site I see old text and when I try to edit that text in the page I see the new text in the editor. ???
A dump of the block on the front of the website.