News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

1.1.4 MOVED topic broken

Started by Owdy, October 05, 2007, 03:50:03 PM

Previous topic - Next topic

Owdy

When you move some topic, SMF cerates that 'MOVED' topic. There are 2 links, first is to board, second to topic. After upgrading 1.1.4, that feature is broken. That second link brakes.

this

[LINKKI AIHEESEEN]
turns to this

[liNKKI AIHEESEEN]


Normally it turns to link.
Former Lead Support Specialist

Tarvitsetko apua SMF foorumisi kanssa? Otan työtehtäviä vastaan, lue:http://www.simplemachines.org/community/index.php?topic=375918.0

codenaught

That's odd. So $txt['movetopic_auto_topic'] is set to the proper one for your language? When the text is first inserted into the textbox it is right but when it is submitted it is breaks and does not get changed into a link?
Dev Consultant
Former SMF Doc Coordinator

Owdy

Quote from: akabugeyes on October 05, 2007, 04:00:31 PM
When the text is first inserted into the textbox it is right but when it is submitted it is breaks and does not get changed into a link?
Yes. This happens in 2 sites.
Former Lead Support Specialist

Tarvitsetko apua SMF foorumisi kanssa? Otan työtehtäviä vastaan, lue:http://www.simplemachines.org/community/index.php?topic=375918.0

Owdy

#3
Hmmm, it doesnt do that with English... Has something changed?

Finnish
$txt['movetopic_auto_board'] = '[ALUE]';
$txt['movetopic_auto_topic'] = '[LINKKI AIHEESEEN]';
$txt['movetopic_default'] = 'Tämä aihe on siirretty alueelle ' . $txt['movetopic_auto_board'] . ".\n\n" . $txt['movetopic_auto_topic'];


English
$txt['movetopic_auto_board'] = '[BOARD]';
$txt['movetopic_auto_topic'] = '[TOPIC LINK]';
$txt['movetopic_default'] = 'This topic has been moved to ' .$txt['movetopic_auto_board'] . ".\n\n" . $txt['movetopic_auto_topic'];

Former Lead Support Specialist

Tarvitsetko apua SMF foorumisi kanssa? Otan työtehtäviä vastaan, lue:http://www.simplemachines.org/community/index.php?topic=375918.0

Tonilind

#4
Is this issue still unsolved? It's very frustrating to modify each "moved topic" manually. :-( There must be several Finnish SMF 1.1.4 admins already wondering what is causing the problem and how to fix it.

I can confirm that this problem appeared after upgrading to v1.1.4 (and only with Finnish language pack, not with English).

Hopefully this can be solved soon (thanks in advance!).

Owdy

Quote from: Tonilind on October 23, 2007, 03:37:19 PM
Is this issue still unsolved?
Yes its seems. Have any other language have this problem? That lang string is fine, it cant be that. Its been working fine untill now (1.1.4).
Former Lead Support Specialist

Tarvitsetko apua SMF foorumisi kanssa? Otan työtehtäviä vastaan, lue:http://www.simplemachines.org/community/index.php?topic=375918.0

SleePy

Owdy, does it work if you use the english versions only for this:
$txt['movetopic_auto_board'] = '[BOARD]';
$txt['movetopic_auto_topic'] = '[TOPIC LINK]';


I would have to peak tomorrow or sometime, I don't know how the replacement is done but I wonder if its messing up.
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

Owdy

If i change only this, it works
$txt['movetopic_auto_topic'] = '[TOPIC LINK]';
Former Lead Support Specialist

Tarvitsetko apua SMF foorumisi kanssa? Otan työtehtäviä vastaan, lue:http://www.simplemachines.org/community/index.php?topic=375918.0

SleePy

So even the board link is correct and works?

I just opened the MoveTopic.php file quickly and that wouldn't make sense

// Should be in the boardwide language.
if ($user_info['language'] != $language)
loadLanguage('index', $language);

