#1271 install last page no css/js

XOOPS_2.5.x
pending
1
2014-08-27
2013-05-23
Tarik AMINE
No

at the last page of installer the link to media files (css, js ...) isnt loaded correctly when instaling with a diffrent laguage than english, the fix is:

at install\page_end.php 42

$_SESSION['newinstallPRO'] = XOOPS_URL.'/'.$installer_modified.'/js/prototype-1.6.0.3.js';

$_SESSION['newinstallINST'] = XOOPS_URL.'/'.$installer_modified.'/js/xo-installer.js';

if (file_exists('language/' . $wizard->language . '/style.css')) {

$_SESSION['newinstallCSSDeflt'] = XOOPS_URL.'/'.$installer_modified.'/css/style.css';

$_SESSION['newinstallCSS'] = XOOPS_URL.'/'.$installer_modified.'/language/' . $wizard->language . '/style.css';

} else {

$_SESSION['newinstallCSSDeflt'] = XOOPS_URL.'/'.$installer_modified.'/css/style.css';

$_SESSION['newinstallCSS'] = '';

}

at install\include\install_tpl.php 168

loadjscssfile(newPro, 'js');

loadjscssfile(newINST, 'js');

loadjscssfile(newCSSDeflt, 'css');

loadjscssfile(newCSS, 'css');

Related

Bugs: #1271

Discussion

  • Michael Beck

    Michael Beck - 2013-09-15

    Committed to SVN

     
  • Michael Beck

    Michael Beck - 2013-09-15
    • status: open --> pending
    • assigned_to: Michael Beck
     
  • Tarik AMINE

    Tarik AMINE - 2013-09-17

    css and javascript loading was fixed but some background images seems to have a problem
    http://i.imgur.com/0nf3KrT.png

     
  • Richard Griffith

    Checked in changes which should fix this (and #1250) completely.

    Basic problem is that the install directory is renamed at php shutdown, which, without benefit of caching, makes the assets inaccessible. The previous patch forced loading of the renamed files, but only worked for styles and scripts, not images. This change moves the triggering of the cleanup to the page loaded event in the browser, since all the needed assets are already loaded at that point. Everything stays available until it is no longer needed.

    Also removed the previous button from the last page of the installer, since there is nothing to go back to. (And, since I was in the install logic, added the changes made for 2.6.0 to eliminate the dummy mainfile.php from the distribution to reduce headaches when upgrading.)

     
  • Tarik AMINE

    Tarik AMINE - 2014-01-20

    was mainfile.php deleted in the last revision? it caused these errors in first page of installer

    Warning: include_once(../mainfile.php): failed to open stream: No such file or directory in C:\easyphp\data\localweb\scripts\xoops\257\install\include\common.inc.php on line 42
    
    Warning: include_once(): Failed opening '../mainfile.php' for inclusion (include_path='.;C:\php\pear') in C:\easyphp\data\localweb\scripts\xoops\257\install\include\common.inc.php on line 42
    
     
  • Richard Griffith

    Yes - mainfile.php was removed. It did more harm than good, especially when updating existing systems. Now, if mainfile is not found by the root index.php, and install is present, the installer is launched. Launching the installer is all the old mainfile did, and then it was always completely overwritten. The same change was incorporated in 2.6.0 some time ago.

    I just checked in changes that should suppress the expected warnings during installation. Also, it fixes an error that caused cleanup.php to sometimes do nothing.

     
    • Cesag

      Cesag - 2014-04-28

      Install doesn't continue if mainfile.php does not exist.

      Tested with Php 5.4

       
      • Richard Griffith

        I've been looking at this but don't have an answer yet.

        Actually, in this case mainfile.php should have just been created using a 'copy' command. It should have been an exact copy of the mainfile.dist.php at the time this message would have been generated.

        One of these conditions must have occurred:
        - The server does not allow the copy command
        - Directory permissions do not allow PHP to create the copied file
        - The resulting permissions on the copied file do not allow reading
        - something I have not thought of yet ;)

        Can you confirm that you can install XOOPS 2.5.6 on this server? The code where this error occurs did not change. It should go through the same copy process, so that could be an important clue.

        Also, do you know what the OS the server is running?

        Thanks.

         
        • Cesag

          Cesag - 2014-04-29

          I'm on dedicated server, I'm on Unbuntu server 13.04
          Maybe my server isn't configurated properly.

          When I go to my error page and after entering this code on it:

          if (PHP_VERSION_ID < 50400) error_reporting (E_ALL | E_STRICT);
          else error_reporting (E_ALL);
          ini_set('display_errors', true);
          ini_set('html_errors', false);
          ini_set('display_startup_errors',true);
          ini_set('log_errors', false);
          ini_set('error_prepend_string','');
          ini_set('error_append_string','
          ');
          ini_set('ignore_repeated_errors', true);

          I get these errors:

          Notice: Undefined variable: rewrite in /install/page_configsave.php on line
          107
          Warning: array_merge(): Argument #1 is not an array in
          /install/page_configsave.php on line 107
          Warning: array_merge(): Argument #1 is not an array in
          /install/page_configsave.php on line 109
          Warning: fopen(/data/secure.php): failed to open stream: No such file or
          directory in /install/page_configsave.php on line 110

          2014-04-29 3:30 GMT+02:00 Richard Griffith rgriffith@users.sf.net:

          I've been looking at this but don't have an answer yet.

          Actually, in this case mainfile.php should have just been created using a
          'copy' command. It should have been an exact copy of the mainfile.dist.php
          at the time this message would have been generated.

          One of these conditions must have occurred:
          - The server does not allow the copy command
          - Directory permissions do not allow PHP to create the copied file
          - The resulting permissions on the copied file do not allow reading
          - something I have not thought of yet ;)

          Can you confirm that you can install XOOPS 2.5.6 on this server? The code
          where this error occurs did not change. It should go through the same copy
          process, so that could be an important clue.

          Also, do you know what the OS the server is running?

          Thanks.


          [bugs:#1271] install last page no css/js

          Status: pending
          Group: XOOPS_2.5.x
          Labels: installation
          Created: Thu May 23, 2013 12:40 AM UTC by Tarik AMINE
          Last Updated: Tue Feb 18, 2014 05:52 PM UTC
          Owner: Michael Beck

          at the last page of installer the link to media files (css, js ...) isnt
          loaded correctly when instaling with a diffrent laguage than english, the
          fix is:

          at install\page_end.php 42

          $_SESSION['newinstallPRO'] =

          XOOPS_URL.'/'.$installer_modified.'/js/prototype-1.6.0.3.js';

          $_SESSION['newinstallINST'] =

          XOOPS_URL.'/'.$installer_modified.'/js/xo-installer.js';

          if (file_exists('language/' . $wizard->language . '/style.css')) {

          $_SESSION['newinstallCSSDeflt'] =

          XOOPS_URL.'/'.$installer_modified.'/css/style.css';

          $_SESSION['newinstallCSS'] =

          XOOPS_URL.'/'.$installer_modified.'/language/' . $wizard->language .
          '/style.css';

          } else {

          $_SESSION['newinstallCSSDeflt'] =

          XOOPS_URL.'/'.$installer_modified.'/css/style.css';

          $_SESSION['newinstallCSS'] = '';

          }

          at install\include\install_tpl.php 168

          loadjscssfile(newPro, 'js');

          loadjscssfile(newINST, 'js');

          loadjscssfile(newCSSDeflt, 'css');

          loadjscssfile(newCSS, 'css');


          Sent from sourceforge.net because you indicated interest in <
          https://sourceforge.net/p/xoops/bugs/1271/>

          To unsubscribe from further messages, please visit <
          https://sourceforge.net/auth/subscriptions/>

           

          Related

          Bugs: #1271

  • Tarik AMINE

    Tarik AMINE - 2014-01-22

    Tested with success under

    Apache 2.4.4
    PHP 5.5.0
    Chrome 32.0.1700.76

     
    Last edit: Tarik AMINE 2014-01-22

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks