Page 1 of 2

[UNDER REVIEW: 1.0.11] Some bugs and fixes

Posted: Tue Sep 05, 2006 7:11 pm
by eelziere
Hi All,

I am a newbie to Joomla and I am not sure this is the right place for this topic...
I found a couple of bugs in Joomla 1.0.11. Here they are:

1. MAJOR BUGS

1.1 In file includes/joomla.php, there are 2 bugs:

- In method mosSession::login(), "update" in following sequence fails:

// initialize session data
$session =& $this->_session;
$session->guest = 0;
$session->username = $row->username;
$session->userid = intval( $row->id );
$session->usertype = $row->usertype;
$session->gid = intval( $row->gid );

$session->update();

Fix is as follow:

. . .
$session->guest = '0';
. . .
$session->update();

- In method mosSession::logout(), "update" in following sequence fails:

$session =& $this->_session;
$session->guest = 1;
$session->username = '';
$session->userid = '';
$session->usertype = '';
$session->gid = 0;

$session->update();

Fixes are as follow:

. . .
$session->userid = '0';
. . .
$session->gid = '0';
. . .
$session->update();

I have read hundred of topics in dozen of forums (french and english ones) where
people where talking about this "remaining login form + missing user menu" problem.
I hope this will help...

I have also noticed the problem in version 1.0.10. I did not check for earlier versions.

1.2 In file com_registration/registration.php, there is 1 bug :

Line 155, you have to add:

$row->params = 'editor=tinymce';

otherwise the new user is not inserted into 'users' table...

2. MINOR BUGS

2.1 In file installation/sql/sample_data.sql:

Translated data for contact_details.postcode column mighr be too long:
that is the case in french and probably in other languages!

I propose to make this column a bit longer (15 characters for example.)


Apart these issues, I LOVE Joomla!!!  ;)

Cheers!

Some bugs and fixes

Posted: Tue Sep 05, 2006 7:28 pm
by eyezberg
Reported by user eelziere on the French Forums.
Bonsoir à tous,

Je suis novice avec Joomla et je ne suis pas sûr d'avoir trouvé la bonne
rubrique pour ce message... Désolé ! Le contenu n'en est pas moins
important, jugez vous-mêmes !

1. BUGS MAJEURS

1.1 Dans le fichier includes/joomla.php, il y a 2 bugs :

- Dans la méthode mosSession::login(), le "update" dans la séquence
suivante échoue :

// initialize session data
$session =& $this->_session;
$session->guest = 0;
$session->username = $row->username;
$session->userid = intval( $row->id );
$session->usertype = $row->usertype;
$session->gid = intval( $row->gid );

$session->update();

La correction est la suivante :

. . .
$session->guest = '0';
. . .
$session->update();

- Dans la méthode mosSession::logout(), le "update" dans la séquence
suivante échoue :

$session =& $this->_session;
$session->guest = 1;
$session->username = '';
$session->userid = '';
$session->usertype = '';
$session->gid = 0;

$session->update();

Les corrections sont les suivantes :

. . .
$session->userid = '0';
. . .
$session->gid = '0';
. . .
$session->update();

Les centaines de messages dans des dizaines de forums concernant le
"fameux" problème du module de login qui reste et du menu usermenu qui
n'apparaît pas après identification, vont peut-être enfin trouver une
explication plus valable que tout ce que j'ai lu...

D'autant plus que ces bugs était déjà la dans la 1.0.10 et peut-être
même avant (je n'ai pas vérifié)...

A faire remonter à nos homologues anglo-saxons et notamment l'équipe
de développement.

1.2 Dans le fichier com_registration/registration.php, il y a 1 bug :

Ligne 155, il faut rajouter :

$row->params = 'editor=tinymce';

sinon, l'ajout du nouvel utilisateur dans la table 'users' échoue...

2. BUGS MINEURES

2.1 Dans le fichier installation/sql/sample_data.sql :

La donnée 'Code Postal' (11 caractères) est trop longue pour la colonne
contact_details.postcode (10 caractères).

Le problème n'arrive que si vous voulez injecter des échantillons de
données (question posée pendant l'installation de Joomla)

Je propose 'C. P.' pour la version française, mais pour être tranquille
avec toutes les langues, il faudrait peut-être mieux augmenter légèrement
la longueur de cette colonne (15 caractères ?). A voir avec l'équipe de
développement...
Meaning:
1st bug (major):
In includes/joomla.php the "update" in mosSession::login(), fails, as single quotes around the value 0 are missing here:

Code: Select all

// initialize session data
$session =& $this->_session;
$session->guest = 0; // should be $session->guest = '0';
$session->username = $row->username;
$session->userid = intval( $row->id );
$session->usertype = $row->usertype;
$session->gid = intval( $row->gid );

$session->update();
applicable from 1.0.10 at least, still in .11

2nd bug in com_registration/registration.php (major):
Missing on line 155: $row->params = 'editor=tinymce'; else user insertions fails
(registration works fine on my site as of now with .11, so I have doubts about this one..)

3rd, minor, in installation/sql/sample_data.sql
The contact_details.postcode column is 10 chars, but in french for example it is "Code Postal" which has 11, in German, "Postleitzahl" needs 12, .. maybe consider adding a bit of padding here.. ;)

regards, Joe

Re: Some bugs and fixes

Posted: Tue Sep 05, 2006 10:00 pm
by infograf768
I know... looks redundant....
Just merged the 2 topics as they are the same...  :laugh:

Re: Some bugs and fixes

Posted: Wed Sep 06, 2006 6:55 am
by Robin
Hi eelziere,

Thanks for the report, is this turns out to be indeed a bug related to all the login issues, it would solve a lot of problems. Thanks for the report. We will look into this.

Regards Robin

[TAGGED: Q&T] Status > Under Review

Re: [UNDER REVIEW: 1.0.11] Some bugs and fixes

Posted: Wed Sep 06, 2006 7:17 am
by RobS
Regarding this fix, what version of PHP are you using?

Re: [UNDER REVIEW: 1.0.11] Some bugs and fixes

Posted: Wed Sep 06, 2006 8:09 am
by eelziere
My PHP version is 5.1.4

Re: [UNDER REVIEW: 1.0.11] Some bugs and fixes

Posted: Wed Sep 06, 2006 8:16 am
by eelziere
You forgot that bug in my french message.

In includes/joomla.php the "update" in mosSession::logout(), ALSO fails:

$session =& $this->_session;
$session->guest = 1;
$session->username = '';
$session->userid = '';        // should be $session->userid = '0';
$session->usertype = '';
$session->gid = 0;          // should be $session->gid = '0';

$session->update();

Re: [UNDER REVIEW: 1.0.11] Some bugs and fixes

Posted: Mon Sep 25, 2006 12:40 pm
by XenoMorph
eelziere wrote: Hi All,

I am a newbie to Joomla and I am not sure this is the right place for this topic...
I found a couple of bugs in Joomla 1.0.11. Here they are:

.
.
.

Fix is as follow:
.
.
.
UAU!!! For a newbie you seem to know quite a lot  ;)

Is this (finally) some light at the end of the tunnel for the reported login issues in joomla 10.0.11 ?

Hope so... I'll try the suggested fixes and report here later

Anyway thank you so much for the effort!!!

Re: [UNDER REVIEW: 1.0.11] Some bugs and fixes

Posted: Mon Oct 02, 2006 9:33 pm
by beano
I have a 'front end' login problem. This started when I upgraded from 1.0.9 to 1.0.11

Is the above likely to cure the problem?

Many others seem to have the same problem http://forum.joomla.org/index.php/topic ... #msg479924

Re: [UNDER REVIEW: 1.0.11] Some bugs and fixes

Posted: Mon Oct 02, 2006 9:50 pm
by eelziere
I don't know...

I discovered the problem when installing a brand new site with version 1.0.11
I found the same problem when doing the same with version 1.0.10
I did not check for previous versions...

