Skip to Content Skip to Menu

unexpected 'Content' (T_STRING) in components/com_uddeim/includes.php on line 1297

9 years 7 months ago - 9 years 7 months ago #262522 by shibumidesign
Came across this error when trying to fix my default Kunena "Forum" link on the PMS Menu Bar:
unexpected 'Content' (T_STRING) in /home2/shibumid/public_html/soco/components/com_uddeim/includes.php on line 1297

All I did was open includes.php and add an "s" to forum in this line of code at line 704:
Code:
echo "<a href='/forum/recent' />";
1. Looking at line 1297 this is what was coded:
Code:
echo(" uddeimWindow.document.writeln(\"<html><head><meta http-equiv="Content-Type" content="text/html; charset=windows-1252"><title>uddeIM<\/title>");

2. This is what is in the original zipped package at line 1297:
Code:
echo(" uddeimWindow.document.writeln(\"<html><head><title>uddeIM<\/title>");

3. and this is what I modified my line 1297 to:
Code:
echo(" uddeimWindow.document.writeln(\"<html><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=windows-1252\"><title>uddeIM<\/title>");

I am still getting the same error, even with replacing the line to the original line from the file in the zipped package

Jeff

ShibumiDesignStudios.com - Ottawa.ScionOwners.ca
Joomla v3.4.1 - Kunena v3.0.8 - K2 v2.6.9 - CB v2.0.8
Last edit: 9 years 7 months ago by shibumidesign.

Please Log in or Create an account to join the conversation.

9 years 7 months ago #262524 by shibumidesign
So, as this was taking the rest of my site offline, I had to comment out line 1297 completely until I can find a solution.

Jeff

ShibumiDesignStudios.com - Ottawa.ScionOwners.ca
Joomla v3.4.1 - Kunena v3.0.8 - K2 v2.6.9 - CB v2.0.8

Please Log in or Create an account to join the conversation.

9 years 7 months ago #262527 by shibumidesign
Just noticed the original code in #2 posted above was missing the closing ;\n"); to look like this:
Code:
echo(" uddeimWindow.document.writeln(\"<html><head><title>uddeIM<\/title>\");\n");

Still same error - going back to commenting it out completely...

Jeff

ShibumiDesignStudios.com - Ottawa.ScionOwners.ca
Joomla v3.4.1 - Kunena v3.0.8 - K2 v2.6.9 - CB v2.0.8

Please Log in or Create an account to join the conversation.

  • slabbi
  • slabbi
  • OFFLINE
  • Posts: 3709
  • Thanks: 250
  • Karma: 153
9 years 7 months ago - 9 years 7 months ago #262543 by slabbi

shibumidesign wrote: Just noticed the original code in #2 posted above was missing the closing ;\n"); to look like this:

Code:
echo(" uddeimWindow.document.writeln(\"<html><head><title>uddeIM<\/title>\");\n");

Still same error - going back to commenting it out completely...


Please do not mess with the code.
The echo command writes something like
Code:
uddeimWindow.document.writeln("<html><head><title>uddeIM<\title> [... more html code...] <\body><\html>");\n
This code is interpreted when the window is opened.

Your modification closes the first bracket which is completely wrong:
Code:
uddeimWindow.document.writeln("<html><head><title>uddeIM<\title>");\n

It is also wrong to use escaped double quotes inside of the already existing escaped double quoted. Constructions like " "" " will lead into a Javascript error.

uddeIM & uddePF Development
CB Language Workgroup
CB 3rd Party Developer
Last edit: 9 years 7 months ago by slabbi.
The following user(s) said Thank You: nant

Please Log in or Create an account to join the conversation.

9 years 7 months ago - 9 years 7 months ago #262555 by shibumidesign
Okay, so I replaced the includes.php file with the original file from the zip file and it works fine, with the exception that the link to the kunena forums recent topics is broken (my Kunena links to /forums/recent/) - so if I open and modify line 704
Code:
echo "<a href='/forum/recent' />";
to
Code:
echo "<a href='/forums/recent' />";
and then save the file, it returns that same error.

How does adding ONE character to the file and saving it, break my whole site?

Something else I just noticed, line 1297 has changed itself on its own to this:
Code:
echo(" uddeimWindow.document.writeln(\"<html><head><meta http-equiv="Content-Type" content="text/html; charset=windows-1252"><title>uddeIM<\/title>");

Jeff

ShibumiDesignStudios.com - Ottawa.ScionOwners.ca
Joomla v3.4.1 - Kunena v3.0.8 - K2 v2.6.9 - CB v2.0.8
Last edit: 9 years 7 months ago by shibumidesign.

Please Log in or Create an account to join the conversation.

  • slabbi
  • slabbi
  • OFFLINE
  • Posts: 3709
  • Thanks: 250
  • Karma: 153
9 years 7 months ago #262596 by slabbi
Please change the editor you are using.
I recommend Notepad++ but you can also use Windows Notepad if you like.

uddeIM & uddePF Development
CB Language Workgroup
CB 3rd Party Developer

Please Log in or Create an account to join the conversation.

Moderators: beatnantslabbikrileon
Powered by Kunena Forum