openstore-ecommerce / OpenStore

OpenStore
25 stars 21 forks source link

Cannot access admin interface on when using an object qualifier #34

Open valadas opened 6 years ago

valadas commented 6 years ago

Steps to reproduce

  1. Install Dnn 9.2.2 use an object qualifier during install.
  2. Download and install the NBright template system from https://github.com/nbrightproject/NBrightTS/releases/tag/v8.5.1.1
  3. Download and install OpenStore from https://github.com/openstore-ecommerce/OpenStore/releases/tag/v4.0.5.0
  4. Create an os-admin page
  5. Change the page skin as documented at https://doc.openstore-ecommerce.com/
  6. Refresh the page
  7. Notice dnn error page

Event log error message:

AbsoluteURL:/Default.aspx

DefaultDataProvider:DotNetNuke.Data.SqlDataProvider, DotNetNuke

ExceptionGUID:59c548f7-b6fc-49f6-b571-33b34113cc33

AssemblyVersion:

PortalId:-1

UserId:-1

TabId:-1

RawUrl:

Referrer:

UserAgent:

ExceptionHash:e/fVNc1HKXW6xX1pYrOITUIA2j0=

Message:Invalid object name 'NBrightBuy'.

StackTrace:

InnerMessage:Invalid object name 'NBrightBuy'.

InnerStackTrace:

at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData() at System.Data.SqlClient.SqlDataReader.get_MetaData() at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted) at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) at System.Data.SqlClient.SqlCommand.ExecuteScalar() at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteScalar(SqlConnection connection, CommandType commandType, String commandText, SqlParameter[] commandParameters) at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteScalar(String connectionString, CommandType commandType, String commandText, SqlParameter[] commandParameters) at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteScalar(String connectionString, String spName, Object[] parameterValues) at Nevoweb.DNN.NBrightBuy.Components.SqlDataProvider.SqlDataProvider.Update(Int32 ItemId, Int32 PortalId, Int32 ModuleId, String TypeCode, String XMLData, String GUIDKey, DateTime ModifiedDate, String TextData, Int32 XrefItemId, Int32 ParentItemId, Int32 UserId, String Lang) at Nevoweb.DNN.NBrightBuy.Components.NBrightBuyController.Update(NBrightInfo objInfo) at Nevoweb.DNN.NBrightBuy.Components.PluginUtils.CreateDBrecords(List`1 pluginList, Int32 portalId) at Nevoweb.DNN.NBrightBuy.Components.PluginUtils.CreateSystemPlugins() at Nevoweb.DNN.NBrightBuy.Base.NBrightBuyBase.OnInit(EventArgs e) at Nevoweb.DNN.NBrightBuy.Admin.BackOffice.OnInit(EventArgs e) at System.Web.UI.Control.InitRecursive(Control namingContainer) at System.Web.UI.Control.InitRecursive(Control namingContainer) at System.Web.UI.Control.AddedControl(Control control, Int32 index) at System.Web.UI.ControlCollection.Add(Control child) at DotNetNuke.Framework.DefaultPage.OnInit(EventArgs e) at System.Web.UI.Control.InitRecursive(Control namingContainer) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Source:

FileName:

FileLineNumber:0

FileColumnNumber:0

Method:
leedavi commented 6 years ago

Hi Daniel,

I've not seent his before. I've not run against 9.2.2 yet. I wonder if we have a problem. I know the parsonabar likes to mess with the admin page, but this looks like DB error. Have you tried restarting the app pool?

leedavi commented 6 years ago

Did the Admin Panel page appear, was this error just in the logs?

valadas commented 6 years ago

Yes, I initially was trying on Dnn 9.3.0 nightly build, and created a brand new clean 9.2.2 instance to try to compare. It shows the Dnn generic error page with the return to site button (kinda 404 page I guess). The error was only in the admin log. I will try it tomorrow on Dnn 9.1.1 and keep you posted.

valadas commented 6 years ago

Oh, and yeah, I cleared cache, bumped CDV version, restarted app pool and even restarted iis for good measure :)

leedavi commented 6 years ago

OK, let me know what happens with 9.1.1. Maybe it's been introduced by something, or maybe I just missed it.

I'm currently trying to work out a better solution for DNN9 integration.

valadas commented 6 years ago

@leedavi Ok, I ran some more tests. It ends up that it was not because of Dnn 9.2, but the module does not work when using an object qualifier, and well I always use one in development and never on production, so no big deal here, but I will edit the title and description of the issue to reflect that...

leedavi commented 6 years ago

Strange, the SQL if defined to use object Qualifier. Can you be specific what has failed. Maybe there is some SQL update that has accidently dropped the qualifier.

valadas commented 6 years ago

I am not sure if it is an sql script, the install did not complain. My guess is that it is something in the datalayer somewhere that is not using the object qualifier since it only happens after the installation...

The only thing I know for now is that it fails during usage (not during installation) when the site uses an object qualifier...

valadas commented 6 years ago

I see this line:

return Convert.ToString(SqlHelper.ExecuteScalar(ConnectionString, CommandType.Text, commandText));

in the dataprovider implementation, all others use the object qualifier, probably some code elsewhere using this method to execute sql statements that are not accounting for the object qualifier.

leedavi commented 6 years ago

I've search through the core code for this and all calls to this function use the object qualifier.

Are you able to debug it?

At which point does it fail?

valadas commented 6 years ago

I did not have time to troubleshoot deeper but it happens as soon as I set the skin, hope it helps...

leedavi commented 6 years ago

OK thanks, I've had a quick look and nothing obvious. Does it work without the qualifier?

There is some issue with the personabar not being able to be removed in DNN9, so I have to hide it. It might be some sort of clash with that. I'm working on a different Admin Panel for OpenStore, but it won't be ready for a couple of months.

valadas commented 6 years ago

Yes without the object qualifier it works fine

leedavi commented 6 years ago

OK, good I'll be able to trace it then. I'll let you know.