This project has moved. For the latest updates, please go here.

Keep getting redirected to graffiti-setup

Sep 18, 2010 at 4:10 PM

I get to /graffiti-setup and I add a user (mgroves), click submit, and I see the graffiti-setup page again.  The user is created in the graffiti_Users table.

I go to /login and I see the login form, but after I enter my credentials, I'm once again directed to the graffiti-setup page.

What am I doing wrong?

Coordinator
Sep 20, 2010 at 6:21 AM

The only way that happens is if you haven't completed the initial setup of the site. Have you gone through the steps that the /graffiti-setup wizard takes you through?

Sep 20, 2010 at 7:20 AM

Well, like I said, I enter a user, click submit, and I'm right back on the same page.  That's the only step that I've seen.  If there are additional steps, I can't get to them.

Coordinator
Sep 20, 2010 at 10:41 AM

Now you mention it, I think I encountered the same thing setting up a new site yesterday.  I could go into /graffiti-admin/ fine, but If I tried to go to the rest of the site, it sent me straight back to the setup page.  I think it resolved itself when I created a new post.

I'm guessing there is some kind of caching issue going on - I'll try and reproduce later tonight or tomorrow and work out what's going on.

 

Coordinator
Sep 20, 2010 at 1:19 PM
mattgroves wrote:

Well, like I said, I enter a user, click submit, and I'm right back on the same page.  That's the only step that I've seen.  If there are additional steps, I can't get to them.

Sorry, I thought you meant that you were in the graffiti admin creating users, not in the setup process. If Alex doesn't find something, I'll see if I can dig around and come up with a solution tonight.

Sep 24, 2010 at 4:11 AM

This is pretty much a bump.

Any update on this issue?  I hate to be a bother, but if you could even point me in the right direction, I'd be glad to take a look at the code to see if I'm doing something wrong or if a patch needs written or something.

Coordinator
Sep 24, 2010 at 6:05 AM

Matt,

Sorry, I haven't had the chance to look into it. I'm definitely going to be doing some Graffiti stuff this weekend, and this'll be the first thing I look into.

Coordinator
Sep 24, 2010 at 3:15 PM

It sounds like the admin user is not getting saved to the DB--if there are any admin users the Graffiti Setup will automatically redirect you to the Graffiti Admin.

Which database are you using? Are you able to check the DB to determine if after clicking "Save Settings" if anything is getting added to the database?

Sep 24, 2010 at 3:19 PM

I'm using SQL 2008, and yes, the user is created in the graffiti_Users table.

Coordinator
Sep 24, 2010 at 3:22 PM
mattgroves wrote:

I'm using SQL 2008, and yes, the user is created in the graffiti_Users table.

When you setup the SQL database did you run BOTH the schema SQL script AND the data schema script?

Can you check in the DB to determine if the "Administrator" role exists, and then if the user you created is assigned that role?

Sep 24, 2010 at 3:27 PM

I ran both Graffiti_SQL_Data.sql and Graffiti_SQL_Schema.sql.

I don't see an 'Administrator' role anywhere.

  • graffiti_UserRoles table has no rows
  • graffiti_RolePermissions has three rows with RoleNames of gEveryone, gManager, gContributor
  • graffiti_RoleCategoryPermissions has no rows
Coordinator
Sep 24, 2010 at 3:40 PM

It seems there is an issue adding the user to the proper role then. The Graffiti Setup should add a row to graffiti_UserRoles assigning that new user to the proper admin role (whatever your web.config define; by default gAdmin).

Are you able to check the event logs on your machine to see if when you click "Save Settings" if there is any type of error? The page should catch any errors and display them on the page, but there is definitely something not happening right.

Coordinator
Sep 24, 2010 at 7:25 PM

This is what the workflow looks like, hopefully this may help track down where the issue is:

  1. The OnLoad event of the TemplatedThemePage does a check for the setting, InitialSetupCompleted -- if this flag is not set, you are redirected to ~/graffiti-setup/
  2. The Page_Load event of ~/graffiti-setup/default.aspx does a check again for that flag, if it is set you will be redirect to the homepage. If the flag is not set, all admin users are pulled from the database; if one exists the InitialSetupCompleted flag is set and you are redirected to the homepage.
  3. By getting this far, you know the InitialSetupCompleted flag is not set and there are no admin users in the database. The setup page is displayed for user entry.
  4. When the "Save Settings" button is clicked, a user is created in the database and assigned to the EveryoneRole. This user is then added to the AdminRole. Site settings are saved and you are redirect to the Graffiti Admin. If an exception is thrown during that save process you should remain on the setup page and the error should be displayed.

Based on the behavior you are reporting, and the fact there are no rows in the graffiti_UserRoles table it seems to be there is an exception happening during the save process, but for some reason it is not being show/displayed properly. Which is why you remain on the Graffiti Setup page. Otherwise, it would go ahead and redirect you to the Login page which from my understanding it is not.

Have you tried deleting the user it did create in the DB and trying again?

Sep 25, 2010 at 1:40 AM

Some more information, hopefully this will help:

I set some breakpoints, and indeed the InitialSetupCompleted property is 'false'.

An exception does indeed occur that is not indicated on the web page.  It's a SQL exception:

"The INSERT statement conflicted with the FOREIGN KEY constraint "FK_graffiti_UserRoles_graffiti_Users". The conflict occurred in database "GraffitiCMS", table "dbo.graffiti_Users", column 'Id'. The statement has been terminated."

Here is the SQL command that caused the exception:

INSERT INTO [graffiti_UserRoles] ( [UserId] , [RoleName]) 
VALUES ( @UserId , @RoleName);
SELECT SCOPE_IDENTITY() as [Next_ID]

In this case, @UserId was 0 and @RoleName was 'gEveryone'.

I actually could not find the foreign key constraint while looking at the database in SQL Studio; there are no constraints on graffiti_UserRoles.

Sep 25, 2010 at 1:42 AM

Also, I tried deleting all rows from the graffiti_Users table and trying again, and I'm still getting the same issue.

Sep 25, 2010 at 4:22 PM

One more update: I just tried installing Graffiti on another computer (my laptop), this time with VS2010 and using Cassini, and everything seems to work fine.  Kinda frustrating, because I don't really know that I did anything radically different.

Sep 26, 2010 at 12:38 AM

Another update (I need a better hobby maybe?):

The difference appears to be that I originally used 'trunk' instead of the 1.3 branch to install the site.  When I install from the 1.3 branch, everything goes without a hitch.  So, I don't know what the technical difference is, but that appears to be the solution.

Coordinator
Sep 26, 2010 at 5:11 AM

Well, that definitely gives us a better idea as to where the problem lies. The trunk is the "in-development" 2.0 version, and I know some people here have been working on some pretty big changes there. I definitely wouldn't recommend using the trunk for any active site. Not even I'm brave enough to do that just yet.

Based on all of your previous emails, here's what I see:

  • The foreign key should definitely be there. It's there in the database that I checked and in the SQL script stored in the source here (both the trunk and 1.3 branch). Not sure why you don't see it in SQL Management Studio, because if it isn't there, you shouldn't get that error.
  • The gEveryone user is not being created properly in the trunk. This is an issue that should be looked at.
  • SQL errors in the setup process are not getting propagated properly. This is also an issue that should be looked at.

I'll submit new issues for these two items so we can make sure they get fixed in the code.

Glad you were able to get it up and running, be sure to let us know how it all goes for you and also let us know if you run into any more issues.

Oct 26, 2010 at 1:57 PM

I had the exact same issue at Mattgroves. I wiped out everything and started over again with the the code from Branch.

I can now get past the Setup page and get to the Graffiti Admin login page. I login, but the site never leaves the Login page. The site sits and spins continuously on Login. I never see the Admin page. I can browse to base site directly, but can't get to the control panel.

I'm running on Windows XP Pro. I've seen posts about changing a setting in the Admin > Setting Option area (or similar), but I can't get there to try that;

This is hugely frustrating. I'm 2 hours into this so far. I've been using Graffiti since 1.1 and have setup numerous sites before. Why this is so difficult is beyond me.

Thanks for the help.

Coordinator
Oct 26, 2010 at 2:06 PM

