Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple issues browsing data #3171

Closed
enfJoao opened this issue Sep 14, 2023 · 14 comments
Closed

Multiple issues browsing data #3171

enfJoao opened this issue Sep 14, 2023 · 14 comments
Assignees

Comments

@enfJoao
Copy link

enfJoao commented Sep 14, 2023

I'm submitting a

[x] bug report

...about

[x] admin experience UI

Current Behavior / Expected Behavior

If I open an app admin panel, go to the Data tab, and open any data type to see the data, I get this error on log:
ERROR TypeError: can't access property "Label", e.contentType is undefined
de content-items.component.html:6
Angular 7

But the data just without issues.
In one specific data type, I also get this error:
image
And it never opens, just shows an empty pane. I can add new data, but I cannot see the existing data.

This is a recent issue (perhaps v16.0 or so).

Your environment

  • 2sxc version(s): 16.5.0
  • Browser: Firefox
  • DNN: 9.11.02
@iJungleboy
Copy link
Contributor

I also noticed the label problem and created a standalone issue #3174

Probably best to remove it from this issue and focus only on the second problem.

Can you give us more info? What content Type is it, what fields, is something already broken in the network request?

@enfJoao
Copy link
Author

enfJoao commented Sep 18, 2023

No network errors. It clearly tries to load the data but it stops somehow.

image

These are the fields in the entity type:
image

image

image

I can export the data to xml and browse it with excel.

image

@iJungleboy
Copy link
Contributor

Something seems wrong with your list-request, which should tell the UI what fields / columns exist. This is your print-screen:
image

Mine is very different:
image

I would look at the data in your response - my guess is something on your webserver is capturing the URL by mistake, eg. because it's waiting for a url with this specific GUID inside? Maybe something you configured in web.config...

@enfJoao
Copy link
Author

enfJoao commented Sep 26, 2023

Perhaps I was not clear in my issue description.

This bug happens when I open the data menu (when you see all the records introduced in that specific data type).
Not the menu where you configure the fields on that data type.

You request screenshot only makes sense if you're browsing the fields, not the data.

@iJungleboy
Copy link
Contributor

The request shown in my case is when you open the list-all-items-in-the-admin-app dialog.

What are you describing? I'm still not sure. Are you opening a dropdown? or still list-all-items-in-admin?

@enfJoao
Copy link
Author

enfJoao commented Sep 28, 2023

Ok. Let's pinpoint this a bit more.
I have no idea why your network data is so different from mine, but it does not seem like a data issue.

Issue 1: When I open this data type items, I get these errors on console log:
image
They are specific to this data type and happens nowhere else.

Issue 2: The rows for the items are created, but the item content is not there. See the first item with the html content.
image

Issue 3: If I mess around the UI, like mouse drag and kb arrows, the rest of the rows will show, so this is definitely a UI issue.
image

Issue 4: This is not firefox specific (happens in edge too).

@iJungleboy
Copy link
Contributor

It seems your issue appears on line 399 in the content-items.component.ts which is

  private valueGetterEntityField(params: ValueGetterParams) {
    const rawValue: ContentItem[] = params.data[params.colDef.field];
    if (rawValue.length === 0) { return null; }
    return rawValue.map(item => item.Title);
  }

so for some field which I don't know, the data is probably null so this causes the problem.
Why? I don't know.
I do suggest you click on the line in the error and try to debug it, till you can see what's in the variables:
image

basically put a stop-point there, and run through it with F8 till you spot the problem.

Note that I'll be on holidays for 3 weeks, so even if you find the issue and we fix it, there won't be a release till end of October (unless there's a security emergency...)

@enfJoao
Copy link
Author

enfJoao commented Sep 28, 2023

Thanks.
I'll take a look amd report.

Before you go on your deserved vacations, do you think you could give me some tips on this question? https://stackoverflow.com/questions/77194178/2sxc-send-e-mail-with-the-pdf-file-generated-in-the-app-tutorial-pdf

@enfJoao
Copy link
Author

enfJoao commented Nov 1, 2023

Ok. This took a lot of testing, but I was able to replicate this issue with these conditions:

  • Pick an entity type with lots of fields and data inserted (it's easier to see the effect)
  • Create a new field with entity data type
  • Setup the field as ephemeral
  • Reorder the fields so that the new one gets place in the middle (not first nor last)
  • Try to browse the data. It will either not show any data or stop showing the data after that field's column.

This may be caused by the fact that the admin panel expects the field (it shows it's name on the top row), but the data is not send by the api. On the other side, this only happens with entity data type, not string, for example.

@iJungleboy
Copy link
Contributor

@enfJoao could you check if the problematic field is marked as the title?

@enfJoao
Copy link
Author

enfJoao commented Nov 2, 2023

It is not.

@enfJoao
Copy link
Author

enfJoao commented Dec 25, 2023

Any luck fixing this issue?

@enfJoao
Copy link
Author

enfJoao commented Feb 12, 2024

Still an issue in v17.
I still have to manually export data to make small fixes in these apps.

@iJungleboy iJungleboy self-assigned this Feb 12, 2024
iJungleboy added a commit to 2sic/eav-ui that referenced this issue Feb 12, 2024
@iJungleboy
Copy link
Contributor

problem was really the ephemeral columns.
I changed the code to just filter these out now - should be in v17.01.08

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: v17.02.00
Development

No branches or pull requests

2 participants