js folder

A place to report and discuss bugs - please mention CMSimple-version, server, platform and browser version
Gert
Posts: 3078
Joined: Fri May 30, 2008 4:53 pm
Location: Berlin
Contact:

Re: js folder

Post by Gert » Wed Jun 06, 2012 8:41 am

Hi Jerry,

thank you for testing ;)

Please download new, I have changed the Code again in cms.php, considering a hint from Christoph:

Code: Select all

$pth['folder']['language'] = $pth['folder']['cmsimple'] . 'languages/';
$pth['folder']['langconfig'] = $pth['folder']['cmsimple'] . 'languages/';

// change $sl for subsites and second languages

$subsite_folder_array = explode('/', $_SERVER['PHP_SELF']); // creates array
$subsite_folder = $subsite_folder_array[count($subsite_folder_array) - 2];
if(file_exists('./cmsimplesubsite.htm') || file_exists('./cmsimplelanguage.htm'))
{
    $sl = $subsite_folder;
}

// END change $sl for subsites and second languages   
Following lines have to be outcommented or deleted, if exists:

Code: Select all

// if (preg_match('/\/[A-z]{2}\/[^\/]*/', sv('PHP_SELF')))
//    $sl = strtolower(preg_replace('/.*\/([A-z]{2})\/[^\/]*/', '\1', sv('PHP_SELF')));
 
But a new download might be the best ;)

If you are testing in a nested intallation, please use only CMSimpleCoAuthors, also for the main installation. CMSimpleCoAuthors "CMS" for the main installation, CMSimpleCoAuthors "Authors" for the Authors installation in a subfolder.

However, please don't test in a nested installation with CMSimple_XH,

Gert
Gert Ebersbach | CMSimple | Templates - Plugins - Services

simpleSolutions.dk
Posts: 155
Joined: Thu Oct 06, 2011 7:00 am

Re: js folder

Post by simpleSolutions.dk » Wed Jun 06, 2012 8:54 am

Done

Still no js.php files.

Gert
Posts: 3078
Joined: Fri May 30, 2008 4:53 pm
Location: Berlin
Contact:

Re: js folder

Post by Gert » Wed Jun 06, 2012 9:09 am

simpleSolutions.dk wrote:Done
Hm - I have no new downloads on my counter for CMSimpleCoAuthors "CMS" and "Authors", only one new download of the plugin CoAuthors_XH.

The plugin CoAuthors_XH is not important for your tests,

Gert

Downloads: http://www.ge-webdesign.de/co_authors/en/?Downloads
Gert Ebersbach | CMSimple | Templates - Plugins - Services

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: js folder

Post by cmb » Wed Jun 06, 2012 10:29 am

Hi Jerry, hi Gert,
simpleSolutions.dk wrote:and to my surprise js.php files was created during the night
It is possible, that those files were created after a particular request to your site (perhaps even a bookmarked URL that has been redirected in the meantime). Using CMSimpleCoAuthors will probably suppress the creation of those files, as the routine to handle secondary languages was changed (see http://www.cmsimpleforum.com/viewtopic. ... =20#p28295 -- unfortunately a German thread), what's probably a good idea.

But however, it might be interesting to find out, why those files were created with CMSimple_XH 1.5.3. The creation of language files, that don't exist is done in plugins/index.php line 249ff. You can change it to:

Code: Select all

    // If plugin language is missing, copy default.php or en.php
    if (!file_exists($pth['file']['plugin_language'])) {
        if (file_exists($pth['folder']['plugins'].$plugin.'/languages/default.php')) {
            copy($pth['folder']['plugins'].$plugin.'/languages/default.php', $pth['file']['plugin_language']);
        writelog(date('Y-m-d H:i:s').' Language file created: '.$pth['file']['plugin_language'].' ('.$_SERVER['PHP_SELF'].')'."\n");
        } elseif (file_exists($pth['folder']['plugins'].$plugin.'/languages/en.php')) {
            copy($pth['folder']['plugins'].$plugin.'/languages/en.php', $pth['file']['plugin_language']);
        writelog(date('Y-m-d H:i:s').' Language file created: '.$pth['file']['plugin_language'].' ('.$_SERVER['PHP_SELF'].')'."\n");
        }
    }
 
Then delete the js.php files and wait until they will be created again. Then there should be an according entry in cmsimple/log.txt, telling the time, the file name and (probably most interesting) the URL that was requested. Additional information might be found in your Apache access logs.

BTW: Were cmsimple/languages/js.php and cmsimple/languages/jsconfig.php created too?

Christoph
Christoph M. Becker – Plugins for CMSimple_XH

simpleSolutions.dk
Posts: 155
Joined: Thu Oct 06, 2011 7:00 am

Re: js folder

Post by simpleSolutions.dk » Thu Jun 07, 2012 12:11 pm

Sorry Gert, my German could be better, so apparently I have not understood your explanations about coAuthors functioning. But the key is to find out how js langauage file are created so I will focus on that.

New js.php files are not created during the night.
In return as sugested by Christoph, I looked in the languages ​​folder under cmsimple and there are lot of strange files. It is not so much the content as the file names for example: timestamp.gif.php and timestamp.gifconfig.php or prettyphoto.css.php and prettyphoto.cssconfig.php. The content is the same as default.php and defaultconfig.php. Js.php and jsconfig.php are also her.

I have no idea how these files were created. It could be some plugin bug (many have the same creation date) so the possible explanation can be that the fault is mine. It is the development server, and I did not find a corresponding files on other servers that use the same plugins as simplesolutions.

The first step will be to clean up and keep an eye on the language folders. If new files will be created I will use Christoph logging to find some explanation. I find out anything of common interest you will hear from me again of course.

Gert
Posts: 3078
Joined: Fri May 30, 2008 4:53 pm
Location: Berlin
Contact:

Re: js folder

Post by Gert » Thu Jun 07, 2012 12:32 pm

Hi Jerry,

the Plugin CoAuthors_XH is not important for the tests.

You have to install the CMS CMSimpleCoAuthors for your tests. I have an English Website now:

http://www.ge-webdesign.de/co_authors/en/?Downloads

You should download CMSimpleCoAuthors in CMS configuration for your tests, it's not a plugin, it's a CMS based on CMSimple_XH,

Gert
Gert Ebersbach | CMSimple | Templates - Plugins - Services

simpleSolutions.dk
Posts: 155
Joined: Thu Oct 06, 2011 7:00 am

Re: js folder

Post by simpleSolutions.dk » Thu Jun 07, 2012 12:44 pm

Hi Gert

thx for translation. I believe that I begin to understand the great idea of coAuthors but I will try find out what's going on my own site first. I didn't find js.php files on other sites so it is not a general issue. May be I will test coAuthors later.

Gert
Posts: 3078
Joined: Fri May 30, 2008 4:53 pm
Location: Berlin
Contact:

Re: js folder

Post by Gert » Thu Jun 07, 2012 12:50 pm

Hi Jerry,

maybe it's the server, we don't know. Or any script in your installation triggers the copy funktion of CMSimple_XH.

The CoAuthors functionality is not important for your problem, CMSimpleCoAuthors (the CMS) has many additional features. One of them is, that you can install the CMS CMSimpleCoAuthors in a 2 digit folder, because the building of $sl is done another way.

So your problem should be solved, if you use CMSimpleCoAuthors (in CMS configuration) instead CMSimple_XH. If all is working, you can test the CoAuthors functionality ;)

Gert

PS: Please have a look at the pluginmanager, click directly on "Plugins" in the Admin Menu.
Gert Ebersbach | CMSimple | Templates - Plugins - Services

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: js folder

Post by cmb » Thu Jun 07, 2012 12:59 pm

Hi Jerry,
simpleSolutions.dk wrote:I looked in the languages ​​folder under cmsimple and there are lot of strange files. It is not so much the content as the file names for example: timestamp.gif.php and timestamp.gifconfig.php or prettyphoto.css.php and prettyphoto.cssconfig.php. The content is the same as default.php and defaultconfig.php. Js.php and jsconfig.php are also her.
That sounds pretty much like Rolf's problem in the german thread. I'm not absolutely what has happened there, but it might be caused by an error redirection. E.g. if I put an .htaccess to my webroot:

Code: Select all

ErrorDocument 404 /2site/index.php
and call an non existing document http://www.example.com/not-there/file.ext several new files in cmsimple/languages/ will be created, among others not-there.php and not-thereconfig.php.

Christoph
Christoph M. Becker – Plugins for CMSimple_XH

Post Reply