News:

Wondering if this will always be free?  See why free is better.

Main Menu

SimpleSEF 2.0 (SMF 1.1.x and SMF 2.0)

Started by SlammedDime, December 05, 2009, 10:08:40 PM

Previous topic - Next topic

Yağız...

Hi SD, a user of the Turkish boards gets this error:
Notice: iconv() [function.iconv]: Detected illegal character in input string in /home/xxx/public_html/Sources/SimpleSEF.php on line 620
Do you have any idea? I searched the error, the fix is to add //IGNORE or //TRANSLIT, but //IGNORE is already added.

SlammedDime

Without knowing exactly what the string is that contains the illegal character, it would be hard to know... I'd suggest suppressing errors from iconv by placing an @ in front of it... @iconv(blahblah)
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

Yağız...

$string = @iconv($char_set, 'UTF-8//IGNORE', $string); fixes the error. But now, he can't get SEF names on URLs.
Topic Name: "Şu An Ne Dinliyorsun.." (w/o quotes)
What he gets: topicseen/topic_3306.msg45835.html

SlammedDime

Try this...

Code (Find) Select
if (function_exists('iconv'))
$string = iconv($char_set, 'UTF-8//IGNORE', $string);
elseif (function_exists('mb_convert_encoding'))
$string = mb_convert_encoding($string, 'UTF8', $char_set);


Code (Replace) Select
if (function_exists('mb_convert_encoding'))
$string = mb_convert_encoding($string, 'UTF8', $char_set);


This will just bypass iconv completely and use mb_convert instead.
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

feline

I found a heave problem when you use cookies if SSEF active ...
Bcause we have logical url's like myulr/help/ or myulr/board_5/  the cookies are created with the path /help/ or /board_5/  :o
The result is, that the cookies don't work anytime ...
For now, I have patched the cookie functions in the file script.js ... any other way possible?

Fel

SlammedDime

What specific cookies are you having an issue with?  The SMF Login cookie works fine for me, and the upshrink and newupshrink cookie for collapsing the header and info box also work fine for me...
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

feline

all smc_toggle calls they use cookies.
The header upshrink uses theme options, not cookies !
and the login cookie have nothing to do with the smc_toggle cookies ...

Fel

SlammedDime

Quote from: feline on March 12, 2010, 04:20:06 PM
all smc_toggle calls they use cookies.
The header upshrink uses theme options, not cookies !
and the login cookie have nothing to do with the smc_toggle cookies ...

Fel
If you look at the Javascript code in Index.template.php and BoardIndex.template.php, the toggles for these items use upshrink and newupshrink cookie names and the state of these items (shrunk or not) is kept in a cookie, not in the database (vs the category shrinkage, which IS kept in the database)
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

feline

You have better to look ..
That is the code from index.template.php

// Define the upper_section toggle in JavaScript.
echo '
<script type="text/javascript"><!-- // --><![CDATA[
var oMainHeaderToggle = new smc_Toggle({
bToggleEnabled: true,
bCurrentlyCollapsed: ', empty($options['collapse_header']) ? 'false' : 'true', ',
aSwappableContainers: [
\'upper_section\'
],
aSwapImages: [
{
sId: \'upshrink\',
srcExpanded: smf_images_url + \'/upshrink.png\',
altExpanded: ', JavaScriptEscape($txt['upshrink_description']), ',
srcCollapsed: smf_images_url + \'/upshrink2.png\',
altCollapsed: ', JavaScriptEscape($txt['upshrink_description']), '
}
],
oThemeOptions: {
bUseThemeSettings: ', $context['user']['is_guest'] ? 'false' : 'true', ',
sOptionName: \'collapse_header\',
sSessionVar: ', JavaScriptEscape($context['session_var']), ',
sSessionId: ', JavaScriptEscape($context['session_id']), '
},
oCookieOptions: {
bUseCookie: ', $context['user']['is_guest'] ? 'true' : 'false', ',
sCookieName: \'upshrink\'
}
});
// ]]></script>';

and you see, that the theme option is defined. In this case, the state is set/get from the theme and not from the cookie, if the user not a guest ...

Fel

SlammedDime

Ahh... my bad... I read the inline if statement wrong.  This is a bug in SMF... the cookie functions in the script.js file are not respecting the local/global cookie settings in SMF's admin control panel.  I'll verify this with the dev's first before filing a bug report.

the line: document.cookie = sKey + '=' + encodeURIComponent(sValue); needs more information to set the path and expiry information.
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

Jason kiDD

#490
Hey I am having a problem with Simple SEF and E-Arcade 2.59... Upon clicking the arcade link I get sent to a blank page.. Any ideas?

Forum Version SMF 1.11

SlammedDime

if the link is http://myforum.com/arcade, and you also have a folder named arcade in your forum directory, it won't work because the folder takes precedence.  You'll either need to rename the folder, or change the action name for the arcade.  Do you have a link to the arcade mod so I can look at how it's constructed?
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

