News module - strange behaviour
News module - strange behaviour
In one of my installation of CMSMS the News module behaves in a strange way. When I enter something like this:
test http://www.torvund.net/guitar/ either in the summary or the content section, it comes out either like this test http://www.torvund.net/guitar/ or like this test http://www.torvund.net/guitar/ when it is saved.
For me this makes the News module close to useless, as I cannot include links, neither in the summary nor in the content. Links are destroyed when saved (by "submit" or "apply").
The strange thing is that this happens only with one of my installations. On the other installations, News with links works fine.
I have tried to reinstall CMSMS (but with keeping the database tables), and I have tried to deinstall and remove the News module and the reinstall it again. But nothing seems to help. Links are still destroyed when saved.
I seems that some of these unwanted changes happens when I "update" the edit wiev after having opened the HTML edit window, and more changes are added when it is saved to the database with "submit" or "update".
Does anyone know how to solve or get around this problem without having to edit the content of the database each time a news item is added or updated?
test http://www.torvund.net/guitar/ either in the summary or the content section, it comes out either like this test http://www.torvund.net/guitar/ or like this test http://www.torvund.net/guitar/ when it is saved.
For me this makes the News module close to useless, as I cannot include links, neither in the summary nor in the content. Links are destroyed when saved (by "submit" or "apply").
The strange thing is that this happens only with one of my installations. On the other installations, News with links works fine.
I have tried to reinstall CMSMS (but with keeping the database tables), and I have tried to deinstall and remove the News module and the reinstall it again. But nothing seems to help. Links are still destroyed when saved.
I seems that some of these unwanted changes happens when I "update" the edit wiev after having opened the HTML edit window, and more changes are added when it is saved to the database with "submit" or "update".
Does anyone know how to solve or get around this problem without having to edit the content of the database each time a news item is added or updated?
Re: News module - strange behaviour
Yes, I have tried the link button, html-editor and by disabling WYSYWYG. I have also tried both cms_selflink and standard html-links, but none of them work. And I don't understand anything of what is happening.mark wrote: Have you tried using the link button to add them?...
Re: News module - strange behaviour
Link are dependant of url in config.php, butolavt wrote: Yes, I have tried the link button
is very strange that CMSMS modify your html textolavt wrote: html-editor and by disabling WYSYWYG. I have also tried both cms_selflink and standard html-links

This is happening with news content only?
And content page or Global Block Content?
Alby
Re: News module - strange behaviour
Yes, it is very strange. 
I does not happen to the content or global content. But it does happen to the news module and to the "Blogs Made Simple" module. At least part of what the system is doing is to escape " by adding \ making each " into \". And another \ is added each time the item is stored, ending up with something lik \\\\". Sometimes content between " " is altered or deleted, and sometimes some / are added as well.
It is very frustrating, as I want to include a news section and news items on various pages. But when it is not possible to include links to other pages, the modules cannot be used for the purpose.

