Closed (fixed)
Project:
Context Set Message
Version:
7.x-1.0-alpha2
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
8 Jun 2012 at 16:52 UTC
Updated:
21 Jun 2012 at 21:13 UTC
Jump to comment: Most recent file
Comments
Comment #1
rypit commentedAre you able to provide a screenshot of the context and reaction? Do you see the message if you are logged in vs anonymous?
Comment #2
rypit commentedCould you also provide your PHP version? Thanks!
Comment #3
PCateNumbersUSA commentedNo message either logged in or logged out. PHP version is 5.3.6. Screenshot is attached.
Comment #4
rypit commentedI'll assume that you have a valid context condition set.
Can you provide the php version you're using?Edit: Thanks. I'll be able to take a look at this soon! I'm thinking it may have something to do with some changes in 5.3 about the usage of pass-by-reference. If you have access to any error logs that would certainly help.
Comment #5
rypit commentedSwitching this to active as it seems probably that there is a problem with using pass by reference. Will confirm asap.
Comment #6
rypit commentedTrying to reproduce this in php 5.3.6 with no luck.
Can you please add the following to context_set_message/plugins/context_set_message_reaction.inc and paste the results here:
after:
$message = isset($v->reactions[$this->plugin]['message']) ? $v->reactions[$this->plugin]['message'] : '';add:
print_r($v->reactions[$this->plugin]);... this will allow us to see if the plugin data is at least being loaded.
Thanks!
Comment #7
rypit commentedThis doesn't seem to be a PHP issue. Could you please also post which versions of context and Drupal core you're using? Thanks again!
Side note: vanilla install with the following modules on PHP 5.3.6 works as intended:
Comment #8
PCateNumbersUSA commentedAdded print_r($v->reactions[$this->plugin]); as instructed and nothing printed. Here are the module versions I'm using:
Drupal: 7.14
Context: 7.x-3.0-beta3
Context UI: 7.x-3.0-beta3
Context Set Message: 7.x-1.0-alpha2
Token: 7.x-1.0-beta3
All the other context reactions are loading correctly, except for set_message.
Comment #9
rypit commentedDefinitely appreciate your coming back here and posting details. I've downgraded my version of Token to match yours but the plugin is still working for me. Could you see if adding
print_r($this->get_contexts());directly after the
function execute() {line in context_set_message/plugins/context_set_message_reaction.inc? This should print out all of your applied contexts, and ideally should look something like this:
If nothing prints here, it would lead me to believe that the plugin itself isn't being loaded. This may be a silly question, but have you tried clearing caches?
Thanks again!
Comment #10
PCateNumbersUSA commentedI added the line and all it printed was: Array ( ) I've cleared all the caches multiple times.
Comment #11
rypit commentedThis is really strange. That means that no context reaction is occurring. Can you add a block with the same reaction and see if the same still prints? I've tried this on several environments now and am still unable to reproduce.
Comment #12
PCateNumbersUSA commentedOK, I setup a test context with the condition set to a specific path, and the set message as the only reaction, and the set message worked. I piece-by-piece added in the other conditions and reactions I had on my previous context and set message broke when I added in theme condition (http://drupal.org/project/context_condition_theme). Hopefully this will help you find out the cause of the conflict.
Comment #13
rypit commentedDo any other reactions break when this happens? Does the theme condition do anything that would hide a message from being displayed? Can you please paste the output of print_r($this->get_contexts()) as mentioned above both before and after you have the theme condition enabled? Thanks so much! I will try to recreate this ASAP.
Comment #14
rypit commentedFound the issue here. Patch in the works. Thanks for all your reporting!
Comment #15
rypit commentedFixed in alpha3. Thanks again!
Comment #16
PCateNumbersUSA commentedConfirmed, it is working fine now. Thanks!