FormIt CMP not working correctly for non-sudo users (form submissions and filter missing)

We are storing different form submissions all over our website. When using the FormIt CMP as a non-sudo user, the list view and the Filter on form is incomplete, only displaying the submissions from one form, rest is missing and only displayed when granting sudo permissions. Any idea?

Sudo view

Non-sudo view

What versions of FormIt and MODX are you using?
Are the forms from different contexts?

2.8.5 / 4.2.7

Yes, those forms are coming from different contexts. However, the non-sudo user has access to those contexts (actually created those) and can edit them in the manager/backend. Are there any additional perms required for making it work?

On the “Access Control Lists” page in the manager (manager/?a=security/permission), edit the user group your non-sudo user is assign to.

In the tab “Permissions” → vertical tab “Context Access” → click the “Add Context” button and select the context the missing forms are from. As the “Access Policy” choose “Load, List and View” (you probably only need Load and List) and save the changes.

Test if that resolves the issue.

Unfortunately that doesn’t help. They already had administrator rights on those contexts. Additionally, the forms which you can see in the screenshot register and web are coming from the same context and only register is visible.

Screenshot 2023-07-20 at 09.36.08

Well the only way I could (kind of) reproduce your issue was when the user lacked list permission on a certain context.

I have no idea what else could be going on.

The processor that fills the combobox with the list of available forms is core/components/formit/processors/mgr/forms/getforms.class.php. As you can see from the code, there is not much going on.

These lines (where the query is filtered by the context_key) is the only place I see that changes the query.

Okay, I am an idiot. It’s working like you suggested. I am doing the form logic in a separated API context, so therefore all forms had the context key of the API and that was indeed hidden for the client admin. It’s working now!! Thanks!!

1 Like

This topic was automatically closed 2 days after discussion ended and a solution was marked. New replies are no longer allowed. You can open a new topic by clicking the link icon below the original post or solution and selecting “+ New Topic”.