View Issue Details

IDProjectCategoryView StatusLast Update
628Composrecommercepublic2017-01-15 17:39
ReporterRishi Saravanan Assigned ToChris Graham  
PrioritynormalSeverityminor 
Status resolvedResolutionfixed 
Summary628: version 7.1.6-- flagrant message not appearing after purchase
DescriptionHello,

I (as Admin) created a test flagrant text message for the first time today (because a user is interested to buy it), but it's not appearing in the footer. I tried both purchasing it through the point store and creating it directly in the Admin Zone flagrant message manager.

However, if I enter something in the 'Default Flagrant text' in the Site Options configuration screen, that does appear in the footer.

Perhaps I'm missing a step that's practically staring straight at me, but I'm not finding it so far.

(Note-- I did change the page language Translation to say "Featured text message" instead of "Flagrant text message")
TagsNo tags attached.
Attach Tags
Attached Files
Time estimation (hours)
Sponsorship open

Sponsor

Date Added Member Amount Sponsored

Activities

Chris Graham

2012-06-21 21:36

administrator   ~680

Automated response: Flagrant text randomisation not working

The is-active check (based on days booked) is not performed correctly, meaning nothing is being picked.

Also the system-message and current message are randomised 50:50, even if no system-message is set. Ideally it would just use the current message if the system-message is blank.

Chris Graham

2012-06-21 21:36

administrator   ~681

Fixed in git commit 241aa91 (https://github.com/chrisgraham/Composr/commit/241aa91 - link will become active once code pushed)

A hotfix (a TAR of files to upload) have been uploaded to this issue. These files are made to the latest intra-version state (i.e. may roll in earlier fixes too if made to the same files) - so only upload files newer than what you have already. Always take backups of files you are replacing or keep a copy of the manual installer for your version, and only apply fixes you need. These hotfixes are not necessarily reliable or well supported. Not sure how to extract TAR files to your Windows computer? Try 7-zip (http://www.7-zip.org/).
support.php (57,081 bytes)

Chris Graham

2012-06-21 21:38

administrator   ~682

The hotfix is for 8.1.x.

support.php is back-ported to 7.1.6 (upload to sources/).

Rishi Saravanan

2012-06-21 22:01

reporter   ~683

Hello Chris,

I uploaded the support.php file for 7.1.6 and the flagrant text message worked, but when navigating back to the home page, the Images and Video carousels (and maybe more blocks below) were out of wack and I got the error message, "1532: Uncaught SyntaxError: unexpected token ILLEGAL"

Chris Graham

2012-06-21 22:04

administrator   ~684

I'm not sure how this would happen, and can't see an error on your site currently (I think you probably reverted). However I can say the change made in sources/support.php was as follows...


Replace:

function get_flagrant()
{
...
}

with:


function get_flagrant()
{
    if (!addon_installed('flagrant')) return new Tempcode();
    
    $system=(mt_rand(0,1)==0);
    $_flagrant=NULL;

    if ((!$system) || (get_option('system_flagrant')==''))
    {
        $_flagrant=persistant_cache_get('FLAGRANT');
        if (is_null($_flagrant))
        {
            $flagrant=$GLOBALS['SITE_DB']->query_value_null_ok_full('SELECT the_message FROM '.get_table_prefix().'text WHERE active_now=1 AND activation_time+days*60*60*24>'.strval(time()),true/*in case tablemissing*/);
            if (is_null($flagrant))
            {
                persistant_cache_set('FLAGRANT',false);
            } else
            {
                $_flagrant=get_translated_tempcode($flagrant);
                persistant_cache_set('FLAGRANT',$_flagrant);
            }
        }
        if ($_flagrant===false) $_flagrant=NULL;
    }
    if (is_null($_flagrant))
    {
        return make_string_tempcode(get_option('system_flagrant'));
    } else
    {
        return do_lang_tempcode('_COMMUNITY_MESSAGE',$_flagrant);
    }
}

Rishi Saravanan

2012-06-21 22:09

reporter   ~685

I did immediately revert to the old file because the front page looked so bad. I would upload a screenshot here, but there isn't attachment upload function.

After uploading the new one, I had emptied the template and block cache before checking things out

Rishi Saravanan

2012-06-21 22:10

reporter   ~686

sorry, i just noticed the place to upload a file

Chris Graham

2012-06-21 22:14

administrator   ~687

What mechanism do you use to upload? There's a portion of the file, lines 70-72, which are...

    $PHP_REP_FROM=array('\\',"\n",'$','"');
    $PHP_REP_TO=array('\\\\','\n','\$','\\"');
    $PHP_REP_TO_TWICE=array('\\\\\\\\','\\n','\\\\$','\\\\\"');

If that was corrupted somehow, that might cause a problem like this.

Rishi Saravanan

2012-06-21 22:22

reporter   ~688

I used Interarchy. Did a drag and drop. I'll try it again

Chris Graham

2012-06-21 22:26

administrator   ~690

Try uploading the file in 'binary' mode. All FTP software will have an option labelled something like this.

Rishi Saravanan

2012-06-21 22:28

reporter   ~691

Same thing happened again, so I've reverted.

The other blocks looked normal, except the side panels had disappeared. I have to go out for a bit now, will check back later

Chris Graham

2012-06-21 22:30

administrator   ~692

I'd be happy to upload for you. I know we have admin access to your site, but I can't remember off-hand if we have FTP access or not. Just open a free ticket with provision of FTP details if you'd like :).

Rishi Saravanan

2012-06-21 23:27

reporter   ~693

I tried uploading in binary mode but got the same result. So I'll open the ticket with FTP details

Chris Graham

2012-08-17 12:33

administrator   ~844

(was resolved a while back)

Issue History

Date Modified Username Field Change
2017-01-15 17:39 Chris Graham Category pointstore => ecommerce