I'm running Umbraco 4.7.1.1 and are fetching media files through an inline macro in a template. This worked as a charm when I find uploaded the project to the server and it still works just fine locally, but suddenly it stopped working on the server.
The original code is more complex, but I found out that this simple code fails:
Did either of you find a cause/solution for this? I'm getting the same thing suddenly, despite nothing having changed (code-wise at least) on the site for several weeks.
I have seen this issue when the Examine index has become corrupted for some other reason. DynamicNode that MediaById is a method of uses Examine as a sort of caching layer for media hence why this issue may occur. To rebuild you Examine indexes you need to do the following, Stop App Pool, Delete all folder and files within App_Data/Temp/ExamineIndexes/ and then Start the App Pool
Is there a programmatic way to determine if/when Examine indexes may be corrupted? Is this also just a problem of the past i.e., version 4.7.x as OP noted, that may have been fixed in a later version?
That is an interesting idea, I have never tried to check but I guess it must be possible with some exception handling that could then trigger a rebuild.
As to if it is a problem of the past, from personal experience I would say that it has become a less frequent issue but it does sometimes happen, for example if a server is shutting down, app pool crashes or server runs out of disk space during a index rebuild etc....
Lucene was upgraded in Umbraco 4.8 so maybe that has stabilised it a bit whilst running, but I am not sure.
Model.MediaById gives error Error loading MacroEngine script (file: )
Hi,
I'm running Umbraco 4.7.1.1 and are fetching media files through an inline macro in a template. This worked as a charm when I find uploaded the project to the server and it still works just fine locally, but suddenly it stopped working on the server.
The original code is more complex, but I found out that this simple code fails:
I have made sure that the ID is in fact a valid ID in the media folder and that the file it's pointing to is reachable through a straight URL call.
The only error message I get is:
Error loading MacroEngine script (file: )
Is there anyone who have a clue on why this error suddenly started appearing and what could be done to solve it?
Or can I get some pointers to how I get a more specific error message?
See the error live here:
http://www.nidacatering.com/om-nida/?umbDebugShowTrace=true
Thanks,
Daniel
We are currently having a similar issue with our own site, yours appears to be resolved, any chance you could let us know how?
Hi,
Did either of you find a cause/solution for this? I'm getting the same thing suddenly, despite nothing having changed (code-wise at least) on the site for several weeks.
Any pointers would be much appreciated.
Thanks.
I have seen this issue when the Examine index has become corrupted for some other reason. DynamicNode that MediaById is a method of uses Examine as a sort of caching layer for media hence why this issue may occur. To rebuild you Examine indexes you need to do the following, Stop App Pool, Delete all folder and files within App_Data/Temp/ExamineIndexes/ and then Start the App Pool
Nice, thanks Jeavon - that did the trick!
Great to hear, annoying one but just sometimes the indexes do get corrupted for no clear reason.
Is there a programmatic way to determine if/when Examine indexes may be corrupted? Is this also just a problem of the past i.e., version 4.7.x as OP noted, that may have been fixed in a later version?
Hi @Funka!
That is an interesting idea, I have never tried to check but I guess it must be possible with some exception handling that could then trigger a rebuild.
As to if it is a problem of the past, from personal experience I would say that it has become a less frequent issue but it does sometimes happen, for example if a server is shutting down, app pool crashes or server runs out of disk space during a index rebuild etc....
Lucene was upgraded in Umbraco 4.8 so maybe that has stabilised it a bit whilst running, but I am not sure.
check out this post too
http://our.umbraco.org/forum/developers/razor/37237-Razor-Script-Index-was-outside-the-bounds-of-the-array
it's fixed in 4.11.7 http://issues.umbraco.org/issue/U4-1874
I'm having a similar problem in Umbraco 6.11 using Model.MediaById. It returns nothing until I restart app pool ...
is working on a reply...