TinyPortal

Development => Support => Topic started by: Rafferty on April 13, 2010, 01:01:00 AM

Title: [TP 1.0 Beta 5-1] Editing and saving Articles
Post by: Rafferty on April 13, 2010, 01:01:00 AM
smf 1.1.11 tp1.0 beta 5-1
firefox
vista home

Similar to experience with tp 1.0 beta 5, when I edit and save an existing article, all sorts of content lost and additional code added. 

Also occurring on new articles added when saving. 

attached example: edited existing article and on save:

Title: Re: [TP 1.0 Beta 5-1] Editing and saving Articles
Post by: IchBin on April 13, 2010, 04:48:56 AM
You need to provide us with as much info as possible if you want us to figure things out. Show us the code your trying out. Then show us the code that you get after you save it. Tell us what type of article you are having this problem in? html, bbc, php? I don't have any of the problem your describing in my articles so far. Are you sure your files got updated when you upgraded to beta5-1 ?
Title: Re: [TP 1.0 Beta 5-1] Editing and saving Articles
Post by: bloc on April 13, 2010, 10:00:31 AM
Things should stay the same in this update(beta 5-1) but old content might need to be corrected first. it doesn't do that automatically.

Also, if the WYSIWYG editor is used, not everything will be saved, as the editor does some formatting on its own. So try turning off the editor to see if the same happens when you save things without it. its not enough to switch to "code" in the editor, it will still filter it some(though I ahve turned off the worst filtering in it, some still is performed) The editor is great for seeing what you write, but less for inserting javascript etc.
Title: Re: [TP 1.0 Beta 5-1] Editing and saving Articles
Post by: Blue Steel on April 13, 2010, 10:57:52 AM
if you can still write JS and PHP and inline stuff in articles anyway why bother filtering it from the WYSIWYG editor if you can still add it in the code editor .. you should only allow members you trust to write articles and preview them anyway prior to making them active ..

