Xinha file upload issue

Xinha file upload issue, a forum discussion on Jojo CMS. Join us for more discussions on Xinha file upload issue on our Administration (backend and configuration) forum.

Back to Forum Index : Back to Administration (backend and configuration)   RSS
Rick Rick

2 Jun 2011
Posts: 336

I'm a little stumped on this... From within Xinha, I'll go to upload an image or file to link and the file Xinha file manager comes up. All good so far.

But the Xinha file manager is missing the upload functions, and the current directory is shown as "/" with one subfolder, "linux", and two files, "bikerbeep.jpg" and "wesnoth079.jpg".

I've checked everything I can think of, the mysite dir, permissions, settings, the Xinha JS calls... has anyone come across this?
Jaijaz Jaijaz

7 Jun 2011
Posts: 215

Hey Rick, what version has this appeared in?

The SVN version of Jojo has issues with Xinha, especially with fresh installs. There are javascript errors that appear in Firebug so wouldn't be surprised if this is related.
If you not living on the edge you taking up too much space.
Rick Rick

9 Jun 2011
Posts: 336

Thanks, you're right, I'm using the 1.0 Branch on that site. I'll look into the bugs. Do you know roughly when the problem was introduced? Then I could roll back until I fix it.
tom

Developer

tom

9 Jun 2011
Posts: 379

I haven't noticed anything major myself
- I have seen that folder weirdness previously but not recently and can't for the life of me remember what it was that caused it (which isn't much help..)

Harvey did a rejig around moving Xinha (optionally) inline at revision 3321 on March 1
So you might try updating to revision 3320 and see if that fixes it.

I still have hopes of looking at Xinha properly in the next week or so - what errors are you seeing Jai?
Rick Rick

9 Jun 2011
Posts: 336

I'll update to the latest and see if it persists, thanks guys.
tom

Developer

tom

9 Jun 2011
Posts: 379

:) i meant update as in revert - with svn you use "update" even if you're going backwards to a previous revision: svn up -r 3320
Rick Rick

9 Jun 2011
Posts: 336

I'll try the latest since you said that you hadn't seen the issue recently. But if that doesn't work I'll go back to 3320 like you mentioned. Thank you :)
Jaijaz Jaijaz

9 Jun 2011
Posts: 215

The error that firebug throws up is:

xinha_editors.fm_pg_body_code_xinha is undefined
[Break On This Error] xinha_editors['fm_pg_body_code_xinha'].config.height = '460px';

Also while we're on Xinha, an issue that has started raising it's head is that with the editor loads, one of the sprites loads but isn't showing on the buttons. ed_buttons_main.png
Anyone seen that one before?
If you not living on the edge you taking up too much space.
Jaijaz Jaijaz

3 Jul 2011
Posts: 215

Just thought I would post what the problem with the Xinha sprite image was. It was with the css for the site's theme. My starting point theme, has a fluid css frame work in it. It's designed to help resizing for smaller screen easier. As a result it has a line in it to make sure that an image, object or embed doesn't expand outside it div:

img, object, embed {
max-width: 100%;
}

This line meant that the image for the Xinha buttons wouldn't work. I've added just under this line:

div.buttonImageContainer img {
max-width: none;
}

Which stops it effecting Xinha.

This does beg the question of whether we need to look for a way to stop frontend CSS breaking admin css?

Anyway, on the off chance someone is playing with the same type of resizing thing, there is a note on how to fix it.
If you not living on the edge you taking up too much space.
Rick Rick

3 Jul 2011
Posts: 336

You could put the line in your theme's css/xinha.css file then it'll apply to the editor but won't show up in the front end. I typically create one of these with a rule to set the editor background colour back to white on colourful sites.
Jaijaz Jaijaz

5 Jul 2011
Posts: 215

Thanks Rick, that's a good idea. I use the xinha.css file for the same background styling stuff but didn't think of using it for the buttons. I'll give it a try.
If you not living on the edge you taking up too much space.
Rick Rick

5 Jul 2011
Posts: 336

I've come across the same thing in other places too... having CSS or JS that was intended only for the public side showing up in admin too.

Usually I use a parent class in the CSS or set an admin variable in admin.js and check for that before running any JS. There might be a better way, but if there's not then I'm keen to add something like

var publicarea= true;

to common.js and override it with

var publicarea = false;

in admin.js

It's only an issue occasionally, but is a nuisance when it is.
tom

Developer

tom

1 Aug 2011
Posts: 379

I've committed some tweaks to the inline version of xinha - i think it resolves Rick's issue with the weird folder location (the base folder definition had been commented out), brings back the stylist column and fixes a couple of javascript errors that were showing up in Firebug.

I haven't put it through any major stress testing yet, but it seems OK on casual use so far. Will hammer it this week.

I'd like to do some tweaking of the admin layout also.. maybe fix the width of the left column and make the right column full width to make the inline editor more useable without needing to go to fullscreen
Rick Rick

1 Aug 2011
Posts: 336

Thanks Tom. I've been thinking about the admin interface too... Even thought about a 3 column layout (menu, list, fields) with a side menu similar to Wordpress or Pyro, but not everyone is on wide screens.

Widening the fields section is a good idea though, I already do this and new buttons for my sites using a plugin so I didn't annoy others by changing it in the repo after getting no feedback.

Rick Rick

1 Aug 2011
Posts: 336

I'm always hesitant to just change stuff. Which of the forum categories is most appropriate for mentioning suggestefeatures/changes that I want feedback before implementing into the core?

I've got lots of ideas on my free time list, but just feel most of then could be improved with feedback.

One might be finding a way to make this text area field behave in Android :p

Edit... never mind, I keep forgetting about the Suggestions and Feedback forum. Someone remind me to dump all my ideas in there when I get time.

Also, the edit text area works perfect with Android.

Also also, sorry for hi-jacking your post, Tom.
tom

Developer

tom

1 Aug 2011
Posts: 379

:)
I think that hijacking is generally the way to go.
All of us seem to be pretty busy and Jojo is now such a bewilderbeast that for my money any improvements that anyone wants to make are welcome.

It's not like any commits can't be reverted if there's an outcry.

And anyone running the current svn copy has to expect a certain degree of excitement ..
(although admittedly that would be less likely if we tagged more frequently)
Harvey

Core Developer

Harvey

2 Aug 2011
Posts: 327

My sentiments exactly.

I read all the commit notices and will growl if I see something I don't like.

The main thing to be mindful of is to implement any unusual changes as options and set the option defaults appropriately (ie the current behaviour). That way when existing sites are upgraded, they get to choose if they want to use the new and potentially untested behaviour.
mikec

Lead Developer

mikec

4 Aug 2011
Posts: 67

Rick,
Feel free to create a new branch in svn (eg jojo1.0_rick_mycoolfeature), work your magic, then once you're happy merge your branch back into jojo1.0. That way you can commit in smaller chunks but not affect others until you're ready to.
Rick Rick

5 Aug 2011
Posts: 336

Thanks, Mike. A lot of ideas I have are very minor and could sit behind options while "in beta".

Other ideas, such as turning Admin Home into a widgetised dashboard that allows plugins to show data (eg sales stats, blog stats etc) there would get a branch, or at least a plugin.

It all comes down to time, of which I have none.
Back to Forum Index : Back to Administration (backend and configuration)   RSS
You must be logged in to post a reply



You need to Register or Log In before posting on these forums.