Developer forum

Forum » Development » New Module
José Silva
Reply
Good Day,

I'm trying to create a new Dynamicweb Module but after include it inside the paragraph, show this error:

"Module attached, edit file cannot be found"

The _Edit.aspx is included.


Thanks for your help.


Replies

 
Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

Hi José,

How did yo set things up? E.g. how did you call the module, where did you save its files and how did you register it? Take a look here for more details about creating custom modules:

http://devierkoeden.com/articles/custom-modules-part-2-7-steps-to-building-a-custom-module-background.aspx
http://devierkoeden.com/articles/custom-modules.aspx

Cheers,

Imar


 
José Silva
Reply

Hi José,

How did yo set things up? E.g. how did you call the module, where did you save its files and how did you register it? Take a look here for more details about creating custom modules:

http://devierkoeden.com/articles/custom-modules-part-2-7-steps-to-building-a-custom-module-background.aspx
http://devierkoeden.com/articles/custom-modules.aspx

Cheers,

Imar


Thank you!

The problem was a mess with the namespace.

Creating new modules using the Dynamicweb templates you'll have troubles with the namespace, be careful.

 
Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply
Can you elaborate a bit on that? What issues did you encounter? And did you install the latest templates? Some time ago I did a review of the template system and submitted a number of suggestions that have all been taken care off. There might be other issues that I overlooked though....

Imar
 
Morten Snedker
Reply
 I'll just poke this thread, to see if we can have an answer to Imaar's last question. If we have errors in our VS templates we'd like to have them fixed. :-)

Regards

Morten Snedker

 
José Silva
Reply
 I'll just poke this thread, to see if we can have an answer to Imaar's last question. If we have errors in our VS templates we'd like to have them fixed. :-)

Regards

Morten Snedker
 

Hello, sorry for the delay.

Are the namespaces, after use the template and choose a name for your project the error happens.

Even after rename your project, everything still calling the "CustomModules" namespace.

Using the Visual Studio wizard for change the namespaces names easily doesn't work, you need do it manually.

Please check the files included, is a simple way to show the error.

I hope help you with this information, if somebody need something else, just ask.


Thanks for your help.

 
Lanzo van Slooten
Reply

I have the same problem and als changing namespaces does not solve it.

See capture.jpg for how I registered the module.

In the other zip is CustomModule solution.

I hope someone can help!!

Best Regards,
Lanzo van Slooten
Capture.JPG
 
Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply
Hi Lanzo,

How did you set up the solution? Did you follow my article? The code looks fine to me, so I don't see a reason why it wouldn't work (haven't been able to test it yet, though). Does the assembly of this project end up in the solution's bin folder? And is the CustomModules folder addressable as well? In other words, is the solution you uploaded the root of the site in IIS?

Imar
 
Lanzo van Slooten
Reply

Hello Imar

I also used the example from your arcticle and that gave the same message.

I build the dll's in the bin folder of DynamicWeb and the aspx pages are stored in the custommodules folder.

From the Modules menu I can click on the custom module and then the edit page is opened.

greetings,
Lanzo
 
Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply
Not sure I understand...

>> From the Modules menu I can click on the custom module and then the edit page is opened.

The edit page shouldn't be accessible there in the main Modules list you see when you click Modules in the Main Menu. The _Edit page should only be shown when adding a module to a paragraph, not when opening the module from the main Module list (the module shouldn't even be clickable in the Module list if you haven't registered a script for the module).

So, something else must be wrong. I just downloaded your example and added it to an IIS site. I then registered the module and it works fine. Can you provide access to an on-line URL to test things out, or provide more information about your setup (paths on disk, settings in IIS, version of IIS, settings of the application pool, the exact error message you're getting, the verison of DW you're using  and so on?)

Cheers,

Imar
 
Lanzo van Slooten
Reply

I solved the problem. I deployed the aspx to the folder Module/CustomModules/<Module Name>. I changed this to Module/<Module Name> and it works.
 
Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply
That's not how it should be. Maybe you're not deploying to your custom project, but to Dynamicweb's Admin folder? Did you set up your project specifically for custom modules? Can you post a screenshot of your solution on disk in Windows Explorer?

Imar

 

You must be logged in to post in the forum