I might be worth trying the fixes I suggested on your version 1.0.09

Re: [UNDER REVIEW: 1.0.11] Some bugs and fixes

Posted: Wed Oct 04, 2006 7:30 am
by Devz
I tried somehow implementing the modifications in the first post,
however theres no mosSession::login() function in 1.0.11 thus i stopped.

Doesnt help with resolving this thread:
http://forum.joomla.org/index.php/topic,76935.0.html

Re: [UNDER REVIEW: 1.0.11] Some bugs and fixes

Posted: Wed Oct 04, 2006 7:41 am
by eelziere
You are right, the login() method is in class mosMainFrame, starting around lines 980s:

/**
* Login validation function
*
* Username and encoded password is compare to db entries in the jos_users
* table. A successful validation updates the current session record with
* the users details.
*/
function login( $username=null,$passwd=null, $remember=0, $userid=NULL ) {
. . .

Re: [UNDER REVIEW: 1.0.11] Some bugs and fixes

Posted: Sun Oct 08, 2006 7:21 am
by breweruk
I found my way to this thread by searching on 'log in problems' and following several links.

My problem is this.

If I try to log in at my front page using IE6.0, it says 'You are not authorised to view this resource'. The second time I try I always get in and the user menu appears.

If I try to log in at my front page using Mozilla Firefox 1.0.5.7 it says 'You are not authorised to view this resource'. The second time I try I always get in BUT there is no user menu -- although it says one member is now online. It is only when I move to another section that I can see the user menu.

I ran the diagnostics.php and got the following. (I am a newbie, so I am not sure how to repair these files with the 'valid MOS' code.)

Compair file hashes against original
Error Filename Type
WARNING /home/brewer/public_html/cms/globals.php File is corrupted or has been altered
WARNING /home/brewer/public_html/cms/index.php File is corrupted or has been altered
SECURITY /home/brewer/public_html/cms/components/com_joomlaboard/file_upload.php File does not contain _VALID_MOS. Read more
SECURITY /home/brewer/public_html/cms/components/com_joomlaboard/image_upload.php File does not contain _VALID_MOS. Read more
SECURITY /home/brewer/public_html/cms/components/com_joomlaboard/sb_layout.php File does not contain _VALID_MOS. Read more
SECURITY /home/brewer/public_html/cms/includes/Cache/Lite.php File does not contain _VALID_MOS. Read more
SECURITY /home/brewer/public_html/cms/includes/domit/xml_domit_rss_shared.php File does not contain _VALID_MOS. Read more
SECURITY /home/brewer/public_html/cms/includes/phpmailer/class.phpmailer.php File does not contain _VALID_MOS. Read more
WARNING /home/brewer/public_html/cms/language/english.php File is corrupted or has been altered
SECURITY /home/brewer/public_html/cms/modules/exmenu/view/pattemplate.menuview.class.php File does not contain _VALID_MOS. Read more

Error Filename Type
MISSING /home/brewer/public_html/cms/htaccess.txt File is missing


Created by Adam van Dongen - Joomla Diagnostics    © 2006 Adam van Dongen


Re: [UNDER REVIEW: 1.0.11] Some bugs and fixes

Posted: Sun Oct 08, 2006 7:32 am
by breweruk
Sorry, forgot to add.

I can always log in first time from my cms/administrator page in both IE and Firefox. The problem is only with the front page log in.

Re: [UNDER REVIEW: 1.0.11] Some bugs and fixes

Posted: Sun Oct 08, 2006 8:30 am
by eelziere
Hi breweruk,

When logged into the backend, check that your "usermenu" module is configured as follow:
- Access Level = Registered (meaning accessible only for registered users) and NOT Public or Special
- Published = yes
- Pages / Elements = All (meaning visible on all pages once user is logged in)

Concerning your diagnostic errors:
- Check that for php files that can be called with URLs directly in the browser, you have the following top code:

Code: Select all

// Set flag that this is a parent file
define( '_VALID_MOS', 1 );
- Check that for php files that are included into others, you have the following top code:

Code: Select all

// no direct access
defined( '_VALID_MOS' ) or die( 'Restricted access' );
Other "corrupted" files are probably only "altered"...

Anyhow it does not sound good that you have all these files in "corrupted" state.
Do you spend your time patching / hacking them or what?   :)

