I installed your package. I made an Dutch root node (called "nl") and then made a copy of it called "en" for English (I checked 'Relate copied items to original').
Then I added hostnames to both root nodes: *.nl and *.com and added the right languages to both nodes.
At the short documentation you write: The package includes
CopyDocumentToRelatedOnPublish.cs in /app_code. This Document OnPublish
event handler will automatically create a copy of the new Document to
all other language nodes and relates them.
However, I can't get this to work. If I create a new page within one of the root nodes, it isn't copied to the other root node. I can make a copy by hand for every subpage, but then on my website the language switch doesn't switch domains. For instance, when I'm at the Dutch site at *.nl/over-ons/, the language switch links to *.nl/about/ instead of .com/about/.
could be that the CS files in your app_code aren't compiling. I remember this happening when there is a problem with a DLL that is not loading properly. Are you working from a clean install? Could it be that you have some legacy DLL's from previous umbraco versions or packages?
Yes, I did a clean install last week. Normally I could try to overwrite te bin folder with the latest download, but I see 4.7.1.1 has been released, and can't find the download of 4.7.1 anymore... Furthermore I haven't installed any packages yet, besides yours and Relation Types.
To be honest I don't want to do a new installation if there still is another option, because I did quite some work in this site now.
to me it sounds like its not related to this package but to the fact that code in your app_code is not executed. To figure out why you'll either have to debug or find the thread where this is discussed on our (don't remember where). Sorry I can't help you more.
Thanks for your help so far. :-) I just tried it with a simple file:
public class Test { public static string HelloWorld() { return "Hello world"; } }
And when I call this in the masterpage, it IS executed.
<% Response.Write(Test.HelloWorld()); %>
So it seems only the code of your package isn't executed. Because the steps I do (as described a few posts ago), is right? Maybe I have to try a new installation of Umbraco after all...
I deleted all pages again. Installed your package again. Created the nodes again. And everything is working as it should be now.
I guess indeed there was something wrong with a file. Maybe deleted a file, a corrupt file, I don't know... But I'm glad it works now. Thanks for your help :-)
Hm, I cheered too soon. This morning it didn't work again. And couldn't get it to work anymore.
So finally I did a complete new Umbraco installation, exported my document types from the old site, imported them in the new one. And installed just your package. Nothing else. Result: still not working.
Very, very strange, because this is a clean Umbraco installation. So I'm wondering if more people got problems with this package. I think I'm going to make a manual link between two pages now, because I spend already two days to this problem.
Sorry to say but I got the same problem, clean 4.7.1.1 installation with six languages.
I am doing all steps and when I am trying to create a new node doesn't get copied to the related, no errors, nothing at the log table. Just to mention that I am under a subdomain record, there is no domain at this account at the moment so I have a single dns record that works for as long as the development will take place so the hostnames are based on the subdomain. As far as I understand there is no problem with this and your code, just confirm please!
Any other directions from Rick on how he finally proceed with his project would be great!
My razor code is not too complicated so I think you should be able to debug it fairly easily. I haven't ran into this problem and can't reproduce it unfortunately.
I think that I know what the problem was. I had both a local version and and a version on our develop machine. Usually I work local and publish the changed files to the develop server, but I think this gave some problems with the App_Data-folder. Or other caching files... Since I'm working directly on the developmachine (where I also got two physical domains, .com.dev and .nl.dev), I've got no problems anymore!
Finally worked for me too, actually I compile the cs file and drp the dll to the bin folder and everything is working fine so far! It seems that the cs code didn't execute properly from the App_Code folder, weird isn't it?
can't get it to work
Hi,
I installed your package. I made an Dutch root node (called "nl") and then made a copy of it called "en" for English (I checked 'Relate copied items to original').
Then I added hostnames to both root nodes: *.nl and *.com and added the right languages to both nodes.
At the short documentation you write:
The package includes CopyDocumentToRelatedOnPublish.cs in /app_code. This Document OnPublish event handler will automatically create a copy of the new Document to all other language nodes and relates them.
However, I can't get this to work. If I create a new page within one of the root nodes, it isn't copied to the other root node. I can make a copy by hand for every subpage, but then on my website the language switch doesn't switch domains. For instance, when I'm at the Dutch site at *.nl/over-ons/, the language switch links to *.nl/about/ instead of .com/about/.
Any idea about what I'm doing wrong?
Hi Rick
what version of Umbraco are you using?
/Jan
4.7.1
Have you tried republishing the root node?
Hi,
Yes, tried to republishing the root node, subnodes, complete website... Didn't help so far.
Ok. I've deleted everying now and started again.
The language switch at the homepage now works. Then my next step is:
And now there is no copy of this file in the 'nl'-tree. Which, according to your instructions, should be there...
So.. What I'm doing wrong?
could be that the CS files in your app_code aren't compiling. I remember this happening when there is a problem with a DLL that is not loading properly. Are you working from a clean install? Could it be that you have some legacy DLL's from previous umbraco versions or packages?
Yes, I did a clean install last week. Normally I could try to overwrite te bin folder with the latest download, but I see 4.7.1.1 has been released, and can't find the download of 4.7.1 anymore...
Furthermore I haven't installed any packages yet, besides yours and Relation Types.
To be honest I don't want to do a new installation if there still is another option, because I did quite some work in this site now.
Any other ideas?
to me it sounds like its not related to this package but to the fact that code in your app_code is not executed. To figure out why you'll either have to debug or find the thread where this is discussed on our (don't remember where). Sorry I can't help you more.
Thanks for your help so far. :-)
I just tried it with a simple file:
And when I call this in the masterpage, it IS executed.
So it seems only the code of your package isn't executed. Because the steps I do (as described a few posts ago), is right?
Maybe I have to try a new installation of Umbraco after all...
hmm strange. Can you debug the cs file? Anything in the Log table?
your steps seem right.
Finally! Everything is working now :D
I deleted all pages again. Installed your package again. Created the nodes again. And everything is working as it should be now.
I guess indeed there was something wrong with a file. Maybe deleted a file, a corrupt file, I don't know... But I'm glad it works now. Thanks for your help :-)
Hm, I cheered too soon. This morning it didn't work again. And couldn't get it to work anymore.
So finally I did a complete new Umbraco installation, exported my document types from the old site, imported them in the new one. And installed just your package. Nothing else. Result: still not working.
Very, very strange, because this is a clean Umbraco installation. So I'm wondering if more people got problems with this package.
I think I'm going to make a manual link between two pages now, because I spend already two days to this problem.
If you have any ideas, it would be welcome.
Hi Yannick,
Sorry to say but I got the same problem, clean 4.7.1.1 installation with six languages.
I am doing all steps and when I am trying to create a new node doesn't get copied to the related, no errors, nothing at the log table.
Just to mention that I am under a subdomain record, there is no domain at this account at the moment so I have a single dns record that works for as long as the development will take place so the hostnames are based on the subdomain. As far as I understand there is no problem with this and your code, just confirm please!
Any other directions from Rick on how he finally proceed with his project would be great!
Cheers, Giorgos
My razor code is not too complicated so I think you should be able to debug it fairly easily. I haven't ran into this problem and can't reproduce it unfortunately.
I think that I know what the problem was. I had both a local version and and a version on our develop machine. Usually I work local and publish the changed files to the develop server, but I think this gave some problems with the App_Data-folder. Or other caching files... Since I'm working directly on the developmachine (where I also got two physical domains, .com.dev and .nl.dev), I've got no problems anymore!
HI again,
Finally worked for me too, actually I compile the cs file and drp the dll to the bin folder and everything is working fine so far!
It seems that the cs code didn't execute properly from the App_Code folder, weird isn't it?
Cheers, Giorgos
is working on a reply...