feline

Quote from: SlammedDime on March 12, 2010, 07:59:11 PM
the line: document.cookie = sKey + '=' + encodeURIComponent(sValue); needs more information to set the path and expiry information.
Yes that's true .. but expiry is ok. if not specific it's the end of browser session, thats correct.
For now I have changed the update cookie in script.js as follow:

// Update the cookie, if desired.
if ('oCookieOptions' in this.opt && this.opt.oCookieOptions.bUseCookie)
{
sPath = smf_scripturl.substring(smf_scripturl.indexOf(window.location.hostname) + window.location.hostname.length, smf_scripturl.lastIndexOf('/') + 1);
document.cookie = this.opt.oCookieOptions.sCookieName + '=' + encodeURIComponent(this.bCollapsed ? '1' : '0') + ';path=' + sPath;
}


Fel

Tanshaydar

Erm... Adding poll to an existed topic gives an error. Is that a known bug?

hartiberlin

Hi,
I am using SMF 2.0RC3 and PortaMX 0.980 with Patch 0.981 and
SimpleSEF 1.03

Okay, I wanted to add a board
in
http://www.free-energy-news.com/forum/

and when I added now 2 new boards:

Solar Energy
and
Wind Energy

I can not go into these boards and can not post...

Also the links on these 2 boards are just linking to:

http://www.free-energy-news.com/

and not into these new boards...

Hmmm..

What could this be ?

I will try now to disable SSEF 1.03 and see, if this was the cause...

Maybe one should not create new boards, when SimpleSEF is enabled ??

Regards, Stefan.

hartiberlin

Ups,
now when I want to disable SimpleSEF 1.03  from the SMF admin panel I get this error:

Warning: require(/xxxxxxx/free-energy-news.com/cache/data_0f84d2e6e8065341dc31f760734b37c1-SMF-modSettings.php) [function.require]: failed to open stream: No such file or directory in /xxxxxx/free-energy-news.com/Sources/Load.php  on line 2634

Warning: require() [function.require]: Unable to access /xxxxxxx/free-energy-news.com/cache/data_0f84d2e6e8065341dc31f760734b37c1-SMF-modSettings.php in /xxxxxxx/free-energy-news.com/Sources/Load.php on line 2634

Warning: require(/xxxxxxx/free-energy-news.com/cache/data_0f84d2e6e8065341dc31f760734b37c1-SMF-modSettings.php) [function.require]: failed to open stream: No such file or directory in /xxxxxxxx/free-energy-news.com/Sources/Load.php on line 2634

Fatal error: require() [function.require]: Failed opening required '/xxxxx/free-energy-news.com/cache/data_0f84d2e6e8065341dc31f760734b37c1-SMF-modSettings.php' (include_path='.:/usr/share/php5/') in /xxxxxxx/free-energy-news.com/Sources/Load.php on line 2634

What could that be ?
Anything cache related ?

Should I better clear the cache now ?

Many thanks.

Regards, Stefan.

atfosan

I have a little problem with this mod and PortaMx.
With previous versions of PortaMx (0.971-2), SimpleSEF (1.0.2) and SMF (2.0 RC2) I can go to the /contacts page instead of /index.php?contacts but now I can only go to the /spage,contacts however I try to strip words "spage", "spage," and "spage," in SimpleSEF settings...

Any suggestion to solve this problem?
my SMF project - school site: forum with PortaMx and SimpleSEF mods

feline

That have nothing to do with SimpleSEF.
I have say you, that PortaMx use the format index.php?spage=pagename to request a Single Page. The old format (index.php?pagename) is not longer valid and supported. That you have to accept.

Fel

SlammedDime

Quote from: Tanshaydar on March 13, 2010, 10:00:01 AM
Erm... Adding poll to an existed topic gives an error. Is that a known bug?
Quote from: SlammedDime on March 11, 2010, 11:03:39 AM
Quote from: escorta.biz on March 11, 2010, 10:30:14 AM
I tested 1.0.3 and most of the issues were solved.
Though, the problem with adding polls to existing topics still exists; i receive an error (more info here).
Thanks!
copy and paste the following code into a file named 'fix.php' and upload it to your SMF root folder ( the same place that SSI.php is) and then navigate to it: http://myforum.com/fix.php

<?php
require('SSI.php');

$fix = array(
'simplesef_areas' => '',
'simplesef_subactions' => '',
);

updateSettings($fix);

unlink(__FILE__);

?>


That should fix the issue.

Stefan - when new boards are added, you have to clear the file cache as this mod cache's board names (they don't change very often, so caching them reduces the database queries needed).  As for the errors your are getting that are cache related, looks like something is up with your cache directory... either not writeable or doesn't exist.
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

hartiberlin

Hmm,
what permission must my /cache directory have ?

777   ?

Many thanks.

Advertisement: