?
avatar tomaszek83
tomaszek83
25 Feb 2015

Steps to reproduce the issue

Joomla! Update 3.3.6 to 3.4

Expected result

Joomla! update to 3.4.0

Actual result

After updating the file "includes / defines.php" JPATCH_CACHE variable takes a different value.

Before you change the address looks like this:
http: //localhost/site/cache/mod_name/image.jpg

After the change of address is as follows:
W: \ var \ www \ site \ cache / mod_name / image.jpg

This causes problems with the extensions that generate the path to the cache using JPATCH_CACHE

System information (as much as possible)

Serwer Apache, PHP 5.4.11 oraz 5.4.25

Additional comments

avatar tomaszek83 tomaszek83 - open - 25 Feb 2015
avatar Hackwar
Hackwar - comment - 25 Feb 2015

Sorry, but I can't find a constant like JPATCH_CLEAN nor JPATH_CLEAN.

avatar Hackwar
Hackwar - comment - 25 Feb 2015

if you mean JPath::clean(), I would be really astonished if that ever returned a URL. It is a method to clean up filesystem paths, not URLs.

avatar tomaszek83
tomaszek83 - comment - 25 Feb 2015

Sorry, JPATCH_CACHE ;)


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/6170.
avatar tomaszek83 tomaszek83 - change - 25 Feb 2015
The description was changed
Title
JPATCH_CLEAN variable error
JPATCH_CACHE variable error
avatar Hackwar
Hackwar - comment - 25 Feb 2015

Sorry, but JPATH_CACHE never contained a URL.

avatar Hackwar
Hackwar - comment - 25 Feb 2015

It was always a filesystem path. At least for the last 4 years.

avatar Kubik-Rubik
Kubik-Rubik - comment - 25 Feb 2015

As Hannes said, it is used for paths and not URLs. Please use the forum if you have a problem with the code!

avatar Kubik-Rubik Kubik-Rubik - change - 25 Feb 2015
Status New Closed
Closed_Date 0000-00-00 00:00:00 2015-02-25 10:08:03
avatar Kubik-Rubik Kubik-Rubik - close - 25 Feb 2015
avatar Kubik-Rubik Kubik-Rubik - close - 25 Feb 2015
avatar zero-24 zero-24 - close - 25 Feb 2015
avatar tomaszek83
tomaszek83 - comment - 25 Feb 2015

That's why after the change in line 23 in the file includes / defines.php with:

define ('JPATH_CACHE', JPATH_BASE. '/ cache');

on

define ('JPATH_CACHE', JPATH_BASE. DIRECTORY_SEPARATOR. 'cache');

is changing the appearance of the path to the cache directory?


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/6170.
avatar Hackwar
Hackwar - comment - 25 Feb 2015

The difference is, that it uses \ on a windows system, compared to / on a unix system.

avatar tomaszek83
tomaszek83 - comment - 25 Feb 2015

I understand, but what is the idea to change something that worked out well? For me, this is no problem, I fixed extension using JPATCH_CACHE and running.

Just not everyone uses Unixes systems. A lot of people working on the set of local servers on Windows. And before updating them everything worked. And after the update no longer works properly.


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/6170.
avatar Hackwar
Hackwar - comment - 25 Feb 2015

Without knowing what you are using this for, I can't answer that. So far I only see that you are trying to use a filesystem path as a URL and that is simply wrong and not supported. And never was.

avatar tomaszek83
tomaszek83 - comment - 25 Feb 2015

I use a local server "JAMP" (PHP version 5.4.11) posed on Windows Vista. The same problem is in XAMPP (PHP version 5.4.26).

After the upgrade to Joomla 3.4 there is a problem with the creation of the path. After changing the file defines.php about which I wrote above, the problem disappears (ie he was not in the version of Joomla 3.3.6)

The question is why the changed records in the file defines.php and why now, in specific cases, this error.

avatar brianteeman
brianteeman - comment - 25 Feb 2015

What Hannes is saying is that your code is wrong
it is trying to use a filesystem path when it should be using a URL

If it worked before then that was because of a bug in Joomla and not
because you were writing the correct code.

At least thats how I understand it

On 25 February 2015 at 11:22, tomaszek83 notifications@github.com wrote:

I use a local server "JAMP" (PHP version 5.4.11) posed on Windows Vista.
The same problem is in XAMPP (PHP version 5.4.26).

After the upgrade to Joomla 3.4 there is a problem with the creation of
the path. After changing the file defines.php about which I wrote above,
the problem disappears (ie he was not in the version of Joomla 3.3.6)

The question is why the changed records in the file defines.php and why
now, in specific cases, this error.


Reply to this email directly or view it on GitHub
#6170 (comment).

Brian Teeman
Co-founder Joomla! and OpenSourceMatters Inc.
http://brian.teeman.net/

avatar Hackwar
Hackwar - comment - 25 Feb 2015

@brianteeman Mostly yes. PHP is filesystem-seperator-agnostic and thus c:/something/foo/bar is the same as c:\something\foo\bar to it. You seem to be doing some weird stuff in your code and since we now made sure that all path constants use consistent seperators now, it breaks. But again, since you don't tell us the code and don't tell us where it is actually breaking, we can't help you.

This is still not a Joomla bug.

avatar tomaszek83
tomaszek83 - comment - 25 Feb 2015

In the code I have used this:

$ thumbPath = JPATH_CACHE. '/'. $ module-> module. '/';

Before upgrading work. Now I had to improve on:

$ thumbPath = JPATH_SITE. '/ cache /'.$ module-> module.' / ';

This extension BT Contentslider (bowthemes.com)

avatar Hackwar
Hackwar - comment - 25 Feb 2015

That code is completely unhelpfull

avatar tomaszek83
tomaszek83 - comment - 25 Feb 2015

@Hackwar thanks for wanting to help but I've fixed the module. I reported the problem to Bowthemes (because it's their extension). Now I know that the problem was a bad module code and not a bug Joomla.

avatar zero-24 zero-24 - change - 7 Jul 2015
Labels Added: ?

Add a Comment

Login with GitHub to post a comment