Links broken when editors updates

This is the place to report bugs and get support. When posting in this forum, please always provide as much detail as possible.

Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum, do not report it as a bug.

This is the place to report bugs and get support

When posting in this forum, please try to provide as many relevant details as possible. Particularly the following:

  • What operating system were you running when the bug appeared?
  • What database platform is your site using?
  • What version of mojoPortal are you running?
  • What version of .NET do you use?
  • What steps are necessary to reproduce the issue? Compare expected results vs actual results.
Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum.
This thread is closed to new posts. You must sign in to post in the forums.
3/30/2010 3:55:55 AM
Gravatar
Total Posts 123
/Mats Lillnor

Links broken when editors updates

There are problems with broken links for smileys etc. when the editors are updated since the path names contains version numbers for the editors. For example, http://haningebudoklubb.se/bloggar

The path to the images is "/ClientScript/fckeditor264/editor/images/smiley/msn/regular_smile.gif", but the current version of fckeditor in my install is 266.

This would not be a problem if updates always are carried out by copying the new distribution over the existing folder structure, but this would lead to a lot of obsolete files and a webfolder tha just continues to grow. I don't really like this, so now and then I create a completely new folder with a fresh install, move the specific content directories and then "switch folders". This makes it possible to also do a rollback if necessary.

In my opinion mojoPortal does not clearly enough separate custom content from application files. (I have some suggestions regarding this, but will present this in the feature request forum)

 

In any case, version numbers should not be part of the folder names.

 

BR
/Mats

3/30/2010 9:56:26 AM
Gravatar
Total Posts 1203
Proud member of the mojoPortal team

Help support mojoPortal!
Add-on modules

Another issue...

Along similar lines, I've noticed that the smilie images are using the full URL (including domain name) rather than a relative path. We noticed this problem in development because we have two different domain names accessing the same site. If you embed a smilie from one domain name, it will be broken when you access by the other name.

I hadn't reported this before since I wanted to see if there was a configuration change I could make to fix this, but I realized that it will be a problem anyway when changing site domain names (or moving sites between domains).

Jamie

3/31/2010 10:25:40 AM
Gravatar
Total Posts 18439

Re: Links broken when editors updates

Mats,

I fixed this in version 2.3.4.1 so that smileys come from a central location rather than from the editor sub folders. I think it is important to use the version as part of the folder name for the editors because it allows one to revert to the previous version if some bug is found in the new version. 

Jamie,

I'm not seeing this in my testing it uses relative paths for images including the smileys. Are you using a custom config file for any of the editors?

It is possible to configure it to use fully qualified urls for images but that is not how I have it configured in our default configuration files for any of the editors. Only in the Newsletter do we resolve image urls fully because it is needed in that feature.

Best,

Joe

3/31/2010 11:03:57 AM
Gravatar
Total Posts 123
/Mats Lillnor

Re: Links broken when editors updates

Great!

I have upgraded to 2.3.4.1 now and tested.

However this only pertains to new posts. I have smileys created with different versions of the editor scattered all over blog posts, editorials and forum posts. I have fixed it by creating a number of subfolder-structures with only the smile-images. This is not a very elegant solution, but I think I can live with it.

Is it possible to do a "search and replace" in the database?

 

By the way, I can confirm Jamie's concern with absolute URLs, but it seems that you fixed this in the new version also.

Go to this page: http://haningebudoklubb.se/bloggar

Note the url without "www".

Right click on the smiley-images and select properties to see the url for the image.

The angry "Test-smiley" is created now and follows the site-url

BUT

Check the other two smileys in the text which have been created earlier, the url for these states www.haningebudoklubb.se/... and so on, even if you went to the site using a different url.

 

/Mats

 

 

 

 

/Mats

3/31/2010 11:29:48 AM
Gravatar
Total Posts 1203
Proud member of the mojoPortal team

Help support mojoPortal!
Add-on modules

Re: Links broken when editors updates

Thanks Mats. Yes, I should have mentioned that I noticed the problem in the "Blog feedback" portion of our test site. I'm very glad to hear that it was fixed in this version as well! yes

Fortunately we haven't gone live yet, so I don't have to worry about search and replace. Hopefully Joe will have a good solution for you. Are you using MS SQL?

3/31/2010 11:55:42 AM
Gravatar
Total Posts 18439

Re: Links broken when editors updates

Hi Mats,

While the solution of keeping the old smiley paths intact may not be elegant that is probably what I would do in this case if you have a lot of content that uses them.

I mean it may be possible to fix it using SQL queries and the replace function on table fields where there is affected content. I would certainly backup the db before attempting it. Since the SQL REPLACE function does not work with ntext fields you would have to cast the field as nvarchcar(max) in order to do the replace, something like this syntax:

UPDATE tablename
SET fieldname= REPLACE(cast(fieldname as nvarchar(max)), 'oldvalue','newvalue')
-- WHERE some condition

Hope it helps,

Joe

You must sign in to post in the forums. This thread is closed to new posts.