Little problem with AJAX mod, maybe conflict with CASH mod?

Allgemeiner Support zum phpBB 2 Board und phpBB 2 Modifikationen
Forumsregeln
Auch wenn hier der Support für phpBB 2 weiterhin aufrecht erhalten bleibt, weisen wir darauf hin, dass das phpBB 2 nicht mehr offiziell unterstützt und weiterentwickelt wird!
Antworten
cavallino
Beiträge: 41
Registriert: Fr 22.Sep, 2006 22:24

Little problem with AJAX mod, maybe conflict with CASH mod?

Beitrag von cavallino »

Hello,
when viewing posts, if i click on the X button to delete one of them, a box window comes up asking:

Code: Alles auswählen

Are you sure you want to delete this post?
I then click OK but nothing happens!
I can delete posts only thru the normal full edit form, by checking the appropriate box and then click submit.
How can I correct the problem with the quick delete? Where should I check for errors?

Thanks
Zuletzt geändert von cavallino am Mo 25.Sep, 2006 18:34, insgesamt 3-mal geändert.
Benutzeravatar
oxpus
Administrator
Beiträge: 28737
Registriert: Mo 27.Jan, 2003 22:13
Wohnort: Bad Wildungen
Kontaktdaten:

Beitrag von oxpus »

Enable the debugging:
Open the ajax/ajax_core.js and change

Code: Alles auswählen

var AJAX_DEBUG_RESULTS = 0;
var AJAX_DEBUG_REQUEST_ERRORS = 0;
var AJAX_DEBUG_HTML_ERRORS = 0;
into

Code: Alles auswählen

var AJAX_DEBUG_RESULTS = 1;
var AJAX_DEBUG_REQUEST_ERRORS = 1;
var AJAX_DEBUG_HTML_ERRORS = 1;
Then retry to delete a post and post the results you will get with the alert messages.
Karsten Ude
-={ Das Mädchen für alles }=-
Kein Support per Messenger, Email oder PN! Unaufgeforderte Nachrichten werden ignoriert!
No support per Messenger, Email or PM. Each unasked message will be ignored!
cavallino
Beiträge: 41
Registriert: Fr 22.Sep, 2006 22:24

Beitrag von cavallino »

Hi oxpus, thanks for your prompt reply.
I have enabled the debugs but the problem is that after i click the X (delete) and then OK... nothing really happens, I don't get any error message, nor javascript ie errors, just nothing, the page doesnt even refresh or update.
Zuletzt geändert von cavallino am Di 14.Aug, 2007 11:21, insgesamt 2-mal geändert.
Benutzeravatar
oxpus
Administrator
Beiträge: 28737
Registriert: Mo 27.Jan, 2003 22:13
Wohnort: Bad Wildungen
Kontaktdaten:

Beitrag von oxpus »

Then clear the browser cache, upload all ajax-files again and retry...
Karsten Ude
-={ Das Mädchen für alles }=-
Kein Support per Messenger, Email oder PN! Unaufgeforderte Nachrichten werden ignoriert!
No support per Messenger, Email or PM. Each unasked message will be ignored!
cavallino
Beiträge: 41
Registriert: Fr 22.Sep, 2006 22:24

Beitrag von cavallino »

I just did it....
cleared the cache, in both browser and forum...
reuploaded all the ajax files,
but the situation is like before.

Maybe I could have missed some code in the upgrade process?
I upgraded from 1.0.1 to 1.0.11 by following all the update texts in ur package...
Before, with the old version (the last one released by alcaeus) it was working.

Can you tell me which part of code is involved so I can check it ?
Zuletzt geändert von cavallino am Sa 23.Sep, 2006 11:53, insgesamt 2-mal geändert.
Benutzeravatar
oxpus
Administrator
Beiträge: 28737
Registriert: Mo 27.Jan, 2003 22:13
Wohnort: Bad Wildungen
Kontaktdaten:

Beitrag von oxpus »

The part must be checked in the viewtopic_body.tpl...
Karsten Ude
-={ Das Mädchen für alles }=-
Kein Support per Messenger, Email oder PN! Unaufgeforderte Nachrichten werden ignoriert!
No support per Messenger, Email or PM. Each unasked message will be ignored!
cavallino
Beiträge: 41
Registriert: Fr 22.Sep, 2006 22:24

Beitrag von cavallino »

Thanks for your effort... but I think I will give up. :(
I double checked all modifications regarding this mod in viewtopic_body.tpl.... but there are no errors, so I dont know what to think...
Zuletzt geändert von cavallino am Sa 23.Sep, 2006 20:09, insgesamt 1-mal geändert.
Benutzeravatar
oxpus
Administrator
Beiträge: 28737
Registriert: Mo 27.Jan, 2003 22:13
Wohnort: Bad Wildungen
Kontaktdaten:

Beitrag von oxpus »

Oh, yes, check the viewtopic.php, too!
There can some code be missing for the deleting, if you install the AJAX Features via EasyMOD.
Karsten Ude
-={ Das Mädchen für alles }=-
Kein Support per Messenger, Email oder PN! Unaufgeforderte Nachrichten werden ignoriert!
No support per Messenger, Email or PM. Each unasked message will be ignored!
cavallino
Beiträge: 41
Registriert: Fr 22.Sep, 2006 22:24

Beitrag von cavallino »

Hi oxpus,
I checked also viewtopic.php and everything is fine there. I installed the whole mod manually, I've never used easymod.

I give you one more detail if this can help: If i pass the mouse right over the X button, I see that the link related is correct (http://....../forum/posting.php?mode=delete&p=8&sid=4ed18.....). As a matter of fact if i open that link in a new IE page, i get the normal page with the phpbb delete message, and the post gets deleted correctly from there.

The problem I have is just with the delete popup IE box... pressing OK there has zero effect, just nothing... the OK button doesn't take the link, I don't know why.
Benutzeravatar
oxpus
Administrator
Beiträge: 28737
Registriert: Mo 27.Jan, 2003 22:13
Wohnort: Bad Wildungen
Kontaktdaten:

Beitrag von oxpus »

Hm, Javascript ist on in your browser?
The newest files in the folder ajax/ are up?

Please attach your viewtopic.php to take a look.
Karsten Ude
-={ Das Mädchen für alles }=-
Kein Support per Messenger, Email oder PN! Unaufgeforderte Nachrichten werden ignoriert!
No support per Messenger, Email or PM. Each unasked message will be ignored!
cavallino
Beiträge: 41
Registriert: Fr 22.Sep, 2006 22:24

Beitrag von cavallino »

Hi oxpus,
I looked at the error logs and I notice these messages:

Code: Alles auswählen

PHP Warning:  Missing argument 9 for delete_post() in /home/forum/includes/functions_post.php on line 892
PHP Fatal error:  Call to a member function on a non-object in /home/forum/includes/functions_post.php on line 900
these are the lines of my function_post.php from 889 to 909:

Code: Alles auswählen

//
// Delete a post/poll
//
function delete_post($mode, &$post_data, &$message, &$meta, &$forum_id, &$topic_id, &$post_id, &$poll_id, &$was_a_draft)
// start mod save posts as drafts (and end too)...added parameters at end of previous line for was a draft
{
	global $board_config, $lang, $db, $phpbb_root_path, $phpEx;
	global $userdata, $user_ip;

	if ($mode != 'poll_delete')
	{
		$GLOBALS['cm_posting']->update_delete($mode, $post_data, $forum_id, $topic_id, $post_id);
		include($phpbb_root_path . 'includes/functions_search.'.$phpEx);

		$sql = "DELETE FROM " . POSTS_TABLE . " 
			WHERE post_id = $post_id";
		if (!$db->sql_query($sql))
		{
			$db->clear_cache('posts_');
			message_die(GENERAL_ERROR, 'Error in deleting post', '', __LINE__, __FILE__, $sql);
		}
Can you help?
Benutzeravatar
oxpus
Administrator
Beiträge: 28737
Registriert: Mo 27.Jan, 2003 22:13
Wohnort: Bad Wildungen
Kontaktdaten:

Beitrag von oxpus »

Open ajax.php, find

Code: Alles auswählen

		delete_post($delete_mode, $post_data, $return_message, $return_meta, $forum_id, $topic_id, $post_id, $poll_id);
and replace this line with

Code: Alles auswählen

		delete_post($delete_mode, $post_data, $return_message, $return_meta, $forum_id, $topic_id, $post_id, $poll_id, 0);
Karsten Ude
-={ Das Mädchen für alles }=-
Kein Support per Messenger, Email oder PN! Unaufgeforderte Nachrichten werden ignoriert!
No support per Messenger, Email or PM. Each unasked message will be ignored!
cavallino
Beiträge: 41
Registriert: Fr 22.Sep, 2006 22:24

Beitrag von cavallino »

Hi oxpus,
I just made the modification you suggested.
Delete still doesn't work but in the error log i get another message:

Code: Alles auswählen

PHP Fatal error:  Cannot pass parameter 9 by reference in /home/forum/ajax.php on line 2126
Benutzeravatar
oxpus
Administrator
Beiträge: 28737
Registriert: Mo 27.Jan, 2003 22:13
Wohnort: Bad Wildungen
Kontaktdaten:

Beitrag von oxpus »

Okay, then use these lines:

Code: Alles auswählen

$was_a_draft = 0;
delete_post($delete_mode, $post_data, $return_message, $return_meta, $forum_id, $topic_id, $post_id, $poll_id, $was_a_draft);
Karsten Ude
-={ Das Mädchen für alles }=-
Kein Support per Messenger, Email oder PN! Unaufgeforderte Nachrichten werden ignoriert!
No support per Messenger, Email or PM. Each unasked message will be ignored!
cavallino
Beiträge: 41
Registriert: Fr 22.Sep, 2006 22:24

Beitrag von cavallino »

Hi there,
I've just made this new change again in ajax.php. Well, delete still doesnt work.. but a new error message in log:

Code: Alles auswählen

PHP Fatal error:  Call to a member function on a non-object in /home/forum/includes/functions_post.php on line 900
and at line 900 of functions_post.php i have this:

Code: Alles auswählen

		$GLOBALS['cm_posting']->update_delete($mode, $post_data, $forum_id, $topic_id, $post_id);
Benutzeravatar
oxpus
Administrator
Beiträge: 28737
Registriert: Mo 27.Jan, 2003 22:13
Wohnort: Bad Wildungen
Kontaktdaten:

Beitrag von oxpus »

Do you have installed the Cash MOD???
Karsten Ude
-={ Das Mädchen für alles }=-
Kein Support per Messenger, Email oder PN! Unaufgeforderte Nachrichten werden ignoriert!
No support per Messenger, Email or PM. Each unasked message will be ignored!
cavallino
Beiträge: 41
Registriert: Fr 22.Sep, 2006 22:24

Beitrag von cavallino »

Yes oxpus, I have also the cash mod by Xore
Benutzeravatar
oxpus
Administrator
Beiträge: 28737
Registriert: Mo 27.Jan, 2003 22:13
Wohnort: Bad Wildungen
Kontaktdaten:

Beitrag von oxpus »

Okay, the message will now not comes up from the AJAX Features, but from the Cash MOD.
This release of the MOD produces on many boards errors, so please ask the MOD author for support.
I can't help you with this...
Karsten Ude
-={ Das Mädchen für alles }=-
Kein Support per Messenger, Email oder PN! Unaufgeforderte Nachrichten werden ignoriert!
No support per Messenger, Email or PM. Each unasked message will be ignored!
cavallino
Beiträge: 41
Registriert: Fr 22.Sep, 2006 22:24

Beitrag von cavallino »

I can already tell you that Xore won't help me, for your same reason :)

Can you tell me how can I just be back to the default phpbb delete feature? I mean just in the viewpost... disable just that javascript box delete feature since I only have problem with that. All thew other features works properly.
Zuletzt geändert von cavallino am Mo 25.Sep, 2006 15:09, insgesamt 1-mal geändert.
Benutzeravatar
oxpus
Administrator
Beiträge: 28737
Registriert: Mo 27.Jan, 2003 22:13
Wohnort: Bad Wildungen
Kontaktdaten:

Beitrag von oxpus »

Remove the AJAX installation on viewtopic.php in the lines begin with
Karsten Ude
-={ Das Mädchen für alles }=-
Kein Support per Messenger, Email oder PN! Unaufgeforderte Nachrichten werden ignoriert!
No support per Messenger, Email or PM. Each unasked message will be ignored!
cavallino
Beiträge: 41
Registriert: Fr 22.Sep, 2006 22:24

Beitrag von cavallino »

Thanks oxpus, I'm back to the default delete post view mode for now.

It would be also nice if someone can report that instead this AJAX feature mod is up and working in a board with the cash mod installed (latest version 2.2.3 by Xore) because I believe that it's one of the most popular and important phpbb mods around (also validated by phpbb team).

Hmmm maybe I will setup a phpbb vanilla board and install just the both mods, to test wether the mistake is just in my setup or not.
Zuletzt geändert von cavallino am Mo 25.Sep, 2006 18:23, insgesamt 1-mal geändert.
Blisk
Beiträge: 873
Registriert: Di 21.Sep, 2004 12:06
Kontaktdaten:

Beitrag von Blisk »

I had installed CASH mod, but I still can delete users normaly it is some other MOD which do that.
But still CASH mdo does'nt work, because I was isnstalling this MOD 3 times and didn't work. I already posted an error on phpbb.com but they said it si problem of phpbb plus and not cahs MOD.
Also if you google you wll see that cash mod conflict with many mods.
It is good and nice mod, but I think too much of problem.
Antworten