I does not happen to the content or global content. But it does happen to the news module and to the "Blogs Made Simple" module. At least part of what the system is doing is to escape " by adding \ making each " into \". And another \ is added each time the item is stored, ending up with something lik \\\\". Sometimes content between " " is altered or deleted, and sometimes some / are added as well.
It is very frustrating, as I want to include a news section and news items on various pages. But when it is not possible to include links to other pages, the modules cannot be used for the purpose.
Re: News module - strange behaviour
What version of CMSMS and what version of NEWS?
I've linked both internal/external and dont have this behaviour.....
Ronny
I've linked both internal/external and dont have this behaviour.....
Ronny
Re: News module - strange behaviour
I am running CMSMS 1.2.2 and News Module 2.6. This error has survived a few updates.
Re: News module - strange behaviour
I know it is a rather peculiar behaviour. I have five installations of CMSMS, all running on the same server and using the same database (but different tables), but I have this problem in only one of the installations.RonnyK wrote: I've linked both internal/external and dont have this behaviour.....
Re: News module - strange behaviour
There are modules and/or php setting (with htaccess) differences?olavt wrote: I know it is a rather peculiar behaviour. I have five installations of CMSMS, all running on the same server and using the same database (but different tables), but I have this problem in only one of the installations.
For example, have you Blog Made Simple in other installations?
Alby
Re: News module - strange behaviour
There are modules and/or php setting (with htaccess) differences?alby wrote:
For example, have you Blog Made Simple in other installations?
[/quote]
I am not aware of any differences in php-settings, but I have to admit that I do not know where to look for them.
I do not find anye htaccess (or .htaccess) files in any of the "root" directories.
I have Blog Made Simple in one other installation, where it works fine.
Re: News module - strange behaviour
Upload and call a file php with this code:olavt wrote: I am not aware of any differences in php-settings, but I have to admit that I do not know where to look for them.
Code: Select all
<?php phpinfo(); ?>
enable debug in config.php and check update sql query for something
Alby
Re: News module - strange behaviour
When adding a new message, I got this string (among many others):alby wrote:
enable debug in config.php and check update sql query for something
Alby
Debug: (0.307866) - (7095400)
(mysql): INSERT INTO zcmsgu_module_news (news_id, news_category_id, news_title, news_data, summary, status, news_date, start_time, end_time, create_date, modified_date,author_id,news_extra) VALUES (3,'1','TEst 2','<a TARGET=\\\"_blank\\\" HREF=\\\"http://www.nrk.no/programmer/radio/norg ... 6</a>','<a TARGET=\\\"_blank\\\" HREF=\\\"http://www.nrk.no/programmer/radio/norg ... 2007-12-28 16:31:41','2007-12-28 16:31:41',NULL,'2007-12-28 16:34:08','2007-12-28 16:34:08','1','')
Error (0):
When opening the message and saving it without editing, this was the UPDATE message:
Debug: (0.23163) - (7110412)
(mysql): UPDATE zcmsgu_module_news SET news_title='TEst 2', news_data='<a HREF=\\\"http://www.torvund.net/guitar/\\\\\\\\\\\" TARGET=\\\"\\\\\\\\\\\">http://www.nrk.no/programmer/radio/norg ... 4215796</a>', summary='<a HREF=\\\"\\\\\\\\\\\" TARGET=\\\"\\\\\\\\\\\">http://www.nrk.no/programmer/radio/norg ... 4215796</a>', status='published', news_date='2007-12-28 16:31:41', news_category_id='1', start_time='2007-12-28 16:31:41', end_time=NULL, modified_date='2007-12-28 16:42:32', news_extra='' WHERE news_id = '3'
Error (0):
I have also tired to clean up the installation as much as I can, by deleting all the CMSMS folders (except images), and reinstalled CMSMS.
I have to admit that I am not an expert on this. But it seems that something mess up the SQL statement that is produced and then sent to the database.
Re: News module - strange behaviour
Upload and call a file php with this code:alby wrote:
Code: Select all
<?php phpinfo(); ?>
[/quote]
I have tried this, but could not find any differences between the installations with problems and other installations. I doubt that the general php-setting can cause the problems, as all the installations are installed in different folders on the same server. There should not be any differences in the php-installation.
Re: News module - strange behaviour
After having done some more testing, it seems that the trouble must be in the database tables.
I tried this as a test: I installed CMSMS in a testfolder, installed it to use the tables belonging to the installation causing trouble. The installation was all fresh, but the database table was the "good" old ones. And I run into the same kind of problem with the News-module.
Then I reinstalled in the same folder, just by running the intall script one more time without uloading any new files. But this time I installed CMSMS to use another set of existing tables in the database. This time News worked as is should, without messing up the files.
As the basic CMSMS installation (all the php-files, modules etc) should be the same for both installation, my suspect is the database. The trouble is that there is to much information in the database to just delete it and recreate it. I have actually once made a copy of all the affected tables in the database and set CMSMS to use the copies, but it did not solve the problem. It may be an idea to delete some tables and recreate them, if this is possible to do without destroying the content and user defined tags. The rest should not be to hard to recreate. But which files should I delete if I should try this???
I tried this as a test: I installed CMSMS in a testfolder, installed it to use the tables belonging to the installation causing trouble. The installation was all fresh, but the database table was the "good" old ones. And I run into the same kind of problem with the News-module.
Then I reinstalled in the same folder, just by running the intall script one more time without uloading any new files. But this time I installed CMSMS to use another set of existing tables in the database. This time News worked as is should, without messing up the files.
As the basic CMSMS installation (all the php-files, modules etc) should be the same for both installation, my suspect is the database. The trouble is that there is to much information in the database to just delete it and recreate it. I have actually once made a copy of all the affected tables in the database and set CMSMS to use the copies, but it did not solve the problem. It may be an idea to delete some tables and recreate them, if this is possible to do without destroying the content and user defined tags. The rest should not be to hard to recreate. But which files should I delete if I should try this???
Re: News module - strange behaviour
I was hoping that I was closing in on a solution, but it did not solve the problem. In the table _modules som modules were listed more than once, and some modules were listed there but not in the "Module menu". I removed all that were listed more than once (by deinstalling, not by hampering the database table). The modules listed in the table, but not in the menu were installed and then reinstalled. Among them was the FK... editor, and I was thinking that another editor lurking in the background could cause the trouble. But it did not help. When I entered this in a news message (both summary and content):
Nok en test http://www.aftenposten.no/
It became this when shown on the site (source code), with all " trailed by a \ :
Nok en test http://www.aftenposten.no/
When reopened for editing, it became this:
Nok en test http://www.aftenposten.no/
As I got a glimpse of the message as HTML before the WYSYWYG (TinyMCE) kicked in, it looked as if the file was changed when the WYSIWYG took over. It looked as if it was like the second example and then was changed into the third when It was handled in the WYSYWYG editor.
Nok en test http://www.aftenposten.no/
It became this when shown on the site (source code), with all " trailed by a \ :
Nok en test http://www.aftenposten.no/
When reopened for editing, it became this:
Nok en test http://www.aftenposten.no/
As I got a glimpse of the message as HTML before the WYSYWYG (TinyMCE) kicked in, it looked as if the file was changed when the WYSIWYG took over. It looked as if it was like the second example and then was changed into the third when It was handled in the WYSYWYG editor.
Re: News module - strange behaviour
Just to continue the report on unsuccessful testing: I unistalled and removed the TinyMCE editor, and tried to write a news message without having any WYSYWYG editor installed. But it did not help 