If you leave it log enough do you ever get an error? Can you check the Event Viewer for any errors? Have you tried attaching a debugger from Visual Studio to see where the code might be hanging?

Oct 26, 2010 at 2:13 PM

I have this in the event log.

I haven't put a trace in the debugger on it.

 

Event Type:    Warning
Event Source:    ASP.NET 2.0.50727.0
Event Category:    Web Event
Event ID:    1309
Date:        10/26/2010
Time:        8:45:31 AM
User:        N/A
Computer:   
Description:
Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 10/26/2010 8:45:31 AM
Event time (UTC): 10/26/2010 12:45:31 PM
Event ID: 38e9dac79dfa42569131697e3c68aedc
Event sequence: 18
Event occurrence: 1
Event detail code: 0
 
Application information:
    Application domain: /LM/W3SVC/1/Root/GraffitiCMS13-1-129325703331250000
    Trust level: Full
    Application Virtual Path: /GraffitiCMS13
    Application Path: C:\Inetpub\wwwroot\GraffitiCMS1.3\
    Machine name:
 
Process information:
    Process ID: 2356
    Process name: aspnet_wp.exe
    Account name:
 
Exception information:
    Exception type: SqlException
    Exception message: Violation of UNIQUE KEY constraint 'IX_graffiti_ObjectStore_Name'. Cannot insert duplicate key in object 'dbo.graffiti_ObjectStore'.
The statement has been terminated.
 
Request information:
    Request URL: http://localhost/GraffitiCMS13/graffiti-admin/default.aspx
    Request path: /GraffitiCMS13/graffiti-admin/default.aspx
    User host address: 127.0.0.1
    User:
    Is authenticated: True
    Authentication Type: Forms
    Thread account name: \ASPNET
 
Thread information:
    Thread ID: 8
    Thread account name: \ASPNET
    Is impersonating: False
    Stack trace:    at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
   at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
   at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
   at System.Data.SqlClient.SqlDataReader.ConsumeMetaData()
   at System.Data.SqlClient.SqlDataReader.get_MetaData()
   at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
   at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
   at System.Data.SqlClient.SqlCommand.ExecuteScalar()
   at DataBuddy.DataProvider.ExecuteScalar(QueryCommand cmd) in C:\Download\Graffiti Open Source\graffiticms-57274\Branches\v1.3\src\DataBuddy\DataProvider.cs:line 197
   at DataBuddy.DataProvider.Insert(Table table, List`1 parameters) in C:\Download\Graffiti Open Source\graffiticms-57274\Branches\v1.3\src\DataBuddy\DataProvider.cs:line 64
   at DataBuddy.DataService.Insert(Table table, List`1 parameters) in C:\Download\Graffiti Open Source\graffiticms-57274\Branches\v1.3\src\DataBuddy\DataService.cs:line 54
   at DataBuddy.BaseDataObject.Save(String username, DateTime modifiedTime) in C:\Download\Graffiti Open Source\graffiticms-57274\Branches\v1.3\src\DataBuddy\BaseDataObject.cs:line 149
   at DataBuddy.BaseDataObject.Save() in C:\Download\Graffiti Open Source\graffiticms-57274\Branches\v1.3\src\DataBuddy\BaseDataObject.cs:line 125
   at Graffiti.Core.FeedManager.AddFeed(Feed feed) in C:\Download\Graffiti Open Source\graffiticms-57274\Branches\v1.3\src\Graffiti.Core\Util\FeedManager.cs:line 30
   at Graffiti.Core.FeedManager.GetFeed(String url, Boolean throwExceptionOnError) in C:\Download\Graffiti Open Source\graffiticms-57274\Branches\v1.3\src\Graffiti.Core\Util\FeedManager.cs:line 126
   at ASP.graffiti_admin_default_aspx.GetFeedItems(String url) in c:\Inetpub\wwwroot\GraffitiCMS1.3\graffiti-admin\Default.aspx:line 187
   at ASP.graffiti_admin_default_aspx.Page_Load(Object sender, EventArgs e) in c:\Inetpub\wwwroot\GraffitiCMS1.3\graffiti-admin\Default.aspx:line 160
   at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e)
   at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e)
   at System.Web.UI.Control.OnLoad(EventArgs e)
   at System.Web.UI.Control.LoadRecursive()
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
 
 
Custom event details:

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

Coordinator
Oct 26, 2010 at 2:22 PM

This is not a fix, but will help in troubleshooting. Try commenting out lines 160-164 of /graffiti-admin/Default.aspx

After doing so. Let me know if you are able to get into your Graffiti control panel.

Oct 26, 2010 at 3:39 PM

It seems to be hanging here:

 

            XmlDocument document = new XmlDocument();
            document.Load("http://extendgraffiti.com/currentversion.xml");

 

In the AdminMasterPage.master. (lines 124-125).

I pasted the url --  http://extendgraffiti.com/currentversion.xml -- into my browser and it also hangs.

Coordinator
Oct 26, 2010 at 3:46 PM

Ah, the extendgraffiti.com site seems to be down right now. :(  I'd recommend just changing those URLs to something else, or commenting them out. You shouldn't loose any real functionality.

Coordinator
Oct 26, 2010 at 4:01 PM
VTPyzon wrote:

I pasted the url --  http://extendgraffiti.com/currentversion.xml -- into my browser and it also hangs.

I've contacted Kevin to see what we can do to get extendgraffiti.com back online ASAP.

Oct 26, 2010 at 4:15 PM

Why is there a dependency on extendgraffiti.com?

Coordinator
Oct 26, 2010 at 4:24 PM

It is open source so you are free to change those URLs to anything you'd like. Kevin has hosted a site which has some meta information about Graffiti and the marketplace, but even the marketplace plugin has been checked in so you are free to host your own marketplace.

It is a "soft" dependency really. The amount of time the admin hangs depends on your timeout settings, no functionality is lost.

Down the road I can see the code being changed to reach out to the CodePlex project for version info and latest news, but that's just not how it is right now. Feel free to adjust and submit a patch, or make a feature request if you feel this is a better approach.

Oct 26, 2010 at 4:38 PM

Okay, that makes sense.  It should probably be a config-file setting then, do you think?

Coordinator
Oct 26, 2010 at 4:39 PM

Yeah, that would be a really good idea. Pretty sure the Marketplace URL is, so this would be a good item to change to be as-well.

Coordinator
Oct 26, 2010 at 5:38 PM

OrcsWeb is a huge supporter of Graffiti CMS and has donated free hosting for the project. I've extended the offer to Kevin to migrate extendgraffiti.com for more stable hosting.

In the meantime, I setup http://graffiticms.co and the XML file with the version info. If you change the URL on line 125 of /graffiti-admin/common/AdminMasterPage.master to http://graffiticms.co/currentversion.xml you should be able to get the admin page to load. I did this because I had production sites I needed to be able to get into right away.

I'll likely upload Graffiti and setup the marketplace plugin which should allow the feed URL found on the dashboard to be updated as-well. I like Kevin's extendgraffiti so it is an open offer for that site to take over the account at anytime, I just needed something now that I can count on being up for my production sites.

Coordinator
Oct 26, 2010 at 5:45 PM

Hey guys, just got the DM from Jeremy. Sorry about that, looks like there's an issue with my server that ExtendGraffiti.com is on and all my sites on there are having a bad day. :(  Unfortunately I can't RD into them from my work box so will have to wait until this evening.

Jeremy, I'll definitely take you up on your offer to have OrcsWeb host & own the site. I haven't had time lately to do much of anything with that site and don't want any downtime on my end to affect Graffiti. I'm sure OW will be much more reliable than my current server at The Planet.

That said, it sucks that this is causing issues in the admin.  We should make the dependency "softer" :)   Maybe reduce the timeout value, and even better load the announcements and meta info via ajax so it doesn't affect the admin page load time.  And agree all built-in external url sources should be configurable. The Marketplace URL is configurable but the RSS feed urls in the admin console home page are not AFAIK.

Coordinator
Oct 26, 2010 at 8:15 PM

ExtendGraffiti.com is back up and running now. I got the server issue resolved for the time being. But I'll still get it migrated over to OrcsWeb hosting this evening.