Skip to main content
Topic: Convert SMF to ElkArte (Read 39034 times) previous topic - next topic - Topic derived from How to install ElkArte Alpha?
0 Members and 4 Guests are viewing this topic.

Re: Convert SMF to ElkArte

Reply #75

Thorsten, does the OpenImporter version of your script fix the infamous path checking problem in the Wedge importer? You know, the error message that shows up even when the path is alright, and that can only be avoided by directly clicking Next after entering the path name..? (i.e. skipping the path check altogether.)

Re: Convert SMF to ElkArte

Reply #76

Quote from: Nao – Thorsten, does the OpenImporter version of your script fix the infamous path checking problem in the Wedge importer? You know, the error message that shows up even when the path is alright, and that can only be avoided by directly clicking Next after entering the path name..? (i.e. skipping the path check altogether.)
TBH, I don't remember that bug, and I also don't know if it's fixed or not.. :P
Thorsten "TE" Eurich
------------------------

Re: Convert SMF to ElkArte

Reply #77

wanna bump this as I cant see a new topic anywhere about this ... any updates will current one work for beta 2?
Bryan Deakin
Former Project Manager/Customiser/Marketing @ SMF

Re: Convert SMF to ElkArte

Reply #78

Hi TrayBake, this would probably be @TE field, though I can guess that if it worked with beta 1, it will work with anything up to the final 1.0 version. :D
Of course this is a guess about the future, but for now, since Elk 1.0 beta 1 was released, the database schema has not been changed and as such if the converter worked with beta 1, it will work with beta 2 as well! ;D
Bugs creator.
Features destroyer.
Template killer.

Re: Convert SMF to ElkArte

Reply #79

Quote from: TE –
Quote from: Nao – Thorsten, does the OpenImporter version of your script fix the infamous path checking problem in the Wedge importer? You know, the error message that shows up even when the path is alright, and that can only be avoided by directly clicking Next after entering the path name..? (i.e. skipping the path check altogether.)
TBH, I don't remember that bug, and I also don't know if it's fixed or not.. :P
It was half-fixed. There was a bug in the JavaScript testing the path, I fixed that one around the time I discussed this. But there's also another bug left, and I just looked into it and understood what was going on, but I haven't found a fix yet.
The problem is that when the importer script is first loaded, $this->xml is empty, and thus $this->xml->general->settings returns nothing. Because of that, your script replaces it with 'null', and does its test on /foldernull instead of /folder/Settings.php...
I noticed that it only happens on FIRST load, that is, if you reload the page, then it works.

Because of the first load thing, I figured it might be a session problem, and indeed it seems to be.
From what I could gather, you're initializing $_SESSION variables, then determining if a script was passed in the URL, in which case it initializes it. But if there isn't, it doesn't seem to initialize anything.
I'm not 100% sure, I'll need to test, but it looks like if you have just ONE *_to_wedge.xml file in your root folder, then this might trigger the bug.

I'll spend some more time on this.

Re: Convert SMF to ElkArte

Reply #80

Okay... Found it.

NOT A FUNNY BUG.
OOP is cool, but it can end up a mess, as is the case here.

Now, when it comes to a situation where only one script is in the folder, here's how the importer detects them...

- Importer object is created. Does the session variable hold a script? If yes, decode it, and fill $this->xml. (Currently: none)
- $template->header(), where $import->xml is tested against. (Currently: empty. The 'from' header is initialized as 'null'.)
- step0. Here's where we look for scripts... If more than one is found, ask for which to use. After this point, we go back to the beginning, and we have a session variable. If only one is found, the session variable is directly initialized with the script path, and... We skip to the next step. At that point, the importer script has already shown the header, which has 'null' in it, and we have a valid script with its data, etc in it.

Possible ways to fix:
- Skip $template->header in case $import->xml is empty, and execute it in doStep0 instead.
- Redirect to the same script once the session variable is set.

What do you prefer, @Thorsten..?

Re: Convert SMF to ElkArte

Reply #81

I've decided to go with the redirect. (Header location.)
It's just slightly cleaner, and more in line with the multi-script part of the code.

 

Re: Convert SMF to ElkArte

Reply #82

@emanuele yep I tried and got it working:

http://convert.bryandeakin.com/forum/

Now just working on a new look that fits my site better :P
Bryan Deakin
Former Project Manager/Customiser/Marketing @ SMF

Re: Convert SMF to ElkArte

Reply #83

Was your SMF test site in ISO or UTF-8? I'm just wondering how well the converter handles going from SMF/ISO to Elk/UTF-8.

Also, has anyone tested 1.1.x/ISO to Elk/UTF-8 yet?
Master of Expletives: Now with improved family f@&king friendliness! :D

Sources code: making easy front end changes difficult since 1873. :P

Re: Convert SMF to ElkArte

Reply #84

test site is a direct clone of main site and thats in UTF-8
Bryan Deakin
Former Project Manager/Customiser/Marketing @ SMF

Re: Convert SMF to ElkArte

Reply #85

K. Gonna have to see what disasters happen with ISO/UTF-8.
Master of Expletives: Now with improved family f@&king friendliness! :D

Sources code: making easy front end changes difficult since 1873. :P

Re: Convert SMF to ElkArte

Reply #86

only one way to find out ant :P
Bryan Deakin
Former Project Manager/Customiser/Marketing @ SMF

Re: Convert SMF to ElkArte

Reply #87

Has Spuds gone and changed the censor strings again? :D
Master of Expletives: Now with improved family f@&king friendliness! :D

Sources code: making easy front end changes difficult since 1873. :P

Re: Convert SMF to ElkArte

Reply #88

I ran into a bug in the openimporter when I let the Elk install script create the Settings.php file from scratch.  (i.e. I didn't copy the one from the install directory into the main directory.)  Elk works ok but openimporter dies because a variable wasn't set in Settings.php.  Sadly I don't recall what variable it was though.

Re: Convert SMF to ElkArte

Reply #89

Is spuds the new grudge?
Bryan Deakin
Former Project Manager/Customiser/Marketing @ SMF