I can reproduce my problem now, and I suspect that in the above thread most users have the same problem, although perhaps there are more issues, can't tell...
System and setting details
- - Joomla 1.5.25
- JoomFish 2.2.3 (upgraded from 2.0.4 via 2.1.7), second language: Dutch (nl-NL)
- PHP 5.2.9 / Database MySQL 5.1.3 / Apache 2.2.1 (on Windows (Xampp)) / Browser: Mozilla Firefox 3.6.26
- Editor TinyMCE (as came with Joomla)
- Debug System: Yes / Error Reporting: Maximum
Reproduce (and play)
- - Backend > Components > JoomFish > Translation
- Code: Select all
<p>Text before Readmore.</p>
<hr id="system-readmore" />
<p>Text after Readmore.</p>- Code: Select all
<input type="hidden" name="id_introtext" value="xxx" />
<input type="hidden" name="id_fulltext" value="xxx" />
- Choose the language and 'Contents' for Content Element
- Pick a translation with a readmore line in it, with introtext and text after readmore (checked in database: #__content has an introtext and a fulltext).
- - I made a test article for this, with this text (copied from when the editor is toggled off)
line 1: introtext in #__content
line 2: Readmore
line 3: Fulltext in #__content
- - #__jf_content has reference field introtext with correct value
- #__jf_content has reference field fulltext with correct value
- - Text: <p>Text without Readmore.</p>
- Introtext has text, fulltext has no text: in database there is an introtext field and a fulltext field with an empty value
- Click save, then try to edit the article again. Everything stays OK.
- Now, clear the field with the label Article Text (leaving empty field: Joomla does not allow a user to save an article with no text, JoomFish does for its translation) and click apply
- - Now the introtext field is empty, and JoomFish deletes the entry from #__jf_content for the reference field introtext!
- When, after the save, the edit page is shown again, indeed without an article text, check the contents of these fields:
- Get some text again in this field, without a Readmore, and click apply
- - Text: <p>Text without Readmore.</p>
- Joomfish now puts this text in introtext, but with stores it in the field with the wrong id, that of the fulltext and then stores the (empty) fulltext in its field. Result: not text is saved. (But that seems logical to me, you only keep the last text saved for a specific id...)
- Result: user cannot save his translation (other than by removing the translations fields for the fulltext for this translation in the database (start over), e.g. where there is not introtext: can be done by deleting the translation in the Translate overview).
What can the user do now to 'fix' the problem?
1) Delete the translation(s) with problems: Backend > Components > JoomFish > Translation > [Select the translation(s) with problems] > Click Delete on the toolbar.
2) Either never save an article without any article text OR apply the solution proposed by Gofry at the solution proposed by Gofry proposes here viewtopic.php?f=47&t=8375&p=35301#p35469 to prevent problems when saving a translated article without any text in the article.
I've been tracking with Eclipse and jDump what JoomFish does when it stores the introtext/fulltext. Bottom line is that as far as I understand what is happening (and I'm new at this/JoomFish!) the solution proposed by Gofry proposes here viewtopic.php?f=47&t=8375&p=35301#p35469
allows the user to save with empty introtext AND empty fulltext, preventing problems for new articles that the user translates. It’s not a solution for articles already having a problem.
Gofry's solution prevents the introtext item being deleted if it's empty (in the same way an empty fulltext isn't deleted).
Possibly that has something to do with the id for the introtext that is the id for the full text in case of a non-existing introtext AND existing fulltext.
