404 - The resource was not found

Jul 1, 2013 at 6:02 PM
Edited Jul 1, 2013 at 6:04 PM
  1. Installed and enabled MailChimp on a working Orchard 1.6.1 installation
  2. Created an API Key at MailChimp.com, set in Orchard Dashboard
  3. Created a new MailChimp Subscription page
  4. Filled in title, permalink, and both HTML bodies, enabled & labeled a menu item
  5. Attempted to save the page and immediately got the response:
Your Mailchimp Subscribe Page has been created.
The resource was not found;
I have successfully installed on an Azure Website as a test, but this is failing with a target of LOCALHOST. Is that possibly the problem? I don't want to publish remotely until I know that the page will work correctly.

Thanks for any assistance.
Jul 1, 2013 at 7:01 PM
Can you see your new subscribe page on the contents list. (Admin menu / Content)?

If so, when you click the link to see the edit page, does this work okay?

If it does what is the permalink for the page? Does it look correct and is it unique?
Jul 1, 2013 at 7:38 PM
Edited Jul 1, 2013 at 7:39 PM
Hello Richard, and thanks for the prompt response.

On the site upon which MailChimp is failing, MailChimp Subscribe Page is present under content, but clicking it yields an empty list, as shown in this screenshot:


I can repeat the creation process ad nauseum without ever getting a different response.
Jul 1, 2013 at 7:48 PM
Edited Jul 1, 2013 at 7:49 PM
You got me at a good moment, but I'm off for the day soon.

Just tested and I was able to install this Mailchimp module and create a subscribe on a clean install of Orchard 1.6.1.

Were you able to see and select your mailing list from the 'Select your MailChimp list' bit?

And, are there any useful errors in the log? (Log files should be in App_Data/Logs)
Jul 1, 2013 at 7:59 PM
There are some upate errors in the MailChimp module

Here's a sampling of the errors in the log file:
at Orchard.ContentManagement.Drivers.ContentShapeResult.ApplyImplementation(BuildShapeContext context, String displayType) in c:\Users\seb2013-07-01 10:43:57,032 [30] NHibernate.AdoNet.AbstractBatcher - Could not execute command: UPDATE NogginBox_MailChimp_FormRecord SET ListId = @p0, Message = @p1, ThankyouMessage = @p2 WHERE Id = @p3
System.Data.SqlServerCe.SqlCeException (0x80004005): The data was truncated while converting from one data type to another. [ Name of function(if known) =  ]
   at System.Data.SqlServerCe.SqlCeCommand.ProcessResults(Int32 hr)
   at System.Data.SqlServerCe.SqlCeCommand.ExecuteCommandText(IntPtr& pCursor, Boolean& isBaseTableCursor)
   at System.Data.SqlServerCe.SqlCeCommand.ExecuteCommand(CommandBehavior behavior, String method, ResultSetOptions options)
   at System.Data.SqlServerCe.SqlCeCommand.ExecuteNonQuery()
   at NHibernate.AdoNet.AbstractBatcher.ExecuteNonQuery(IDbCommand cmd)
2013-07-01 10:43:57,108 [30] NHibernate.Util.ADOExceptionReporter - The data was truncated while converting from one data type to another. [ Name of function(if known) =  ]
2013-07-01 10:43:57,109 [30] NHibernate.Event.Default.AbstractFlushingEventListener - Could not synchronize database state with session
NHibernate.Exceptions.GenericADOException: could not update: [NogginBox.MailChimp.Models.FormRecord#81][SQL: UPDATE NogginBox_MailChimp_FormRecord SET ListId = ?, Message = ?, ThankyouMessage = ? WHERE Id = ?] ---> System.Data.SqlServerCe.SqlCeException: The data was truncated while converting from one data type to another. [ Name of function(if known) =  ]
The complete log is available in the folder at MailChimp Folder
Jul 2, 2013 at 9:00 AM
You didn't say if you could see and select your mailing list from the 'Select your MailChimp list' bit?

From the error it looks like the data getting sent for ListId, Message or ThankyouMessage is in a format that the database can't save. Can you work out what ListId you're passing?
Jul 2, 2013 at 3:25 PM
Yes. There is only one mailing list and it is listed and the radio button is selected.

As for debugging the values being passed, I'm not able to do that yet. Part of this project is evaluating whether Orchard is ready to be used as a user rather than a developer; currently it is set up on a machine with no development tools beyond WebMatrix.

The site is small enough that I can still create a new Orchard installation and reproduce everything by hand when v1.7 is released. I made the mistake of setting up the blog to use Markdown and have to manually copy/paste the HTML into blog entries with the HTML flavor anyway. Unless you really want to dig into this, I'll consider it a throwaway.
Sep 28, 2013 at 8:58 PM
Same thing is happening on a installation, both at *.azurewebsites.net and on LOCALHOST. The module has worked once for me and failed twice. Are you able to get it working on recent Orchard builds?
Sep 29, 2013 at 8:28 AM
It works fine on the latest Orchard builds. Although there are some good bug fixes in Orchard 1.7.1 that are worth upgrading for.

If the error message in the logs is still the same; There is something wrong with either the ListId, Message, or Thankyou message.

Try limiting the Message and thank you message to just the word 'test' and see if that works. They could be too long, or include strange characters that upset the database.

If that doesn't fix it, work out what your list id is and let me know. It could be a type of id that I wasn't expecting and is uncommon.
Oct 1, 2013 at 9:28 PM

You are correct – it appears to be somewhat severely length-limited. I was busy this weekend with what you would logically call ‘football’ (and I would for some reason call ‘soccer’), but took a look this morning.

I thought it might be related to me including a link to the RSS link for the same domain as the MailChimp page, but then I got the same crash just using 256 bytes of “lorem ipsum” as the sign-up text, and ‘Thanks’ for the thanks text.

Oct 3, 2013 at 9:17 AM
I've checked the DB records created by the module. I haven't set column lengths explicitly so they've been set to the default which is 255 bytes. So hopefully if you were to generate 255 bytes of lorem ipsum it should work fine.

This is a bit short, so when I get a spare moment I'll increase the size. In the meantime you should be able to directly alter the column widths in the DB. The table you want to be looking at is NogginBox_MailChimp_FormRecord.
Oct 9, 2013 at 6:13 PM
I can work around the limitation. The more concerning part is that the site upon which the failed subscribe page was created, then replaced with a working one, is now basically read-only. The site displays fine in the client browser, but when attempting to edit existing pages or create new ones, the HTML Editor always shows up without content, and without any save/update button. This has persisted across replacing TinyMce with TinyMceDeluxe, subsequently removing TinyMceDeluxe and enabling TinyMce, and finally upgrading from 1.7.0 to 1.71.

This is not specifically aimed at your module, but I'm having difficultly maintaining faith that Orchard will ever be anything more than a developer-intensive system at this point, of little use to tech-literate, non-programmers.
Oct 10, 2013 at 10:19 AM
Orchard will become more useful to non-programmers as programmers extend it more and provide more modules. It's early days.

I can't think why the problem with field lengths would cause this problem. If Orchard fails to complete a full page render it's normally because an error has happened and this will be in the logs.

I've worked with a lot of CMSs (both .NET and PHP) and I've not found one that is immune to being broken by third party modules. The only way to keep yourself safe from that is by keeping a regular backup.
Oct 10, 2013 at 4:10 PM

The HTML problem turned out to be due to another family member updating to IE11 - as soon as I pressed F12 to go into the developer tools, I knew something was funky. In default mode, any and all sites, including a clean install of 1.7.1, have the issue. You have to go into IE10 emulation mode to prevent this. I'm gonna try to scan the Orchard DB to see if this is known issue.

As for the usability comments, I still feel that way. IMO, the developers are working on some really cool inner mechanics, but the tools which make the system more usable to web designers are not showing up. A module to create/integrate calendars, while not part of the core CMS, seems essential to make the system more easily usable to more people, for instance. Sadly, I'm not qualified to create such a module.
Oct 10, 2013 at 4:14 PM
I can't help you with the calendar thing, but I'm working at the moment to upgrade this module for 1.7.1. Found some other problems and trying to get my head round them at the moment.
Oct 10, 2013 at 6:58 PM
I've increased the field lengths and added data validation to check them. The new version is now live in the Orchard Gallery.
Oct 12, 2013 at 12:35 AM
Thanks, I will update the site to 1.7.1 and update your module this weekend. If all goes well, I'll be upgrading the review on CodePlex as well.

Your responsiveness and helpfulness have been outstanding.