Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

one click update 2.6.1 to 2.6.2 fails #10372

Closed
bizmate opened this issue Aug 3, 2016 · 17 comments
Closed

one click update 2.6.1 to 2.6.2 fails #10372

bizmate opened this issue Aug 3, 2016 · 17 comments
Labels
answered For when a question was asked and we referred to forum or answered it.

Comments

@bizmate
Copy link

bizmate commented Aug 3, 2016

I have piwik installed on Dreamhost.
Saw the update message and went for the online update. The first error i received was that a autogenerated composer autoload file was missing so it was failing.

I installed composer and run composer install

This step took me to error #9703

At this point i tried to do what was suggested there, ie delete the contents in tmp/ but this fixed nothing. When reloading the homepage i was getting the template missing error.

I had to manually update to fix the problem. I thought i d let you know

@mattab
Copy link
Member

mattab commented Aug 4, 2016

Hi @bizmate - Thank you for the report. unfortunately i'm not able to reproduce this issue, as the auto update worked for me on two different Piwik servers.

Does anyone else experience this issue? could you please post the full error messages or screenshots showing the problem?

@pouyana
Copy link

pouyana commented Aug 4, 2016

Hi @mattab I also run in to the same issue. In the middle of the upgrade there were some errors about not writable folders I just skipped that and with chown change the permission to what piwik wanted. Afterwards it asked me to upgrade the database as usual so I did it over the console. and then the same errors appeared. My upgrade was from 2.16.1 => 2.16.2
And I use the PHP version 7.0.7.
piwik-update-error

@pouyana
Copy link

pouyana commented Aug 4, 2016

In error logs I see only one line:
[Thu Aug 04 08:30:11.450975 2016] [:error] [pid 12323] [client ....] Error in Piwik: Unknown "piwikProCampaignParameters" filter in "ajaxMacros.twig" at line 34., referer: ...

And another notice, fresh Piwik install after copying the plugins/config folder from the old one works.

@mattab
Copy link
Member

mattab commented Aug 4, 2016

Can you please check that all files were uploaded correctly? it looks like some files such as plugins/Morpheus/templates/ajaxMacros.twig were not overwritten successfully

@pouyana
Copy link

pouyana commented Aug 4, 2016

That could be the case:
-rw-r--r-- 1 wwwrun www 1623 Jun 2 10:08 ajaxMacros.twig
2nd June is the last change to the file.
But the file seems to be without any errors:

{% macro errorDiv(id='ajaxError') %}
    <div id="{{ id }}" style="display:none"></div>
{% endmacro %}

{% macro loadingDiv(id='ajaxLoadingDiv') %}
<div id="{{ id }}" style="display:none;">
    <div class="loadingPiwik">
        <img src="plugins/Morpheus/images/loading-blue.gif" alt="{{ 'General_LoadingData'|translate }}" />{{ 'General_LoadingData'|translate }}
    </div>
    <div class="loadingSegment">
        {{ 'SegmentEditor_LoadingSegmentedDataMayTakeSomeTime'|translate }}
    </div>
</div>
{% endmacro %}

{% macro requestErrorDiv(emailSuperUser, arePiwikProAdsEnabled = false) %}
    <div id="loadingError">
        <div class="alert alert-danger">

            {% if emailSuperUser is defined and emailSuperUser %}
                {{ 'General_ErrorRequest'|translate('<a href="mailto:' ~ emailSuperUser ~ '">', '</a>')|raw }}
            {% else %}
                {{ 'General_ErrorRequest'|translate('', '') }}
            {% endif %}

            <br /><br />
            {{ 'General_NeedMoreHelp'|translate }}

            <a rel="noreferrer" target="_blank" href="https://piwik.org/faq/troubleshooting/faq_19489/">{{ 'General_Faq'|translate }}</a> ?~@~S
            <a rel="noreferrer" target="_blank" href="http://forum.piwik.org/">{{ 'Feedback_CommunityHelp'|translate }}</a>

            {%- if arePiwikProAdsEnabled %}
                ?~@~S
                <a rel="noreferrer" target="_blank" href="{{ 'https://piwik.pro/'|piwikProCampaignParameters('Help', 'AjaxError')|e('html_attr') }}">{{ 'Feedback_ProfessionalHelp'|translate }}</a>
            {%- endif %}.
        </div>
    </div>
{% endmacro %}

How can you rerun the upgrade when there is a permission error?

@aramboyajyan
Copy link

aramboyajyan commented Aug 4, 2016

Same here; just upgraded everything and the following message shows up no matter which page I try to load:

An error occurred
The filter "piwikProCampaignParameters" does not exist in "ajaxMacros.twig" at line 34

Here's the screenshot:

piwik-error-cropped

Will dig further and keep this thread posted.

@aramboyajyan
Copy link

aramboyajyan commented Aug 4, 2016

Some progress so far:

  • Manually emptying /tmp did not make any difference.

  • I tried uploading the /core first but this didn't change anything and the original error page was still displayed.

  • After comparing the listed plugins I noticed that the the /plugins/UserId was not created after the update. Uploading it did not make any difference.

  • I then reuploaded the /plugins/Morpheus as the ajaxMacros.twig file is located there. This time I got a different error message:

    Variable "arePiwikProAdsEnabled" does not exist in "@CoreHome/getDefaultIndexView.twig" at line 13
    

piwik-error-1

  • Next I reuploaded /plugins/CoreHome as the getDefaultIndexView.twig file was located there. This time I did get to the admin dashboard page, however all blocks were missing. Here's what was logged in the console:

    Refused to execute script from 'http://www.example.com/piwik/index.php?module=Proxy&action=getCoreJs&cb=a7b2cebb0151cfbe6743f133b5b09f6d' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
    index.php?module=CoreHome&action=index&idSite=1&period=day&date=yesterday:80 Uncaught ReferenceError: $ is not defined(anonymous function) @ index.php?module=CoreHome&action=index&idSite=1&period=day&date=yesterday:80
    index.php?module=CoreHome&action=index&idSite=1&period=day&date=yesterday:755 Uncaught ReferenceError: $ is not defined(anonymous function) @ index.php?module=CoreHome&action=index&idSite=1&period=day&date=yesterday:755
    index.php?module=CoreHome&action=index&idSite=1&period=day&date=yesterday:781 Uncaught ReferenceError: $ is not defined
    

piwik-error-2

  • Reuploading the complete /plugins directory didn't help.

Checking further.

@aramboyajyan
Copy link

To save on time, I ended up doing the following:

  1. Creating a fresh install on the same server.
  2. Completing the install and creating a sample site.
  3. Emptying the database.
  4. Importing the database of the old install.

Everything seems to be working fine. Old sites are recognized and system check does not report any issues.
This means that database upgrades went fine and that the errors are related to downloaded files or file cache.

I'll test the new setup thoroughly and keep you posted.

@aramboyajyan
Copy link

Making a clean install and then importing the database seems to be working good.
I checked both back end and tracking scripts.

Here's system information in case you need it for debugging:

  • OS: CloudLinux
  • PHP version: 5.6.
  • MySQL version: 5.6.30.
  • Administration: cPanel + WHM. Exception rules for Piwik are already added to ModSecurity tools.
  • No special plugins installed in Piwik.
  • No special Piwik configuration.
  • Piwik is running in a subdirectory (/analytics)

Hope this helps.

@TheBorox
Copy link

TheBorox commented Aug 9, 2016

Hi, Had the same problem 'Variable "arePiwikProAdsEnabled" does not exist in "@CoreHome/getDefaultIndexView.twig" at line 13'

I reinstall the last piwik version on the same database, and I got back piwik with all my data.

@aramboyajyan
Copy link

Great, good to hear that. So the same steps as in this comment worked for you, correct?

@TheBorox
Copy link

TheBorox commented Aug 9, 2016

I didn't have to import the database, I just made a fresh install and using the database that already exists.

I first made an export of the database, just in case...but I didn't need it ( fortunatly)

@aramboyajyan
Copy link

Yep, steps are pretty much the same. Thanks for fast message; hopefully this will help others with the same issue.

@seelenreiter
Copy link

Hi,
i got the same issue while updating from 2.6.1 to 2.6.2 via update on the admin page.
I thought, i got an timeout on the following page.
(Had the same issue on the last update from 2.6 to 2.6.1. After relogin and update the database, everything was green.)
Now, i am not sure anymore. The page after updating, was an Error 500 page. mea culpa
next time, i will make screenshots.

After reload, i got the "update database" screen.

Next screen was the "unknown pewikProCampainParameters filter in ajaxMacros.twig"

After reuploading the source of piwik 2.6.2 to the existing folders, the error changed to

"Variable arePiwikProAdsEnabled missing"

remark: there were some files/folders missing before.

my solution:

deleting the whole piwik folder and do a "clean install" with wget
using the existing databasetables.

All settings are ok, all pages and data is present.

thanks god.

@koltyakov
Copy link

This has happened to me too after upgrading to 2.6.2 via a web wizard.

I was managed to resolve it by following steps:

  • Stop web service;
  • Rewrite everything in the folders: core, js, lang, libs, misc, plugins, vendor;
  • Rewrite files: index.php, piwik.js, piwik.php;
    by files from the dist ver. 2.6.2
  • Drop ./tmp content
  • Delete ./plugins/CoreVisualizations/Visualizations/HtmlTable/PivotBy.php
  • Start web service.

Then is worked.

@truclk
Copy link

truclk commented Sep 15, 2016

After checking the source code I can't find arePiwikProAdsEnabled, is it that Piwik automatically get the advertising online and insert it into the codebase, if it is true, it's very bad behaviour

@mattab
Copy link
Member

mattab commented Sep 26, 2016

, is it that Piwik automatically get the advertising online and insert it into the codebase, if it is true, it's very bad behaviour

No, of course we don't do this

Please delete the files plugins/PiwikPro if they exist still as they should have been deleted automatically during update.

@mattab mattab closed this as completed Sep 26, 2016
@mattab mattab added the answered For when a question was asked and we referred to forum or answered it. label Sep 26, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
answered For when a question was asked and we referred to forum or answered it.
Projects
None yet
Development

No branches or pull requests

8 participants