Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
GetSimple 3.1 RC #4
#51
Hello,
I update my test environement and this :

Code:
Warning: htmlspecialchars() expects at most 3 parameters, 4 given in /mnt/101/sda/5/d/lriaudel/gs/admin/inc/basic.php on line 471

Warning: htmlspecialchars() expects at most 3 parameters, 4 given in /mnt/101/sda/5/d/lriaudel/gs/admin/inc/basic.php on line 471


    Warning: htmlspecialchars() expects at most 3 parameters, 4 given in /mnt/101/sda/5/d/lriaudel/gs/admin/inc/basic.php on line 471
Reply
#52
madvic Wrote:
Code:
Warning: htmlspecialchars() expects at most 3 parameters, 4 given in /.../gs/admin/inc/basic.php on line 471

The 4th parameter for htmlspecialchars was added in PHP 5.2.3. Madvic is probably using an older version.

If you want GS to be compatible with those PHP versions, it may be fixed by editing admin/inc/basic.php, line 471, changing:

Code:
$text = htmlspecialchars($text, ENT_QUOTES, 'UTF-8', false);
to:
Code:
$text = str_replace('"', '"', str_replace("'", ''', $text) );

(I hope it doesn't break anything. It should do the same, though maybe uglier)
Reply
#53
Ohhhh, I'm so stupid !

It's a php function. I thought it was getsimple.


Thanks.
Reply
#54
madvic Wrote:Ohhhh, I'm so stupid !
Not at all madvic, you found an issue!

BTW it's my fault: I had suggested the changes for that line in the code.
Now it has to be changed in some way (maybe like what I suggested above, can you test it?) or else the minimum PHP version required for GS 3.1 will be 5.2.3.
Reply
#55
Carlos Wrote:Now it has to be changed in some way (maybe like what I suggested above, can you test it?) or else the minimum PHP version required for GS 3.1 will be 5.2.3.
Could we just wrap it in a PHP version if statement and if it is earlier than 5.2.3, dont include that 4th parameter?
- Chris
Thanks for using GetSimple! - Download

Please do not email me directly for help regarding GetSimple. Please post all your questions/problems in the forum!
Reply
#56
ccagle8 Wrote:Could we just wrap it in a PHP version if statement and if it is earlier than 5.2.3, dont include that 4th parameter?
Yes, nice idea. I think that would work with no major problems.

Anyway I'll do some test later at home and tell you...
Reply
#57
BTW: Please change the error message CANNOT_SAVE_EMPTY from "You cannot save an empty page" to the real problem, which - as far as I know - is the empty page slug, which itself is caused by an empty title or an all-non-latin title (that translates into an empty page slug).

Two error messages would be nice: "Please enter a title" - if the title is empty - and - if there is no slug and a title which translates to an empty slug - "Please open the page options and enter a slug name"
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
#58
@mvlcek

Or maybe just change the error to "You cannot save a page with no title (or slug)" ?

BTW you lose the body content when this happens... That would make another issue, but perhaps it's a bit late, maybe for 3.2...
Reply
#59
ccagle8 Wrote:Could we just wrap it in a PHP version if statement and if it is earlier than 5.2.3, dont include that 4th parameter?

Done some tests. If you do it that way, sites on PHP<5.2.3 will have (again) over-encoded html entities in their meta desc, keywords and menu link title attribute, e.g. &copy; is rendered as &amp;copy;

Better than stopping with an error, of course... :-)
Reply
#60
Not major, and not something alot of people would do, but if you rename a plugin file.
You get a ton of errors. But I have some conflicting filename plugins from extend i was trying to install.
( they really should use a unique forced prefix naming convention, perhaps extend user id or something )

Then load plugings you get
Code:
Notice: Undefined index: name.php in plugins.php
blah.... etc

I imagine this is because the filecount is still the same, so perhaps a missing index can be treated as a change and cause a rescan of plugins. This doesn't happen when you delete a file.

Also I dont know how plugins are getting the plugin name and linking to extend, it seems to be using the filename somehow and not the plugins registered name, which just seems odd and causes renaming plugins to break the title in plugins list.
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#61
madvic/carlos & mvlcek : Changes have been made here. Madvic, can you replace the code in basic.php that changed and see if that allows you to use GS? http://code.google.com/p/get-simple-cms/...tail?r=663
- Chris
Thanks for using GetSimple! - Download

Please do not email me directly for help regarding GetSimple. Please post all your questions/problems in the forum!
Reply
#62
marcco: what is showing when it doesnt work?
- Chris
Thanks for using GetSimple! - Download

Please do not email me directly for help regarding GetSimple. Please post all your questions/problems in the forum!
Reply
#63
ccagle8 Wrote:marcco: what is showing when it doesnt work?

sorry, bug fixed. My Chrome had problems, doing a reboot solved the issue of "browse server" popup window not appearing.


Confirmed working, problem was between keyboard and chair
Reply
#64
marrco Wrote:Confirmed working, problem was between keyboard and chair
haha, good to know... thanks for checking back in
- Chris
Thanks for using GetSimple! - Download

Please do not email me directly for help regarding GetSimple. Please post all your questions/problems in the forum!
Reply




Users browsing this thread: 2 Guest(s)