News:

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

Main Menu

Thank-O-Matic

Started by enik, June 12, 2007, 12:18:59 PM

Previous topic - Next topic

Arvacon

 I didn't note any other error at the installation, except from the display.template.php files that they had to do with the core theme.
What can I do now to repair this, except from restore the whole forum?  :-[

Edit: I pushed the uninstall button at the thankomatic and it says that all the changes at the load.php file are "test failed".
Why now are all failed, when before it was just one (that I corrected it manually)?
Edit2: I didn't uninstall it yet, I have cancel it.

Arvacon

Ok there is something really weird here..
I tried find the changes that failed at testing, but it seems the thankomatic has not touched this file finally, as I can not find any change, except from the only change I did manually.
Isn't it strange?  :o


Edit: I uninstalled it finally and now the forum works fine again.
I took a long screenshot, I will try to upload it here, to see the errors that says before you install it.

Arvacon

#2182
Try to zoom in and scroll down to see the details..

Update: I manually did all the changes of the load.php file and now I don't get any error at that field.
Should I do any other manual changes as you see from the picture, or am I ready to go?
Is there any possibility the carbonate theme to be based by the core theme?
As I remember this was not...

Arvacon

#2183
I finally see now an error at the log file, every time I try to open a topic.
I didn't uninstall the mod again, so I try to figure out what is happening.
As I see from the error code, this has to do with the line 681 of the load.php file.

I took a screenshot and hope you can find something from this, as I can't see what's wrong.  ???

Edit: I tried to used also the default curve theme, but I get the same error.

Quotehttp://www.xxxxxx.gr/index.php?/topic,9.0.html
8: Undefined index: redirect
File: /home/xxxxxxxx/www/Sources/Load.php
Line: 681

Edit2: The forum can work with core theme, but not with the default or my custom one, and it still gives the same error at the error logs.

Arvacon

Good morning.
Can someone help me with this problem please?
I feel hopeless now..  :(
My members would like this mod, they have been asking this to me so much.
Please someone?  :'(

Shambles

Can we see the $request $smcFunc['db_query'](''' block of code from around 40 lines before that which you posted in your screenie?

Copy and paste it here between [code] and [/code] tags to make it easier to read.

Arvacon

#2186
Hi friend.
Is this the code you ask?

// Is the member data cached?
      if (empty($modSettings['cache_enable']) || $modSettings['cache_enable'] < 2 || ($user_settings = cache_get_data('user_settings-' . $id_member, 60)) == null)
      {
         $request = $smcFunc['db_query']('', '
            SELECT mem.*, IFNULL(a.id_attach, 0) AS id_attach, a.filename, a.attachment_type
            FROM {db_prefix}members AS mem
               LEFT JOIN {db_prefix}attachments AS a ON (a.id_member = {int:id_member})
            WHERE mem.id_member = {int:id_member}
            LIMIT 1',
            array(
               'id_member' => $id_member,
            )
         );
         $user_settings = $smcFunc['db_fetch_assoc']($request);
         $smcFunc['db_free_result']($request);

         if (!empty($modSettings['cache_enable']) && $modSettings['cache_enable'] >= 2)
            cache_put_data('user_settings-' . $id_member, $user_settings, 60);
      }



Oups, sorry, that was wrong code.
Here is the right one

if (empty($temp))
{
$request = $smcFunc['db_query']('', '
SELECT
c.id_cat, b.name AS bname, b.description, b.num_topics, b.member_groups,
b.id_parent, c.name AS cname, IFNULL(mem.id_member, 0) AS id_moderator,
mem.real_name' . (!empty($topic) ? ', b.id_board' : '') . ', b.child_level,
b.id_theme, b.override_theme, b.count_posts, b.id_profile, b.thank_you_post_enable,
b.unapproved_topics, b.unapproved_posts' . (!empty($topic) ? ', t.approved, t.id_member_started' : '') . '
FROM {db_prefix}boards AS b' . (!empty($topic) ? '
INNER JOIN {db_prefix}topics AS t ON (t.id_topic = {int:current_topic})' : '') . '
LEFT JOIN {db_prefix}categories AS c ON (c.id_cat = b.id_cat)
LEFT JOIN {db_prefix}moderators AS mods ON (mods.id_board = {raw:board_link})
LEFT JOIN {db_prefix}members AS mem ON (mem.id_member = mods.id_member)
WHERE b.id_board = {raw:board_link}',
array(
'current_topic' => $topic,
'board_link' => empty($topic) ? $smcFunc['db_quote']('{int:current_board}', array('current_board' => $board)) : 't.id_board',
)
);

Shambles

No, that looks to be too far back in the file.

Could you attach the whole file here, in your next post? I have a feeling that one of your DB queries doesn't have the correct selection criteria.


EDIT: you've got the right part this time.

Code (Select) Select
SELECT
c.id_cat, b.name AS bname, b.description, b.num_topics, b.member_groups,
b.id_parent, c.name AS cname, IFNULL(mem.id_member, 0) AS id_moderator,
mem.real_name' . (!empty($topic) ? ', b.id_board' : '') . ', b.child_level,
b.id_theme, b.override_theme, b.count_posts, b.id_profile, b.thank_you_post_enable,


Code (replace) Select
SELECT
c.id_cat, b.name AS bname, b.description, b.num_topics, b.member_groups,
b.id_parent, c.name AS cname, IFNULL(mem.id_member, 0) AS id_moderator,
mem.real_name' . (!empty($topic) ? ', b.id_board' : '') . ', b.child_level,
b.id_theme, b.override_theme, b.count_posts, b.id_profile, b.thank_you_post_enable, b.redirect,

Arvacon

I didn't realize I was so back  ;D

I did that change but the problem still exist.

I upload the whole file to have a look.  :)

Shambles

Quote from: Arvacon
I did that change but the problem still exist.
The 'redirect' error or the parse error?

Try flushing your forums file cache if it's the redirect error.

Arvacon

I just replaced the code you gave me with the one from my file before, but it didn't change the redirect problem.
What is the parse error?

I flushed the forum cache from the "forum maintenance" -> "Empty the file cache" but still the same.
I flushed the browser's cache too.

Shambles

I'll have to pick this up later as I'm off out now.

The "parse error" is the second issue you reported, above.

Arvacon

I thought that the redirect problem cause the parse page, I mean I thought this was one problem.
So it is two problems finally?  :o
At my log file I get only one error, the one with the redirect and I thought that this cause the parse error page..
Anyway, see you later then and thanks in advance for your time!


Shambles

Quote from: Arvacon
At my log file I get only one error, the one with the redirect...
Does the error still occur at the point you previously noted (line 681) ?

This issue doesn't appear related to the Thank-O-Matic mod, more likely as a result of the manual edits you said earlier you'd made to Load.php.

Shambles

On the subject of the template parse error, I note you reported this last year in relation to the T-O-M mod:

http://www.simplemachines.org/community/index.php?topic=418177.msg3458718#msg3458718

I think you might be proceeding with the installation when the package manager is advising against it... a classic result of that.

Arvacon

Quote from: Shambles on May 27, 2013, 12:50:41 PM
Quote from: Arvacon
At my log file I get only one error, the one with the redirect...
Does the error still occur at the point you previously noted (line 681) ?

This issue doesn't appear related to the Thank-O-Matic mod, more likely as a result of the manual edits you said earlier you'd made to Load.php.

Actually I checked it again now and it seems I don't get the 681 line error anymore.
The manual edits I did was exactly what the thankomatic was asking me to replace during the installation, I didn't change something else.

I had forget that I had seen this error when I installed the "Custom View of Attachments" mod. As I remember now, I had already installed the thankomatic and when I installed the custom view mod, then it happened the parse problem, so I kept the custom view and I uninstalled the thankomatic, because it was not showing the admin panel after the installation, so I could not do any changes at its settings.

So does this mean that I can't run both of these mods together finally?  :-\
The weird is that with the core theme, everything works ok and I can't understand why the default curve theme and my custom one have this problem..

The problem is that I need both of these mods, so is there any way to solve this parse problem?

Arvacon

Update.. Now I get another error from load.php at lines 1238 and 1239.  :-X

Shambles

Well it's good that the redirect problem disappeared, as I thought it might.

The parse issue won't be a problem, just copy the template file here and we can take a look at it.


Arvacon

Which one is the template file? BoardIndex.template.php or index.template.php?
Do you need the default curve one or my custom?
I think the custom "carbonate by Bloc" theme must collaborate with the default one (if I don't do mistake)

Shambles


Advertisement: