CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Import (and other forms) dont work in Joomla 1.5
Pages: [1]

Author Topic: Import (and other forms) dont work in Joomla 1.5  (Read 1762 times)

mcsmom

  • I post frequently
  • ***
  • Posts: 266
  • Karma: 23
    • Official Joomla! Book
  • CiviCRM version: 4 and 3.4
  • CMS version: Joomla!
Import (and other forms) dont work in Joomla 1.5
August 23, 2007, 11:09:06 am
Lobo,

I'm getting the same message with Joomla! 1.5--do you think it could be a similar issue with the j! ftp layer?

Elin

mcsmom

  • I post frequently
  • ***
  • Posts: 266
  • Karma: 23
    • Official Joomla! Book
  • CiviCRM version: 4 and 3.4
  • CMS version: Joomla!
Import (and other forms) dont work in Joomla 1.5
August 23, 2007, 02:05:08 pm
Update: If i disable the ftp layer, I don't get the ""Import Data File is a required field" message--the page just refreshes and does nothing.

This is in FireFox.

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Import (and other forms) dont work in Joomla 1.5
August 23, 2007, 02:08:06 pm

Elin:

Is this with the latest 1.8 version. This issue has been fixed for safari3 in the latest 1.8

If it is happening with joomla 1.5, can u please file an issue. we'll investigate and fix

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

mcsmom

  • I post frequently
  • ***
  • Posts: 266
  • Karma: 23
    • Official Joomla! Book
  • CiviCRM version: 4 and 3.4
  • CMS version: Joomla!
Import (and other forms) dont work in Joomla 1.5
August 23, 2007, 03:32:31 pm
Yes, with 1.5. And I was just going to post that the file type might be the issue.
The files are uploading with this file type shows in my ftp client:
MicroSoft Office Excel Comma Separated Values File

Or if I look with extplorer it says type: file.

Is this wrong? Should it say txt?

I need to install the current version--will report back or file an issue.
« Last Edit: August 23, 2007, 03:34:38 pm by mcsmom »

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Import (and other forms) dont work in Joomla 1.5
August 26, 2007, 01:35:12 am

Spent a few hours tracking this down. I had a 1.5 install which worked while kurund had a 1.5 install on the same machine which did not work :( Took me a few hours to track this down :(

joomla/libraries/joomla/session/storage/database.php: function write( )

check for database connected'ness. This fails for mysql but works with mysqli. This has to do with the order of calling destructors and the session write to the database. Here is what drupal's session handler has in comments:

Code: [Select]
  // Write and Close handlers are called after destructing objects since PHP 5.0.5
  // Thus destructors can use sessions but session handler can't use objects.
  // So we are moving session closure before destructing objects.
  register_shutdown_function('session_write_close');

The reason why forms (and multi-step forms) are affected is because, we follow the POST/GET pattern (http://en.wikipedia.org/wiki/Post/Redirect/Get), so we redirect the browser to a new page and call exit( ) immediately after the "header('Location: ...');" statement. This in turn is supposed to destroy all the PHP objects (in PHP5 and over) and also write the session to the DB. In our current scenario, the session is not written to the db if you use a DSN of mysql://, but does work if you use mysqli://  (not sure why)

I'll point the joomla core developers to this post, and see if we can get this fixed in Joomla-1.5 RC2 :)

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

mcsmom

  • I post frequently
  • ***
  • Posts: 266
  • Karma: 23
    • Official Joomla! Book
  • CiviCRM version: 4 and 3.4
  • CMS version: Joomla!
Re: Import (and other forms) dont work in Joomla 1.5
August 26, 2007, 04:54:27 am
Thank you!
I really thought I was going crazy with this. I can't tell you what a relief it was to hear Kurund also had this problem, since it seemed like I was the only one. :)

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Import (and other forms) dont work in Joomla 1.5
August 26, 2007, 12:14:50 pm

The joomla developers are awesome :)

Got a response from Johan and this is now fixed in svn, so should be part of RC2

If you want a fix before that add the following to:

CRM/Utils/System.php, function redirect( ) (line 410 or so)

change this:

Code: [Select]
        // replace the & characters with &
        // this is kinda hackish but not sure how to do it right
        $url = str_replace( '&', '&', $url );
        header( 'Location: ' . $url );
        exit( );

to

Code: [Select]
        // replace the & characters with &
        // this is kinda hackish but not sure how to do it right
        $url = str_replace( '&', '&', $url );
        header( 'Location: ' . $url );
        JSession::close( );
        exit( );

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

mcsmom

  • I post frequently
  • ***
  • Posts: 266
  • Karma: 23
    • Official Joomla! Book
  • CiviCRM version: 4 and 3.4
  • CMS version: Joomla!
Re: Import (and other forms) dont work in Joomla 1.5
September 01, 2007, 09:41:27 am
Okay, I just want to say, 1.5 RC2+1.8= amazing. :)

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Import (and other forms) dont work in Joomla 1.5

This forum was archived on 2017-11-26.