Developer forum

Forum » Development » Problem attaching custom module to paragraph

Problem attaching custom module to paragraph

Aki Ruuskanen
Reply
Hi,

I have a very simple custom  module that simply renders a ul/li list. I have done similar thing many times in DW 7.x, but now in DW8 when i try to attach the module to a paragraph the progress spinner just keeps spinning and nothin happends.

Code for the  module below. It is registered in DW with system name "CategoryListing". Any ideas?

 
   [AddInName("CategoryListing")]
    public class CategoryList : ContentModule
    {
        public override string GetContent()
        {
            NewsCategoryCollection ncc;
            StringBuilder content;            

            ncc = NewsCategory.GetNewsCategorys();
            content = new StringBuilder();
            content.Append("<div id='bloggcategorylist'><ul>");

            foreach(NewsCategory nc in ncc)
            {
                content.Append(String.Format("<li><a href='/Default.aspx?ID=7&categoryid={0}'>{1}</li>", nc.ID, nc.Name));
            }
            
            content.Append("</ul></div>");

            return content.ToString();
        }
    }
 

Replies

 
Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply
This post has been marked as an answer
Hi Aki,

I had the same issue a few times during a training session I gave last week. It seemed that recompiling the application / restarting IIS and then logging into Dynamicweb again seemed to do the trick for us.

Obviously, that's not a great work around, but can you confirm it works for you as well? That may help Dynamicweb reproducing this issue.

Cheers,

Imar
Votes for this answer: 0
 
Pavel Volgarev
Reply
Hi Aki,

There might be some server-side exceptions on your module edit page that you simply don't see because of the spinning wheel (which "waits" for the hidden frame to successfully load).

You can try one of the following:

  1. Open your edit page in new window (by typing the URL directly).
  2. Inspect the response from the hidden frame using Fiddler.
-- Pavel

 
Aki Ruuskanen
Reply
 Actually only logging out and in again solved it. Good to know!

Thanks for your help Imar and Pavel. You have solved many problems for me lately. :)

/Aki

 
Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply
Actually only logging out and in again solved it. Good to know!
Sounds like a bug to me. I'll see if I can have this reported and hopefully fixed....

Imar
 
Merethe Nielsen
Reply

Hi

We have created an investigation issue to find out, what is happening.
The investigation issue has number 8174.

Kind regards,
Merethe
 
Merethe Nielsen
Reply

Hi Aki

I guess that you your custom code is working because the developer said that:
...your source code cannot be compiled with references to Dynamicweb 8 dlls.The reason is that type NewsCategory no longer contains method named GetNewsCategorys() - use GetAllCategoryList() instead.Also this type no longer contains Name property - use NewsCategoryName instead.

But we are checking the issue with attaching custom modules to a paragraph.

Kind regards,
Merethe
 
Nicolai Høeg Pedersen
Reply
Hi

We've investigated this issue further and cannot reproduce it - only on modules that give an exception on the _edit.aspx screen.

If anyone have further information in this matter, feel free to post and we will have a further look.

 
Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply
Hi Nicolai,

I can consistently reproduce it if I follow the steps in the Dynamicweb CMS backend training material where you set up Dynamicweb and add a custom module.

I am using Windows 7 and run as a 32 Bit application if that helps.

Imar

 
Nicolai Høeg Pedersen
Reply
Will send it off again...

 

You must be logged in to post in the forum