News:

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

Main Menu

RC4 with TP 1.1 FAIL (Tried everything...)

Started by jncrenshaw, November 26, 2010, 12:36:05 PM

Previous topic - Next topic

jncrenshaw

OK. So I Installed a fresh copy of RC4 onto the server. After a lot of trouble I managed to migrate over almost all the information from my old 1.x forum (NOT an easy task. This database was like 4 years old. Haha.) I had to tweak a fair amount of the database and code to get it to work but it finally jumped up and started putting along. So, I moved on to step two of updating the site. TPortal.
I've placed this in the SMF forum because I suspect that it's not working due to what I did initial to the TP install.
I installed the latest version of TP (I believe it's 1.1.10...) and now I can't see squat.
It loads the first part of the theme just fine. The header, the forum board name, etc... All the way down to the navigation loads just fine. Then it takes a poop...  :o
I get the following error:
Unable to load the 'tp_above' template.
So, I did the obvious and re uploaded the applicable files. No go.
So I decided to do the next obvious and check the error log in the DB to see what was happening. Very informative. The following are the applicable records for each attempted page load...

So. It appears as though there's a problem with finding that language file. That would be why it can't find those txt variables.
I double checked that the file IS on the server and CHMOed it to 777. Still no go. It's not ftp related.
I suspect that it's actually a database issue but I'm not familiar enough with SMF and TP to actually know where to look from here.
I've checked the TPSubs.php, the Subs.php, I've tried reverting to old versions of these files and reuploading the edited versions. I just can't figure out where I'm supposed to go from here. Any ideas?
Again, before this gets flagged as irrelevant and that I should go to the TP support forum, I believe this to be an SMF database issue, NOT a problem with TP.
Thanks for your help in advance!

NanoSector

My Mods / Mod Builder - A tool to easily create mods / Blog
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

jncrenshaw

TP installed successfully. All the necessary DB changes occurred. All necessary files were uploaded. I personally made the necessary edits to the xml file to insure that it installed correctly. Yes, I can error in this but the system is also telling me that it installed properly.
I really don't think this has anything to do with the TinyPortal mod.
Thanks for you help in advance...

NanoSector

Quote from: jncrenshaw on November 26, 2010, 01:38:45 PM
TP installed successfully. All the necessary DB changes occurred. All necessary files were uploaded. I personally made the necessary edits to the xml file to insure that it installed correctly. Yes, I can error in this but the system is also telling me that it installed properly.
I really don't think this has anything to do with the TinyPortal mod.
Thanks for you help in advance...
Even if SMF tells you it is installed, it may not be.

If you click "Install" on SMF, it imports data into the list of installed items and thus it thinks it is installed.

Though, file uploads and database changes do still get done, but file modifications aren't done.
My Mods / Mod Builder - A tool to easily create mods / Blog
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

jncrenshaw

Let me clarify. I've spent the last... 24 hours off and on tracking the code on this. The file modifications were made. I've hand checked the .mod file myself.
The error is being incurred because in TPSubs.php, it's making a call to a specific variable. It calls for $txt['tp-myarticles']. The error report tells us that it doesn't register this as a valid variable. Why? Because it's not calling the TPortal.english.php language file! Why? I can't figure that out. I've manually run code on the server to try to reproduce file modifications. I've manually uploaded all necessary files and have double checked nearly all the applicable code in the .mod file.
I'm positive enough that the mod did it's job that I'd put money on it.

jncrenshaw

OK. So the problem is definitely with the TPSubs.php file.
I'm going through the code and this is definitely where the language files are loaded. The problem has to be somewhere amongst the very complex language function code. It can't find the template files for TP.
I've attached the TPSubs.php file that's on the server.
Any clues as to why it's not loading the template files?
Could it be a database issue possibly?
Thanks again in advance!

Illori

you are best to ask for support on the tp site or on the support thread for tp. smf does not directly support any mod that is installed.

jncrenshaw

As I said before. I don't believe this to be a Mod based problem. I can try over there too but I really suspect that this is caused by the database. I had to manually truncate, delete and add tables in the DB in order to update the forum. I suspect that something was damaged during that process and that is preventing the mod from functioning properly.

NanoSector

Quote from: jncrenshaw on November 26, 2010, 03:09:48 PM
As I said before. I don't believe this to be a Mod based problem. I can try over there too but I really suspect that this is caused by the database. I had to manually truncate, delete and add tables in the DB in order to update the forum. I suspect that something was damaged during that process and that is preventing the mod from functioning properly.
It IS a problem with the mod because since you installed it you had these problems :-\
My Mods / Mod Builder - A tool to easily create mods / Blog
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

jncrenshaw

Be who it may the guilty party, I'm still not getting the help I need in the TP forum either.
In the very least, could someone enlighten me how to force an uninstall using the xml file in the package?
I can't access the admin page so I can't uninstall that way...

Illori

you would have to reverse the directions here Manual Installation of Mods

if you cant enter the admin panel you cant use the xml to do an uninstall.

Antechinus

Quote from: jncrenshaw on November 26, 2010, 03:09:48 PM
As I said before. I don't believe this to be a Mod based problem. I can try over there too but I really suspect that this is caused by the database. I had to manually truncate, delete and add tables in the DB in order to update the forum. I suspect that something was damaged during that process and that is preventing the mod from functioning properly.
You should not have had to do any manual modifcation of the database. The large upgrade pack should have taken care of everything. What version was your old db?

Norv

Is TinyPortal currently compatible with RC4? I understand it has just been taken over by IchBin, and I'm not sure he had time to update it already.
http://www.simplemachines.org/community/index.php?topic=27642.msg2863051#msg2863051
To-do lists are for deferral. The more things you write down the later they're done... until you have 100s of lists of things you don't do.

File a security report | Developers' Blog | Bug Tracker


Also known as Norv on D* | Norv N. on G+ | Norv on Github

jncrenshaw

I don't recall. It was really old though. Here's the problem.
I tried running the update but I had so many screwed up mods on the site that it was nigh unto impossible to sort them all out. I couldn't even uninstall most of them.
I decided to not only update the site but to also migrate it's location. So I set up a brand-new secondary forum and deleted the tables I was going to replace. I then created a SQL query to insert my backed up tables for topics, messages, users, etc... (I was very thorough with this...). This gave me an exact copy of my first forum but without the mod/settings nightmare.
I then ran the updater. Now, when running the updater, it gave me several errors but I knew what they were from. They were all errors where the migrated table format was different from the expected table format. So, I had to delete/add a few columns. Inspecting the code gave me the exact information needed to know what kind and class of column was missing. Fortunately the updater stops at each error and lets you know what's going on.
So I had a new forum, I couldn't see any surface damage to my abnormal update, and I decided to start the installation of TP.
I made the necessary changes in the package to make it RC4 compatible, there were no errors in the installation, and BOOM!
Can't load the template.
It seems that Someone around here would know where this error is coming from and how to fix it. After all, someone coded this...

@Norv. That's correct. However, there are other sites that are running it without problems. You just need to make a few basic adjustments to the package info xml file and the .mod file inside. Then it runs fine... theoretically...

Antechinus

Running the large upgrade automatically uninstalls all mods, because all files are overwritten. There is no need to worry about hacking the db. You can, if you wish to, drop superfluous db tables created by old mods but no other action is required.

jncrenshaw

Hmmm.. Well for some reason it wasn't letting me upgrade. I don't remember all the details as it was a short term problem that was resolved fairly quickly.
As far as the compatablility stuff, you can check here for more details on TP RC1 working with SMF RC4...
http://www.simplemachines.org/community/index.php?topic=27642.msg2840458#msg2840458

jncrenshaw

Hey. Just had a tiny breakthrough.
Check this out...

The TP menu is seriously screwed up. That's got to be the source of the problem. Is it possibly a syntax error? A missing bracket perhaps? I'll start counting...

NanoSector

Quote from: jncrenshaw on November 26, 2010, 05:08:21 PM
Hey. Just had a tiny breakthrough.
Check this out...

The TP menu is seriously screwed up. That's got to be the source of the problem. Is it possibly a syntax error? A missing bracket perhaps? I'll start counting...
Seriously, reinstall TP...
My Mods / Mod Builder - A tool to easily create mods / Blog
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

jncrenshaw

I already manually reinstalled.
I went through all the files and manually uploaded them and manually searched and replaced everything mentioned as per the .mod files.
I've already reinstalled. After so much work I'm trying to avoid having to do all that again in reverse.

The code responsible for the menu is as follows. I don't see any problems. This is only the code for the first few entries in the menu though. But that is definitely where the problem is...
function tp_getbuttons()
{
global $scripturl, $txt, $context;

loadlanguage('TPortal');

$buts = array();

if($context['TPortal']['show_download']==1)
$buts['downloads'] = array(
'title' => $txt['tp-downloads'],
'href' => $scripturl . '?action=tpmod;dl',
'show' => true,
'active_button' => false,
'sub_buttons' => array(
),
);


if($context['user']['is_logged'])
$buts['tpeditwonarticle'] = array(
'title' => $txt['tp-myarticles'],
'href' => $scripturl . '?action=tpmod;sa=myarticles',
'show' => true,
'active_button' => false,
'sub_buttons' => array(
),
);

if(allowedTo('tp_submithtml'))
$buts['tpeditwonarticle']['sub_buttons']['submithtml'] = array(
'title' => $txt['tp-submitarticle'],
'href' => $scripturl . '?action=tp' . (allowedTo('tp_articles') ? 'admin' : 'mod') . ';sa=addarticle_html',
'show' => true,
'active_button' => false,
'sub_buttons' => array(
),
);

if(allowedTo('tp_submitbbc'))
$buts['tpeditwonarticle']['sub_buttons']['submitbbc'] = array(
'title' => $txt['tp-submitarticlebbc'],
'href' => $scripturl . '?action=tp' . (allowedTo('tp_articles') ? 'admin' : 'mod') . ';sa=addarticle_bbc',
'show' => true,
'active_button' => false,
'sub_buttons' => array(
),
);


NanoSector

Open up modifications.English.php and look if the $txt['texthere'] variables exist and are correctly filled in.
My Mods / Mod Builder - A tool to easily create mods / Blog
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

Norv

In what file is defined $txt['tp-downloads'] ?
How about $txt['tp-myarticles'] ?

Do you have an UTF8 forum?
What languages exactly (utf8 or non-utf8, too) do you have installed?
(though on RC4 that should matter less if at all).

Actually, do you still get undefined index 'tp-myarticles' or not? It may be useful to clear your error log and see if it still occurs, and what errors exactly.

Then again, mostly, I strongly recommend to post this / link this in TP thread, and wait for IchBin to update the mod to RC4. He just took it over (it's a matter of days), you could wait a bit for him to see what's up.
We cannot really help with everything without knowing well TP code or taking the time to dig into it.
To-do lists are for deferral. The more things you write down the later they're done... until you have 100s of lists of things you don't do.

File a security report | Developers' Blog | Bug Tracker


Also known as Norv on D* | Norv N. on G+ | Norv on Github

jncrenshaw

@Yoshi- the variables are set in the TPortal.english.php file. And yes. They are all there. I already double checked.

@Norv- Yah, both variables are set in the same place. TPortal.english.php. All the supposed "missing" variables are all accounted for in the same location as the actual text that appears on the site. This would lead me to believe that an extra apostrophe or something was added accidentally.

Yah. I may just do that. I think I may have to revert to not using TinyPortal for a little while. At least all my data is in tact. I can wait a little I guess. I'll just link this into the already exorbitantly long topic and hope he gets around to looking at it.

Thanks everyone for your help. I'll try tinkering a little bit more with this and then I may just have to ditch this one.
If anyone happens to notice anything wrong with what's been posted hitherto, please let me know.
Thanks again!
:)

NanoSector

Quote from: jncrenshaw on November 26, 2010, 05:51:34 PM
@Yoshi- the variables are set in the TPortal.english.php file. And yes. They are all there. I already double checked.

@Norv- Yah, both variables are set in the same place. TPortal.english.php. All the supposed "missing" variables are all accounted for in the same location as the actual text that appears on the site. This would lead me to believe that an extra apostrophe or something was added accidentally.

Yah. I may just do that. I think I may have to revert to not using TinyPortal for a little while. At least all my data is in tact. I can wait a little I guess. I'll just link this into the already exorbitantly long topic and hope he gets around to looking at it.

Thanks everyone for your help. I'll try tinkering a little bit more with this and then I may just have to ditch this one.
If anyone happens to notice anything wrong with what's been posted hitherto, please let me know.
Thanks again!
:)
Marked as solved for now.

Maybe you could try another portal system like Adk-Portal, ezPortal or SimplePortal.
My Mods / Mod Builder - A tool to easily create mods / Blog
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

Advertisement: