Skip to content
This repository has been archived by the owner on Oct 6, 2019. It is now read-only.

This is issue about Manage ->Sites #177

Closed
Sillymonkey opened this issue Nov 28, 2018 · 1 comment
Closed

This is issue about Manage ->Sites #177

Sillymonkey opened this issue Nov 28, 2018 · 1 comment

Comments

@Sillymonkey
Copy link

Sillymonkey commented Nov 28, 2018

I was trying to manage ->site in PersonaBar and encountered an error which said "There was an error retrieving your content. Please check internet connection.". I checked the console from the browser and it gave me more info about the error.

Note: PortalgroupId must be -1

<Error>
<Message>An error has occurred.</Message>
<ExceptionMessage>
Conversion failed when converting the nvarchar value 'logo.png' to data type int.
</ExceptionMessage>
<ExceptionType>System.Data.SqlClient.SqlException</ExceptionType>
<StackTrace>
at System.Data.SqlClient.SqlConnection.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.TryHasMoreRows(Boolean& moreRows) at System.Data.SqlClient.SqlDataReader.TryReadInternal(Boolean setTimeout, Boolean& more) at System.Data.SqlClient.SqlDataReader.Read() at DotNetNuke.Common.Utilities.CBO.FillListFromReader(Type objType, IDataReader dr, IList objList, Boolean closeReader) at DotNetNuke.Common.Utilities.CBO.FillCollection(IDataReader dr, Type& objType, Int32& totalRecords) at DotNetNuke.Entities.Portals.PortalController.GetPortalsByName(String nameToMatch, Int32 pageIndex, Int32 pageSize, Int32& totalRecords) at Dnn.PersonaBar.Sites.Services.SitesController.GetPortals(Int32 portalGroupId, String filter, Int32 pageIndex, Int32 pageSize)
</StackTrace>
</Error>

Ok, so there must be something wrong with the "Dnn.PersonaBar.Sites.Services.SitesController.GetPortals(Int32 portalGroupId, String filter, Int32 pageIndex, Int32 pageSize)" Method which lead me to the GetPortalsByName Procedure. The sql code looks fine but when I ran it gave me the error in this particular t-sql

SELECT  *
		FROM	dbo.vw_PortalsDefaultLanguage p, #PageIndexForPortals i
		WHERE  p.PortalId = i.PortalId
		AND i.IndexId >= @PageLowerBound AND i.IndexId <= @PageUpperBound
ORDER BY p.PortalName

So I fixed the code with this t-sql

SELECT  *
		FROM	dbo.vw_PortalsDefaultLanguage where PortalID in
		(select PortalID from #PageIndexForPortals where IndexId >= @PageLowerBound AND IndexId <= @PageUpperBound)
	

Hope this helps!

@valadas
Copy link
Contributor

valadas commented Jan 22, 2019

I think this was resolved with dnnsoftware/Dnn.Platform#2522 if not please open a new issue. You can test (in a non production environment only) using the latest nightly build available at https://www.dnnsoftware.com/platform/build/nightly-builds

@valadas valadas closed this as completed Jan 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants