Notice: CMSB v2.63 Beta 1 (Aug 20th, 2014)

9 posts by 3 authors in: Forums > CMS Builder
Last Post: August 28, 2014   (RSS)

  • Archived  

By Deborah - August 26, 2014

Hi. I gave the new beta a test drive and all looks great. I like the new 'live view' for the upload URL and directory.

Looking forward to the release!

~ Deborah

  • Archived  

By Dave - August 26, 2014

Thanks Deborah! :) 

Dave Edis - Senior Developer
interactivetools.com
  • Archived  

By Djulia - August 27, 2014 - edited: August 27, 2014

Hi dave,

I obtain errors on parse_url (http://):

PHP Warning:  parse_url (http://): Unable to parses URL in ..init.php one line 541

Already with the previous version (v2.62).

An idea?

Thanks!

Djulia

  • Archived  

By Dave - August 28, 2014

Hi Djulia, 

Was that on install or upgrade? 

We use the path of the admin script to figure out where other files are, and there's some code on that line that detects the path like this:

// adminUrl - update if url path has changed
$hasAdminPathChanged = parse_url(thisPageUrl(), PHP_URL_PATH) != parse_url(@$SETTINGS['adminUrl'], PHP_URL_PATH);

It could be that $SETTINGS['adminUrl'] isn't set. You could try adding a @ in front of parse_url.  or this:

// adminUrl - update if url path has changed
$hasAdminPathChanged = !@$SETTINGS['adminUrl'] || (parse_url(thisPageUrl(), PHP_URL_PATH) != parse_url(@$SETTINGS['adminUrl'], PHP_URL_PATH));

Let me know if either of those fix it for you.  Thanks!

Dave Edis - Senior Developer
interactivetools.com
  • Archived  

By Djulia - August 28, 2014

Hi Dave,

I have just noticed that the hours when the errors are recorded, correspond to some scripts (php) which are programmed (executed) on a cron server.

I also obtain this error with these files programmed :
[28-Aug-2014 12:15:04] PHP Notice:  Undefined index:  path in ../common.php on line 666
[28-Aug-2014 12:15:04] PHP Notice:  Undefined index:  path in ../common.php on line 669

The scripts does not use cron.php. They are programmed directly on the server.

Thanks again!

Djulia

  • Archived  

By Dave - August 28, 2014

Thanks Djulia, That's a great find.

Can you try this code block instead?  I've re-arranged the code so none of it will run unless IS_CMS_ADMIN is set (which is set when admin.php is run directly, not by cron).

  // adminUrl - update if url path has changed
  if (defined('IS_CMS_ADMIN')) {
    $hasAdminPathChanged = parse_url(thisPageUrl(), PHP_URL_PATH) != parse_url(@$SETTINGS['adminUrl'], PHP_URL_PATH);
    if ($hasAdminPathChanged) { // only update adminUrl when in the CMS admin
      $SETTINGS['adminUrl'] = @array_shift(explode('?', thisPageUrl()));  // added in 2.12 - this must be set when admin.php is being access directly so we get the right URL
      saveSettings();
    }
  }

Let me know how it goes.

Dave Edis - Senior Developer
interactivetools.com
  • Archived  

By Djulia - August 28, 2014

Hi Dave,

Your adaptation seems to correct the first error.

But, I always obtain error on the common.php file.

[28-Aug-2014 21:15:04] PHP Notice:  Undefined index:  path in ..common.php on line 666
[28-Aug-2014 21:15:04] PHP Notice:  Undefined index:  path in ..common.php on line 669

An idea?

Thanks!

Djulia

  • Archived  

By Dave - August 28, 2014

Thanks Djulia, 

I've emailed you some patches to try.  Let's discuss via email and I'll post back here when it's resolved. 

Thanks!

Dave Edis - Senior Developer
interactivetools.com