DNNCommunity / Dnn.WebAnalytics

A Dnn (formerly DotNetNuke) module for capturing information about visitors. Includes a report UX and a map UX to show location information.
http://dnncommunity.org/Community/Website-Metrics
10 stars 11 forks source link

Object Qualifier not supported #36

Open MaiklT opened 3 years ago

MaiklT commented 3 years ago

I installed version 1.1.2 on a portal that uses an object qualifier (which is a heritage from long time ago). When placing the module on a page, I get an HTTP error 500 in the request /api/Dnn.WebAnalytics/visit?...

Answer is: {"Errors":[{"source":".Net SqlClient Data Provider","number":208,"state":1,"errorClass":16,"server":"XXX","message":"Invalid object name 'dbo.Community_Visits'.", ...

The name of the table is something like dbo.xxx_Community_Visits, but I could not find the wrong line of code tbh.

WillStrohl commented 3 years ago

Is your object qualifier Community?

X3Technology commented 3 years ago

What is the xxx ?

WillStrohl commented 3 years ago

What is the xxx ?

That's the name of his server that he removed for security purposes.

WillStrohl commented 3 years ago

Is your object qualifier Community?

Never mind... The table name was renamed to Community_Visitors in version 01.01.00.

In your portal where this is happening, is it using a domain name or a virtual directory/child portal?

valadas commented 3 years ago

@hismightiness there was an XXX for the server name and an xxx (lowercase) for the actual object qualifier. We where asking because the sql looks about right to me and maybe the object qualifier has some special characters that maybe cause the issue ?

WillStrohl commented 3 years ago

@hismightiness there was an XXX for the server name and an xxx (lowercase) for the actual object qualifier. We where asking because the sql looks about right to me and maybe the object qualifier has some special characters that maybe cause the issue ?

Okay... now this issue confuses me. :D

MaiklT commented 3 years ago

@valadas is right, XXX is the server name and xxx the object qualifier. It is a main portal, but the issue is something else, and is not dependent from that. The portal was created long time ago in a shared hosting environment, and therfore is this heritage of the object qualifier. The object qualifier has no special charactes, just three letters.

There must be some piece of code somewhere that misses the object qualifier to access the table (and when I look at the SQL installer scripts, the database owner is missed quite everywhere, which makes the module unusable for every installation that has a different database owner that dbo)

valadas commented 3 years ago

database owner is missed quite everywhere

Can you point to an example, it looks about right to me...

X3Technology commented 3 years ago

The problem is likely because I used LinqToSql to generate the DAL. I have a solution that I can incorporate into this that will allow it.

valadas commented 3 years ago

Ohhh, now it all makes sense