$_POST['reason'] = $func['htmlspecialchars']($_POST['reason'], ENT_QUOTES);
preparsecode($_POST['reason']);

// Add a URL onto the message.
$_POST['reason'] = strtr($_POST['reason'], array(
$txt['movetopic_auto_board'] => '[url=' . $scripturl . '?board=' . $_POST['toboard'] . ']' . addslashes($board_name) . '[/url]',
$txt['movetopic_auto_topic'] => '[iurl]' . $scripturl . '?topic=' . $topic . '.0[/iurl]'
));


I wonder if preparsecode is causing this..
Try to edit the code and comment it out.
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

Owdy

#9
Quote from: SleePy on October 24, 2007, 01:15:58 AM
So even the board link is correct and works?
Board link is fine, only topic link is broken.

If i comment this out, it brakes it same way
$txt['movetopic_auto_topic'] => '[iurl]' . $scripturl . '?topic=' . $topic . '.0[/iurl]'


Former Lead Support Specialist

Tarvitsetko apua SMF foorumisi kanssa? Otan työtehtäviä vastaan, lue:http://www.simplemachines.org/community/index.php?topic=375918.0

SleePy

Well of course it will break :P That part should be translating it..

I can try to figure this out tomorrow (but I should be getting my new computer so most likely will forget).
But what we can attempt to do is either comment out the redirectexits, then have it echo that text string (to see if its in english or not) or have it log an error quickly with that error string to see what language it is in.
I am thinking its in English for some reason.
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

Owdy

Quote from: SleePy on October 24, 2007, 01:33:32 AM
log an error quickly with that error string to see what language it is in.
I am thinking its in English for some reason.
Finnish is unchanged.
Former Lead Support Specialist

Tarvitsetko apua SMF foorumisi kanssa? Otan työtehtäviä vastaan, lue:http://www.simplemachines.org/community/index.php?topic=375918.0

SleePy

Owdy,
Are you able to reproduce this, with newer versions?
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

Owdy

Former Lead Support Specialist

Tarvitsetko apua SMF foorumisi kanssa? Otan työtehtäviä vastaan, lue:http://www.simplemachines.org/community/index.php?topic=375918.0

SleePy

Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

Owdy

Quote from: SleePy on December 18, 2007, 05:11:05 PM
I meant latest version of 2.0 ;)

Is there Finnish lang files for 2.0? I dont translate those anymore, its Niko's job now.

This is weird, because 1.1.3 worked, 1.1.4 dont.
Former Lead Support Specialist

Tarvitsetko apua SMF foorumisi kanssa? Otan työtehtäviä vastaan, lue:http://www.simplemachines.org/community/index.php?topic=375918.0

SleePy

Does it work in the test board here?
I wonder.

If you open the MoveTopic.php

Find:
preparsecode($_POST['reason']);

And add after:
exit $_POST['reason'];

Then submit this. What does the code look like? I am thinking that the clean up is doing this.
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

Owdy

Parse error: syntax error, unexpected T_VARIABLE in /var/www/public_html/foorumi/Sources/MoveTopic.php on line 232
Former Lead Support Specialist

Tarvitsetko apua SMF foorumisi kanssa? Otan työtehtäviä vastaan, lue:http://www.simplemachines.org/community/index.php?topic=375918.0

SleePy

exit ($_POST['reason']);


I swear exit was a language construct.. But this should just be dumping what the output is before it gets replaced.. Which seems to be the issue.
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

Owdy

#19
QuoteTämä aihe on siirretty alueelle [ALUE].

[liNKKI AIHEESEEN]
That is wrong. Those first 2 letters in that topic string are wrong. It should be 'LINKKI AIHEESEEN'.
Former Lead Support Specialist

Tarvitsetko apua SMF foorumisi kanssa? Otan työtehtäviä vastaan, lue:http://www.simplemachines.org/community/index.php?topic=375918.0

Advertisement: