Forums

Unfortunately no one can be told what FluxBB is - you have to see it for yourself.

You are not logged in.

#26 2012-11-24 22:22:25

Franz
Lead developer
From: Germany
Registered: 2008-05-13
Posts: 5,780
Website

Re: FluxBB 1.5.1 released

What exactly breaks with the patcher?

We should be more careful with our release process...


fluxbb.de | develoPHP

"As code is more often read than written it's really important to write clean code."

Online

#27 2012-11-24 22:29:12

sklerder
Member
From: Brittany
Registered: 2012-11-06
Posts: 116
Website

Re: FluxBB 1.5.1 released

Some html tags were not in good place, but were accepted so.

More difficult, the use of "&" where XHTML wants "&" ...

I'm trying to debug it, but it's very hard, furthermore when HTML is not your native language wink

But I hope to make it work tonight or tomorrow smile


Yes, a communication about this choice should have been made, I think, letting some time for "modders" to update their mods and plugins.

But now, we have to go on smile

Offline

#28 2012-11-24 22:47:19

Franz
Lead developer
From: Germany
Registered: 2008-05-13
Posts: 5,780
Website

Re: FluxBB 1.5.1 released

Is it Chrome or whatever browser you use throwing these errors? I need to find out how to turn those off wink


fluxbb.de | develoPHP

"As code is more often read than written it's really important to write clean code."

Online

#29 2012-11-24 22:53:31

sklerder
Member
From: Brittany
Registered: 2012-11-06
Posts: 116
Website

Re: FluxBB 1.5.1 released

I'm using Firefox 15.0.1, but many browsers should encounter these errors :
"Erreur d'analyse XML : mal formé" in French.
Parsing errors, due, for most of them, to "&" litterally written as is where they should be written "&" ...

Tedious smile

Offline

#30 2012-11-25 10:12:53

Pierre
Member
From: Germany/Bonn
Registered: 2010-05-20
Posts: 49
Website

Re: FluxBB 1.5.1 released

Franz wrote:

Is it Chrome or whatever browser you use throwing these errors? I need to find out how to turn those off wink

The issue is sending the "application/xhtml+xml" mime type instead of "text/html". Using that mime type Firefox will use it's XML parser and wont tolerate any errors or unknown tags etc..

Offline

#31 2012-11-25 15:06:24

Otomatic
FluxBB Donor
From: Paris - France
Registered: 2010-01-26
Posts: 463
Website

Re: FluxBB 1.5.1 released

Hi,

With type application/xhtml+xml there are many problems with old messages that are not correct for XML.
When the XML parser of Firefox see a XML error there are a BIG error message like :

Firefox XML parser wrote:

Erreur d'analyse XML : balise ne correspondant pas. Attendu : </em>.
Emplacement : http://aviatechno/forum/viewtopic.php?id=320&p=11&order=ASC
Numéro de ligne 138, Colonne 31 :

WITHOUT any other thing; ONLY the error message, no page!
That is why, for my forums, I decided to change the function get_mime() in include/functions.php file so that it always returns 'text/html' and never 'application/xhtml+xml'.


Ce n'est pas parce que l'erreur se propage qu'elle devient vérité. Ghandi
An error does not become truth by reason of multiplied propagation. Ghandi

Offline

#32 2012-11-25 23:57:52

sklerder
Member
From: Brittany
Registered: 2012-11-06
Posts: 116
Website

Re: FluxBB 1.5.1 released

sklerder wrote:

I'm using Firefox 15.0.1, but many browsers should encounter these errors :
"Erreur d'analyse XML : mal formé" in French.
Parsing errors, due, for most of them, to "&" litterally written as is where they should be written "&amp;" ...

Tedious smile

Hello !

I've managed to make Patcher work with XHTML on ...

Here are the modifications to apply, hoping I didn't miss others hmm


Don't worry about the dates associated to files smile
This diff file has been generated with Winmerge on a Windows system.

I've posted these modifications in the "Patcher" topic too ...

@Visman : You'll have to modify the URL related to your plugins and mods (changing '&' by "'&amp;' to comply to XHTML, thus in all the 'readme.txt' files of each of your mods ad plugins, they can't no more be used with the XHTML control sad)
I.E. :

fluxbb.org/resources/mods/?s=author&t=Visman&v=all&o=name

should be modified in

fluxbb.org/resources/mods/?s=author&amp;t=Visman&amp;v=all&amp;o=name

diff U3 plugins/patcher/functions.php plugins/patcher/functions.php
--- plugins/patcher/functions.php	Thu Jan 15 10:09:20 1970
+++ plugins/patcher/functions.php	Thu Jan 15 10:09:20 1970
@@ -478,7 +478,7 @@
 		message($langPatcher['Failed to extract file']);
 	$zip->close();
 
-	redirect(PLUGIN_URL.'&mod_id='.$modId, $langPatcher['Modification uploaded redirect']);
+	redirect(PLUGIN_URL.'&amp;mod_id='.$modId, $langPatcher['Modification uploaded redirect']);
 }
 
 /**
@@ -515,7 +515,7 @@
 		message($langPatcher['Failed to extract file']);
 	$zip->close();
 
-	$redirect_url = (isset($_GET['update'])) ? '&mod_id='.$modId.'&action=update' : '';
+	$redirect_url = (isset($_GET['update'])) ? '&amp;mod_id='.$modId.'&amp;action=update' : '';
 
 	redirect(PLUGIN_URL.$redirect_url, $langPatcher['Modification updated redirect']);
 }
@@ -558,7 +558,7 @@
 		message($langPatcher['Failed to extract file']);
 	$zip->close();
 
-	redirect(PLUGIN_URL.'&mod_id='.$modId, $langPatcher['Modification downloaded redirect']);
+	redirect(PLUGIN_URL.'&amp;mod_id='.$modId, $langPatcher['Modification downloaded redirect']);
 }
 
 /**
diff U3 plugins/patcher/Patcher.php plugins/patcher/Patcher.php
--- plugins/patcher/Patcher.php	Thu Jan 15 10:09:20 1970
+++ plugins/patcher/Patcher.php	Thu Jan 15 10:09:20 1970
@@ -194,7 +194,7 @@
 					{
 						if (!isset($requirements['cannot_open']))
 							$requirements['cannot_open'] = array();
-						$requirements['cannot_open'][] = array(false, $curStep['code'], 'Cannot open file <a href="'.PLUGIN_URL.'&show_log#a'.$key.'">#'.$key.'</a>');
+						$requirements['cannot_open'][] = array(false, $curStep['code'], 'Cannot open file <a href="'.PLUGIN_URL.'&amp;show_log#a'.$key.'">#'.$key.'</a>');
 					}
 					if (isset($curStep['substeps']))
 					{
@@ -205,7 +205,7 @@
 								if (!isset($requirements['missing_strings']))
 									$requirements['missing_strings'] = array();
 
-								$requirements['missing_strings'][] = array(false, $curStep['code'], $langPatcher['Missing string'].' <a href="'.PLUGIN_URL.'&show_log#a'.$id.'">#'.$id.'</a>');
+								$requirements['missing_strings'][] = array(false, $curStep['code'], $langPatcher['Missing string'].' <a href="'.PLUGIN_URL.'&amp;show_log#a'.$id.'">#'.$id.'</a>');
 							}
 						}
 					}
diff U3 plugins/AP_Patcher.php plugins/AP_Patcher.php
--- plugins/AP_Patcher.php	Thu Jan 15 10:09:20 1970
+++ plugins/AP_Patcher.php	Thu Jan 15 10:09:20 1970
@@ -348,7 +348,7 @@
 						{
 							$stepsFailedInfo = array();
 							foreach ($stepsFailed as $key => $s)
-								$stepsFailedInfo[] = '<a href="'.PLUGIN_URL.'&show_log#a'.$s.'">#'.$key.'</a>';
+								$stepsFailedInfo[] = '<a href="'.PLUGIN_URL.'&amp;show_log#a'.$s.'">#'.$key.'</a>';
 							$subMsg[] = sprintf($langPatcher['Num failed'], count($stepsFailed)).': '.implode(', ', $stepsFailedInfo);
 						}
 
@@ -406,8 +406,8 @@
 			} ?>
 							<p>
 								<a href="<?php echo PLUGIN_URL ?>&amp;show_log"><?php echo $langPatcher['Show log'] ?></a> |
-<?php if (in_array($action, array('install', 'update'))) : ?>								<a href="<?php echo PLUGIN_URL.'&mod_id='.pun_htmlspecialchars($modId) ?>&amp;action=update"><?php echo $langPatcher['Update'] ?></a> | <?php endif; ?>
-<?php if ($action != 'uninstall') : ?>								<a href="<?php echo PLUGIN_URL.'&mod_id='.pun_htmlspecialchars($modId) ?>&amp;action=uninstall"><?php echo $langPatcher['Uninstall'] ?></a> |  <?php endif; ?>
+<?php if (in_array($action, array('install', 'update'))) : ?>								<a href="<?php echo PLUGIN_URL.'&amp;mod_id='.pun_htmlspecialchars($modId) .'&amp;action=update">' .$langPatcher['Update'] .'</a>'?> | <?php endif; ?>
+<?php if ($action != 'uninstall') : ?>								<a href="<?php echo PLUGIN_URL.'&amp;mod_id='.pun_htmlspecialchars($modId) ?>&amp;action=uninstall"><?php echo $langPatcher['Uninstall'] ?></a> |  <?php endif; ?>
 								<a href="<?php echo PLUGIN_URL ?>"><?php echo $langPatcher['Return to mod list'] ?></a>
 							</p>
 						</div>
@@ -939,7 +939,7 @@
 						if ($section == 'Mods to update')
 						{
 							if (isset($curMod->hasRepoUpdate))
-								$actions[0][] = '<a href="'.PLUGIN_URL.'&mod_id='.pun_htmlspecialchars($curMod->id).'&download_update='.pun_htmlspecialchars($curMod->version).'&update">'.$langPatcher['Download and install update'].'</a>';
+								$actions[0][] = '<a href="'.PLUGIN_URL.'&amp;mod_id='.pun_htmlspecialchars($curMod->id).'&amp;download_update='.pun_htmlspecialchars($curMod->version).'&amp;update">'.$langPatcher['Download and install update'].'</a>';
 
 							if (isset($curMod->hasLocalUpdate))
 								$actions[0]['update'] = $langPatcher['Update'];
@@ -962,7 +962,7 @@
 					else
 					{
 						if (isset($curMod->hasRepoUpdate))
-							$actions[0][] = '<a href="'.PLUGIN_URL.'&mod_id='.pun_htmlspecialchars($curMod->id).'&download_update='.pun_htmlspecialchars($curMod->hasRepoUpdate).'">'.sprintf($langPatcher['Download update'], $curMod->hasRepoUpdate).'</a>';
+							$actions[0][] = '<a href="'.PLUGIN_URL.'&amp;mod_id='.pun_htmlspecialchars($curMod->id).'&amp;download_update='.pun_htmlspecialchars($curMod->hasRepoUpdate).'">'.sprintf($langPatcher['Download update'], $curMod->hasRepoUpdate).'</a>';
 
 						$status = '<strong style="color: red">'.$langPatcher['Not installed'].'</strong>';
 						$actions[1]['install'] = isset($curMod->hasRepoUpdate) ? $langPatcher['Install old version'] : $langPatcher['Install'];
@@ -998,11 +998,13 @@
 <?php
 				$i++;
 			}
-		}
-
 ?>
 								</tbody>
 							</table>
+<?php
+		}
+
+?>
 						</div>
 					</fieldset>
 				</div>

Offline

#33 2012-11-26 03:03:02

Visman
Member
From: Siberia
Registered: 2010-07-10
Posts: 878
Website

Re: FluxBB 1.5.1 released

@sklerderх, I don't use plugin "Patcher". And the code of my mods for FluxBB 1.5.1 is valid wink


My modification of FluxBB 1.5.6 - rev.65
I speak only Russian  tongue

Offline

#34 2012-11-26 09:50:42

pelm
Member
From: Sweden
Registered: 2010-06-21
Posts: 67

Re: FluxBB 1.5.1 released

Hi!

#Otomatic: What changes did you do in include/functions.php to only return text/html exactly as before? I was forced to downgrade my forum to 1.5.0 after the upgrade to 1.5.1 due to massive error messages. Presumably because mods that isn't compatible.


Sorry for my english, is from Sweden smile

Offline

#35 2012-11-26 13:50:21

Otomatic
FluxBB Donor
From: Paris - France
Registered: 2010-01-26
Posts: 463
Website

Re: FluxBB 1.5.1 released

Hi,

I didn't include anything. I modify functions.php :

#---[ 1 OPEN ]----------------------------------------------------------------

    include/functions.php

#--[ 2 FIND ] Info: $search_replace_file[include/functions][0]----------------

	if (isset($_SERVER['HTTP_ACCEPT']) && strpos($_SERVER['HTTP_ACCEPT'], 'application/xhtml+xml') !== false)
		return 'application/xhtml+xml';
	// special check for the W3C validation service
	else if (isset($_SERVER['HTTP_USER_AGENT']) && strpos($_SERVER['HTTP_USER_AGENT'], 'W3C_Validator') !== false)
		return 'application/xhtml+xml';
	else
		return 'text/html';


#--[ 3 REPLACE BY ] Info: $insert_replace_file[include/functions][0]----------

//[modif oto - Always 'text/html'in place of 'application/xhtml+xml'
//	if (isset($_SERVER['HTTP_ACCEPT']) && strpos($_SERVER['HTTP_ACCEPT'], 'application/xhtml+xml') !== false)
//		return 'application/xhtml+xml';
	// special check for the W3C validation service
//	else if (isset($_SERVER['HTTP_USER_AGENT']) && strpos($_SERVER['HTTP_USER_AGENT'], 'W3C_Validator') !== false)
//		return 'application/xhtml+xml';
//	else
		return 'text/html';


******************************************************************************
#-------[ 4 SAVE FILE include/functions.php ]
******************************************************************************

======================[ END OF INSTALLATION PROCEDURE ]=======================

This file was created automatically by the plugin Mod Installer
Written by Otomatic - fluxbb.fr

Ce n'est pas parce que l'erreur se propage qu'elle devient vérité. Ghandi
An error does not become truth by reason of multiplied propagation. Ghandi

Offline

#36 2012-11-26 14:56:09

pelm
Member
From: Sweden
Registered: 2010-06-21
Posts: 67

Re: FluxBB 1.5.1 released

So easy.... thanks!

/pelm


Sorry for my english, is from Sweden smile

Offline

#37 2012-11-26 21:38:05

sklerder
Member
From: Brittany
Registered: 2012-11-06
Posts: 116
Website

Re: FluxBB 1.5.1 released

@Visman : What I meant when I wrote that you'll have to modify your plugins was not precise enough.
Your plugins or mods are not broken, but only your URL in the "readme.txt" files, which is not compliant with XHTML restrictions.
Thus, people using FluxBB 1.5.1 and "Patcher" (maybe other installers) face a problem where the "Patcher's plugin" page cannot be displayed (due to the XML error).

I found the problem, I said how it can be solved, but I can't modify the "readme.txt" files of your mods and plugins.

If you don't "repair" these files, at least users of Daris's Patcher wont be able to use or install your mods and plugins without doing themself this URL modification, thats all.
Furthermore, as long there will be a "broken" URL in a "readme.txt" file in the forum's "mods" directory tree, "Patcher" will be broken.
But if they modify by themself the URL, or remove the local directory of the faultive plugin/mod, Patcher will work again.

Now, it's up to you to decide if you modify your "readme.txt" files ...

sklerder (without an "x" smile)

Offline

#38 2012-11-27 06:03:16

Visman
Member
From: Siberia
Registered: 2010-07-10
Posts: 878
Website

Re: FluxBB 1.5.1 released

This

		if (isset($mod->repositoryUrl))
			$info = '<a href="'.$mod->repositoryUrl.'">'.$info.'</a>';;

replace

		if (isset($mod->repositoryUrl))
			$info = '<a href="'.pun_htmlspecialchars($mod->repositoryUrl).'">'.$info.'</a>';;

and this

				if (isset($curMod->repositoryUrl))
					$info[0] = '<a href="'.$curMod->repositoryUrl.'">'.$info[0].'</a>';

replace

				if (isset($curMod->repositoryUrl))
					$info[0] = '<a href="'.pun_htmlspecialchars($curMod->repositoryUrl).'">'.$info[0].'</a>';

P.S. It is potential vulnerability in code of "Patcher".

Last edited by Visman (2012-11-27 06:05:39)


My modification of FluxBB 1.5.6 - rev.65
I speak only Russian  tongue

Offline

#39 2012-11-27 10:34:53

Franz
Lead developer
From: Germany
Registered: 2008-05-13
Posts: 5,780
Website

Re: FluxBB 1.5.1 released

Visman wrote:

P.S. It is potential vulnerability in code of "Patcher".

I believe the repositoryUrl is coming from our API, right?


fluxbb.de | develoPHP

"As code is more often read than written it's really important to write clean code."

Online

#40 2012-11-27 14:54:48

Visman
Member
From: Siberia
Registered: 2010-07-10
Posts: 878
Website

Re: FluxBB 1.5.1 released

>I believe the repositoryUrl is coming from our API, right?
It is the answer for sklerder.
"Patcher" is guilty, instead of my files readme.txt.


My modification of FluxBB 1.5.6 - rev.65
I speak only Russian  tongue

Offline

#41 2012-11-27 21:49:30

sklerder
Member
From: Brittany
Registered: 2012-11-06
Posts: 116
Website

Re: FluxBB 1.5.1 released

Hello !

You are right Visman, so I published a new patch-file on Patcher's topic smile

It should work better, now wink

Offline

#42 2012-12-17 15:50:11

guniimr
New member
Registered: 2012-12-17
Posts: 1

Re: FluxBB 1.5.1 released

Thanks!!!

Offline

Board footer

Powered by FluxBB 1.5.6