frumbert / wp2moodle--wordpress-

Wordpress to Moodle pass through authentication plugin (wordpress end)
27 stars 23 forks source link

Shortcodes affecting post #2

Closed hunterdt closed 9 years ago

hunterdt commented 10 years ago

Hi, I'm not sure if something else is interacting on my page in a weird way, but when I create a page and use the short codes, the only thing that shows is the page title. The content gets stripped out and the wordpress admin bar does not display. This also only happens when I'm logged in. When I'm not logged in, the text still appears and the short coded text is not a hyperlink (so it is working fine when not logged in).

Any suggestions on what I should look through or is there anything I could share with you to help find out what the problem is? Thanks so much for writing this. It is exactly what I need, so I'm looking forward to getting it set up.

Here is the page I've been testing the shortcode on: http://www.zombiebased.com/forum-2/ The "Click" at the end of the first paragraph is what I put in the short code.

frumbert commented 10 years ago

The link should be generated properly when you are logged in, unless something has gone awry with the internals of Wordpress (which happens from time to time). Can you tell me the specific Wordpress build your site is running. Also, can you confirm that you have created a new user (e.g. a subscriber), added their first and last names, and logged on as that user using the standard wordpress logon? It's a bit hard to see what might be the cause without a user logon.

hunterdt commented 10 years ago

Thanks for getting back to me so quickly.

I'm running Wordpress 3.8.1, the most current version. I did try to create a new user and fill in first and last name and set them as a subscriber and logged in as that user. No matter how I'm logged in, I'm still running into that problem.

I'm guessing that it might be another plugin that is interacting in a weird way, but I don't know how to look for that problem. I am using s2member which changes a lot of the login settings and can set the pages to only be viewed by certain users. This is a very uneducated guess, and I'm not seeing that exactly happening. It looks more like there is an open div tag or something. I just wouldn't be surprised if my problem is from another plugin doing something weird to the tag.

erichartley commented 9 years ago

Hi there. Did this issue get resolved? I am experiencing the same problem. It would be great to fix it as this is an excellent contribution and exactly what I need!

I have Wordpresss 3.9.1 installed, and Moodle 2.7 running on PHP 5.5.18. I have followed and double checked the installation procedures for both WP and Moodle, and the plugin is activated on Moodle. I appreciate that the plugin is not passed for Moodle 2.7, but I thought I'd install, test and see what errors, if any, I get and then try to fix. However, I am getting the same error as hunterdt, before I even test the SSO:

When I add the following shortcode to a post:

[wp2moodle target='_blank']wp2moodle SSO[/wp2moodle]

it 'breaks' the page - removes the user's logged in top header, removes the post content and widgets in right hand column. If the user is logged out, then the page displays ok, with the 'wp2moodle SSO' text within the shortcode displaying as text only output as I would expect.

Any ideas? I would really appreciate the assistance.

entuity-katz commented 9 years ago

Hi: I just left this over at the WP2M example page, but I think it belongs here. I am experiencing hte same issue as stated above.

Details: Hi: I really need to get this working asap. It's just what I need to provide single sign on for my WP and Moodle users. Unfortunately, every time I enter the shortcode and update the WP page, when I view the page all content is gone except for the header. This happens regardless of where on the page I place the shortcode. It also seems to be independent of any options in the shortcode (i.e. the barebones shortcode has the same effect as a shortcode with class and cohort included. They all break the page.

I am using WP 4.01 with the Responsive theme Moodle 2.8 I have 23 plugins, but even if I deactivate all of them and leave only WP2Moodle active, it still wipes out the page except for the header. Once the shortcode is removed from the page and the page is updated, it returns to normal.

Now, I'm at a loss for what to try next. I just uninstalled and reinstalled it, but that had not effect.

Any help would be greatly appreciated.

Ralph

frumbert commented 9 years ago

Hmm.. I’m running wordpress latest version (4.0.1) and have tried switching between a number of themes - the links always render properly.

Do you have debugging enabled on your wordpress site, so that you can see any error messages (or a tail of the php error log)? There might be something awry with what the plugin needs.

