g2image TinyMCE popup - wrong path?
narzus
Joined: 2007-11-30
Posts: 4 |
![]() |
When I click on the g2 icon in visual editor or the WPG2 button in non-visual editor, the popup window shows a 404 file not found (on a normal wordpress output page). Firefox, Safari, Opera, all fail. The "WPG2 Album Tree" widget doesn't work too. It's not a browser issue since the demo works: I have a standard clean and fresh WP/Gallery2 installation (latest official builds) both on the same domain, and everything works except the g2-button when writing/editing a page. WPG2 path settings are standard: The gallery2 admin user is listed correctly in WP (Wordpress Users with Gallery2 admin accounts). Analysing the javascript shows that the popup-link defined in "function g2_open()" is: var form = 'post'; Which is rather odd since the variables "form" and "field" are already defined. Therfore I removed the variable chunk after g2image.php: After that the popup works and shows my gallery tree incl. all images. Additionally the Gallery2 users panel (site admin) shows a "Failed Login = 1" (but never above 1 even if I tried 20 times to insert images). I suppose this happens when activating the WPG2 plugin - is it necessary for the WP and the gallery user to share the same password? Any ideas? I'm clueless. |
|
capt_kirk
Joined: 2006-01-24
Posts: 492 |
![]() |
In wpg2/g2imageplugin.inc, around line 354, this code var form = 'post'; var field = 'content'; var url = '<?php echo $g2image_url; ?>g2image.php?g2ic_form='+form+'&g2ic_field='+field+'&g2ic_tinymce=0'; could have been written as var url = '<?php echo $g2image_url; ?>g2image.php?g2ic_form=post&g2ic_field=content&g2ic_tinymce=0'; It means the same either way. But it has to be there or g2image doesn't know where to insert the code that it generates. (I left it the way it is to make it easier to make form and field actual variables instead of just fixed strings. As it turns out, we've never needed to make them variables, but it works either way.) Try the Wordpress demo, http://demo.steffensenfamily.com/wordpress/ Does it work there? How about on the standalone demo: http://demo.steffensenfamily.com What exact version of WPG2 are you using? I'm guessing 3.0.2 from the WordPress plugins pages, but wanted to make sure. Since the 404 is a WordPress 404 (WP header and footer with the WP 404 message), I'm thinking it must be a WP rewrite problem. We've never seen this (in thousands of installs), so it's really strange. Do you have any WP permalink structure activated? If so, is it a fairly standard one? EDIT: I just rethought this question. Since you're getting the popup without the form and field variables, I don't think it's a rewrite issue. Kirk |
|
narzus
Joined: 2007-11-30
Posts: 4 |
![]() |
Captain Kirk, believe it or not - it works now and I swear I didn't change anything except set the line back to original. A second and a third test install in parallel folders work, TinyMCE appeared but had the same issue with WPG2 - until "it got fixed" magically over night. A few days ago TinyMCE reappeared all of a sudden, but a day later disappeared again. I got the impression that some browsers break "something" - even replacing all files OR the database won't help. Could that be folder related, a permission problem? Could it be some php-related side-effect, probably from other users? I can't really imagine though. I'm on a shared hosting (Site5) and these irregularities are more and more suspicious to me. Guess I have to start all over (again) and drop my database. I worry that the visual editor or gallery chooser might stop working when users are active on either blog/gallery. Can't just delete the db and start over then. What I use: Anyway, thanks for your quick reply Kirk! You seem to be very active on the forums and always there for help. |
|
capt_kirk
Joined: 2006-01-24
Posts: 492 |
![]() |
Narzus, Thanks for letting me know. Glad it's working! This is the most frustrating type of bugs, one that doesn't have an apparent cause and automagically cures itself. Please let us know if it reappears and we can try some more detailed troubleshooting. TinyMCE working or not *should not* have anything to do with the PHP side, unless there is a problem with the WP files that cause it to be included as javascript in the output to your browser. Once it's in your browser, it's pure javascript that does not interact with the server other than to get popup windows for some of the editor buttons. If this happens again, check from another computer. Preferrably from another network, like at work or have a friend check it. Just to make sure that it's really a server issue. Good luck. Kirk |
|
narzus
Joined: 2007-11-30
Posts: 4 |
![]() |
Kirk, one couldn't express it better, it is indeed frustrating and I wasted around 3-4 days on that, erm issue(?)... But good to know Captain Kirk is there to help with Warp-10! Will start all over again and let you know if that did the trick. Narzus |
|
narzus
Joined: 2007-11-30
Posts: 4 |
![]() |
Note regarding WPG2 button+popup in visual editor. Clicking the WPG2 button might result in a popup with a "404 file not found" error embedded in a normal Wordpress page. The 404 error is misleading since it's the plugin that could not be executed. For people with shell access, do it the easy way. This command sets all folder within the CURRENT directory and below to 755: This command sets all files within the CURRENT directory and below to 644: |
|
qwik3r
Joined: 2007-08-20
Posts: 60 |
![]() |
Why the hell does my entire gallery inside of my wordpress page popup when I click the G2 button? I am using wpg2 3.06 and wordpress 2.5.1 |
|
ozgreg
![]()
Joined: 2003-10-18
Posts: 1378 |
![]() |
Hiya qwik3r, Your entire Gallery2 actually does not load, only the current selected album. G2image is a selection tool, it is designed to display the photos from the relevant album and you select the photos you want to be inserted into your blog entry. ____________________________________ |
|
qwik3r
Joined: 2007-08-20
Posts: 60 |
![]() |
problem resolved by setting the folder to 755 |
|