Umbraco url's displaying home node in one node, sometimes - asp.net

So I have an umbraco setup with a 'content' root node and then a 'home' node under that. Under the 'home' node is the content and the URLs are the name of those nodes for example I have a 'about u's node under home and it's URL is '/about-us/'
In the case of the 'news' node, below 'about us', its children some times get '/home/about-us/news/title' of the story as the URL, which throws a 404. I can see that this is the URL of the node on the properties tab, but if I republish it it returns to '/about-us/news/title' for a period before returning to the broken link.
I have only seen this behavior on this node, which contains new-item document types. I basically watched the umbraco tv video and created it following along.
It seems to be to be a umbraco bug, but I would really appreciate any help with the issue

In the web.config, there is a setting called umbracoHideTopLevelNodeFromPath. This causes the behavior you are describing when it is set to false. Do you perhaps have multiple people working on the site and publishing different versions of the web.config that have this setting changed?
When publishing a node with the setting set to false, it would add the /home part to the URL. Otherwise, it would leave off the /home.

Once the Umbraco application has started, there are several processes that run on a regular basis (e.g. to check for expired content). It is possible to piggy-back on these by creating a custom class that inherits from umbraco.cms.businesslogic.ApplicationBase. If you have created one that uses the Document.AfterPublish eventhandler then I would check that it is not causing the issue.
I'm assuming that you haven't written one of these though, so the only other thing I can suggest is checking whether it is an installed package that is causing the issue. Have you installed any Umbraco packages? If so, do they have any automated behaviours, like creating folders etc. If so, this may be causing the issue. The author of a package will usually have a website, codeplex project etc. and they will usually have a issue list or blog.
Edit
I've just quickly checked and uBlogsy, one of the plugins you mention exactly this. It has auto moving and sorting of posts. This is described in the release notes. If you are using this tool for creating news pages, then this will be your issue.

I followed obsidian's link in his answer and read about someone else having the same issue. It seems to be traces back to a umbraco.library:NiceUrlFullPath call in the RSS creator that was feeding news items. I replaced the umbraco.library:NiceUrlFullPath calls with umbraco.library:NiceUrl calls and the issue has disappeared.

Related

AEM - grid container visible in editor/preview but not when published

Running AEM 6.5.8.0 and we've a range of content in grid containers that no longer render visibly despite the code being present when viewing source.
For instance, on https://www.redfcu.org content below "featured rates" can be seen, edited in author, and the source is present when published, but does not render in the browser. Our implementation partner has not responded to the issue in several days, and Adobe's only solution is restore from back-up, but without knowing the root cause, I'm hesitant to just restore for the sake of it.
content in author
content when published
I see the content now, and I guess the issue has been solved. What was the root cause. In the future, if you have access to the logs, there should be errors or warnings printed in error.log (or in the default project log project-name-project.log) when you try to access that page. Missing content in publish is a common issue. In this case, it could be that this component is reading the child pages below a given path and these pages or experience fragments are not present in the publish instance. Similar scenarios happen when the content is tagged but the tags are not published, or there is a failure in a logic validating if you are on author/publish mode.

Umbraco dictionary translations are not working correctly on localhost

I have downloaded an Umbraco 6 site and I have tried replicating the environment locally in my machine, using the production database and the compiled site from production.
If I go to the Umbraco backoffce and to the Settings => Dictionary entries, I can see a specific dictionary entry in multiple languages.
This entry is displayed correctly in production when the user chooses a different language. However, locally, when I change the language, the dictionary item still appears in english (the default language and does not get translated).
I have tried running the site through Visual Studio and WebMatrix, to check if this was some issue with the webserver settings locally, as this might be session related, but the issue still happens.
Is there a reason why translation for dictionary items is not working as expected? Content that is created through nodes and translated there is showing up in the correct language, but dictionary items are not.
UPDATE
I am now looking into something that could be responsible for this. When I am at the content area and select one of the language nodes and head to properties, I see multiple "Alternative links", which contain URLs to the same page on different domains. I don't see localhost:XXXX/EN.aspx there, which makes me wonder as to whether or not the site is handling the language detection correctly in localhost. I haven't found how to add additional links there, and be able to use a wildcard for port would be interesting.
You should right click on the node - select "Culture and Hostnames" and add your domain there.
After that right click on the root "Content" node and click on "Republish entire site" - that should clear the cache and you should be able to see the new url under "Alternative links".

