Hi all,
I have upgraded MSPcontrol to SolidCP, all the tasks were succeeded and I could login to SolidCP as administrator, but when I want to click Hosting Plans menu (Account Menu > Hosting Plans) , I'm getting an error like this :
I didn't understand how to solve this error.
Please tell me how to fix this menu.
Thank you
Best Regards
I Made
Hey,
Can you try run this in MsSQL Management studio against the SolidCP database:
DROP PROCEDURE [dbo].[GetHostingPlans]
GO
CREATE PROCEDURE [dbo].[GetHostingPlans]
(
@ActorID int,
@UserID int
)
AS
-- check rights
IF dbo.CheckActorUserRights(@ActorID, @UserID) = 0
RAISERROR('You are not allowed to access this account', 16, 1)
SELECT
HP.PlanID,
HP.UserID,
HP.PackageID,
HP.PlanName,
HP.PlanDescription,
HP.Available,
HP.SetupPrice,
HP.RecurringPrice,
HP.RecurrenceLength,
HP.RecurrenceUnit,
HP.IsAddon,
(SELECT COUNT(P.PackageID) FROM Packages AS P WHERE P.PlanID = HP.PlanID) AS PackagesNumber,
-- server
ISNULL(HP.ServerID, 0) AS ServerID,
ISNULL(S.ServerName, 'None') AS ServerName,
ISNULL(S.Comments, '') AS ServerComments,
ISNULL(S.VirtualServer, 1) AS VirtualServer,
-- package
ISNULL(HP.PackageID, 0) AS PackageID,
ISNULL(P.PackageName, 'None') AS PackageName
FROM HostingPlans AS HP
LEFT OUTER JOIN Servers AS S ON HP.ServerID = S.ServerID
LEFT OUTER JOIN Packages AS P ON HP.PackageID = P.PackageID
WHERE
HP.UserID = @UserID
AND HP.IsAddon = 0
ORDER BY HP.PlanName
RETURN
GO
Hi Trevor,
Thanks for your quick replied.
I have ran and the query was completed, but I'm still getting an error like before.
Is there another query to fix this error ?
Thank you
Best Regards
Looking at the code this one may need running also:
DROP PROCEDURE [dbo].[GetUserSettings]
GO
CREATE PROCEDURE [GetUserSettings]
(
@ActorID int,
@UserID int,
@SettingsName nvarchar(50)
)
AS
-- check rights
IF dbo.CheckActorUserRights(@ActorID, @UserID) = 0
RAISERROR('You are not allowed to access this account', 16, 1)
-- find which parent package has overriden NS
DECLARE @ParentUserID int, @TmpUserID int
SET @TmpUserID = @UserID
WHILE 10 = 10
BEGIN
IF EXISTS
(
SELECT PropertyName FROM UserSettings
WHERE SettingsName = @SettingsName AND UserID = @TmpUserID
)
BEGIN
SELECT
UserID,
PropertyName,
PropertyValue
FROM
UserSettings
WHERE
UserID = @TmpUserID AND
SettingsName = @SettingsName
BREAK
END
SET @ParentUserID = NULL --reset var
-- get owner
SELECT
@ParentUserID = OwnerID
FROM Users
WHERE UserID = @TmpUserID
IF @ParentUserID IS NULL -- the last parent
BREAK
SET @TmpUserID = @ParentUserID
END
RETURN
GO
Hi,
I was trying to run this query also, but an error still exist.
Can you give me another query that should I try ?
I got this error when I click Hosting Plans menu on the first page logged in.
Steps :
- Login to our panel
- Click Account menu > Hosting Plans
and I'm getting an error.
Please help me again, and sorry for disturbing.
Thank you
Best Regards