Strange URLs when culture is enable - kentico

I am running Kentico 12.0.26 MVC.
When adding links via the inline widget editor (MediumEditor), the final URL that gets generated has a strange URL path, which is not a pretty URL for SEO.
http://localhost/cmsctx/pv/administrator/culture/en-US/wg/54e1b893-56a5-455b-9f89-37433f2f4365/readonly/0/ea/1/h/98d86f48b5376d0f10eb44df47afb782729ba12751defe6a5ce98c918950785e/-/products/Tube-Pipe-Systems/FL-WELD-P-ORB?uh=b0542cb25017b58c3ebde4855543bcea15269abf4d7458251db4ff128f2feb30&administrationdomain=http%3A%2F%2Flocalhost
Not all links have this, but when this links where added, it was using the clean relative URL of the page, I think maybe after enabeling the Kentico culture feature, they somehow got update like that, but not all links got affected. I am still not entirely sure at what point to they get updated like that.
I also notice that links that are added via the page type editor (CKEditor) are fine and don't seem to run into this issue.
Please advise, thanks

Related

Using Gatsby how to link to a static html file and open in the same page?

So I have my gatbsy blog with a link static. But when I click it says that gatsby can't find the page. Now I need to reload to actually get the static.html file.
Note that I'm using a simple a tag and not the gatsby-link. I'm not using pushState from history, so not sure how it actually does a soft load.
I want to open in the same page, not target _blank like the how has been "solved" here https://github.com/gatsbyjs/gatsby/issues/2928
Any suggestions on how to fix this?
Thanks
That should normally work. Perhaps you've installed https://www.gatsbyjs.org/packages/gatsby-plugin-catch-links/?=cstc which is catching the link and trying to resolve it within Gatsby?

Orchard CulturePicker and CurrentCulturePicker

I'm using orchard 1.8.1 and Culture picker.
After removing the culture filter in module (Orchard has it on core by default and so it has to be removed to avoid conflicts) I made it working when I'm logged on.
However anonymous user cannot change language (or better it seems that the cookie is set correclty but the filter does not works or does not picks the language)
I digged for permission and read all code but it seems nothing wrong.
Any idea why culture picker works only when I'm logged as admin and does not works when I browse anonymous?
It is probably something with 1.8 upgrade
This is a site that works (1.6):
http://social-media-marketing-day.web-marketing-manager.it/cina-russia-corea-asia-corso-digital-strategia-comunicazione
This is the one that does not works (1.8):
http://radici-group.linked-in.it/nylon-uso-vantaggi
Thanks
I found a workaround.
Since it is a caching problem I have added a fake lang parameter matching requested language to the requested url.
This should not harm existing urls but adds something different to url itself so that it is cached separately...
Any idea on how do it properly without change the url?

Joomla - 404 on Every Page, Back-End Still Works

