Recent Topics

1 Oct 23, 2008 19:05    

My b2evolution Version: 2.x

I upgraded to b2evo 2.4.5 and now, in the Files section of the backoffice, the row for .css files (and, I suppose, every file of "unknown" type, although I only have images and .css files in my media folders) shows the following error before the action buttons:

Notice: Trying to get property of non-object in /home/bit/public_html/blog/inc/files/model/_file.class.php on line 422

I am trying to modify the styles of my skin and notice the changes don't apply, so I wonder if these two annoying things are somewhat related. :)

2 Oct 23, 2008 19:40

Hi bit,

Can you check if css is mentioned as filetype in Dashboard -> Global settings -> File types?
If it isn't that would be an explanation of your issue, if it is we have a mystery :p

Good luck

3 Oct 23, 2008 19:43

Well, it is not listed, hence the "Unknown" type in the leftmost column. But now:

1. How do I add it?

2. How do I make it editable? (I really would like, as an administrator, to be able to edit ANY file, just like before.)

3. Since there is a column that tells me that the file type is unknown, why do I get this error? It looks like b2evo is trying to get information it cannot handle.

5 Oct 23, 2008 19:59

/inc/files/model/_file.class.php from line 226 onward:

		// Create the filetype with the extension of the file if the extension exist in database
		if( $ext = $this->get_ext() )
		{ // The file has an extension, load filetype object
			$FiletypeCache = & get_Cache( 'FiletypeCache' );
			$this->Filetype = & $FiletypeCache->get_by_extension( strtolower( $ext ), false );
		}


The first comment is correct, the second not. Likely it should only load the FiletypeCache if the extension of the file exists in the database.

6 Oct 23, 2008 22:35

Mmmmh. So it is a bug?

I'm no programmer, I don't know what to do with that code. :)

7 Oct 23, 2008 23:32

Hi bit,

You just make sure you set .css correctly as filetype so you get rid of your errors. I'll deal with the code and the bug :p

Good luck

8 Oct 24, 2008 00:06

I think I've told you this before but: you're great.

Now, the "editable" question persists: is this feature gone forever?

9 Oct 24, 2008 01:04

What I saw in some other part of that file, if you set it to 'text' it *should* be editable.


Form is loading...