Actions not working in Mambo+G2

keymaster

Joined: 2005-06-27
Posts: 23
Posted: Tue, 2005-07-12 14:25

Hi Michiel,

A fairly strange problem is occuring. I have mambo registered users synch'ed in properly into embedded G2 as far as permissions go.

When you first login to Mambo+G2 all the actions (ie. add item, etc) work fine at the top level album.

As soon as you go into an album, even one level deep, the actions stop working. Moreover, if you go back up to the top album the actions still don't work, although they worked initially at the top album.

The only way to get the actions to work, is to use the 'back' button on the browser, and go all the way back to the page containing the context of your original entry into the top album level. Then the actions will work again (but will stop working as soon as you start descending into the album).

This leads me to believe there is some loss of context on the Actions as you go into albums, and the context is not recovered as you come out.

BTW - the problem does not exist in my standalone G2.

I know there have been many posts about Actions not working, but I thought I would add some more info in the hopes this might help.

Any ideas?

Using 2.05 component, and July 7 nightly snapshot of G2-b3+

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Tue, 2005-07-12 14:36

use todays nightly snapshot, provide a php info link, a g2 link if possible and post examples of action links that work and examples of action links that don't work.

 
michiel_1981

Joined: 2005-05-19
Posts: 430
Posted: Tue, 2005-07-12 16:53

keymaster,

please give the link to your site, is most usefull.

grtz,
Michiel

 
keymaster

Joined: 2005-06-27
Posts: 23
Posted: Tue, 2005-07-12 20:08

PM'd you the site/account details. Thanks.

BTW - one action in particular that was not working was "Add item", you can use this for testing, but I know there were others as well.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Tue, 2005-07-12 20:56

we saw this actions link problem in earlier versions of g2. don't know why it isn't working in your embedded g2.

one would have to debug your specific embedded g2, because we can't reproduce it on other systems.

 
keymaster

Joined: 2005-06-27
Posts: 23
Posted: Wed, 2005-07-13 10:02

Hi,

I PM'd Michiel my site URL, uid and password. He was able to reproduce the problem.

Michiel, how is it going? Have you found out anything since yesterday?

Do you think the problem will go away by taking the newest nightly build of G2-b3+? (on the site, I currently have July 7th's build).

What about upgrading to your new component v2.06 ?

Thanks.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Wed, 2005-07-13 10:28

keymaster, michiel forwarded the information to me, hope that's ok with you.
my last post is based on my visit to your website, i saw the problem.

the current nightly snapshot won't fix it for you.

the question is still, why does it happen and why only on very rare server setups (because it works for almost everyone else).

could you add a phpinfo link?

 
michiel_1981

Joined: 2005-05-19
Posts: 430
Posted: Wed, 2005-07-13 10:53

keymaster,

version 2.0.6 is not yet ready for relaise. :)

grtz,
Michiel

 
keymaster

Joined: 2005-06-27
Posts: 23
Posted: Wed, 2005-07-13 11:53

Sent you both (Valiant and Michiel) the phpinfo link by PM.

Thank you both for your help.

I don't know if I emphasized the following last time...

to me (in my limited knowledge) there is a problem with maintaining the context.

If I am at the top level, the first time I come to the Gallery, I can add items. If I go down a level into the album, I cannot add items. If I go back up a level, I still cannot add items. (the context of the first time I entered the Gallery is lost).

However, if I use the browser 'back' button to go back in time to the context when I first entered the Gallery, I am able once again to add an item.

Hope this helps.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Wed, 2005-07-13 12:14

your php/apache configuration has too many features, hard to tell which of them causes the problem.

let's debug this:
could you add
$gallery->debug("the view is '$viewName' and the controller is '$controllerName'");
in main.php line 138 right after
ist($viewName, $controllerName) = GalleryUtilities::getRequestVariables('view', 'controller');

then activate buffered debug mode and click on a add comment link that doesn't work.

in the output search for "the view is "... and please report the whole string.

 
keymaster

Joined: 2005-06-27
Posts: 23
Posted: Wed, 2005-07-13 12:55

Hi Valiant,

I've PM'd you the uid/passwords to the mambo admin panel, and the hosting provider's panel (for getting to the files).

You can probably do things much quicker and easier, and accomplish much more if you have a free hand.

If I can be of further help, please let me know.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Wed, 2005-07-13 13:10

michiel_1981, when i activate buffered debug mode in his site, i get these warnings:

Notice: Undefined variable: HTTP_COOKIE_VARS in /home/butler-m/public_html/components/com_gallery2/userfuncs.php on line 59

Notice: Undefined index: enableAlbumCreation in /home/butler-m/public_html/components/com_gallery2/gallery2.php on line 78

michiel, you should change your error / warning level in php.ini to see all notices / warnings during development.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Wed, 2005-07-13 13:30

ok, first debugging result:
the g2_view=core.ShowItem within g2_return param overrides the real g2_view param in embedded g2/mambo urls.

don't know why yet. compared all php configuration values with my own php. no results.

the question is: why does php/apache think that g2_view=core.ShowItem is a url param in embedded g2/mambo (in your case) and not in g2 standalone on the same server in a subdir?`

- perhaps mambo or a mambo component does urldecode the whole request string and puts the results in the $_GET / $_POST vars.
- perhaps there's an apache / mod_rewrite / ? thing that urldecodes the request string before passing it to php.
- perhaps your mambo changes some php config values during runtime which affect this

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Wed, 2005-07-13 13:46

michiel_1981, please use $_COOKIE instead of $HTTP_COOKIE_VARS (see php.net). and before using $_COOKIE["sessioncookie"] you should check if it isset()

keymaster, could you upgrade to the current nightly snapshot. it's easier to compare your and my version 1:1.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Wed, 2005-07-13 13:56

keymaster, michiel_1981, i'm stopping the debugging at this point. I can't reproduce it on my system and the problem is somewhere in mambo/php/apache.

michiel_1981, could you check if you can reproduce the problem in your own mambo/g2? Do you and keymaster use different mambo versions?
do you use the same integration options? ...

 
michiel_1981

Joined: 2005-05-19
Posts: 430
Posted: Wed, 2005-07-13 14:16

valiant,

i have already adjusted the files using debug option. So that is not problem any more. I'll change COOKIE thing to.

Mambo loads every $_post and $_get for you, so maybe the problem is there, but don't know why he is experiencing the problem and i'm not experiencing any problems.

i'll take a dive into to it, tomorrow because today i don't have much time,

grtz,
Michiel

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Wed, 2005-07-13 14:45

watch out for statements urldecode the whole query string / url.

 
keymaster

Joined: 2005-06-27
Posts: 23
Posted: Thu, 2005-07-14 06:36

Thanks for your effort guys.

 
keymaster

Joined: 2005-06-27
Posts: 23
Posted: Fri, 2005-07-15 07:05

Hi Michiel,

If you are still interested in debugging off my site, please let me know, I would like to take it offline as I am changing accounts.

fyi - I host with one of the largest hosting providers in the world, and this is their standard shared hosting account setup. It probably is not a very peculiar setup. As your user base grows, others may soon experience the same problem.

It might be worth your while to find out what the problem is. Alternatively, you can wait and I can reinstall component v2.06 and see if the problem still exists.

Please let me know what you would like to do.

Thanks.

 
michiel_1981

Joined: 2005-05-19
Posts: 430
Posted: Fri, 2005-07-15 09:26

keymaster,

i'm still interested, but it will come after the relaise of 2.0.6 because this will fix some bugs more users are getting. Further changes in gallery2(core 0.9.31+) have made me to adjust the component also because somethings aren't supported any more. So people will get these problems to.

which hosting provider do you have? pm so you don't advertise on this board!

i'll put you on the list to receive 2.0.6 for testing and we can see if the bug is gone in this version or we still have problems. For now do your thing and don't wait for me. We will fixed in time.

regards,
Michiel

 
keymaster

Joined: 2005-06-27
Posts: 23
Posted: Fri, 2005-07-15 13:52

Hi Michiel,

PM'd you the info.

Thanks.

 
keymaster

Joined: 2005-06-27
Posts: 23
Posted: Sun, 2005-07-17 13:24

Hi Michiel,

Installed v.206-beta2, but the "actions" still don't work.

They do work in the standalone, so this is definitely a problem with the component, not G2.

Unfortunately (as I mentioned would happen sooner or later) that account has been deleted by the hosting provider in favour of another account they are giving me, and I am now in the process of installing a site backup on the new account.

When it is done, I will see if the "Actions" problem still exists. Since the new account is with the same hosting provider, I expect the problem will still be there.

Will let you know. Thanks for staying in touch.

 
michiel_1981

Joined: 2005-05-19
Posts: 430
Posted: Sun, 2005-07-17 15:35

keymaster,
let me know and pm the new site info as soon as possible, i'll try to find out what is wrong.

grtz,
Michiel

 
keymaster

Joined: 2005-06-27
Posts: 23
Posted: Mon, 2005-07-18 13:00

Hi Michiel, Valiant,

Good News.

After installing mambo-G2 on my new account, I think I may have found what is causing the “Actions not working problem

 
michiel_1981

Joined: 2005-05-19
Posts: 430
Posted: Mon, 2005-07-18 13:42

keymaster,

thxs, i'll install it myself and check it out.

grtz,
Michiel

 
keymaster

Joined: 2005-06-27
Posts: 23
Posted: Wed, 2005-07-20 06:21

Hi Michiel,

As I mentioned, I put a reference to this thread on Mambohacks.com forum for cowboy, the owner of mambo-SMF forum component.

This is the thread in his forum:
http://www.mambohacks.com/index.php?option=com_smf&Itemid=0&expv=0&topic=482.new;topicseen#new

His response seemed to imply he knew something about this already. He was under the impression this was no longer a problem and is looking into it.

If you think it is a good idea, you may want to communicate with him. It may help the problem get resolved much easier, if mutual code changes are required.

Do you know what the problem is exactly?

 
keymaster

Joined: 2005-06-27
Posts: 23
Posted: Wed, 2005-07-20 16:03

Hi Michiel,

I posted the following on mambohacks.com. I think this narrows down the bug.
==================================

Hi Michiel, Cowboy,

It seems the problem is caused by the following line (added by cowboy to mambo's main index.php):

require_once ($smf_path."/SSI.php");

If you comment it out, mambo-G2 works fine.

Interestingly, mambo-SMF also seems to work fine with it commented out (at least I didn't see any overt impact). The one thing I did notice was the module mod_smf_recent_posts ceases to function when it is commented out. That's not good.

I noticed that line also caused problems for other mambo components, see:

http://www.mambohacks.com/component/option,com_smf/Itemid,78/expv,0/topic,347.msg1440#msg1440
and
http://www.mambohacks.com/component/option,com_smf/Itemid,78/expv,0/topic,285.msg1349#msg1349

(BTW - I am using the patched index.php from the second thread above as suggested by cowboy:
http://www.mambohacks.com/smf/index.php?action=dlattach;topic=285.0;id=58

This patch fixed the SMF poll issue, but didn't fix the zoom gallery issue.

I wonder why Mambo's two gallery programs are broken because of this? Is there a connection?)

Anyways, I don't know what about that SSI.php file causes problems for G2, but am pretty sure that's where the problem lies... any ideas?

 
keymaster

Joined: 2005-06-27
Posts: 23
Posted: Thu, 2005-07-21 05:45

Cowboy's response:

"Well in SSI.php series of calls, it clears what Mambo had initialized. For example, $_REQUEST is cleared by it. That is why on one fix, $_REQUEST value is saved to $_TMP and copied back to $_REQUEST after SSI.php call. There were other variables that probably needed be saved as well."

So, Michiel, it looks like the SSI.php is clearing a variable(s) which mambo-G2's add_items and add_comment depend on.

If you can tell cowboy which variable that is, perhaps he might be willing to save their context before and restore it after the SSI.php call, as he has done before, with the $_REQUEST.

I imagine the problem would then be solved.

 
michiel_1981

Joined: 2005-05-19
Posts: 430
Posted: Thu, 2005-07-21 06:04

keymaster,

on it!

Regards,
Michiel

 
keymaster

Joined: 2005-06-27
Posts: 23
Posted: Tue, 2005-07-26 08:16

Hi Michiel,

Any news?

Thanks.

 
michiel_1981

Joined: 2005-05-19
Posts: 430
Posted: Tue, 2005-07-26 14:15

keymaster,

didn't got much time to work on the component last few days, and did some work on it today, to make the path to multi language support and more overview in the coding. after this i'm going to take the mosplus and the smf bug. after that i hope to know the cause of the header problems.

regards,
Michiel

 
michiel_1981

Joined: 2005-05-19
Posts: 430
Posted: Wed, 2005-07-27 14:29

Everybody who has this problem

could some one try to comment out this line in SSi.php around line 66.
cleanRequest()
check if smf is working okay and if gallery2 is working!
please report back your findings,
Michiel

 
michiel_1981

Joined: 2005-05-19
Posts: 430
Posted: Mon, 2005-08-01 09:23

update:

i'have been testing and the only problem i can find is the $_REQUEST but this is stored in $_TMP i'm correct.

maybe this is server issue after all, could you give me your php info again.

regards,
Michiel

 
keymaster

Joined: 2005-06-27
Posts: 23
Posted: Tue, 2005-08-02 21:30

Hi Michiel,

Just wanted to update you.

I commented out the CleanRequest() call in SSI.php. Both G2 (in particular the add items and add comments actions) and SMF appear to work fine. Even the SMF modules such as recent posts are working.

From my perspective this problems seems to be solved.

I have to run as I am going out of town for about 3-4 weeks, so at this time I don't have time to send you a phpinfo. I'm not even sure you still need it.

If you do want it, please reply, and when I return I will be happy to send it to you.

Thanks very much for your diligence, and support.

All the best.