Hope all this will help...

Cheers,
EE.

Re: [UNDER REVIEW: 1.0.11] Some bugs and fixes

Posted: Sun Oct 08, 2006 8:37 am
by breweruk
Hi thanks for that, I will try to work through the measures you suggest.

It's a recent download and have only added the joomlaboard component and the component to show the latest posts on the front page.

I was unable to get joomlacomment to work.

Is it possible to reinstall Joomla without losing all the data I have put on the site? A sort of update of an existing site to the same version without losing all my content?

Would that be easier?

David

Re: [UNDER REVIEW: 1.0.11] Some bugs and fixes

Posted: Sun Oct 08, 2006 8:46 am
by breweruk
eelziere wrote: Hi breweruk,

When logged into the backend, check that your "usermenu" module is configured as follow:
- Access Level = Registered (meaning accessible only for registered users) and NOT Public or Special
- Published = yes
- Pages / Elements = All (meaning visible on all pages once user is logged in)
Hi Eelziere,

That bit is fine.

I am going to need a pal to help me with the other bit, because I am afraid of making a mistake. The site I am working on has been moved to Joomla and I am keen not to lose anything by messing things up.

David

Re: [UNDER REVIEW: 1.0.11] Some bugs and fixes

Posted: Mon Oct 09, 2006 7:44 am
by eelziere
Hi breweruk,

Here is what I suggest you:

1. Make a full backup of your web site (joomla installation folder AND database)
2. Make a list of all the files you updated since you customized the joomla installation and that you want to keep in place
    (*.css, *.png, *.gif, *.js, *.php, *.htm?, ...)
3. Make a list of all the files that have been modified since you added your components (joomlaboard and joomlacomment)
4. Make a list of all the tables that have been added/altered/updated since you customized the joomla installation
  (MySQL logs will help you for that step)
5. Make a list of all the tables that have been added/altered/updated since you added these components
  (MySQL logs will help you for that step)
6. Make the difference between the lists generated at steps 2 and 3 and analyze in details what happened to the files that are
    in the lists intersection (you need a files difference tool)
7. Make the difference between the lists generated at steps 4 and 5 and analyze in details what happened to the tables that are
    in the lists intersection and write sql scripts applying these differences
8. Modify manually the files identified at steps 6 accordingly to the files identified at step 2
9. Modify manually the tables identified at steps 7 accordingly to the tables identified at step 4

An alternative solution:

1. Uninstall the joomlaboard and joomlacomment components
2. Make a full backup of your web site (joomla installation folder AND database)
3. Install a brand new web site in a different folder, from the joomla package you used for your original site
4. Compare the folders of the original installation and the new one
5. Apply manually the modifications identified at step 4 to the new installation files
6. Compare the databases of the original installation and the new one
7. Apply manually the modifications identified at step 5 to the new installation tables

As you can imagine, these 2 processes are VERY risky, so take your time or just forget it!
And do not blame me if you mess up everything!  ;)

Good luck!

EE.

Re: [UNDER REVIEW: 1.0.11] Some bugs and fixes

Posted: Mon Oct 09, 2006 8:04 am
by breweruk
Wow, thanks so much for all this information.

This will keep me busy for the rest of the week.

Thanks for taking the time to help me.

I will ask a friend to help me with this.

Great stuff.

David

Re: [UNDER REVIEW: 1.0.11] Some bugs and fixes

Posted: Mon Oct 16, 2006 8:21 am
by michaelthomsen
Hi
I applied the '0' fix from EE for the login problem.
thank you very much.

It worked!
My site is on a windows server.
Michael

Re: [UNDER REVIEW: 1.0.11] Some bugs and fixes

Posted: Sat Oct 21, 2006 9:23 pm
by friesengeist
Hi eelziere,

I tried to find out what your patch changes, and took a carefull look at the queries generated by Joomla!. So far, I couldn't find anything wrong with it (though it obviously wouldn't hurt to apply your patch). Given that Michael just applied your patch and it works for him, you might really have found something. Could you both, eelziere and michaelthomsen, please state your system info, esp. PHP version and database version? (OK, eelziere, you're on PHP 5.1.4, I already found that ;-))
eelziere wrote: 1.1 In file includes/joomla.php, there are 2 bugs:

- In method mosSession::login(), "update" in following sequence fails:

// initialize session data
$session =& $this->_session;
$session->guest = 0;
$session->username = $row->username;
$session->userid = intval( $row->id );
$session->usertype = $row->usertype;
$session->gid = intval( $row->gid );

$session->update();

Fix is as follow:

. . .
$session->guest = '0';
. . .
$session->update();

- In method mosSession::logout(), "update" in following sequence fails:

$session =& $this->_session;
$session->guest = 1;
$session->username = '';
$session->userid = '';
$session->usertype = '';
$session->gid = 0;

$session->update();

Fixes are as follow:

. . .
$session->userid = '0';
. . .
$session->gid = '0';
. . .
$session->update();
The query which is generated for the login process looks like this (latest SVN, tested both on PHP4 and PHP5):

Code: Select all

UPDATE jos_session SET `time`='1161462420',`userid`='62',`usertype`='Super Administrator',`username`='admin',`gid`='2',`guest`='' WHERE session_id='1bb23897bd84b7dac0e1e36b00097233'
The field guest is set to '', but since it's type is tinyint(4), it's converted to integer, so the DB record actually holds the value 0 - unless some specific database versions do not convert this to int (and store null instead).
eelziere wrote: 1.2 In file com_registration/registration.php, there is 1 bug :

Line 155, you have to add:

$row->params = 'editor=tinymce';

otherwise the new user is not inserted into 'users' table...
Why would an empty (null) params field prevent the object from being stored to the DB? I haven't tested this, but this is the first report about problems when registering at a site. From looking at the code, I can't see any mistake.
eelziere wrote: 2. MINOR BUGS

2.1 In file installation/sql/sample_data.sql:

Translated data for contact_details.postcode column mighr be too long:
that is the case in french and probably in other languages!

I propose to make this column a bit longer (15 characters for example.)
Sorry, no changes to the DB scheme in 1.0.x...

Thanks for your report so far!
Looking forward to seeing your system info,
Enno

Re: [UNDER REVIEW: 1.0.11] Some bugs and fixes

Posted: Wed Oct 25, 2006 2:07 pm
by davemacd
This fix, and the other posted patch download of joomla.php and mos_login.php did not work for me.

I am running 1.0.11 on an IIS platform. My site is on a subdomain http://subdomain.domain.com and my config file reflects that.

When a user logs in from the front end they are fed a login parameter redirect to a mos_docman component, this has worked in previous versions of Joomla although I recently went through a catch up so moved from 1.0.5 through to 1.0.11 so can't say if it would have worked in the versions in between.

The problem I have is that on first login the users is told they don't have access to the downloads component, and if I stop the redirect in the login parameters they are simply given a refreshed homepage.

When they attempt login a second time all is well - just as it is if they use the remember me box.

The strange thing is that if I enable a welcome greeting by using the radio button in the login parameters it also works perfectly all the time - but my users get that annoying pop up box confirming they have logged in.

Have spent the whole afternoon trying various fixes for this but none as yet have done the trick  :(

Re: [UNDER REVIEW: 1.0.11] Some bugs and fixes

Posted: Tue Nov 07, 2006 12:21 am
by friesengeist
friesengeist wrote: [...] Could you both, eelziere and michaelthomsen, please state your system info, esp. PHP version and database version? (OK, eelziere, you're on PHP 5.1.4, I already found that ;-))
Ok, everyone, if this fix (using '0' instead of 0, '1' instead of 1) works for you, may I ask you to give us your exact MySQL version (plus PHP, OS, Webserver)?

Additionally, it would be interesting to see if the first query your Joomla! 1.0.11 application does looks like this one:

Code: Select all

SET sql_mode = 'MYSQL40'
So maybe you can put your install into debug mode and include the first query into your post as well?

Thanks in advance,
Enno

Re: [UNDER REVIEW: 1.0.11] Some bugs and fixes

Posted: Tue Nov 07, 2006 7:48 am
by Oliver23
Great thanks, this works for me. Before I didn't even get an error message when I tried to login in frontend. Now it works.

Here my System Infos:
PHP built On:    Windows NT S0095 5.2 build 3790
Database Version:    5.0.24-community-nt
PHP Version:    5.1.6
Web Server:    Apache/2.2.3 (Win32)
WebServer to PHP interface:    apache2handler
Joomla! Version:    Joomla! 1.0.11 Stable [ Sunbow ] 28 August 2006 20:00 UTC

But I can't see my Debug, it is all behind my layers  ???

edit: maybe this:

Code: Select all

1
SELECT `id`,`link` FROM jos_menu where ((`menutype`='mainmenu') AND (`published` > 0) AND (`ordering`='1') AND (`parent` = 0) AND (`access` >= '0'))

Re: [UNDER REVIEW: 1.0.11] Some bugs and fixes

Posted: Tue Nov 07, 2006 10:43 pm
by friesengeist
Oliver, thanks a lot!
Oliver23 wrote: Database Version:  5.0.24-community-nt
Oliver23 wrote:

Code: Select all

1
SELECT `id`,`link` FROM jos_menu where ((`menutype`='mainmenu') AND (`published` > 0) AND (`ordering`='1') AND (`parent` = 0) AND (`access` >= '0'))
Exactly the info I needed. In your case, the first query should definately look like "SET sql_mode = 'MYSQL40'", and since it's not, some of the observed issues arrise. I'll get back to you! :)

Re: [UNDER REVIEW: 1.0.11] Some bugs and fixes

Posted: Wed Nov 08, 2006 10:24 pm
by friesengeist
Ok, just one guess: everyone for whom the 0->'0' patch works runs Joom!Fish?

Thanks to Oliver, I was able to find out why the expected query "SET sql_mode = 'MYSQL40'" is not run on his website. Joomla! actually runs it, but the Joom!Fish database layer overwrites the Joomla! database object with it's own one. Since a new database connection is made, the previous setting is lost.

This also explains pretty good why it's so hard to find the cause of this reported problem - since most dev's probably run clean Joomla! installations without 3PD components for testing, this bug doesn't show on any of our test installations.


For the interested of you, here are the recorded DB queries for one page load. The green ones are made by Joomla!, the blue ones by Joom!Fish with a new database connection:
1
SET sql_mode = 'MYSQL40'
2
SELECT folder, element, published, params
FROM jos_mambots
WHERE published >= 1
AND access <= 0
AND folder = 'system'
ORDER BY ordering
1
SELECT id, link
FROM jos_menu
WHERE menutype = 'mainmenu'
AND published = 1
ORDER BY parent, ordering
LIMIT 0, 1
2
SELECT template
FROM jos_templates_menu
WHERE client_id = 0
AND ( menuid = 0  OR menuid = 1 )
ORDER BY menuid DESC
LIMIT 0, 1
etc...

Re: [UNDER REVIEW: 1.0.11] Some bugs and fixes

Posted: Fri Nov 10, 2006 9:53 pm
by jfranken
Hello,

The patch worked fine, until the moment I wanted to post news from the Usermenu.
I'm using the standard content manager to post news.

This is the error I'm getting;

Code: Select all

moscontent::store failed <br />Field 'urls' doesn't have a default value SQL=INSERT INTO jos_content ( `id`,`title`,`introtext`,`fulltext`,`state`,`sectionid`,`catid`,`created`,`created_by`,`created_by_alias`,`publish_up`,`publish_down`,`images`,`version`,`ordering`,`metakey`,`metadesc`,`access` ) VALUES ( '0','My photo album','hello','','0','1','1','2006-11-10 22:48:53','62','','2006-11-10 01:00:00','0000-00-00 00:00:00','','1','0','','','0' )
These are my system variables;
PHP built On:  Windows NT KD 5.1 build 2600
Database Version: 5.0.26-community-nt
PHP Version: 5.1.6
Web Server: Apache/2.0.59 (Win32) mod_ssl/2.0.59 OpenSSL/0.9.8c PHP/5.1.6
WebServer to PHP interface: apache2handler
Joomla! Version: Joomla! 1.0.11 Stable [ Sunbow ] 28 August 2006 20:00 UTC
User Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8.0.4) Gecko/20060613 Camino/1.0.2

Any clues to this one?

thx a lot,
John

Re: [UNDER REVIEW: 1.0.11] Some bugs and fixes

Posted: Sat Nov 11, 2006 1:05 pm
by friesengeist
jfranken wrote: The patch worked fine, until the moment I wanted to post news from the Usermenu.
I'm using the standard content manager to post news.

This is the error I'm getting;

Code: Select all

moscontent::store failed <br />Field 'urls' doesn't have a default value SQL=INSERT INTO jos_content ( `id`,`title`,`introtext`,`fulltext`,`state`,`sectionid`,`catid`,`created`,`created_by`,`created_by_alias`,`publish_up`,`publish_down`,`images`,`version`,`ordering`,`metakey`,`metadesc`,`access` ) VALUES ( '0','My photo album','hello','','0','1','1','2006-11-10 22:48:53','62','','2006-11-10 01:00:00','0000-00-00 00:00:00','','1','0','','','0' )
You could try this:
In /components/com_content/content.php, around line 1950, find this:

Code: Select all

	$row = new mosContent( $database );
	if ( !$row->bind( $_POST ) ) {
		echo "<script> alert('".$row->getError()."'); window.history.go(-1); </script>\n";
		exit();
	}
and add this line afterwards:

Code: Select all

	$row->urls = '';
jfranken wrote: Any clues to this one?
Please let me know if you use Joom!Fish?

Re: [UNDER REVIEW: 1.0.11] Some bugs and fixes

Posted: Sat Nov 11, 2006 1:24 pm
by jfranken
Hi,

Yes, I am using Joom!Fish, this is when all started ;)
I need 3 translations on the site and then it seems the easiest solution.

OK, this is the error I'm getting after changing the code to;

ERROR

Code: Select all

moscontent::store failed <br />
CHANGE MADE

Code: Select all

	$row = new mosContent( $database );
	if ( !$row->bind( $_POST ) ) {
		echo "<script> alert('".$row->getError()."'); window.history.go(-1); </script>\n";
		exit();
	}
  $row->urls = '';
Thanks a lot for looking into this.

John

Re: [UNDER REVIEW: 1.0.11] Some bugs and fixes

Posted: Sat Nov 11, 2006 3:42 pm
by friesengeist
jfranken wrote: Yes, I am using Joom!Fish, this is when all started ;)
Thanks for confirming!
jfranken wrote: OK, this is the error I'm getting after changing the code to;

ERROR

Code: Select all

moscontent::store failed <br />
I don't have the time to test this on MySQL 5 locally right now, so here is a pretty radical method which should fix it:
In your /index.php, after line ~103:

Code: Select all

$_MAMBOTS->trigger( 'onAfterStart' );
insert this:

Code: Select all

// if running mysql 5, set sql-mode to mysql40 - thereby circumventing strict mode problems
if ( strpos( $database->getVersion(), '5' ) === 0 ) {
	$query = "SET sql_mode = 'MYSQL40'";
	$database->setQuery( $query );
	$database->query();
}
Please note that this is an untested quickfix, as always, use on your own risk ;)