I honestley can't see why things have to be filtered out. or at the least make it so that the individual admins can set what they want filtered. even down to a per member group bases
Title: Re: [TP 1.0 Beta 5-1] Editing and saving Articles
Post by: bloc on April 13, 2010, 01:11:14 PM
No, you misunderstand - its the editor code itself thats built that way, by a third-party. Thats why I say turning it off ensures 100% the same code.
Title: Re: [TP 1.0 Beta 5-1] Editing and saving Articles
Post by: Blue Steel on April 14, 2010, 12:53:22 AM
ahhh ok sorry ;(
Title: Re: [TP 1.0 Beta 5-1] Editing and saving Articles
Post by: Rafferty on April 15, 2010, 01:58:38 PM
Quote from: IchBinâ„¢ on April 13, 2010, 04:48:56 AM
You need to provide us with as much info as possible if you want us to figure things out. Show us the code your trying out. Then show us the code that you get after you save it. Tell us what type of article you are having this problem in? html, bbc, php? I don't have any of the problem your describing in my articles so far. Are you sure your files got updated when you upgraded to beta5-1 ?

I can't show you what it was before because it was an existing html article which I edited with WYSIWYG.  After saving all I got was the above code.  I then added the missing parts again by re-editing and instead of gaining the text back I had typed in, it lost even more and added further surplus code.  each time I edit it lost a little more of the article. 

In this case it was an article with a list of deceased members which I edit frequently to add members who have passed on, we are an Ex Veteran Association. 

I not sure all the files got uploaded, I used the smf install facility, all files were ok and it installed with no errors. 

I'll edit a further article saving the before and after which I'll post soon. 



It occurred in an html article
Title: Re: [TP 1.0 Beta 5-1] Editing and saving Articles
Post by: Blue Steel on April 15, 2010, 02:12:15 PM
did you by chance edit it using tp1.0 Beta 5 .. prior to updating to tp1.0 beta5-1 ???

if so then you need to go in and edit it again

you need to do a search and replace on
Ã,«
Ã,»

and replace with
{
}
respectivly (not missing any)
Title: Re: [TP 1.0 Beta 5-1] Editing and saving Articles
Post by: Rafferty on April 15, 2010, 02:20:19 PM
The attached is one I copied and pasted to an article with WYSIWYG editor off.  The article displayed correctly however not complete, ended half way through.  A recheck of the code found it complete but not displaying the 2nd half. 
Title: Re: [TP 1.0 Beta 5-1] Editing and saving Articles
Post by: Rafferty on April 15, 2010, 02:22:26 PM
Quote from: BlueSteel on April 15, 2010, 02:12:15 PM
did you by chance edit it using tp1.0 Beta 5 .. prior to updating to tp1.0 beta5-1 ???

if so then you need to go in and edit it again

you need to do a search and replace on
Ã,«
Ã,»

and replace with
{
}
respectivly (not missing any)


Yes I did, I think the original article was way back in tp 0.83 or something.  If you look at the code I attached in my first posts, I dont think replacing those would do any good, its full of rubbish code which happened when I saved my edit. 

Title: Re: [TP 1.0 Beta 5-1] Editing and saving Articles
Post by: Freddy on April 15, 2010, 02:52:01 PM
When I used your text file in an HTML article it also cut it short.  Went to look at the HTML again via TP admin and found the end was chopped off.

Do you know anything about the mysql database ?

If you look at the structure of the tp_articles table you will find the field 'body' which holds the data is set to 'text'.  This means it will only accept 65535 characters.

What you could try is changing the 'body' field to 'longtext'.
Title: Re: [TP 1.0 Beta 5-1] Editing and saving Articles
Post by: Rafferty on April 17, 2010, 01:44:37 AM
I had a look for this but can't find it.  I found the tp_articles table and the field body however the fields were individually set for each article populated by the html code.

At the risk of appearing rude, and I don't mean to be, TP has really got harder and harder to use over the years I have been using it.  I have been looking at other portals which seem much easier to use.  I have read comments from other TP users at these forums stating the same, that TP is becoming harder to use and their looking for something easier.   

The only issue I have is the article system which is getting almost impossible to use. 
Title: Re: [TP 1.0 Beta 5-1] Editing and saving Articles
Post by: bloc on April 17, 2010, 04:19:20 PM
Yes, TP have become more complex over the years, no question of that. I like to think that it is also capable of more things now than before. But if you need just some extra pages in SMF and the occasional block or two along with it, why use something like TP then? I would then rather recommend you to indeed use other solutions.

You may think this is strange - to sort of "drive people away" from TP - but its really very simple: I have a dream about how to expand SMF to a portal/small CMS, and thats what TP is doing. If then 100 or 10.000 people like it, doesn't worry me too much, because I am staying true to that dream. As it happens also many others seem to prefer its increased complexity, including the TP team here(though I can tell you they had a big part of deciding in what has gone into TP and what has not), so I persevere to clean it up and improve it. Because its far from "perfect" in regards to bugs and optimisation lol. But overall I feel its doing its thing.

The only things I am unsatisfied atm with are the lack of good themeing of TP templates + speed and resource use. Its a bit heavy on that.
Title: Re: [TP 1.0 Beta 5-1] Editing and saving Articles
Post by: ZarPrime on April 17, 2010, 05:17:13 PM
Rafferty,

Can you look at this page on my test site --> http://talesofthehavenexpanse.com/smf2test/index.php?page=rafferty

I am interested in knowing whether this is what it's supposed to look like, or if something seems to be missing.  I took the code you attached to this post --> http://www.tinyportal.net/index.php?topic=32404.msg260766#msg260766

... and pasted it into an html article.

ZarPrime
Title: Re: [TP 1.0 Beta 5-1] Editing and saving Articles
Post by: m771401 on April 17, 2010, 06:37:18 PM
ZarPrime,

There seems to be a couple of people having this problem now. I think it's great that it works on your site. I wish it worked on mine but it doesn't.
This topic and the other two probably could be merged now since they are detailing the same problem with the editor/article system not handling special characters.
Title: Re: [TP 1.0 Beta 5-1] Editing and saving Articles
Post by: NCKerm on April 17, 2010, 06:54:38 PM
Quote from: Bloc on April 17, 2010, 04:19:20 PM
The only things I am unsatisfied atm with are the lack of good themeing of TP templates + speed and resource use. Its a bit heavy on that.
Iââ,¬â,,¢m not going to complain because I already solved my problem, but I decided to tell my story just to let you know. Upgrading from SMF1+TP0.98 to SMF2+TP1 completely killed my server. While before the upgrade I was able to serve up to 1500 users online (according to the ?action=who, timeout=15 mins) before all thing began to slow down, then after upgrade I was barely able to serve 400 users.
First day I spent tweaking apache, nginx, mysql and accelerators. Without result, I still was running out of RAM and CPU. On second day I rent a new server and the problem gone. Now its all running very smooth.. on a hardware that just a week ago I would call complete overkill.
One more time, Iââ,¬â,,¢m not complaining. I know that it is beta and such.
Title: Re: [TP 1.0 Beta 5-1] Editing and saving Articles
Post by: Rafferty on April 18, 2010, 02:19:41 PM
Quote from: ZarPrime on April 17, 2010, 05:17:13 PM
Rafferty,

Can you look at this page on my test site --> http://talesofthehavenexpanse.com/smf2test/index.php?page=rafferty

I am interested in knowing whether this is what it's supposed to look like, or if something seems to be missing.  I took the code you attached to this post --> http://www.tinyportal.net/index.php?topic=32404.msg260766#msg260766

... and pasted it into an html article.

ZarPrime

Thanks for your trouble ZarPrime, yes that pretty much how it needs to be with the exception of some of the text format has changed and one missing line, the last line, however it doesnt display like that on mine.  As explained before Im only getting half of the length of the article showing.

To Bloc, yes Bloc and I have appreciated all efforts put into TP by yourself and others and like other users have watched it grow.  I ve enjoyed playing with all the new features and for the most part I love it.  Its a shame I cant say the same for the Article system. It seems to have been plagued with problems for a long time now and for lamen like me, increasingly hard to operate.  I am also very upset at losing our list of deceased Veterans which has been 2 years in the making.  I used an article to produce a Chapel Type theme surrounding the names of our dead comrades, frequently adding to it as another one passes.  As explained previously, I have lost most of that with my last attempted edit using the built in editor.  But we live and learn, after all its a beta and was my risk.  Ill start that again, its very important to us that these patriots be remembered.  Thanks again for all your help guys, just a reminder that we are all real people out here and our forums are very important to us and at times rely on your help.  Keep up the great work.   
Title: Re: [TP 1.0 Beta 5-1] Editing and saving Articles
Post by: Freddy on April 18, 2010, 02:47:56 PM
Rafferty...

Do you have any old backups of your database ?  If you have then most of what you lost will be in those.  You just need to use phpmyadmin and find the article in the database.  Copy it out and reuse it again.
Title: Re: [TP 1.0 Beta 5-1] Editing and saving Articles
Post by: Rafferty on April 18, 2010, 02:56:02 PM
Thanks for that Freddy, Yes I have kept all backups however Im extremely nervous playing with the databases but I guess its time to start if its going to save me another 2 years.  Fact is Ive left it well alone so far and wouldnt know where to start.  On the odd occasion Ive needed something my host as done it for me. Trouble is, If I restore it and go to edit it again the same thing will happen unless i just use the data to restore the names and find some other way to display it to the guys. 

Off topic slightly, Ive just noticed an error on the bottom of my new articles under the Comments box, as in the attached screen shot. I dion't know what this means. "
Not Defined Yet Not Defined Yet Not Defined Yet Not Defined Yet Not Defined Yet "
Title: Re: [TP 1.0 Beta 5-1] Editing and saving Articles
Post by: Freddy on April 18, 2010, 03:21:46 PM
Well it's a little more involved than what I said.  The way I would probably do it is create a new (ie separate) database temporarily and import one of the backups into it.  Then I would track down the article from there.  Then you can just remove the temporary database when you are done.

The 'phpMyAdmin' software takes some figuring out.  If you want to send me the last back up you did (the sql file) then if you gave me an idea of what was in the article then I could probably extract it for you.
Title: Re: [TP 1.0 Beta 5-1] Editing and saving Articles
Post by: Rafferty on April 19, 2010, 03:43:34 AM
Quote from: freddy888 on April 18, 2010, 03:21:46 PM
Well it's a little more involved than what I said.  The way I would probably do it is create a new (ie separate) database temporarily and import one of the backups into it.  Then I would track down the article from there.  Then you can just remove the temporary database when you are done.

The 'phpMyAdmin' software takes some figuring out.  If you want to send me the last back up you did (the sql file) then if you gave me an idea of what was in the article then I could probably extract it for you.

I'd be grateful for any help, thanks Freddy. I tried to attach the backup which should contain the original article however it's too large to be uploaded here.  I reckon if i could get any copy at all with or without the html code it may be better if I resurrect it in an html centre block while I decide where it would be better off.  Is there another source I can get it to you?
Title: Re: [TP 1.0 Beta 5-1] Editing and saving Articles
Post by: IchBin on April 19, 2010, 04:28:18 AM
Did you zip it up Rafferty? Zipping the download should down size it pretty good. If you can't post it, I'd just upload it to your site and send freddy a link to download it.
Title: Re: [TP 1.0 Beta 5-1] Editing and saving Articles
Post by: Rafferty on April 19, 2010, 06:37:54 AM
It is zipped and about 4.2 meg
Title: Re: [TP 1.0 Beta 5-1] Editing and saving Articles
Post by: Freddy on April 19, 2010, 01:06:39 PM
Yeah if you can do what IchBin said that would probably be the best way.  It also means it can be kept private - you don't really want a database full of emails floating around.   If you know how to ftp it to a temporary place on your webspace just send me the link to it by Private Messages.

:)
Title: Re: [TP 1.0 Beta 5-1] Editing and saving Articles
Post by: Rafferty on April 20, 2010, 02:11:21 PM
I would like to thank Freddy888 for rescuing us from a nasty loss of data.  Freddy successfully restored our deceased veterans list, something very close to our hearts. I won't have to committ hari kari now after all. 

Also thanks to Ichbin for being patient with me and understanding.

The above has convinced me to stay with TP and I would like to propose a Donation be made to TP when our committee next meets. Do we have Charter Membership here or just donations guys?

Lastly, I think missed in the main flurry of posts:  My mention of the error found under my comments box, any explanation for that?

QuoteOff topic slightly, Ive just noticed an error on the bottom of my new articles under the Comments box, as in the attached screen shot. I don't know what this means. "Not Defined Yet Not Defined Yet Not Defined Yet Not Defined Yet Not Defined Yet "

Thanks again guys, youve shown me just how dedicated you all are from TP and I appreciate it much more now. 
Title: Re: [TP 1.0 Beta 5-1] Editing and saving Articles
Post by: IchBin on April 20, 2010, 03:30:48 PM
Glad you got things working Rafferty. The "Not defined Yet" is a bug that has been reported. Bloc will be adding the fixes to the next release.
http://www.tinyportal.net/index.php?action=bugtracker;sa=bug557
Title: Re: [TP 1.0 Beta 5-1] Editing and saving Articles
Post by: Freddy on April 20, 2010, 03:45:53 PM
No problem at all Rafferty, glad to help  :)
Title: Re: [TP 1.0 Beta 5-1] Editing and saving Articles
Post by: Rafferty on April 29, 2010, 01:01:24 PM
A couple of quickies: I mentioned earlier that I had trouble displaying a full article if it was particularly long.  Everything seems to be working OK now on my site but this problem remains.  Do you guys think its something in my server or forum setup settings or something else?

Secondly we would like to make a donation as previously stated as a small appreciation of your work.  Do you have a charter membership or should it go through a general donation?

Thanks again guys

Title: Re: [TP 1.0 Beta 5-1] Editing and saving Articles
Post by: IchBin on April 29, 2010, 07:11:22 PM
Depends on what "long" is. Have you figured out if it is cutting off at any particular character count? It's easy to get the count of characters when you copy/paste the text into an editor. The editors usually show you how many characters you have in your current document.

As for your Donation, this is the latest on what Bloc has offered.
http://www.blocweb.net/index.php?topic=111.0
Title: Re: [TP 1.0 Beta 5-1] Editing and saving Articles
Post by: Rafferty on April 30, 2010, 02:03:18 AM
Thanks I will fix that up.

I am pasting 59,312 characters for an article

After saving it only displays 47,858 characters. The html code after that point is deleted or not saved
Title: Re: [TP 1.0 Beta 5-1] Editing and saving Articles
Post by: IchBin on April 30, 2010, 03:06:43 PM
Are there any <textarea> tags in your code? Can you tell if it is cutting off at any certain html tags or anything?
Title: Re: [TP 1.0 Beta 5-1] Editing and saving Articles
Post by: Rafferty on May 02, 2010, 12:42:18 AM
I have attached my original code (before)

and (after) is what it actually saves and displays
Title: Re: [TP 1.0 Beta 5-1] Editing and saving Articles
Post by: IchBin on May 02, 2010, 12:51:35 AM
If you look at your database table in something like phpMyAdmin (assuming you have it), what does it say when you look at the tp_articles table in the body row in the type column? Should say longtext. Let me know if it says anything different.
Title: Re: [TP 1.0 Beta 5-1] Editing and saving Articles
Post by: Rafferty on May 02, 2010, 01:38:08 AM
This is what I found. The body appears to contain the html code

nb: there is a column under type reading "NULL"  I didnt scroll across
Title: Re: [TP 1.0 Beta 5-1] Editing and saving Articles
Post by: Rafferty on May 02, 2010, 02:10:21 AM
Fixed! I found the body type which was marked as "TEXT" I was able to change that to "LONGTEXT" and the article displayed in full.  Sorry to waste your time with something which was obviously this end but again I appreciate your help. 

Have noticed something else though. Intro text is populating although I clearly have "No Intro Text" selected. 
Title: Re: [TP 1.0 Beta 5-1] Editing and saving Articles
Post by: IchBin on May 02, 2010, 03:49:40 AM
Would you mind starting another topic for your intro text problem? Explaining it a little more clearly if you could. Like, do you have some intro text in the article? But you don't have the checkbox selected to show it?