Do you happen to know your php version and extensions - it needs PHP 5.2+ and mcrypt, any version numbers might be a help.

Also, it sounds like it’s rendering part of the page then stopping. Can you view the source of the rendered portion of the page and see any errors at the end of the source code that might not be visible in the rendered part of the page?

Cheers, Tim

Tim St. Clair http://about.me/timstclair/

On 16 Dec 2014, at 4:17 am, entuity-katz notifications@github.com wrote:

Hi: I just left this over at the WP2M example page, but I think it belongs here. I am experiencing hte same issue as stated above.

Details: Hi: I really need to get this working asap. It's just what I need to provide single sign on for my WP and Moodle users. Unfortunately, every time I enter the shortcode and update the WP page, when I view the page all content is gone except for the header. This happens regardless of where on the page I place the shortcode. It also seems to be independent of any options in the shortcode (i.e. the barebones shortcode has the same effect as a shortcode with class and cohort included. They all break the page.

I am using WP 4.01 with the Responsive theme Moodle 2.8 I have 23 plugins, but even if I deactivate all of them and leave only WP2Moodle active, it still wipes out the page except for the header. Once the shortcode is removed from the page and the page is updated, it returns to normal.

Now, I'm at a loss for what to try next. I just uninstalled and reinstalled it, but that had not effect.

Any help would be greatly appreciated.

Ralph

— Reply to this email directly or view it on GitHub https://github.com/frumbert/wp2moodle--wordpress-/issues/2#issuecomment-67029441.

entuity-katz commented 9 years ago

Hi Tim:

Thanks for your quick reply. From your response, I was able to make some good progress, but I’m still not able to get the full connection.

I’m running PHP 5.3.3, but until this morning, mcrypt was not installed. Now that is is, I am able to use a shortcode to produce a wp2m link on the page. Here’s the shortcode I am using:

[wp2moodle cohort='free_courses'] test link [/wp2moodle]

I’m in the US, but my Moodlle counterpart in the UK has set up the plugin on his side and created a cohort called free_courses. Clicking on the link produces this URL:

test link

Unfortunately, it just hangs with a blank white screen.

Can you suggest a course of action?

Thanks again for your help!

Roger

