Opened 6 years ago

Closed 6 years ago

#123 closed defect (fixed)

PSI v.016-2018-07-16 produces a THEME error

Reported by: darcio Owned by:
Priority: Feedback Pending Component: psi
Version: Keywords: psi theme error
Cc:

Description

Upgraded to the latest release of the PSI app. No problem, previous program was completely wiped out, re-installed into empty tree, left the current configuration in the \.home\xxx tree.

The main window comes up fine, however when I open an individual message/chat window the following error message appears in the text window:

"Theme initialization failed: TypeError: Result of expression 'sheet.cssRules' [null] is not an object."

Any message text entered in the window at this point in time does not show up in the chat history (upper) part of the window.

I will attach a screenshot next to illustrate better.

Attachments (1)

PSI_theme_error_ticket123-msg_window.jpg (29.2 KB ) - added by darcio 6 years ago.
screenshot of the CHAT window showing the THEME error msg

Download all attachments as: .zip

Change History (12)

by darcio, 6 years ago

screenshot of the CHAT window showing the THEME error msg

comment:1 by Silvan Scherrer, 6 years ago

please try a complete new installation. means remove the configurations as well.

comment:2 by Silvan Scherrer, 6 years ago

go to themes/chatview/psi/new_classic/index.html and exchange the below part

//	var cssBody = chat.util.findStyleSheet(document.styleSheets[0], "body").style;
//	var cssSentMsg = chat.util.findStyleSheet(document.styleSheets[0], ".sent").style;
//	var cssReceivedMsg = chat.util.findStyleSheet(document.styleSheets[0], ".received").style;
//	var cssInfMsg = chat.util.findStyleSheet(document.styleSheets[0], ".infmsg").style;
//	var cssUserText = chat.util.findStyleSheet(document.styleSheets[0], ".usertext").style;
//	var cssChatSays = chat.util.findStyleSheet(document.styleSheets[0], ".msg>span:first").style;
	var cssBody = '{padding:0; margin:0; width:100%;}';
	var cssSentMsg = '{}';
	var cssReceivedMsg = '{}';
	var cssInfMsg = '{}';
	var cssUserText = '{}';
	var cssChatSays = '{}';

if you use the classic theme, then use themes/chatview/psi/classic/index.html

here it works.

comment:3 by digi, 6 years ago

It did not help me. Problem still exists.

comment:4 by Silvan Scherrer, 6 years ago

Priority: majorFeedback Pending

as I can't reproduce it anymore locally a fix might not be possible. are you sure you changed the index.html right?

comment:5 by darcio, 6 years ago

diver, I will try both the suggestions. Sorry about my delay I am just coming out of a HFPS386 to JFS migration and a HDD to SSD move at the same time...needless to say, a bit of cleanup here and there.

So I will do the following:

1) try the changes you outlined, digi says that did not work for him, let me see what that does here

2) try the NEW version on a FRESH install, so I will point PSI to a temp location as it's 'home' and try it out

Last edited 6 years ago by darcio (previous) (diff)

comment:6 by darcio, 6 years ago

@diver in your change above you left out the following:

var cssAlertMsg = chat.util.findStyleSheet(document.styleSheets[0], ".alert").style;[[BR]]

Note, this single line exists only in the CLASSIC theme, it does not exist in the NEW_CLASSIC.

Should this be changed as well, or leave it alone?

Last edited 6 years ago by darcio (previous) (diff)

in reply to:  6 ; comment:7 by Digi, 6 years ago

Replying to darcio:

@diver in your change above you left out the following:

You're right. Now all is ok. Thank you!

in reply to:  7 comment:8 by darcio, 6 years ago

Replying to Digi:

Replying to darcio:

@diver in your change above you left out the following:

You're right. Now all is ok. Thank you!


@Digi, what did you do? Did you replace with a similarly strutured replacement, or did you completely remove it?

comment:9 by Silvan Scherrer, 6 years ago

yes in the classic theme you need to change that as well.

var cssAlertMsg = '{font-weight:bold;}'

comment:10 by Silvan Scherrer, 6 years ago

as @digi confirms all works now. So I close the ticket.

comment:11 by Silvan Scherrer, 6 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.