all! I have a Joomla site (http://wired-ar.com) that I attempted an upgrade to 1.5.26 just a while ago. The upgrade went a bit awry, and I was forced to revert to a backup copy of the site using 1.5.15. Was upgrading with the intent to then upgrade to 2.x and then the latest.
I'm new to Joomla, but I believe I've reattached all the necessary components and modules. However, I'm getting 404 errors on EVERY page. Homepage, interior pages. I'm also having some problems with my editor, as only the top-portion of the editor appears and no TinyMCE. I've re-uploaded all editor files just to be safe, but no luck.
I haven't got a clue what's going on here, and I'm all out of leads. Most other problems like this involve the home page working, and nothing else. On my end, the back end works a-okay, and no visual pages are coming through. Changing different themes does not help, nor modifying any of the SEO areas, like mod_rewrite. Disabling plugins returns no results, either.
I would love some help with this, please! Any thoughts, options, or possibilities would be great.
Try to disable SEF url from backend, and figure out from the links, which articles/comp. are assigned to the menu. (maybe languages arent set correctly - you have assigned another lang article/category for ex. to an En lang menu)
As it turns out, and this may be the case with others, if you can access the back-end and nothing else, you likely have a corrupted file tree that's missing components or modules.
In my case, the really old files on this server had very wonky permissions, which made a smooth re-upload nearly impossible. The solution was to check and double check all components, adding the missing ones where needed. Took a lot of CHMOD work, too, for me.
Hope that helps someone, if you're in a similar pickle with an old Joomla site!

Orchard CMS Adding a links in HTML widget

I'm trying to add links to pages in the HTML widget.
I'm currently running orchard as a virtual directory, so I can't use '/'. Also since I'm working on a dev site then copying over to a live site, I'm not sure if the site will be running as a virtual directory or from the root.
I've just realised that all links entered via the HTML widget will have a problem, since you can't use '~', also it looks like the image links are fixed, so deploying to a different location won't work ie. from localhost\dev to localhost\live
Any ideas?
If you're entering it from the html editor, you don't have any choice but to use a rooted path (/foo). Sure, it can cause problems if you then publish from a vdir into a site without a vdir, but that's how it for now. We're looking at solutions but in the meantime your best bet is to have a dev site that is as close as possible to the production setup.
As pointed out by randompete on codeplex, another solution could be implementing your own IHtmlFilter. I wrote a simple implementation which you can find here: http://orchard.codeplex.com/discussions/279418
It basically post-processes the BodyPart text by replacing all occurences of urls starting with ~/ with a resolved url (using the UrlHelper.Content() method)
If you need to display a link pointing to a static resource, you can use:
#Html.Link(string textlink, string url)
But Html.Link doesn't supports application relatives urls (~/[...] ones)
if you need only the href (as for an img ). It supports ~/ urls.
src='#Href(string url)'
If you need to display a link to an action
#Html.ActionLink(...) <-- lots of overloads.

How do you globally modify page output sent from IIS without modifying the page source?

A couple sites of mine recently got "hacked". Someone was able to add a line of JavaScript to the bottom of every page on the site.
The server is a Windows Server 2003, and has Cold Fusion 8 and MySQL 5.x installed and running.
Looking into the code on each page shows that none of the pages were modified. The JavaScript is not in the code files themselves. This leads me to believe it is an IIS problem, but I am unsure and cannot find anything that would be able to do this within IIS.
The JavaScript being added redirects a user to another page only when they come from Google, or at least it appears to work this way.
Any help on how someone was able to accomplish this as well as removing it would be greatly appreciated.
Another way to word the question thanks to #Jeffrey Hantin
How do you systematically modify output from IIS without modifying individual pages?
EDIT: A bit more testing has shown that only the .cfm pages add the extra javascript. Added a new .cfm and the js was there but a .html did not have it.
Edit2: Turns out to have been a coldfusion problem after all. Somehow the pages OnRequestEnd.cfm were created on the sites and added that js.
Looks like someone exploited some latest Adobe CF vulnerabilities.
Please see these blog posts for details and try to search symptoms on your server:
Image upload
FCKEditor bug + this post
Hope this helps.
Turns out to have been a coldfusion problem after all. The page OnRequestEnd.cfm were created on the sites and added that js.
If you only want to use IIS to modify output, the ISAPI filter is probably the best answer. If you would like to use Coldfusion, you could utilize the application.cfc to modify output during certain parts of the request cycle or wrap all of your pages in a Custom Tag to consolidate the like portions of your page templates.
I have used both. In cases where my page headers and footers are all the same, the custom tag is fast and easy to use. To make changes to all the pages, you edit one custom tag file. In cases where I have a more complicated web application I'll use the application.cfc to store and insert common components where they are needed.
They might have guessed your password. You should change it immediately.
It's possible that an ISAPI filter is used to do this. I once used one myself to perform compression before IIS supported it natively.
In your specific situation, you may want to check for ISAPI filters you don't want installed. Of course, if your server has been compromised, you will likely be better off rebuilding from a known good image rather than trying to fix it in situ.

Resources