From: TIm St.Clair [mailto:notifications@github.com] Sent: Monday, December 15, 2014 9:57 PM To: frumbert/wp2moodle--wordpress- Cc: Roger Katz Subject: Re: [wp2moodle--wordpress-] Shortcodes affecting post (#2)

Hmm.. I’m running wordpress latest version (4.0.1) and have tried switching between a number of themes - the links always render properly.

Do you have debugging enabled on your wordpress site, so that you can see any error messages (or a tail of the php error log)? There might be something awry with what the plugin needs.

Do you happen to know your php version and extensions - it needs PHP 5.2+ and mcrypt, any version numbers might be a help.

Also, it sounds like it’s rendering part of the page then stopping. Can you view the source of the rendered portion of the page and see any errors at the end of the source code that might not be visible in the rendered part of the page?

Cheers, Tim

Tim St. Clair http://about.me/timstclair/

On 16 Dec 2014, at 4:17 am, entuity-katz notifications@github.com<mailto:notifications@github.com> wrote:

Hi: I just left this over at the WP2M example page, but I think it belongs here. I am experiencing hte same issue as stated above.

Details: Hi: I really need to get this working asap. It's just what I need to provide single sign on for my WP and Moodle users. Unfortunately, every time I enter the shortcode and update the WP page, when I view the page all content is gone except for the header. This happens regardless of where on the page I place the shortcode. It also seems to be independent of any options in the shortcode (i.e. the barebones shortcode has the same effect as a shortcode with class and cohort included. They all break the page.

I am using WP 4.01 with the Responsive theme Moodle 2.8 I have 23 plugins, but even if I deactivate all of them and leave only WP2Moodle active, it still wipes out the page except for the header. Once the shortcode is removed from the page and the page is updated, it returns to normal.

Now, I'm at a loss for what to try next. I just uninstalled and reinstalled it, but that had not effect.

Any help would be greatly appreciated.

Ralph

— Reply to this email directly or view it on GitHub https://github.com/frumbert/wp2moodle--wordpress-/issues/2#issuecomment-67029441.

— Reply to this email directly or view it on GitHubhttps://github.com/frumbert/wp2moodle--wordpress-/issues/2#issuecomment-67105366.

frumbert commented 9 years ago

The url “looks” right, but it’s also an encrypted string so there’s no way for me to see what is inside it specifically.

First I’d suggest taking the latest copy of the moodle end plugin and getting the moodle end updated with that (the latest push a couple of days ago was tweaks for moodle 2.7 / 2.8).

If that’s no help, you’ll have to enable Moodle debugging (log on as the administrator, go to administration (block) > site administration > development > debugging and set it to “developer” and then ensure that “display debug messages” is enabled. Update, then try the link again. If there’s any errors visible, post them back to me and I can try to work it.

Tim

Tim St. Clair http://about.me/timstclair/

On 17 Dec 2014, at 7:27 am, entuity-katz notifications@github.com wrote:

Hi Tim:

Thanks for your quick reply. From your response, I was able to make some good progress, but I’m still not able to get the full connection.

I’m running PHP 5.3.3, but until this morning, mcrypt was not installed. Now that is is, I am able to use a shortcode to produce a wp2m link on the page. Here’s the shortcode I am using:

[wp2moodle cohort='free_courses'] test link [/wp2moodle]

I’m in the US, but my Moodlle counterpart in the UK has set up the plugin on his side and created a cohort called free_courses. Clicking on the link produces this URL:

test link

Unfortunately, it just hangs with a blank white screen.

Can you suggest a course of action?

Thanks again for your help!

Roger

From: TIm St.Clair [mailto:notifications@github.com] Sent: Monday, December 15, 2014 9:57 PM To: frumbert/wp2moodle--wordpress- Cc: Roger Katz Subject: Re: [wp2moodle--wordpress-] Shortcodes affecting post (#2)

Hmm.. I’m running wordpress latest version (4.0.1) and have tried switching between a number of themes - the links always render properly.

Do you have debugging enabled on your wordpress site, so that you can see any error messages (or a tail of the php error log)? There might be something awry with what the plugin needs.

Do you happen to know your php version and extensions - it needs PHP 5.2+ and mcrypt, any version numbers might be a help.

Also, it sounds like it’s rendering part of the page then stopping. Can you view the source of the rendered portion of the page and see any errors at the end of the source code that might not be visible in the rendered part of the page?

Cheers, Tim

Tim St. Clair http://about.me/timstclair/

On 16 Dec 2014, at 4:17 am, entuity-katz notifications@github.com<mailto:notifications@github.com> wrote:

Hi: I just left this over at the WP2M example page, but I think it belongs here. I am experiencing hte same issue as stated above.

Details: Hi: I really need to get this working asap. It's just what I need to provide single sign on for my WP and Moodle users. Unfortunately, every time I enter the shortcode and update the WP page, when I view the page all content is gone except for the header. This happens regardless of where on the page I place the shortcode. It also seems to be independent of any options in the shortcode (i.e. the barebones shortcode has the same effect as a shortcode with class and cohort included. They all break the page.

I am using WP 4.01 with the Responsive theme Moodle 2.8 I have 23 plugins, but even if I deactivate all of them and leave only WP2Moodle active, it still wipes out the page except for the header. Once the shortcode is removed from the page and the page is updated, it returns to normal.

Now, I'm at a loss for what to try next. I just uninstalled and reinstalled it, but that had not effect.

Any help would be greatly appreciated.

Ralph

— Reply to this email directly or view it on GitHub https://github.com/frumbert/wp2moodle--wordpress-/issues/2#issuecomment-67029441.

— Reply to this email directly or view it on GitHubhttps://github.com/frumbert/wp2moodle--wordpress-/issues/2#issuecomment-67105366. — Reply to this email directly or view it on GitHub https://github.com/frumbert/wp2moodle--wordpress-/issues/2#issuecomment-67225998.

frumbert commented 9 years ago

Haven't been able to replicate problem in Moodle 2.8 and Wordpress 4.1 (both latest). Closing issue.