diff --git a/core/ArchiveProcessor/Rules.php b/core/ArchiveProcessor/Rules.php index 7538d7f7d06748ba9afe6861b154dc463d6c9fad..8e027cda43c1b9c36e602f1ee72347685712a37b 100644 --- a/core/ArchiveProcessor/Rules.php +++ b/core/ArchiveProcessor/Rules.php @@ -166,7 +166,7 @@ class Rules public static function isBrowserArchivingAvailableForSegments() { $generalConfig = Config::getInstance()->General; - return (self::isRequestAuthorizedToArchive() && !$generalConfig['browser_archiving_disabled_enforce']); + return !$generalConfig['browser_archiving_disabled_enforce']; } public static function isArchivingDisabledFor(array $idSites, Segment $segment, $periodLabel) @@ -193,7 +193,7 @@ class Rules // When there is a segment, we disable archiving when browser_archiving_disabled_enforce applies if (!$segment->isEmpty() && !$isArchivingEnabled - && $generalConfig['browser_archiving_disabled_enforce'] + && !self::isBrowserArchivingAvailableForSegments() && !SettingsServer::isArchivePhpTriggered() // Only applies when we are not running core:archive command ) { Log::debug("Archiving is disabled because of config setting browser_archiving_disabled_enforce=1"); diff --git a/plugins/SegmentEditor/javascripts/Segmentation.js b/plugins/SegmentEditor/javascripts/Segmentation.js index 7365a89fd63495791890408992129c04d4fcaeb3..96436f70c8d893f2d95c3f464b587245b206ad77 100644 --- a/plugins/SegmentEditor/javascripts/Segmentation.js +++ b/plugins/SegmentEditor/javascripts/Segmentation.js @@ -1077,16 +1077,21 @@ Segmentation = (function($) { }); if(segmentStr != getSegmentFromId(segmentId).definition && $('.segment-definition-change-confirm').data('hideMessage') != 1) { - var segmentProcessedOnRequest = $('.segment-definition-change-confirm').data('segmentProcessedOnRequest'); + var isBrowserArchivingAvailableForSegments = $('.segment-definition-change-confirm').data('segmentProcessedOnRequest'); + var isRealTimeSegment = (autoArchive == 0); + var segmentNotProcessedOnRequest = !isBrowserArchivingAvailableForSegments || !isRealTimeSegment; $('.process-on-request, .no-process-on-request').hide(); - if (segmentProcessedOnRequest == 1 && autoArchive == 0) { - $('.process-on-request').show(); - } else { + if (segmentNotProcessedOnRequest) { $('.no-process-on-request').show(); + } else { + $('.process-on-request').show(); } + //bug: real time + isBrowserArchivingAvailableForSegments ---> see pre processed, expect real time + + piwikHelper.modalConfirm('.segment-definition-change-confirm', { yes: function () { if ($('#hideSegmentMessage:checked').length) { diff --git a/plugins/SegmentEditor/lang/en.json b/plugins/SegmentEditor/lang/en.json index 286682b81390f5cf370925a9ecf45d846849a113..69621c015c128cd4a6a1e3c6bdedc1028baf641c 100644 --- a/plugins/SegmentEditor/lang/en.json +++ b/plugins/SegmentEditor/lang/en.json @@ -7,7 +7,7 @@ "AutoArchivePreProcessed": "segmented reports are pre-processed (faster, requires cron)", "AutoArchiveRealTime": "segmented reports are processed in real time", "ChangingSegmentDefinitionConfirmationNotProcessedOnRequest": "You're about to change the segment definition. Your analytics reports for this new segment won't be available until the reports are re-processed. It may take a few hours for reports data to show for this segment. Proceed anyway?", - "ChangingSegmentDefinitionConfirmationProcessedOnRequest": "You're about to change the segment definition. Your analytics reports for this new segment will be re-processed the next time you request them, which may take some time. Proceed anyway?", + "ChangingSegmentDefinitionConfirmationProcessedOnRequest": "You're about to change the segment definition. Your analytics reports for this new segment will be re-processed on demand the next time you request them. Your reports may take a few minutes to appear. Proceed anyway?", "ChooseASegment": "Choose a segment", "CurrentlySelectedSegment": "Currently selected segment: %s", "DataAvailableAtLaterDate": "Your segmented analytics reports will be available later. We apologize for the inconvenience.", diff --git a/tests/UI/expected-ui-screenshots b/tests/UI/expected-ui-screenshots index facead563717650686e496a8d5978c493c8a81b0..5f35b2563d576762993c6f39f6e7830e37429105 160000 --- a/tests/UI/expected-ui-screenshots +++ b/tests/UI/expected-ui-screenshots @@ -1 +1 @@ -Subproject commit facead563717650686e496a8d5978c493c8a81b0 +Subproject commit 5f35b2563d576762993c6f39f6e7830e37429105