Activities endpoint returns action field null in Directus V8 - directus

I am using Directus v8 as a headless CMS. Its self hosted. I have created content types and contents. Then when I want to view my content, I get a javascript exception which indicates activities endpoint returns action field null as you see in first the image
I checked the directus_activity table to see if action column is really null but It was ok.
Then I checked the response from activities endpoint and I saw that action field is coming null from the endpoint as you see in the second image
What could be the reason for that? We have another instance of Directus and its working fine for it.
Thanks for your answers.

Related

Force GET_ONE request when navigating to Show page

As I believe is common in many APIs, ours returns a subset of fields for a record when it is part of a List request, and more details when it is a single-record request to its Show endpoint.
It seems that react-admin attempts to avoid doing a second request when loading a Show page (possibly re-using the record data from List?), which results in missing data. Refreshing the page fixes this, but I'm wondering if there is a setting that will force a GET_ONE request on every Show page load.
There are no setting for that. However, this should be achievable with a custom saga which would listen to LOCATION_CHANGE action (from react-redux-router) and dispatch a refreshView action (from react-admin) when the new location pathname ends with /show.
Edit: however this is very strange. We only use the data we already got from the list for optimistic display but we still request with a GET_ONE when navigating to a show page from the list. Do you have a codesandbox showing your issue?

Fabric Answers Event: how to see all custom attributes?

In my app when user reports a spelling error in the table row I send an event with a name mistake with custom attribute id that contains id of the row.
In my case it's possible to have more than 400 different values but in Fabric I see only top 100.
Is there a way to see all of them?
In Fabric, we show the top 10 and there isn't a way to see the full 400. If you link your app to Firebase you can access up to 25 attributes. Check out https://docs.fabric.io/apple/answers/ios-export-firebase.html for more details.

Sitecore Web API GetRenderingHtml response message

I have a requirement of getting HTML output for a component in a page.
I get a response message "Preview is unavailable for the Default rendering." when I try to use GetRenderingHTML Web API.
My API call looks like : http://<HostName>/-/item/v1/-/actions/GetRenderingHtml?database=master&language=en-US&renderingId=<RENDERING_ID>&itemId=<ITEM_ID>
There are couple things you need to consider while using GetRenderingHtml action.
GetRenderingHtml does not return output of a component on a page. The itemId parameter is used to find a datasource for your component, not a page which uses a component.
It only allows method redering, sublayout, url rendering, xsl rendering, webcontrol and xmlcontrol to be rendered.
The fact that your message says for the Default rendering means that whatever id you passed as renderingId, there is an item in your database with this id and DisplayName property set to Default and this item is not a rendering listed in point 2.

How to do a listener on every page load

I'm trying to limit the session access to a Struts application so the users will only be able to use 1 tab at the time. To do this, I have to create an ID everytime a new page is loaded and assign that ID to the user's session. By doing so, if the user uses a page with a different ID than the one registered in his session, the action will be rejected.
How can I do a listener on every page load? Which interface should I use?
Or do you have any other idea of how I could manage multiple tabs?
I'm Using Struts 1 and Java 4.
You could use Spring MVC Interceptors and override the preHandle method.
Returning false inside should cancel your request for not allowed additional tabs.
You can use an interceptor to do this. You will need to define it on your interceptor stack in your struts.xml and code the interceptor to check the JEE role information provided by your web application server. The interceptor can be coded to give a redirect result on the other tab if there was recently an action called however you will probably need to coordinate it via JS generated ids and AJAX.
https://struts.apache.org/docs/interceptors.html

MvcSiteMapProvider not resolving depending on RouteData

I am attempting to use the MvcSiteMapProvider with an MVC 4 site, and am having a problem in a section of the site which has (for example) a Project Listing page and child Project Detail page.
When you access the Detail page, the ID of the entity selected from the Listing is specified in URL e.g.:
~/Project/2/Detail
I have not made the Detail page a Dynamic node, as I do not want the Site Map Provider to provide any enhanced functionality. Essentially I want the Site Map Provider to ignore the projectID URL parameter and always just map to the Detail action.
Unfortunately, I am having the following problem:
If the app starts with the first request being for the Listing page,
then the user can click through to any project and the SiteMap
matches the Detail page just fine.
If the app starts with a request
for the Detail page, then the SiteMap only matches the Detail page if
the URL contains the ProjectID of the first request, i.e. if you
visit any other Project then the SiteMap currentnode is null.
I have tried to disable caching, enable caching with a long duration, and have even been digging around in the source code with no success. The inconsistent behaviour suggests it is a bug. Any help would be greatly appreciated.
This problem is resolved.
See thread on MvcSiteMapProvider's github at:
https://github.com/maartenba/MvcSiteMapProvider/issues/154