The Features module and blocks on Drupal 7

I am trying to implement the Features module on one of my Drupal 7 sites for managing blocks. I have a couple questions though. 1st, when you create a new feature on the source site, do you then take that newly created feature and put it in your modules directory and enable it on the source server AND the destination server or JUST the destination server?
Also, I'm wondering how it works when you are trying to manage blocks with a test server and a live server when the live server is a clone of test. In other words we create a test server, construct our site including content and blocks and when it's finished we clone test to live. Then we install the features module on test and create a feature that contains ALL of our custom blocks. When I did this though and moved that feature to the live server and enabled it, it was immediately in an overridden state. Are features only meant for moving NEW blocks from one site to another and not meant to manage blocks that already exist on BOTH servers? Should I create the feature containing all the blocks on the test server and then delete the blocks on the live server and THEN enable the feature on live which would populate the blocks on live. I'm just not sure if I'm missing something or going about this the wrong way.
THANKS
UPDATE: OK, I'm pulling my hair out over here. Again, so I have two sites a source and a destination. The destination was is an exact clone of the source. I have three blocks on both sites that I would like to manage via features. SO, on the source site, I decided to test with just ONE block first. I first edited the block so it would be different than the one on the destination site. I then created the feature including the block and block settings (by the way I'm using Features Extra to accomplish this) and then I place the feature on the destination site and when I activate the feature, the feature is actually NOT in an overridden state and the changes that I made to the block on the source site, show up on the destination site no problem. HOWEVER, if I try to add the other two blocks now to this feature on the source site and recreate it and export it out to the destination site, the feature on the destination site is now in an overridden state which is fine, but no matter how many times I "Revert" the feature to take the blocks out of the dB and into code, it will NOT get out of an overridden state. I have flushed the cache, disabled the feature and re-enabled, and tried reverting and it is stuck as overridden and I do not see the changes to the other two blocks that I made. I then thought maybe it's because I am doing three blocks at once. I then took JUST block number two by itself and created a feature for it and put it on the destination site and it gets stuck in overridden status. Same goes for block number 3. Block number one by itself is fine and does not get stuck in overridden status. It's just block number 2 and three. As far as I can tell all three blocks were created the same exact way and do not have any different settings as far as roles, pages etc. I am stumped on this one for sure.
comment doesn't allow this much log post, so posting as answer.
I can't say much without having exact problem. But This is how features works. You have to do changes in a source site. then create feature of that changes. Now On destination site you have to enable that feature. If you already have that changes in destination site, than feature will be overridden, you revert it and get changes.
As you saying you added two other blocks in feature, but you didn't change anything in those blocks, so they are already in destination site. that why features in overridden state. when you revert It does changes, but sometime it doesn't changes state on (admin/structure/features/).
I don't know your exact requirement, but I think you should change do changes in source site and then pick them in feature and enable on destination site.

Plone yields 404 on new content save

The issue: a content editor saves a new content item and gets a 404 on the proper-looking url for the new object. If they then refresh, the item is there, perfectly normal.
This happens for multiple Archetypes-based content types, and we've seen it on at least two different sites. We've seen it on Plone 3.x and 4.0.3. Here's what these sites have in common:
HAProxy load balancing (with and without session affinity)
Multiple ZEO clients
Using either ZODB 3.9.7 or 3.8.4
The issue happens only some of the time, maybe for 1 out of 4 content items
Has anyone seen anything like this?
I do not have an answer for you; this should not really happen. I certainly have not seen this.
You'll need to gather more information to troubleshoot this, and that perhaps requires interactive access to experts, and SO is not the place for such troubleshooting.
All I can do is advice that you gather as much information as possible, including a full trail of the user interaction from the various logs, including HAProxy and the ZEO server.
It may require additional instrumentation at the server level (when the NotFound error occurs, dump additional information about what is present, etc).
Some recomendations/questions:
Verfy that the content object was, indeed, created.
Check that the content views are correct (the ones that are declared in profiles/default/types/yourtype.xml).
Does it happen when adding content directly to plone instance (Without caching and load balancing?
Does it happen when adding content to direct plone instance with load balancing, but without caching? ---> And so on ...?
Maybe not an elegant one, but you might try inserting print statements or pdb breakpoints in the code so you can track whenever a content object was, indeed, created. Do this only as a desperate method of "instrumentation".
Yes. we have recently started seeing the same issue. We have almost the same setup. Haproxy (no session affinity).
I'm wondering since the pattern seems to be haproxy... perhaps its an issue with a request being redistributed after a timeout?
Updated:
We had this issue. It happens when you have a redirect back to the changed object after a save. This is because the 2nd request hits another zeo client which doesn't realise it's out of date.
The only solution we found was a to add temporary session affinity in haproxy (20s) during any POST. Not ideal but does work. I was just searching for a better solution which is why I found this old post.

ASP.NET security issues, maybe Umbraco related, but most likely just general security issue

I have an incredibly frustrating problem cleaning up my site at the moment. On the same hosting space I have Umbraco (ASP.NET) and Blab Lite (PHP Chatroom) installed. The former talks to SQL 2005, and the latter to MySQL 5.
On my Umbraco site I had a guestbook with an entry form. Upon postback it does an Akismet check and skips the creation/saving of the corresponding Umbraco document if it is verified by Akismet as spam.
However, recently I started getting entries created under my guestbook node which are verified as spam, and yet the document is still saved. I have even gone as far as hiding the form using "display:none" and yet these entries are still created! I have modified the DLL to include logging to Umbraco document event logs and somehow the creation of these still does not trigger any entries to the logs. I've even created an eventhandler for Document.BeforeSave event in a separate assembly and this event handler is not catching the saving of these entries.
I'm really stumped as to how the spammers can create these entries. Has anyone got any ideas how this can be done, and how I can secure my site to prevent this kind of attack?
Thanks,
Dany.
This seems like an old post but it's not marked as answered so I'll give it a go. I havnt used Umbraco in a while so I'm not sure if they've fixed this in the latest version, but the problem is with Umbraco it self. Document.BeforeSave() gets fired AFTER the node is created, that's why your spam filter is not working. Marking the form as not visible wont work because the bot will look at the source code and just pattern match the form fields it finds. Have a look here for more details on the Umbraco problem:
http://forum.umbraco.org/yaf_postst9312_BeforePublish-and-BeforeSave-Event-Handlers.aspx
Like I said I haven't used Umbraco in ages, but hopefully it will help someone even if you've found a fix.
Paul
My guess is that there is a bug in your code to skip the creation/saving of the Umbraco document... although it is strange that the Document.BeforeSave event is not triggered. Are you sure that your event listeners are also working (i.e. do they register the saving of non-spam entries?)
By the way, setting "display:none" won't stop spammers as bots will generally ignore CSS anyway.
Yup, the event listeners are working indeed. This lead me to think something else is odd here. I finally took the plunge and went through it all with a finer-toothed comb. First I compared the content of the bin folder between standard Umbraco 4 distribution and the one on my host. I figured it was easiest to overwrite each one with a fresh one. Then I went through each Umbraco package I've installed and made sure the DLLs are also fine. Well, there was 1 DLL that didn't match anything else in Umbraco or packages I've installed - EO.Web.dll!
It seems there's a legit thing out there by EssentialObjects but I don't think Umbraco, my code, or any of the packages actually uses it! I deleted it and every part of my Umbraco install still works! I've now set visibility of of the form in ascx markup so it's not rendered - now we wait and see if that was the offending piece of malware!

Resources