Problem upgrading MW - enableSemantics fatal error

classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

Problem upgrading MW - enableSemantics fatal error

Michael Greis
I'm having trouble upgrading my MW installation from 1.24.1 to 1.28.  I
get the following error message when I run update.php:

Fatal error: Call to undefined function enableSemantics() in
/home/michaelgreis/public_html/wiki128/LocalSettings.php on line 246

I have SMW 2.1 installed on the working 1.24 wiki.  The enableSemantics
line in LocalSettings.php looks like this:

enableSemantics( 'michaelgreis.org' );

This setting has been working successfully in the running wiki.  The
only reference to this error that I can find on the SMW pages
<https://www.semantic-mediawiki.org/wiki/Help:Installation/Troubleshooting>
applies to pre-composer versions of SMW (MW < 1.21):

/Fatal: Call to undefined function enableSemantics() …//
//    This kind of message appears for MW = 1.21.x //
/

Elsewhere, I found a suggestion in a similar case that the SMW directory
may not be installed or findable. That's certainly consistent with the
error message, but the SMW directory is in /extensions, where it has
always been.

One other item - I have no idea if this is related, but it was an odd
occurence, so I thought it worth mentioning because of the connections
among the extensions.   I initially received the following error:

/Fatal error: Uncaught exception 'Exception' with message 'You need to
have ParserHooks installed in order to use SubPageList' in
/home/michaelgreis/public_html/wiki128/extensions/SubPageList/SubPageList.php:28/

Stack trace:
#0 /home/michaelgreis/public_html/wiki128/LocalSettings.php(230):
require_once()
#1
/home/michaelgreis/public_html/wiki128/maintenance/doMaintenance.php(84):
require('/home/michaelgr...')
#2 /home/michaelgreis/public_html/wiki128/maintenance/update.php(217):
require_once('/home/michaelgr...')
#3 {main}
   thrown in
/home/michaelgreis/public_html/wiki128/extensions/SubPageList/SubPageList.php
on line 28

When I investigated further, I found a parser-hooks subdirectory in the
vendor/mediawiki subdirectory of my current installation, but not the
mw128 directory.  I've not previously been aware of the vendor
subdirectory, let alone copied it during an upgrade, but I went ahead
and copied the parser-hooks subdirectory into the same location in the
new "mw128" directory.  That error then disappeared.

Any help would be much appreciated.  I can provide additional
information as needed.  Thanks!



--

Michael


Michael Greis

781 559-4623 (O)
781 449-8007 (H)
------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/xeonphi
_______________________________________________
Semediawiki-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-user
Reply | Threaded
Open this post in threaded view
|

Re: Problem upgrading MW - enableSemantics fatal error

Laurent Alquier
I ran into the same issue and found that composer files had been reset by
the upgrade process.

Running the composer commands to reinstall all extensions that used
composer fixed the issue for me.

- Laurent
On Tue, Dec 6, 2016 at 12:05 PM Michael Greis <[hidden email]> wrote:

> I'm having trouble upgrading my MW installation from 1.24.1 to 1.28.  I
> get the following error message when I run update.php:
>
> Fatal error: Call to undefined function enableSemantics() in
> /home/michaelgreis/public_html/wiki128/LocalSettings.php on line 246
>
> I have SMW 2.1 installed on the working 1.24 wiki.  The enableSemantics
> line in LocalSettings.php looks like this:
>
> enableSemantics( 'michaelgreis.org' );
>
> This setting has been working successfully in the running wiki.  The
> only reference to this error that I can find on the SMW pages
> <https://www.semantic-mediawiki.org/wiki/Help:Installation/Troubleshooting
> >
> applies to pre-composer versions of SMW (MW < 1.21):
>
> /Fatal: Call to undefined function enableSemantics() …//
> //    This kind of message appears for MW = 1.21.x //
> /
>
> Elsewhere, I found a suggestion in a similar case that the SMW directory
> may not be installed or findable. That's certainly consistent with the
> error message, but the SMW directory is in /extensions, where it has
> always been.
>
> One other item - I have no idea if this is related, but it was an odd
> occurence, so I thought it worth mentioning because of the connections
> among the extensions.   I initially received the following error:
>
> /Fatal error: Uncaught exception 'Exception' with message 'You need to
> have ParserHooks installed in order to use SubPageList' in
>
> /home/michaelgreis/public_html/wiki128/extensions/SubPageList/SubPageList.php:28/
>
> Stack trace:
> #0 /home/michaelgreis/public_html/wiki128/LocalSettings.php(230):
> require_once()
> #1
> /home/michaelgreis/public_html/wiki128/maintenance/doMaintenance.php(84):
> require('/home/michaelgr...')
> #2 /home/michaelgreis/public_html/wiki128/maintenance/update.php(217):
> require_once('/home/michaelgr...')
> #3 {main}
>    thrown in
>
> /home/michaelgreis/public_html/wiki128/extensions/SubPageList/SubPageList.php
> on line 28
>
> When I investigated further, I found a parser-hooks subdirectory in the
> vendor/mediawiki subdirectory of my current installation, but not the
> mw128 directory.  I've not previously been aware of the vendor
> subdirectory, let alone copied it during an upgrade, but I went ahead
> and copied the parser-hooks subdirectory into the same location in the
> new "mw128" directory.  That error then disappeared.
>
> Any help would be much appreciated.  I can provide additional
> information as needed.  Thanks!
>
>
>
> --
>
> Michael
>
>
> Michael Greis
>
> 781 559-4623 (O)
> 781 449-8007 (H)
>
> ------------------------------------------------------------------------------
> Developer Access Program for Intel Xeon Phi Processors
> Access to Intel Xeon Phi processor-based developer platforms.
> With one year of Intel Parallel Studio XE.
> Training and support from Colfax.
> Order your platform today.http://sdm.link/xeonphi
> _______________________________________________
> Semediawiki-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/semediawiki-user
>
------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/xeonphi
_______________________________________________
Semediawiki-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-user
Reply | Threaded
Open this post in threaded view
|

Re: Problem upgrading MW - enableSemantics fatal error

Michael Greis
Laurent,

Thanks for the quick response!

The composer.json and composer.lock files in the base directory "mw128"
appear unchanged.  They still have the original timestamp they had in
the running 1.24 wiki.

In an earlier iteration of my upgrade effort, I used composer to upgrade
the extensions (SMW & SubPageList) before running the update script.  
But then I got this error message from the update script:

Warning:
require(/home/michaelgreis/public_html/mw128/vendor/composer/../../extensions/SemanticMediaWiki/src/Aliases.php):
failed to open stream: No such file or directory in
/home/michaelgreis/public_html/mw128/vendor/composer/autoload_real.php
on line 66
Fatal error: require(): Failed opening required
'/home/michaelgreis/public_html/mw128/vendor/composer/../../extensions/SemanticMediaWiki/src/Aliases.php'
(include_path='.:/opt/cpanel/ea-php56/root/usr/share/pear') in
/home/michaelgreis/public_html/mw128/vendor/composer/autoload_real.php
on line 66


Line 66 of *autoload_real.php* defines the following function:

function composerRequire_mediawiki_vendor($fileIdentifier, $file)
{
     if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
         require $file;

         $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
     }
}

It appears that the require() may have concatenated several paths and is
not looking in the correct directory....

/home/michaelgreis/public_html/mw128/vendor/composer/../../extensions/SemanticMediaWiki/src/Aliases.php/

There is no Aliases.php in the /vendor/composer/ file hierarchy, but the
file is in //extensions/SemanticMediaWiki/includes

/At this point, I was clearly out of my depth and well above my pay
grade, so I abandoned that effort in favor of upgrading from MW 1.24 to
1.28 before upgrading SMW.  But that's where I ran into the
enableSemantics problem.


Michael




On 12/6/2016 12:10 PM, Laurent Alquier wrote:

> I ran into the same issue and found that composer files had been reset
> by the upgrade process.
>
> Running the composer commands to reinstall all extensions that used
> composer fixed the issue for me.
>
> - Laurent
> On Tue, Dec 6, 2016 at 12:05 PM Michael Greis <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     I'm having trouble upgrading my MW installation from 1.24.1 to
>     1.28.  I
>     get the following error message when I run update.php:
>
>     Fatal error: Call to undefined function enableSemantics() in
>     /home/michaelgreis/public_html/wiki128/LocalSettings.php on line 246
>
>     I have SMW 2.1 installed on the working 1.24 wiki.  The
>     enableSemantics
>     line in LocalSettings.php looks like this:
>
>     enableSemantics( 'michaelgreis.org <http://michaelgreis.org>' );
>
>     This setting has been working successfully in the running wiki.  The
>     only reference to this error that I can find on the SMW pages
>     <https://www.semantic-mediawiki.org/wiki/Help:Installation/Troubleshooting>
>     applies to pre-composer versions of SMW (MW < 1.21):
>
>     /Fatal: Call to undefined function enableSemantics() …//
>     //    This kind of message appears for MW = 1.21.x //
>     /
>
>     Elsewhere, I found a suggestion in a similar case that the SMW
>     directory
>     may not be installed or findable. That's certainly consistent with the
>     error message, but the SMW directory is in /extensions, where it has
>     always been.
>
>     One other item - I have no idea if this is related, but it was an odd
>     occurence, so I thought it worth mentioning because of the connections
>     among the extensions.   I initially received the following error:
>
>     /Fatal error: Uncaught exception 'Exception' with message 'You need to
>     have ParserHooks installed in order to use SubPageList' in
>     /home/michaelgreis/public_html/wiki128/extensions/SubPageList/SubPageList.php:28/
>
>     Stack trace:
>     #0 /home/michaelgreis/public_html/wiki128/LocalSettings.php(230):
>     require_once()
>     #1
>     /home/michaelgreis/public_html/wiki128/maintenance/doMaintenance.php(84):
>     require('/home/michaelgr...')
>     #2 /home/michaelgreis/public_html/wiki128/maintenance/update.php(217):
>     require_once('/home/michaelgr...')
>     #3 {main}
>        thrown in
>     /home/michaelgreis/public_html/wiki128/extensions/SubPageList/SubPageList.php
>     on line 28
>
>     When I investigated further, I found a parser-hooks subdirectory
>     in the
>     vendor/mediawiki subdirectory of my current installation, but not the
>     mw128 directory.  I've not previously been aware of the vendor
>     subdirectory, let alone copied it during an upgrade, but I went ahead
>     and copied the parser-hooks subdirectory into the same location in the
>     new "mw128" directory.  That error then disappeared.
>
>     Any help would be much appreciated.  I can provide additional
>     information as needed.  Thanks!
>
>
>
>     --
>
>     Michael
>
>
>     Michael Greis
>
>     781 559-4623 (O)
>     781 449-8007 (H)
>     ------------------------------------------------------------------------------
>     Developer Access Program for Intel Xeon Phi Processors
>     Access to Intel Xeon Phi processor-based developer platforms.
>     With one year of Intel Parallel Studio XE.
>     Training and support from Colfax.
>     Order your platform today.http://sdm.link/xeonphi
>     _______________________________________________
>     Semediawiki-user mailing list
>     [hidden email]
>     <mailto:[hidden email]>
>     https://lists.sourceforge.net/lists/listinfo/semediawiki-user
>


--

Michael


Michael Greis

781 559-4623 (O)
781 449-8007 (H)
------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/xeonphi
_______________________________________________
Semediawiki-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-user
Reply | Threaded
Open this post in threaded view
|

Re: Problem upgrading MW - enableSemantics fatal error

John Doe-27
easiest thing to do is move the current SMW files to a temp folder, and
re-install them via the composer install commands.

On Tue, Dec 6, 2016 at 1:50 PM, Michael Greis <[hidden email]> wrote:

> Laurent,
>
> Thanks for the quick response!
>
> The composer.json and composer.lock files in the base directory "mw128"
> appear unchanged.  They still have the original timestamp they had in
> the running 1.24 wiki.
>
> In an earlier iteration of my upgrade effort, I used composer to upgrade
> the extensions (SMW & SubPageList) before running the update script.
> But then I got this error message from the update script:
>
> Warning:
> require(/home/michaelgreis/public_html/mw128/vendor/
> composer/../../extensions/SemanticMediaWiki/src/Aliases.php):
> failed to open stream: No such file or directory in
> /home/michaelgreis/public_html/mw128/vendor/composer/autoload_real.php
> on line 66
> Fatal error: require(): Failed opening required
> '/home/michaelgreis/public_html/mw128/vendor/composer/../../extensions/
> SemanticMediaWiki/src/Aliases.php'
> (include_path='.:/opt/cpanel/ea-php56/root/usr/share/pear') in
> /home/michaelgreis/public_html/mw128/vendor/composer/autoload_real.php
> on line 66
>
>
> Line 66 of *autoload_real.php* defines the following function:
>
> function composerRequire_mediawiki_vendor($fileIdentifier, $file)
> {
>      if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
>          require $file;
>
>          $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
>      }
> }
>
> It appears that the require() may have concatenated several paths and is
> not looking in the correct directory....
>
> /home/michaelgreis/public_html/mw128/vendor/composer/../../extensions/
> SemanticMediaWiki/src/Aliases.php/
>
> There is no Aliases.php in the /vendor/composer/ file hierarchy, but the
> file is in //extensions/SemanticMediaWiki/includes
>
> /At this point, I was clearly out of my depth and well above my pay
> grade, so I abandoned that effort in favor of upgrading from MW 1.24 to
> 1.28 before upgrading SMW.  But that's where I ran into the
> enableSemantics problem.
>
>
> Michael
>
>
>
>
> On 12/6/2016 12:10 PM, Laurent Alquier wrote:
> > I ran into the same issue and found that composer files had been reset
> > by the upgrade process.
> >
> > Running the composer commands to reinstall all extensions that used
> > composer fixed the issue for me.
> >
> > - Laurent
> > On Tue, Dec 6, 2016 at 12:05 PM Michael Greis <[hidden email]
> > <mailto:[hidden email]>> wrote:
> >
> >     I'm having trouble upgrading my MW installation from 1.24.1 to
> >     1.28.  I
> >     get the following error message when I run update.php:
> >
> >     Fatal error: Call to undefined function enableSemantics() in
> >     /home/michaelgreis/public_html/wiki128/LocalSettings.php on line 246
> >
> >     I have SMW 2.1 installed on the working 1.24 wiki.  The
> >     enableSemantics
> >     line in LocalSettings.php looks like this:
> >
> >     enableSemantics( 'michaelgreis.org <http://michaelgreis.org>' );
> >
> >     This setting has been working successfully in the running wiki.  The
> >     only reference to this error that I can find on the SMW pages
> >     <https://www.semantic-mediawiki.org/wiki/Help:
> Installation/Troubleshooting>
> >     applies to pre-composer versions of SMW (MW < 1.21):
> >
> >     /Fatal: Call to undefined function enableSemantics() …//
> >     //    This kind of message appears for MW = 1.21.x //
> >     /
> >
> >     Elsewhere, I found a suggestion in a similar case that the SMW
> >     directory
> >     may not be installed or findable. That's certainly consistent with
> the
> >     error message, but the SMW directory is in /extensions, where it has
> >     always been.
> >
> >     One other item - I have no idea if this is related, but it was an odd
> >     occurence, so I thought it worth mentioning because of the
> connections
> >     among the extensions.   I initially received the following error:
> >
> >     /Fatal error: Uncaught exception 'Exception' with message 'You need
> to
> >     have ParserHooks installed in order to use SubPageList' in
> >     /home/michaelgreis/public_html/wiki128/extensions/
> SubPageList/SubPageList.php:28/
> >
> >     Stack trace:
> >     #0 /home/michaelgreis/public_html/wiki128/LocalSettings.php(230):
> >     require_once()
> >     #1
> >     /home/michaelgreis/public_html/wiki128/maintenance/
> doMaintenance.php(84):
> >     require('/home/michaelgr...')
> >     #2 /home/michaelgreis/public_html/wiki128/maintenance/
> update.php(217):
> >     require_once('/home/michaelgr...')
> >     #3 {main}
> >        thrown in
> >     /home/michaelgreis/public_html/wiki128/extensions/
> SubPageList/SubPageList.php
> >     on line 28
> >
> >     When I investigated further, I found a parser-hooks subdirectory
> >     in the
> >     vendor/mediawiki subdirectory of my current installation, but not the
> >     mw128 directory.  I've not previously been aware of the vendor
> >     subdirectory, let alone copied it during an upgrade, but I went ahead
> >     and copied the parser-hooks subdirectory into the same location in
> the
> >     new "mw128" directory.  That error then disappeared.
> >
> >     Any help would be much appreciated.  I can provide additional
> >     information as needed.  Thanks!
> >
> >
> >
> >     --
> >
> >     Michael
> >
> >
> >     Michael Greis
> >
> >     781 559-4623 (O)
> >     781 449-8007 (H)
> >     ------------------------------------------------------------
> ------------------
> >     Developer Access Program for Intel Xeon Phi Processors
> >     Access to Intel Xeon Phi processor-based developer platforms.
> >     With one year of Intel Parallel Studio XE.
> >     Training and support from Colfax.
> >     Order your platform today.http://sdm.link/xeonphi
> >     _______________________________________________
> >     Semediawiki-user mailing list
> >     [hidden email]
> >     <mailto:[hidden email]>
> >     https://lists.sourceforge.net/lists/listinfo/semediawiki-user
> >
>
>
> --
>
> Michael
>
>
> Michael Greis
>
> 781 559-4623 (O)
> 781 449-8007 (H)
> ------------------------------------------------------------
> ------------------
> Developer Access Program for Intel Xeon Phi Processors
> Access to Intel Xeon Phi processor-based developer platforms.
> With one year of Intel Parallel Studio XE.
> Training and support from Colfax.
> Order your platform today.http://sdm.link/xeonphi
> _______________________________________________
> Semediawiki-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/semediawiki-user
>
------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/xeonphi
_______________________________________________
Semediawiki-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-user
Reply | Threaded
Open this post in threaded view
|

Re: Problem upgrading MW - enableSemantics fatal error

Michael Greis
John,

I'll try that, but let me be sure I understand exactly what you're
suggesting, since I've now described two different paths:  I believe
you're suggesting in:

Scenario 1: - the update.php script fails with the fatal error
"undefined function enableSemantics()"

   - Move the SMW files (extensions/SemanticMediaWiki) to a temp directory
   - Comment out the enableSemantics() line in LocalSettings.php
   - Run update.php again

Assuming update.php completes with no further errors (I can dream, can't
I?):

On the SMW page *Help:Installation/Using Composer with MediaWiki 1.25+
<https://www.semantic-mediawiki.org/wiki/Help:Installation/Using_Composer_with_MediaWiki_1.25%2B>
* (since the wiki is theoretically now at 1.28), should I

   - follow the *Install* instructions (with no
extensions/SemanticMediaWiki directory present, since I moved it to a
temp directory)
   - follow the *Update *instructions (after restoring the SMW files
from the temp directory)

(Noting that the Update instructions include the "composer update"
command which was causing other problems in scenario #2...) **

Thanks - I really appreciate the the suggestions and will keep working
at it....

Michael

On 12/6/2016 1:55 PM, John wrote:

> easiest thing to do is move the current SMW files to a temp folder,
> and re-install them via the composer install commands.
>
> On Tue, Dec 6, 2016 at 1:50 PM, Michael Greis <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     Laurent,
>
>     Thanks for the quick response!
>
>     The composer.json and composer.lock files in the base directory
>     "mw128"
>     appear unchanged.  They still have the original timestamp they had in
>     the running 1.24 wiki.
>
>     In an earlier iteration of my upgrade effort, I used composer to
>     upgrade
>     the extensions (SMW & SubPageList) before running the update script.
>     But then I got this error message from the update script:
>
>     Warning:
>     require(/home/michaelgreis/public_html/mw128/vendor/composer/../../extensions/SemanticMediaWiki/src/Aliases.php):
>     failed to open stream: No such file or directory in
>     /home/michaelgreis/public_html/mw128/vendor/composer/autoload_real.php
>     on line 66
>     Fatal error: require(): Failed opening required
>     '/home/michaelgreis/public_html/mw128/vendor/composer/../../extensions/SemanticMediaWiki/src/Aliases.php'
>     (include_path='.:/opt/cpanel/ea-php56/root/usr/share/pear') in
>     /home/michaelgreis/public_html/mw128/vendor/composer/autoload_real.php
>     on line 66
>
>
>     Line 66 of *autoload_real.php* defines the following function:
>
>     function composerRequire_mediawiki_vendor($fileIdentifier, $file)
>     {
>          if
>     (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
>              require $file;
>
>              $GLOBALS['__composer_autoload_files'][$fileIdentifier] =
>     true;
>          }
>     }
>
>     It appears that the require() may have concatenated several paths
>     and is
>     not looking in the correct directory....
>
>     /home/michaelgreis/public_html/mw128/vendor/composer/../../extensions/SemanticMediaWiki/src/Aliases.php/
>
>     There is no Aliases.php in the /vendor/composer/ file hierarchy,
>     but the
>     file is in //extensions/SemanticMediaWiki/includes
>
>     /At this point, I was clearly out of my depth and well above my pay
>     grade, so I abandoned that effort in favor of upgrading from MW
>     1.24 to
>     1.28 before upgrading SMW.  But that's where I ran into the
>     enableSemantics problem.
>
>
>     Michael
>
>
>
>
>     On 12/6/2016 12:10 PM, Laurent Alquier wrote:
>     > I ran into the same issue and found that composer files had been
>     reset
>     > by the upgrade process.
>     >
>     > Running the composer commands to reinstall all extensions that used
>     > composer fixed the issue for me.
>     >
>     > - Laurent
>     > On Tue, Dec 6, 2016 at 12:05 PM Michael Greis
>     <[hidden email] <mailto:[hidden email]>
>     > <mailto:[hidden email] <mailto:[hidden email]>>> wrote:
>     >
>     >     I'm having trouble upgrading my MW installation from 1.24.1 to
>     >     1.28.  I
>     >     get the following error message when I run update.php:
>     >
>     >     Fatal error: Call to undefined function enableSemantics() in
>     >     /home/michaelgreis/public_html/wiki128/LocalSettings.php on
>     line 246
>     >
>     >     I have SMW 2.1 installed on the working 1.24 wiki.  The
>     >     enableSemantics
>     >     line in LocalSettings.php looks like this:
>     >
>     >     enableSemantics( 'michaelgreis.org <http://michaelgreis.org>
>     <http://michaelgreis.org>' );
>     >
>     >     This setting has been working successfully in the running
>     wiki.  The
>     >     only reference to this error that I can find on the SMW pages
>     >  
>      <https://www.semantic-mediawiki.org/wiki/Help:Installation/Troubleshooting
>     <https://www.semantic-mediawiki.org/wiki/Help:Installation/Troubleshooting>>
>     >     applies to pre-composer versions of SMW (MW < 1.21):
>     >
>     >     /Fatal: Call to undefined function enableSemantics() …//
>     >     //    This kind of message appears for MW = 1.21.x //
>     >     /
>     >
>     >     Elsewhere, I found a suggestion in a similar case that the SMW
>     >     directory
>     >     may not be installed or findable. That's certainly
>     consistent with the
>     >     error message, but the SMW directory is in /extensions,
>     where it has
>     >     always been.
>     >
>     >     One other item - I have no idea if this is related, but it
>     was an odd
>     >     occurence, so I thought it worth mentioning because of the
>     connections
>     >     among the extensions.   I initially received the following
>     error:
>     >
>     >     /Fatal error: Uncaught exception 'Exception' with message
>     'You need to
>     >     have ParserHooks installed in order to use SubPageList' in
>     >  
>      /home/michaelgreis/public_html/wiki128/extensions/SubPageList/SubPageList.php:28/
>     >
>     >     Stack trace:
>     >     #0
>     /home/michaelgreis/public_html/wiki128/LocalSettings.php(230):
>     >     require_once()
>     >     #1
>     >  
>      /home/michaelgreis/public_html/wiki128/maintenance/doMaintenance.php(84):
>     >     require('/home/michaelgr...')
>     >     #2
>     /home/michaelgreis/public_html/wiki128/maintenance/update.php(217):
>     >     require_once('/home/michaelgr...')
>     >     #3 {main}
>     >        thrown in
>     >  
>      /home/michaelgreis/public_html/wiki128/extensions/SubPageList/SubPageList.php
>     >     on line 28
>     >
>     >     When I investigated further, I found a parser-hooks subdirectory
>     >     in the
>     >     vendor/mediawiki subdirectory of my current installation,
>     but not the
>     >     mw128 directory.  I've not previously been aware of the vendor
>     >     subdirectory, let alone copied it during an upgrade, but I
>     went ahead
>     >     and copied the parser-hooks subdirectory into the same
>     location in the
>     >     new "mw128" directory.  That error then disappeared.
>     >
>     >     Any help would be much appreciated.  I can provide additional
>     >     information as needed.  Thanks!
>     >
>     >
>     >
>     >     --
>     >
>     >     Michael
>     >
>     >
>     >     Michael Greis
>     >
>     >     781 559-4623 (O)
>     >     781 449-8007 (H)
>     >  
>      ------------------------------------------------------------------------------
>     >     Developer Access Program for Intel Xeon Phi Processors
>     >     Access to Intel Xeon Phi processor-based developer platforms.
>     >     With one year of Intel Parallel Studio XE.
>     >     Training and support from Colfax.
>     >     Order your platform today.http://sdm.link/xeonphi
>     >     _______________________________________________
>     >     Semediawiki-user mailing list
>     > [hidden email]
>     <mailto:[hidden email]>
>     >     <mailto:[hidden email]
>     <mailto:[hidden email]>>
>     > https://lists.sourceforge.net/lists/listinfo/semediawiki-user
>     <https://lists.sourceforge.net/lists/listinfo/semediawiki-user>
>     >
>
>
>     --
>
>     Michael
>
>
>     Michael Greis
>
>     781 559-4623 <tel:781%20559-4623> (O)
>     781 449-8007 <tel:781%20449-8007> (H)
>     ------------------------------------------------------------------------------
>     Developer Access Program for Intel Xeon Phi Processors
>     Access to Intel Xeon Phi processor-based developer platforms.
>     With one year of Intel Parallel Studio XE.
>     Training and support from Colfax.
>     Order your platform today.http://sdm.link/xeonphi
>     _______________________________________________
>     Semediawiki-user mailing list
>     [hidden email]
>     <mailto:[hidden email]>
>     https://lists.sourceforge.net/lists/listinfo/semediawiki-user
>     <https://lists.sourceforge.net/lists/listinfo/semediawiki-user>
>
>


--

Michael


Michael Greis

781 559-4623 (O)
781 449-8007 (H)
------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/xeonphi
_______________________________________________
Semediawiki-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-user
Reply | Threaded
Open this post in threaded view
|

Re: Problem upgrading MW - enableSemantics fatal error

John Doe-27
No, What I am suggesting is to:
1 move extensions/SemanticMediaWiki to a temp directory,
2 composer require mediawiki/semantic-media-wiki "~2.4" --update-no-dev
(plus any other SMW extensions)
3 run update.php

On Tue, Dec 6, 2016 at 2:18 PM, Michael Greis <[hidden email]> wrote:

> John,
>
> I'll try that, but let me be sure I understand exactly what you're
> suggesting, since I've now described two different paths:  I believe you're
> suggesting in:
>
> Scenario 1: - the update.php script fails with the fatal error "undefined
> function enableSemantics()"
>
>   - Move the SMW files (extensions/SemanticMediaWiki) to a temp directory
>   - Comment out the enableSemantics() line in LocalSettings.php
>   - Run update.php again
>
> Assuming update.php completes with no further errors (I can dream, can't
> I?):
>
> On the SMW page *Help:Installation/Using Composer with MediaWiki 1.25+
> <https://www.semantic-mediawiki.org/wiki/Help:Installation/Using_Composer_with_MediaWiki_1.25%2B> *
> (since the wiki is theoretically now at 1.28), should I
>
>   - follow the *Install* instructions (with no
> extensions/SemanticMediaWiki directory present, since I moved it to a temp
> directory)
>   - follow the *Update *instructions (after restoring the SMW files from
> the temp directory)
>
> (Noting that the Update instructions include the "composer update" command
> which was causing other problems in scenario #2...)
>
> Thanks - I really appreciate the the suggestions and will keep working at
> it....
>
> Michael
>
>
> On 12/6/2016 1:55 PM, John wrote:
>
> easiest thing to do is move the current SMW files to a temp folder, and
> re-install them via the composer install commands.
>
> On Tue, Dec 6, 2016 at 1:50 PM, Michael Greis <[hidden email]> wrote:
>
>> Laurent,
>>
>> Thanks for the quick response!
>>
>> The composer.json and composer.lock files in the base directory "mw128"
>> appear unchanged.  They still have the original timestamp they had in
>> the running 1.24 wiki.
>>
>> In an earlier iteration of my upgrade effort, I used composer to upgrade
>> the extensions (SMW & SubPageList) before running the update script.
>> But then I got this error message from the update script:
>>
>> Warning:
>> require(/home/michaelgreis/public_html/mw128/vendor/composer
>> /../../extensions/SemanticMediaWiki/src/Aliases.php):
>> failed to open stream: No such file or directory in
>> /home/michaelgreis/public_html/mw128/vendor/composer/autoload_real.php
>> on line 66
>> Fatal error: require(): Failed opening required
>> '/home/michaelgreis/public_html/mw128/vendor/composer/../../
>> extensions/SemanticMediaWiki/src/Aliases.php'
>> (include_path='.:/opt/cpanel/ea-php56/root/usr/share/pear') in
>> /home/michaelgreis/public_html/mw128/vendor/composer/autoload_real.php
>> on line 66
>>
>>
>> Line 66 of *autoload_real.php* defines the following function:
>>
>> function composerRequire_mediawiki_vendor($fileIdentifier, $file)
>> {
>>      if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
>>          require $file;
>>
>>          $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
>>      }
>> }
>>
>> It appears that the require() may have concatenated several paths and is
>> not looking in the correct directory....
>>
>> /home/michaelgreis/public_html/mw128/vendor/composer/../../
>> extensions/SemanticMediaWiki/src/Aliases.php/
>>
>> There is no Aliases.php in the /vendor/composer/ file hierarchy, but the
>> file is in //extensions/SemanticMediaWiki/includes
>>
>> /At this point, I was clearly out of my depth and well above my pay
>> grade, so I abandoned that effort in favor of upgrading from MW 1.24 to
>> 1.28 before upgrading SMW.  But that's where I ran into the
>> enableSemantics problem.
>>
>>
>> Michael
>>
>>
>>
>>
>> On 12/6/2016 12:10 PM, Laurent Alquier wrote:
>> > I ran into the same issue and found that composer files had been reset
>> > by the upgrade process.
>> >
>> > Running the composer commands to reinstall all extensions that used
>> > composer fixed the issue for me.
>> >
>> > - Laurent
>> > On Tue, Dec 6, 2016 at 12:05 PM Michael Greis <[hidden email]
>> > <mailto:[hidden email]>> wrote:
>> >
>> >     I'm having trouble upgrading my MW installation from 1.24.1 to
>> >     1.28.  I
>> >     get the following error message when I run update.php:
>> >
>> >     Fatal error: Call to undefined function enableSemantics() in
>> >     /home/michaelgreis/public_html/wiki128/LocalSettings.php on line
>> 246
>> >
>> >     I have SMW 2.1 installed on the working 1.24 wiki.  The
>> >     enableSemantics
>> >     line in LocalSettings.php looks like this:
>> >
>> >     enableSemantics( 'michaelgreis.org <http://michaelgreis.org>' );
>> >
>> >     This setting has been working successfully in the running wiki.  The
>> >     only reference to this error that I can find on the SMW pages
>> >     <https://www.semantic-mediawiki.org/wiki/Help:Installation/
>> Troubleshooting>
>> >     applies to pre-composer versions of SMW (MW < 1.21):
>> >
>> >     /Fatal: Call to undefined function enableSemantics() …//
>> >     //    This kind of message appears for MW = 1.21.x //
>> >     /
>> >
>> >     Elsewhere, I found a suggestion in a similar case that the SMW
>> >     directory
>> >     may not be installed or findable. That's certainly consistent with
>> the
>> >     error message, but the SMW directory is in /extensions, where it has
>> >     always been.
>> >
>> >     One other item - I have no idea if this is related, but it was an
>> odd
>> >     occurence, so I thought it worth mentioning because of the
>> connections
>> >     among the extensions.   I initially received the following error:
>> >
>> >     /Fatal error: Uncaught exception 'Exception' with message 'You need
>> to
>> >     have ParserHooks installed in order to use SubPageList' in
>> >     /home/michaelgreis/public_html/wiki128/extensions/SubPageLi
>> st/SubPageList.php:28/
>> >
>> >     Stack trace:
>> >     #0 /home/michaelgreis/public_html/wiki128/LocalSettings.php(230):
>> >     require_once()
>> >     #1
>> >     /home/michaelgreis/public_html/wiki128/maintenance/doMainte
>> nance.php(84):
>> >     require('/home/michaelgr...')
>> >     #2 /home/michaelgreis/public_html/wiki128/maintenance/update.
>> php(217):
>> >     require_once('/home/michaelgr...')
>> >     #3 {main}
>> >        thrown in
>> >     /home/michaelgreis/public_html/wiki128/extensions/SubPageLi
>> st/SubPageList.php
>> >     on line 28
>> >
>> >     When I investigated further, I found a parser-hooks subdirectory
>> >     in the
>> >     vendor/mediawiki subdirectory of my current installation, but not
>> the
>> >     mw128 directory.  I've not previously been aware of the vendor
>> >     subdirectory, let alone copied it during an upgrade, but I went
>> ahead
>> >     and copied the parser-hooks subdirectory into the same location in
>> the
>> >     new "mw128" directory.  That error then disappeared.
>> >
>> >     Any help would be much appreciated.  I can provide additional
>> >     information as needed.  Thanks!
>> >
>> >
>> >
>> >     --
>> >
>> >     Michael
>> >
>> >
>> >     Michael Greis
>> >
>> >     781 559-4623 <(781)%20559-4623> (O)
>> >     781 449-8007 <(781)%20449-8007> (H)
>> >     -----------------------------------------------------------
>> -------------------
>> >     Developer Access Program for Intel Xeon Phi Processors
>> >     Access to Intel Xeon Phi processor-based developer platforms.
>> >     With one year of Intel Parallel Studio XE.
>> >     Training and support from Colfax.
>> >     Order your platform today.http://sdm.link/xeonphi
>> >     _______________________________________________
>> >     Semediawiki-user mailing list
>> >     [hidden email]
>> >     <mailto:[hidden email]>
>> >     https://lists.sourceforge.net/lists/listinfo/semediawiki-user
>> >
>>
>>
>> --
>>
>> Michael
>>
>>
>> Michael Greis
>>
>> 781 559-4623 (O)
>> 781 449-8007 (H)
>> ------------------------------------------------------------
>> ------------------
>> Developer Access Program for Intel Xeon Phi Processors
>> Access to Intel Xeon Phi processor-based developer platforms.
>> With one year of Intel Parallel Studio XE.
>> Training and support from Colfax.
>> Order your platform today.http://sdm.link/xeonphi
>> _______________________________________________
>> Semediawiki-user mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/semediawiki-user
>>
>
>
>
> --
>
> Michael
>
>
> Michael Greis
>
> 781 559-4623 <(781)%20559-4623> (O)
> 781 449-8007 <(781)%20449-8007> (H)
>
------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/xeonphi
_______________________________________________
Semediawiki-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-user
Reply | Threaded
Open this post in threaded view
|

Re: Problem upgrading MW - enableSemantics fatal error

Michael Greis
Thanks, John.

When I run the composer command (#2), I get this error message:

The "https://packagist.org/packages.json" file could not be downloaded:
allow_url_fopen must be enabled in php.ini (https:// wrapper is disabled
in the server configuration by allow_url_fopen=0
failed to open stream: no suitable wrapper could be found)
https://packagist.org could not be fully loaded, package information was
loaded from the local cache and may be out of date
Updating dependencies

Installation failed, reverting ./composer.json to its original content.

   [Composer\Downloader\TransportException]
   The
"http://packagist.org/p/data-values/number%249d672e313b2ca064b6b9b304f8
   3593a0ab0b84b37f36642a5a13dbe6cbdb9c07.json" file could not be
downloaded:
   allow_url_fopen must be enabled in php.ini (http:// wrapper is
disabled in
   the server configuration by allow_url_fopen=0
   failed to open stream: no suitable wrapper could be found)/
/
I ran into that message in a previous try at this upgrade.  I've
confirmed that allow_url_fopen *_is_* on in my PHP installation.

I used *wget *to manually retrieve the file from packagist.org but that
didn't help.

Michael


On 12/6/2016 2:51 PM, John wrote:

> No, What I am suggesting is to:
> 1 move extensions/SemanticMediaWiki to a temp directory,
> 2 composer require mediawiki/semantic-media-wiki "~2.4"
> --update-no-dev (plus any other SMW extensions)
> 3 run update.php
>
> On Tue, Dec 6, 2016 at 2:18 PM, Michael Greis <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     John,
>
>     I'll try that, but let me be sure I understand exactly what you're
>     suggesting, since I've now described two different paths:  I
>     believe you're suggesting in:
>
>     Scenario 1: - the update.php script fails with the fatal error
>     "undefined function enableSemantics()"
>
>       - Move the SMW files (extensions/SemanticMediaWiki) to a temp
>     directory
>       - Comment out the enableSemantics() line in LocalSettings.php
>       - Run update.php again
>
>     Assuming update.php completes with no further errors (I can dream,
>     can't I?):
>
>     On the SMW page *Help:Installation/Using Composer with MediaWiki
>     1.25+
>     <https://www.semantic-mediawiki.org/wiki/Help:Installation/Using_Composer_with_MediaWiki_1.25%2B>
>     * (since the wiki is theoretically now at 1.28), should I
>
>       - follow the *Install* instructions (with no
>     extensions/SemanticMediaWiki directory present, since I moved it
>     to a temp directory)
>       - follow the *Update *instructions (after restoring the SMW
>     files from the temp directory)
>
>     (Noting that the Update instructions include the "composer update"
>     command which was causing other problems in scenario #2...) **
>
>     Thanks - I really appreciate the the suggestions and will keep
>     working at it....
>
>     Michael
>
>
>     On 12/6/2016 1:55 PM, John wrote:
>>     easiest thing to do is move the current SMW files to a temp
>>     folder, and re-install them via the composer install commands.
>>
>>     On Tue, Dec 6, 2016 at 1:50 PM, Michael Greis <[hidden email]
>>     <mailto:[hidden email]>> wrote:
>>
>>         Laurent,
>>
>>         Thanks for the quick response!
>>
>>         The composer.json and composer.lock files in the base
>>         directory "mw128"
>>         appear unchanged.  They still have the original timestamp
>>         they had in
>>         the running 1.24 wiki.
>>
>>         In an earlier iteration of my upgrade effort, I used composer
>>         to upgrade
>>         the extensions (SMW & SubPageList) before running the update
>>         script.
>>         But then I got this error message from the update script:
>>
>>         Warning:
>>         require(/home/michaelgreis/public_html/mw128/vendor/composer/../../extensions/SemanticMediaWiki/src/Aliases.php):
>>         failed to open stream: No such file or directory in
>>         /home/michaelgreis/public_html/mw128/vendor/composer/autoload_real.php
>>         on line 66
>>         Fatal error: require(): Failed opening required
>>         '/home/michaelgreis/public_html/mw128/vendor/composer/../../extensions/SemanticMediaWiki/src/Aliases.php'
>>         (include_path='.:/opt/cpanel/ea-php56/root/usr/share/pear') in
>>         /home/michaelgreis/public_html/mw128/vendor/composer/autoload_real.php
>>         on line 66
>>
>>
>>         Line 66 of *autoload_real.php* defines the following function:
>>
>>         function composerRequire_mediawiki_vendor($fileIdentifier, $file)
>>         {
>>              if
>>         (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
>>                  require $file;
>>
>>                
>>          $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
>>              }
>>         }
>>
>>         It appears that the require() may have concatenated several
>>         paths and is
>>         not looking in the correct directory....
>>
>>         /home/michaelgreis/public_html/mw128/vendor/composer/../../extensions/SemanticMediaWiki/src/Aliases.php/
>>
>>         There is no Aliases.php in the /vendor/composer/ file
>>         hierarchy, but the
>>         file is in //extensions/SemanticMediaWiki/includes
>>
>>         /At this point, I was clearly out of my depth and well above
>>         my pay
>>         grade, so I abandoned that effort in favor of upgrading from
>>         MW 1.24 to
>>         1.28 before upgrading SMW.  But that's where I ran into the
>>         enableSemantics problem.
>>
>>
>>         Michael
>>
>>
>>
>>
>>         On 12/6/2016 12:10 PM, Laurent Alquier wrote:
>>         > I ran into the same issue and found that composer files had
>>         been reset
>>         > by the upgrade process.
>>         >
>>         > Running the composer commands to reinstall all extensions
>>         that used
>>         > composer fixed the issue for me.
>>         >
>>         > - Laurent
>>         > On Tue, Dec 6, 2016 at 12:05 PM Michael Greis
>>         <[hidden email] <mailto:[hidden email]>
>>         > <mailto:[hidden email] <mailto:[hidden email]>>> wrote:
>>         >
>>         >     I'm having trouble upgrading my MW installation from
>>         1.24.1 to
>>         >     1.28.  I
>>         >     get the following error message when I run update.php:
>>         >
>>         >     Fatal error: Call to undefined function
>>         enableSemantics() in
>>         >  
>>          /home/michaelgreis/public_html/wiki128/LocalSettings.php on
>>         line 246
>>         >
>>         >     I have SMW 2.1 installed on the working 1.24 wiki.  The
>>         >     enableSemantics
>>         >     line in LocalSettings.php looks like this:
>>         >
>>         >     enableSemantics( 'michaelgreis.org
>>         <http://michaelgreis.org> <http://michaelgreis.org>' );
>>         >
>>         >     This setting has been working successfully in the
>>         running wiki.  The
>>         >     only reference to this error that I can find on the SMW
>>         pages
>>         >  
>>          <https://www.semantic-mediawiki.org/wiki/Help:Installation/Troubleshooting
>>         <https://www.semantic-mediawiki.org/wiki/Help:Installation/Troubleshooting>>
>>         >     applies to pre-composer versions of SMW (MW < 1.21):
>>         >
>>         >     /Fatal: Call to undefined function enableSemantics() …//
>>         >     //    This kind of message appears for MW = 1.21.x //
>>         >     /
>>         >
>>         >     Elsewhere, I found a suggestion in a similar case that
>>         the SMW
>>         >     directory
>>         >     may not be installed or findable. That's certainly
>>         consistent with the
>>         >     error message, but the SMW directory is in /extensions,
>>         where it has
>>         >     always been.
>>         >
>>         >     One other item - I have no idea if this is related, but
>>         it was an odd
>>         >     occurence, so I thought it worth mentioning because of
>>         the connections
>>         >     among the extensions.   I initially received the
>>         following error:
>>         >
>>         >     /Fatal error: Uncaught exception 'Exception' with
>>         message 'You need to
>>         >     have ParserHooks installed in order to use SubPageList' in
>>         >  
>>          /home/michaelgreis/public_html/wiki128/extensions/SubPageList/SubPageList.php:28/
>>         >
>>         >     Stack trace:
>>         >     #0
>>         /home/michaelgreis/public_html/wiki128/LocalSettings.php(230):
>>         >     require_once()
>>         >     #1
>>         >  
>>          /home/michaelgreis/public_html/wiki128/maintenance/doMaintenance.php(84):
>>         >     require('/home/michaelgr...')
>>         >     #2
>>         /home/michaelgreis/public_html/wiki128/maintenance/update.php(217):
>>         >     require_once('/home/michaelgr...')
>>         >     #3 {main}
>>         >        thrown in
>>         >  
>>          /home/michaelgreis/public_html/wiki128/extensions/SubPageList/SubPageList.php
>>         >     on line 28
>>         >
>>         >     When I investigated further, I found a parser-hooks
>>         subdirectory
>>         >     in the
>>         >     vendor/mediawiki subdirectory of my current
>>         installation, but not the
>>         >     mw128 directory.  I've not previously been aware of the
>>         vendor
>>         >     subdirectory, let alone copied it during an upgrade,
>>         but I went ahead
>>         >     and copied the parser-hooks subdirectory into the same
>>         location in the
>>         >     new "mw128" directory.  That error then disappeared.
>>         >
>>         >     Any help would be much appreciated.  I can provide
>>         additional
>>         >     information as needed.  Thanks!
>>         >
>>         >
>>         >
>>         >     --
>>         >
>>         >     Michael
>>         >
>>         >
>>         >     Michael Greis
>>         >
>>         > 781 559-4623 <tel:%28781%29%20559-4623> (O)
>>         > 781 449-8007 <tel:%28781%29%20449-8007> (H)
>>         >  
>>          ------------------------------------------------------------------------------
>>         >     Developer Access Program for Intel Xeon Phi Processors
>>         >     Access to Intel Xeon Phi processor-based developer
>>         platforms.
>>         >     With one year of Intel Parallel Studio XE.
>>         >     Training and support from Colfax.
>>         >     Order your platform today.http://sdm.link/xeonphi
>>         >     _______________________________________________
>>         >     Semediawiki-user mailing list
>>         > [hidden email]
>>         <mailto:[hidden email]>
>>         >     <mailto:[hidden email]
>>         <mailto:[hidden email]>>
>>         >
>>         https://lists.sourceforge.net/lists/listinfo/semediawiki-user
>>         <https://lists.sourceforge.net/lists/listinfo/semediawiki-user>
>>         >
>>
>>
>>         --
>>
>>         Michael
>>
>>
>>         Michael Greis
>>
>>         781 559-4623 <tel:781%20559-4623> (O)
>>         781 449-8007 <tel:781%20449-8007> (H)
>>         ------------------------------------------------------------------------------
>>         Developer Access Program for Intel Xeon Phi Processors
>>         Access to Intel Xeon Phi processor-based developer platforms.
>>         With one year of Intel Parallel Studio XE.
>>         Training and support from Colfax.
>>         Order your platform today.http://sdm.link/xeonphi
>>         _______________________________________________
>>         Semediawiki-user mailing list
>>         [hidden email]
>>         <mailto:[hidden email]>
>>         https://lists.sourceforge.net/lists/listinfo/semediawiki-user
>>         <https://lists.sourceforge.net/lists/listinfo/semediawiki-user>
>>
>>
>
>
>     --
>
>     Michael
>
>
>     Michael Greis
>
>     781 559-4623 <tel:%28781%29%20559-4623> (O)
>     781 449-8007 <tel:%28781%29%20449-8007> (H)
>
>


--

Michael


Michael Greis

781 559-4623 (O)
781 449-8007 (H)
------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/xeonphi
_______________________________________________
Semediawiki-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-user
Reply | Threaded
Open this post in threaded view
|

Re: Problem upgrading MW - enableSemantics fatal error

kghbln
What happens when you add the --prefer-source flag?:

composer require mediawiki/semantic-media-wiki "~2.4"
--update-no-dev --prefer-source


Am 06.12.2016 um 21:45 schrieb Michael Greis:

> Thanks, John.
>
> When I run the composer command (#2), I get this error message:
>
> The "https://packagist.org/packages.json" file could not be downloaded:
> allow_url_fopen must be enabled in php.ini (https:// wrapper is disabled
> in the server configuration by allow_url_fopen=0
> failed to open stream: no suitable wrapper could be found)
> https://packagist.org could not be fully loaded, package information was
> loaded from the local cache and may be out of date
> Updating dependencies
>
> Installation failed, reverting ./composer.json to its original content.
>
>    [Composer\Downloader\TransportException]
>    The
> "http://packagist.org/p/data-values/number%249d672e313b2ca064b6b9b304f8
>    3593a0ab0b84b37f36642a5a13dbe6cbdb9c07.json" file could not be
> downloaded:
>    allow_url_fopen must be enabled in php.ini (http:// wrapper is
> disabled in
>    the server configuration by allow_url_fopen=0
>    failed to open stream: no suitable wrapper could be found)/
> /
> I ran into that message in a previous try at this upgrade.  I've
> confirmed that allow_url_fopen *_is_* on in my PHP installation.
>
> I used *wget *to manually retrieve the file from packagist.org but that
> didn't help.
>
> Michael
>
>
> On 12/6/2016 2:51 PM, John wrote:
>> No, What I am suggesting is to:
>> 1 move extensions/SemanticMediaWiki to a temp directory,
>> 2 composer require mediawiki/semantic-media-wiki "~2.4"
>> --update-no-dev (plus any other SMW extensions)
>> 3 run update.php
>>
>> On Tue, Dec 6, 2016 at 2:18 PM, Michael Greis <[hidden email]
>> <mailto:[hidden email]>> wrote:
>>
>>     John,
>>
>>     I'll try that, but let me be sure I understand exactly what you're
>>     suggesting, since I've now described two different paths:  I
>>     believe you're suggesting in:
>>
>>     Scenario 1: - the update.php script fails with the fatal error
>>     "undefined function enableSemantics()"
>>
>>       - Move the SMW files (extensions/SemanticMediaWiki) to a temp
>>     directory
>>       - Comment out the enableSemantics() line in LocalSettings.php
>>       - Run update.php again
>>
>>     Assuming update.php completes with no further errors (I can dream,
>>     can't I?):
>>
>>     On the SMW page *Help:Installation/Using Composer with MediaWiki
>>     1.25+
>>     <https://www.semantic-mediawiki.org/wiki/Help:Installation/Using_Composer_with_MediaWiki_1.25%2B>
>>     * (since the wiki is theoretically now at 1.28), should I
>>
>>       - follow the *Install* instructions (with no
>>     extensions/SemanticMediaWiki directory present, since I moved it
>>     to a temp directory)
>>       - follow the *Update *instructions (after restoring the SMW
>>     files from the temp directory)
>>
>>     (Noting that the Update instructions include the "composer update"
>>     command which was causing other problems in scenario #2...) **
>>
>>     Thanks - I really appreciate the the suggestions and will keep
>>     working at it....
>>
>>     Michael
>>
>>
>>     On 12/6/2016 1:55 PM, John wrote:
>>>     easiest thing to do is move the current SMW files to a temp
>>>     folder, and re-install them via the composer install commands.
>>>
>>>     On Tue, Dec 6, 2016 at 1:50 PM, Michael Greis <[hidden email]
>>>     <mailto:[hidden email]>> wrote:
>>>
>>>         Laurent,
>>>
>>>         Thanks for the quick response!
>>>
>>>         The composer.json and composer.lock files in the base
>>>         directory "mw128"
>>>         appear unchanged.  They still have the original timestamp
>>>         they had in
>>>         the running 1.24 wiki.
>>>
>>>         In an earlier iteration of my upgrade effort, I used composer
>>>         to upgrade
>>>         the extensions (SMW & SubPageList) before running the update
>>>         script.
>>>         But then I got this error message from the update script:
>>>
>>>         Warning:
>>>         require(/home/michaelgreis/public_html/mw128/vendor/composer/../../extensions/SemanticMediaWiki/src/Aliases.php):
>>>         failed to open stream: No such file or directory in
>>>         /home/michaelgreis/public_html/mw128/vendor/composer/autoload_real.php
>>>         on line 66
>>>         Fatal error: require(): Failed opening required
>>>         '/home/michaelgreis/public_html/mw128/vendor/composer/../../extensions/SemanticMediaWiki/src/Aliases.php'
>>>         (include_path='.:/opt/cpanel/ea-php56/root/usr/share/pear') in
>>>         /home/michaelgreis/public_html/mw128/vendor/composer/autoload_real.php
>>>         on line 66
>>>
>>>
>>>         Line 66 of *autoload_real.php* defines the following function:
>>>
>>>         function composerRequire_mediawiki_vendor($fileIdentifier, $file)
>>>         {
>>>              if
>>>         (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
>>>                  require $file;
>>>
>>>                
>>>          $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
>>>              }
>>>         }
>>>
>>>         It appears that the require() may have concatenated several
>>>         paths and is
>>>         not looking in the correct directory....
>>>
>>>         /home/michaelgreis/public_html/mw128/vendor/composer/../../extensions/SemanticMediaWiki/src/Aliases.php/
>>>
>>>         There is no Aliases.php in the /vendor/composer/ file
>>>         hierarchy, but the
>>>         file is in //extensions/SemanticMediaWiki/includes
>>>
>>>         /At this point, I was clearly out of my depth and well above
>>>         my pay
>>>         grade, so I abandoned that effort in favor of upgrading from
>>>         MW 1.24 to
>>>         1.28 before upgrading SMW.  But that's where I ran into the
>>>         enableSemantics problem.
>>>
>>>
>>>         Michael
>>>
>>>
>>>
>>>
>>>         On 12/6/2016 12:10 PM, Laurent Alquier wrote:
>>>         > I ran into the same issue and found that composer files had
>>>         been reset
>>>         > by the upgrade process.
>>>         >
>>>         > Running the composer commands to reinstall all extensions
>>>         that used
>>>         > composer fixed the issue for me.
>>>         >
>>>         > - Laurent
>>>         > On Tue, Dec 6, 2016 at 12:05 PM Michael Greis
>>>         <[hidden email] <mailto:[hidden email]>
>>>         > <mailto:[hidden email] <mailto:[hidden email]>>> wrote:
>>>         >
>>>         >     I'm having trouble upgrading my MW installation from
>>>         1.24.1 to
>>>         >     1.28.  I
>>>         >     get the following error message when I run update.php:
>>>         >
>>>         >     Fatal error: Call to undefined function
>>>         enableSemantics() in
>>>         >  
>>>          /home/michaelgreis/public_html/wiki128/LocalSettings.php on
>>>         line 246
>>>         >
>>>         >     I have SMW 2.1 installed on the working 1.24 wiki.  The
>>>         >     enableSemantics
>>>         >     line in LocalSettings.php looks like this:
>>>         >
>>>         >     enableSemantics( 'michaelgreis.org
>>>         <http://michaelgreis.org> <http://michaelgreis.org>' );
>>>         >
>>>         >     This setting has been working successfully in the
>>>         running wiki.  The
>>>         >     only reference to this error that I can find on the SMW
>>>         pages
>>>         >  
>>>          <https://www.semantic-mediawiki.org/wiki/Help:Installation/Troubleshooting
>>>         <https://www.semantic-mediawiki.org/wiki/Help:Installation/Troubleshooting>>
>>>         >     applies to pre-composer versions of SMW (MW < 1.21):
>>>         >
>>>         >     /Fatal: Call to undefined function enableSemantics() …//
>>>         >     //    This kind of message appears for MW = 1.21.x //
>>>         >     /
>>>         >
>>>         >     Elsewhere, I found a suggestion in a similar case that
>>>         the SMW
>>>         >     directory
>>>         >     may not be installed or findable. That's certainly
>>>         consistent with the
>>>         >     error message, but the SMW directory is in /extensions,
>>>         where it has
>>>         >     always been.
>>>         >
>>>         >     One other item - I have no idea if this is related, but
>>>         it was an odd
>>>         >     occurence, so I thought it worth mentioning because of
>>>         the connections
>>>         >     among the extensions.   I initially received the
>>>         following error:
>>>         >
>>>         >     /Fatal error: Uncaught exception 'Exception' with
>>>         message 'You need to
>>>         >     have ParserHooks installed in order to use SubPageList' in
>>>         >  
>>>          /home/michaelgreis/public_html/wiki128/extensions/SubPageList/SubPageList.php:28/
>>>         >
>>>         >     Stack trace:
>>>         >     #0
>>>         /home/michaelgreis/public_html/wiki128/LocalSettings.php(230):
>>>         >     require_once()
>>>         >     #1
>>>         >  
>>>          /home/michaelgreis/public_html/wiki128/maintenance/doMaintenance.php(84):
>>>         >     require('/home/michaelgr...')
>>>         >     #2
>>>         /home/michaelgreis/public_html/wiki128/maintenance/update.php(217):
>>>         >     require_once('/home/michaelgr...')
>>>         >     #3 {main}
>>>         >        thrown in
>>>         >  
>>>          /home/michaelgreis/public_html/wiki128/extensions/SubPageList/SubPageList.php
>>>         >     on line 28
>>>         >
>>>         >     When I investigated further, I found a parser-hooks
>>>         subdirectory
>>>         >     in the
>>>         >     vendor/mediawiki subdirectory of my current
>>>         installation, but not the
>>>         >     mw128 directory.  I've not previously been aware of the
>>>         vendor
>>>         >     subdirectory, let alone copied it during an upgrade,
>>>         but I went ahead
>>>         >     and copied the parser-hooks subdirectory into the same
>>>         location in the
>>>         >     new "mw128" directory.  That error then disappeared.
>>>         >
>>>         >     Any help would be much appreciated.  I can provide
>>>         additional
>>>         >     information as needed.  Thanks!
>>>         >
>>>         >
>>>         >
>>>         >     --
>>>         >
>>>         >     Michael
>>>         >
>>>         >
>>>         >     Michael Greis
>>>         >
>>>         > 781 559-4623 <tel:%28781%29%20559-4623> (O)
>>>         > 781 449-8007 <tel:%28781%29%20449-8007> (H)
>>>         >  
>>>          ------------------------------------------------------------------------------
>>>         >     Developer Access Program for Intel Xeon Phi Processors
>>>         >     Access to Intel Xeon Phi processor-based developer
>>>         platforms.
>>>         >     With one year of Intel Parallel Studio XE.
>>>         >     Training and support from Colfax.
>>>         >     Order your platform today.http://sdm.link/xeonphi
>>>         >     _______________________________________________
>>>         >     Semediawiki-user mailing list
>>>         > [hidden email]
>>>         <mailto:[hidden email]>
>>>         >     <mailto:[hidden email]
>>>         <mailto:[hidden email]>>
>>>         >
>>>         https://lists.sourceforge.net/lists/listinfo/semediawiki-user
>>>         <https://lists.sourceforge.net/lists/listinfo/semediawiki-user>
>>>         >
>>>
>>>
>>>         --
>>>
>>>         Michael
>>>
>>>
>>>         Michael Greis
>>>
>>>         781 559-4623 <tel:781%20559-4623> (O)
>>>         781 449-8007 <tel:781%20449-8007> (H)
>>>         ------------------------------------------------------------------------------
>>>         Developer Access Program for Intel Xeon Phi Processors
>>>         Access to Intel Xeon Phi processor-based developer platforms.
>>>         With one year of Intel Parallel Studio XE.
>>>         Training and support from Colfax.
>>>         Order your platform today.http://sdm.link/xeonphi
>>>         _______________________________________________
>>>         Semediawiki-user mailing list
>>>         [hidden email]
>>>         <mailto:[hidden email]>
>>>         https://lists.sourceforge.net/lists/listinfo/semediawiki-user
>>>         <https://lists.sourceforge.net/lists/listinfo/semediawiki-user>
>>>
>>>
>>
>>
>>     --
>>
>>     Michael
>>
>>
>>     Michael Greis
>>
>>     781 559-4623 <tel:%28781%29%20559-4623> (O)
>>     781 449-8007 <tel:%28781%29%20449-8007> (H)
>>
>>
>
>

------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/xeonphi
_______________________________________________
Semediawiki-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-user
Reply | Threaded
Open this post in threaded view
|

Re: Problem upgrading MW - enableSemantics fatal error

James HK
In reply to this post by Michael Greis
Hi,

> Fatal error: Call to undefined function enableSemantics() in
> /home/michaelgreis/public_html/wiki128/LocalSettings.php on line 246

If you find yourself left with this message then it just means that
from the two ways of how to install/upgrade SMW, none were applied
correctly (the error is the result of the autoloader being unable to
register the file that hosts the `enableSemantics` function and
ultimately tells us that something did not update, files are missing,
or not at the expected place).

The first being, `composer update` executed from the base directory to
find all files and packages necessary for an update and replaces them
without any manually file juggling or headaches about what fits
together and what not.

If `composer update` isn't available then the second option is to pick
a tarball release and follow the installation guideline (but don't mix
them!).

> subdirectory, let alone copied it during an upgrade, but I went ahead
> and copied the parser-hooks subdirectory into the same location in the

CAUTION: If you start copying files from/into the vendor directory
(you can do that if you know what you are doing but that isn't an
official recommendation) because of some issues then it should be
obvious that things aren't going the right way. At this point you
should stop, take a 5 minutes break, read the installation guideline
again, and start from the beginning.

> MW installation from 1.24.1 to 1.28

@kghbln runs the sandbox [0] on 1.28+ without any issues (including
`composer update`) therefore we can be fairly certain that what worked
in 1.25/1.26/1.27 also works for that MW release.

Maybe [1, 2, 3] can be of some help.

[0] https://www.semantic-mediawiki.org/
[1] https://vimeo.com/82255034 (Install Semantic MediaWiki using Composer)
[2] https://vimeo.com/127356533 (Update Semantic MediaWiki using Composer)
[3] https://www.youtube.com/watch?v=zY5ugnyq7ig

Cheers

On 12/6/16, Michael Greis <[hidden email]> wrote:

> I'm having trouble upgrading my MW installation from 1.24.1 to 1.28.  I
> get the following error message when I run update.php:
>
> Fatal error: Call to undefined function enableSemantics() in
> /home/michaelgreis/public_html/wiki128/LocalSettings.php on line 246
>
> I have SMW 2.1 installed on the working 1.24 wiki.  The enableSemantics
> line in LocalSettings.php looks like this:
>
> enableSemantics( 'michaelgreis.org' );
>
> This setting has been working successfully in the running wiki.  The
> only reference to this error that I can find on the SMW pages
> <https://www.semantic-mediawiki.org/wiki/Help:Installation/Troubleshooting>
> applies to pre-composer versions of SMW (MW < 1.21):
>
> /Fatal: Call to undefined function enableSemantics() …//
> //    This kind of message appears for MW = 1.21.x //
> /
>
> Elsewhere, I found a suggestion in a similar case that the SMW directory
> may not be installed or findable. That's certainly consistent with the
> error message, but the SMW directory is in /extensions, where it has
> always been.
>
> One other item - I have no idea if this is related, but it was an odd
> occurence, so I thought it worth mentioning because of the connections
> among the extensions.   I initially received the following error:
>
> /Fatal error: Uncaught exception 'Exception' with message 'You need to
> have ParserHooks installed in order to use SubPageList' in
> /home/michaelgreis/public_html/wiki128/extensions/SubPageList/SubPageList.php:28/
>
> Stack trace:
> #0 /home/michaelgreis/public_html/wiki128/LocalSettings.php(230):
> require_once()
> #1
> /home/michaelgreis/public_html/wiki128/maintenance/doMaintenance.php(84):
> require('/home/michaelgr...')
> #2 /home/michaelgreis/public_html/wiki128/maintenance/update.php(217):
> require_once('/home/michaelgr...')
> #3 {main}
>    thrown in
> /home/michaelgreis/public_html/wiki128/extensions/SubPageList/SubPageList.php
> on line 28
>
> When I investigated further, I found a parser-hooks subdirectory in the
> vendor/mediawiki subdirectory of my current installation, but not the
> mw128 directory.  I've not previously been aware of the vendor
> subdirectory, let alone copied it during an upgrade, but I went ahead
> and copied the parser-hooks subdirectory into the same location in the
> new "mw128" directory.  That error then disappeared.
>
> Any help would be much appreciated.  I can provide additional
> information as needed.  Thanks!
>
>
>
> --
>
> Michael
>
>
> Michael Greis
>
> 781 559-4623 (O)
> 781 449-8007 (H)
> ------------------------------------------------------------------------------
> Developer Access Program for Intel Xeon Phi Processors
> Access to Intel Xeon Phi processor-based developer platforms.
> With one year of Intel Parallel Studio XE.
> Training and support from Colfax.
> Order your platform today.http://sdm.link/xeonphi
> _______________________________________________
> Semediawiki-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/semediawiki-user
>

------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/xeonphi
_______________________________________________
Semediawiki-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-user
Reply | Threaded
Open this post in threaded view
|

Re: Problem upgrading MW - enableSemantics fatal error

James HK
In reply to this post by kghbln
Hi,

> What happens when you add the --prefer-source flag?:

Just for clarification, "The --prefer-source option will force cloning
sources instead of downloading an archive" [0, 1].

[0] https://moquet.net/blog/5-features-about-composer-php/
[1] https://getcomposer.org/doc/03-cli.md#install

Cheers

On 12/7/16, kghbln <[hidden email]> wrote:

> What happens when you add the --prefer-source flag?:
>
> composer require mediawiki/semantic-media-wiki "~2.4"
> --update-no-dev --prefer-source
>
>
> Am 06.12.2016 um 21:45 schrieb Michael Greis:
>> Thanks, John.
>>
>> When I run the composer command (#2), I get this error message:
>>
>> The "https://packagist.org/packages.json" file could not be downloaded:
>> allow_url_fopen must be enabled in php.ini (https:// wrapper is disabled
>> in the server configuration by allow_url_fopen=0
>> failed to open stream: no suitable wrapper could be found)
>> https://packagist.org could not be fully loaded, package information was
>> loaded from the local cache and may be out of date
>> Updating dependencies
>>
>> Installation failed, reverting ./composer.json to its original content.
>>
>>    [Composer\Downloader\TransportException]
>>    The
>> "http://packagist.org/p/data-values/number%249d672e313b2ca064b6b9b304f8
>>    3593a0ab0b84b37f36642a5a13dbe6cbdb9c07.json" file could not be
>> downloaded:
>>    allow_url_fopen must be enabled in php.ini (http:// wrapper is
>> disabled in
>>    the server configuration by allow_url_fopen=0
>>    failed to open stream: no suitable wrapper could be found)/
>> /
>> I ran into that message in a previous try at this upgrade.  I've
>> confirmed that allow_url_fopen *_is_* on in my PHP installation.
>>
>> I used *wget *to manually retrieve the file from packagist.org but that
>> didn't help.
>>
>> Michael
>>
>>
>> On 12/6/2016 2:51 PM, John wrote:
>>> No, What I am suggesting is to:
>>> 1 move extensions/SemanticMediaWiki to a temp directory,
>>> 2 composer require mediawiki/semantic-media-wiki "~2.4"
>>> --update-no-dev (plus any other SMW extensions)
>>> 3 run update.php
>>>
>>> On Tue, Dec 6, 2016 at 2:18 PM, Michael Greis <[hidden email]
>>> <mailto:[hidden email]>> wrote:
>>>
>>>     John,
>>>
>>>     I'll try that, but let me be sure I understand exactly what you're
>>>     suggesting, since I've now described two different paths:  I
>>>     believe you're suggesting in:
>>>
>>>     Scenario 1: - the update.php script fails with the fatal error
>>>     "undefined function enableSemantics()"
>>>
>>>       - Move the SMW files (extensions/SemanticMediaWiki) to a temp
>>>     directory
>>>       - Comment out the enableSemantics() line in LocalSettings.php
>>>       - Run update.php again
>>>
>>>     Assuming update.php completes with no further errors (I can dream,
>>>     can't I?):
>>>
>>>     On the SMW page *Help:Installation/Using Composer with MediaWiki
>>>     1.25+
>>>
>>> <https://www.semantic-mediawiki.org/wiki/Help:Installation/Using_Composer_with_MediaWiki_1.25%2B>
>>>     * (since the wiki is theoretically now at 1.28), should I
>>>
>>>       - follow the *Install* instructions (with no
>>>     extensions/SemanticMediaWiki directory present, since I moved it
>>>     to a temp directory)
>>>       - follow the *Update *instructions (after restoring the SMW
>>>     files from the temp directory)
>>>
>>>     (Noting that the Update instructions include the "composer update"
>>>     command which was causing other problems in scenario #2...) **
>>>
>>>     Thanks - I really appreciate the the suggestions and will keep
>>>     working at it....
>>>
>>>     Michael
>>>
>>>
>>>     On 12/6/2016 1:55 PM, John wrote:
>>>>     easiest thing to do is move the current SMW files to a temp
>>>>     folder, and re-install them via the composer install commands.
>>>>
>>>>     On Tue, Dec 6, 2016 at 1:50 PM, Michael Greis <[hidden email]
>>>>     <mailto:[hidden email]>> wrote:
>>>>
>>>>         Laurent,
>>>>
>>>>         Thanks for the quick response!
>>>>
>>>>         The composer.json and composer.lock files in the base
>>>>         directory "mw128"
>>>>         appear unchanged.  They still have the original timestamp
>>>>         they had in
>>>>         the running 1.24 wiki.
>>>>
>>>>         In an earlier iteration of my upgrade effort, I used composer
>>>>         to upgrade
>>>>         the extensions (SMW & SubPageList) before running the update
>>>>         script.
>>>>         But then I got this error message from the update script:
>>>>
>>>>         Warning:
>>>>
>>>> require(/home/michaelgreis/public_html/mw128/vendor/composer/../../extensions/SemanticMediaWiki/src/Aliases.php):
>>>>         failed to open stream: No such file or directory in
>>>>
>>>> /home/michaelgreis/public_html/mw128/vendor/composer/autoload_real.php
>>>>         on line 66
>>>>         Fatal error: require(): Failed opening required
>>>>
>>>> '/home/michaelgreis/public_html/mw128/vendor/composer/../../extensions/SemanticMediaWiki/src/Aliases.php'
>>>>         (include_path='.:/opt/cpanel/ea-php56/root/usr/share/pear') in
>>>>
>>>> /home/michaelgreis/public_html/mw128/vendor/composer/autoload_real.php
>>>>         on line 66
>>>>
>>>>
>>>>         Line 66 of *autoload_real.php* defines the following function:
>>>>
>>>>         function composerRequire_mediawiki_vendor($fileIdentifier,
>>>> $file)
>>>>         {
>>>>              if
>>>>         (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier]))
>>>> {
>>>>                  require $file;
>>>>
>>>>
>>>>          $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
>>>>              }
>>>>         }
>>>>
>>>>         It appears that the require() may have concatenated several
>>>>         paths and is
>>>>         not looking in the correct directory....
>>>>
>>>>
>>>> /home/michaelgreis/public_html/mw128/vendor/composer/../../extensions/SemanticMediaWiki/src/Aliases.php/
>>>>
>>>>         There is no Aliases.php in the /vendor/composer/ file
>>>>         hierarchy, but the
>>>>         file is in //extensions/SemanticMediaWiki/includes
>>>>
>>>>         /At this point, I was clearly out of my depth and well above
>>>>         my pay
>>>>         grade, so I abandoned that effort in favor of upgrading from
>>>>         MW 1.24 to
>>>>         1.28 before upgrading SMW.  But that's where I ran into the
>>>>         enableSemantics problem.
>>>>
>>>>
>>>>         Michael
>>>>
>>>>
>>>>
>>>>
>>>>         On 12/6/2016 12:10 PM, Laurent Alquier wrote:
>>>>         > I ran into the same issue and found that composer files had
>>>>         been reset
>>>>         > by the upgrade process.
>>>>         >
>>>>         > Running the composer commands to reinstall all extensions
>>>>         that used
>>>>         > composer fixed the issue for me.
>>>>         >
>>>>         > - Laurent
>>>>         > On Tue, Dec 6, 2016 at 12:05 PM Michael Greis
>>>>         <[hidden email] <mailto:[hidden email]>
>>>>         > <mailto:[hidden email] <mailto:[hidden email]>>>
>>>> wrote:
>>>>         >
>>>>         >     I'm having trouble upgrading my MW installation from
>>>>         1.24.1 to
>>>>         >     1.28.  I
>>>>         >     get the following error message when I run update.php:
>>>>         >
>>>>         >     Fatal error: Call to undefined function
>>>>         enableSemantics() in
>>>>         >
>>>>          /home/michaelgreis/public_html/wiki128/LocalSettings.php on
>>>>         line 246
>>>>         >
>>>>         >     I have SMW 2.1 installed on the working 1.24 wiki.  The
>>>>         >     enableSemantics
>>>>         >     line in LocalSettings.php looks like this:
>>>>         >
>>>>         >     enableSemantics( 'michaelgreis.org
>>>>         <http://michaelgreis.org> <http://michaelgreis.org>' );
>>>>         >
>>>>         >     This setting has been working successfully in the
>>>>         running wiki.  The
>>>>         >     only reference to this error that I can find on the SMW
>>>>         pages
>>>>         >
>>>>
>>>> <https://www.semantic-mediawiki.org/wiki/Help:Installation/Troubleshooting
>>>>
>>>> <https://www.semantic-mediawiki.org/wiki/Help:Installation/Troubleshooting>>
>>>>         >     applies to pre-composer versions of SMW (MW < 1.21):
>>>>         >
>>>>         >     /Fatal: Call to undefined function enableSemantics() …//
>>>>         >     //    This kind of message appears for MW = 1.21.x //
>>>>         >     /
>>>>         >
>>>>         >     Elsewhere, I found a suggestion in a similar case that
>>>>         the SMW
>>>>         >     directory
>>>>         >     may not be installed or findable. That's certainly
>>>>         consistent with the
>>>>         >     error message, but the SMW directory is in /extensions,
>>>>         where it has
>>>>         >     always been.
>>>>         >
>>>>         >     One other item - I have no idea if this is related, but
>>>>         it was an odd
>>>>         >     occurence, so I thought it worth mentioning because of
>>>>         the connections
>>>>         >     among the extensions.   I initially received the
>>>>         following error:
>>>>         >
>>>>         >     /Fatal error: Uncaught exception 'Exception' with
>>>>         message 'You need to
>>>>         >     have ParserHooks installed in order to use SubPageList' in
>>>>         >
>>>>
>>>> /home/michaelgreis/public_html/wiki128/extensions/SubPageList/SubPageList.php:28/
>>>>         >
>>>>         >     Stack trace:
>>>>         >     #0
>>>>         /home/michaelgreis/public_html/wiki128/LocalSettings.php(230):
>>>>         >     require_once()
>>>>         >     #1
>>>>         >
>>>>
>>>> /home/michaelgreis/public_html/wiki128/maintenance/doMaintenance.php(84):
>>>>         >     require('/home/michaelgr...')
>>>>         >     #2
>>>>
>>>> /home/michaelgreis/public_html/wiki128/maintenance/update.php(217):
>>>>         >     require_once('/home/michaelgr...')
>>>>         >     #3 {main}
>>>>         >        thrown in
>>>>         >
>>>>
>>>> /home/michaelgreis/public_html/wiki128/extensions/SubPageList/SubPageList.php
>>>>         >     on line 28
>>>>         >
>>>>         >     When I investigated further, I found a parser-hooks
>>>>         subdirectory
>>>>         >     in the
>>>>         >     vendor/mediawiki subdirectory of my current
>>>>         installation, but not the
>>>>         >     mw128 directory.  I've not previously been aware of the
>>>>         vendor
>>>>         >     subdirectory, let alone copied it during an upgrade,
>>>>         but I went ahead
>>>>         >     and copied the parser-hooks subdirectory into the same
>>>>         location in the
>>>>         >     new "mw128" directory.  That error then disappeared.
>>>>         >
>>>>         >     Any help would be much appreciated.  I can provide
>>>>         additional
>>>>         >     information as needed.  Thanks!
>>>>         >
>>>>         >
>>>>         >
>>>>         >     --
>>>>         >
>>>>         >     Michael
>>>>         >
>>>>         >
>>>>         >     Michael Greis
>>>>         >
>>>>         > 781 559-4623 <tel:%28781%29%20559-4623> (O)
>>>>         > 781 449-8007 <tel:%28781%29%20449-8007> (H)
>>>>         >
>>>>
>>>> ------------------------------------------------------------------------------
>>>>         >     Developer Access Program for Intel Xeon Phi Processors
>>>>         >     Access to Intel Xeon Phi processor-based developer
>>>>         platforms.
>>>>         >     With one year of Intel Parallel Studio XE.
>>>>         >     Training and support from Colfax.
>>>>         >     Order your platform today.http://sdm.link/xeonphi
>>>>         >     _______________________________________________
>>>>         >     Semediawiki-user mailing list
>>>>         > [hidden email]
>>>>         <mailto:[hidden email]>
>>>>         >     <mailto:[hidden email]
>>>>         <mailto:[hidden email]>>
>>>>         >
>>>>         https://lists.sourceforge.net/lists/listinfo/semediawiki-user
>>>>         <https://lists.sourceforge.net/lists/listinfo/semediawiki-user>
>>>>         >
>>>>
>>>>
>>>>         --
>>>>
>>>>         Michael
>>>>
>>>>
>>>>         Michael Greis
>>>>
>>>>         781 559-4623 <tel:781%20559-4623> (O)
>>>>         781 449-8007 <tel:781%20449-8007> (H)
>>>>
>>>> ------------------------------------------------------------------------------
>>>>         Developer Access Program for Intel Xeon Phi Processors
>>>>         Access to Intel Xeon Phi processor-based developer platforms.
>>>>         With one year of Intel Parallel Studio XE.
>>>>         Training and support from Colfax.
>>>>         Order your platform today.http://sdm.link/xeonphi
>>>>         _______________________________________________
>>>>         Semediawiki-user mailing list
>>>>         [hidden email]
>>>>         <mailto:[hidden email]>
>>>>         https://lists.sourceforge.net/lists/listinfo/semediawiki-user
>>>>         <https://lists.sourceforge.net/lists/listinfo/semediawiki-user>
>>>>
>>>>
>>>
>>>
>>>     --
>>>
>>>     Michael
>>>
>>>
>>>     Michael Greis
>>>
>>>     781 559-4623 <tel:%28781%29%20559-4623> (O)
>>>     781 449-8007 <tel:%28781%29%20449-8007> (H)
>>>
>>>
>>
>>
>
> ------------------------------------------------------------------------------
> Developer Access Program for Intel Xeon Phi Processors
> Access to Intel Xeon Phi processor-based developer platforms.
> With one year of Intel Parallel Studio XE.
> Training and support from Colfax.
> Order your platform today.http://sdm.link/xeonphi
> _______________________________________________
> Semediawiki-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/semediawiki-user
>

------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/xeonphi
_______________________________________________
Semediawiki-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-user
Reply | Threaded
Open this post in threaded view
|

Re: Problem upgrading MW - enableSemantics - Success!

Michael Greis
In reply to this post by James HK
James, John and KG,

Many thanks for your suggestions and help with my problem.  I am so
appreciative for the assistance this community has provided and for the
amazing responsiveness you've shown.  For my part, I hope that I have
asked reasonably informed questions and provided appropriate and
relevant information when doing so.  I recognize how important that is
when people are offering their time and expertise to be helpful.  I have
been on the other side (though certainly not at this level...).

It looks like I now have an updated and working wiki at MW 1.28 and SMW
2.4.3.  I'll share below what I did in case it is helpful to others (or
for any advice it may prompt....).

After further efforts, I concluded that continuing the "whack-a-mole"
game was not the best strategy.  Clearly enough had been messed up that
recovering the "new" versions I had created was not likely to work, so I
went back to the beginning.

- Unzipped the MW 1.28 into a new directory "mwnew"
- Copied the images directory from my working wiki to the "mwnew" directory
- Copied over or installed new versions of the non-composer extensions
from my working wiki (CategoryTree, Math, WikiArticleFeeds)
- Did NOT copy  SMW, PageSubList, SemanticForms or Validator (which is
apparently no longer needed)
- Made a new copy of the database
- Copied LocalSettings.php from my working wiki to the new "mwnew" directory
     - Updated $wgDBname in LocalSettings.php to point to the new copy
of the database
     - Updated $wgScriptPath in LocalSettings.php to point to the
"mwnew" directory
     - Commented out all references to the uncopied extensions (e.g. SMW)
- Ran update.php

At that point, the wiki main page opened, with, not surprisingly, the
SMW code showing in raw form on the page.

I then:
   - Used composer to install SMW:
composer require mediawiki/semantic-media-wiki "~2.4" --update-no-dev
   - Ran /composer update/ (as prompted)
   - Ran the database refresh script (per the Update section of the
Help:Installation
<https://www.semantic-mediawiki.org/wiki/Help:Installation/Using_Composer_with_MediaWiki_1.25%2B>
page
php extensions/SemanticMediaWiki/maintenance/SMW_refreshData.php -d 50 -v

   - Fired up the wiki and got the following error on my main page,
which has SMW code
[WEgymixcHKc9HCgM63RigAAAAAg] 2016-12-07 16:02:34: Fatal exception of
type "RuntimeException"

   - Special:Version page confirmed the upgrade (MW 1.28.0, PHP 5.6.28,
SMW 2.4.3)

  - Disabled SMW and fired up the main page.  Loaded OK (without SMW
sections, of course)

   - Found the Help:Repairing SMW's data
<https://www.semantic-mediawiki.org/wiki/Help:Repairing_SMW%27s_data>
page, opened the Special:SMWAdmin page on my updated wiki
Note: It may be helpful to include a link to this page from the
Help:Installation page.

      - Ran the /Initialize or upgrade tables /job
      - Started the /updating data**/job
Suggestion: It may be helpful to add to the text at the top of this page
a reminder to people upgrading their SMW like:
          "Run the first two jobs in order when upgrading your SMW
installation"
                (I know, RTFM, but I went straight to the repair data
the first time I tried this.  The update stalled because of a missing
table.  I only realized what had happened because I used |runJobs.php|  
and it displayed an error message about a missing table when it stopped.)

   - Created a simple test page per the Help:Testing
<https://www.semantic-mediawiki.org/wiki/Help:Testing> page
       - Page displayed correctly (by which I concluded that SMW is
operational, though my existing data was not yet updated)

      - Ran |runJobs.php| --maxjobs 1000 as many times as needed to
complete the data update.
           - (Oddly, the progress bar on the SMWAdmin page showed
complete even though additional runs of |runJobs.php|
           produced many more jobs.)
          -  The "fatal exception" update still appeared if I looked at
pages while the update was underway.  Is that expected?
              If so, I can't imagine doing the update without runJobs.php.

That's it.  Once the data update was complete, I had an updated and
working wiki.  (I haven't been able yet to fully check the content an do
have some additional extensions to install, but so far, so good.)

Thanks again to all!



Michael


On 12/6/2016 11:19 PM, James HK wrote:

> Hi,
>
>> Fatal error: Call to undefined function enableSemantics() in
>> /home/michaelgreis/public_html/wiki128/LocalSettings.php on line 246
> If you find yourself left with this message then it just means that
> from the two ways of how to install/upgrade SMW, none were applied
> correctly (the error is the result of the autoloader being unable to
> register the file that hosts the `enableSemantics` function and
> ultimately tells us that something did not update, files are missing,
> or not at the expected place).
>
> The first being, `composer update` executed from the base directory to
> find all files and packages necessary for an update and replaces them
> without any manually file juggling or headaches about what fits
> together and what not.
>
> If `composer update` isn't available then the second option is to pick
> a tarball release and follow the installation guideline (but don't mix
> them!).
>
>> subdirectory, let alone copied it during an upgrade, but I went ahead
>> and copied the parser-hooks subdirectory into the same location in the
> CAUTION: If you start copying files from/into the vendor directory
> (you can do that if you know what you are doing but that isn't an
> official recommendation) because of some issues then it should be
> obvious that things aren't going the right way. At this point you
> should stop, take a 5 minutes break, read the installation guideline
> again, and start from the beginning.
>
>> MW installation from 1.24.1 to 1.28
> @kghbln runs the sandbox [0] on 1.28+ without any issues (including
> `composer update`) therefore we can be fairly certain that what worked
> in 1.25/1.26/1.27 also works for that MW release.
>
> Maybe [1, 2, 3] can be of some help.
>
> [0] https://www.semantic-mediawiki.org/
> [1] https://vimeo.com/82255034 (Install Semantic MediaWiki using Composer)
> [2] https://vimeo.com/127356533 (Update Semantic MediaWiki using Composer)
> [3] https://www.youtube.com/watch?v=zY5ugnyq7ig
>
> Cheers
>
> On 12/6/16, Michael Greis <[hidden email]> wrote:
>> I'm having trouble upgrading my MW installation from 1.24.1 to 1.28.  I
>> get the following error message when I run update.php:
>>
>> Fatal error: Call to undefined function enableSemantics() in
>> /home/michaelgreis/public_html/wiki128/LocalSettings.php on line 246
>>
>> I have SMW 2.1 installed on the working 1.24 wiki.  The enableSemantics
>> line in LocalSettings.php looks like this:
>>
>> enableSemantics( 'michaelgreis.org' );
>>
>> This setting has been working successfully in the running wiki.  The
>> only reference to this error that I can find on the SMW pages
>> <https://www.semantic-mediawiki.org/wiki/Help:Installation/Troubleshooting>
>> applies to pre-composer versions of SMW (MW < 1.21):
>>
>> /Fatal: Call to undefined function enableSemantics() …//
>> //    This kind of message appears for MW = 1.21.x //
>> /
>>
>> Elsewhere, I found a suggestion in a similar case that the SMW directory
>> may not be installed or findable. That's certainly consistent with the
>> error message, but the SMW directory is in /extensions, where it has
>> always been.
>>
>> One other item - I have no idea if this is related, but it was an odd
>> occurence, so I thought it worth mentioning because of the connections
>> among the extensions.   I initially received the following error:
>>
>> /Fatal error: Uncaught exception 'Exception' with message 'You need to
>> have ParserHooks installed in order to use SubPageList' in
>> /home/michaelgreis/public_html/wiki128/extensions/SubPageList/SubPageList.php:28/
>>
>> Stack trace:
>> #0 /home/michaelgreis/public_html/wiki128/LocalSettings.php(230):
>> require_once()
>> #1
>> /home/michaelgreis/public_html/wiki128/maintenance/doMaintenance.php(84):
>> require('/home/michaelgr...')
>> #2 /home/michaelgreis/public_html/wiki128/maintenance/update.php(217):
>> require_once('/home/michaelgr...')
>> #3 {main}
>>     thrown in
>> /home/michaelgreis/public_html/wiki128/extensions/SubPageList/SubPageList.php
>> on line 28
>>
>> When I investigated further, I found a parser-hooks subdirectory in the
>> vendor/mediawiki subdirectory of my current installation, but not the
>> mw128 directory.  I've not previously been aware of the vendor
>> subdirectory, let alone copied it during an upgrade, but I went ahead
>> and copied the parser-hooks subdirectory into the same location in the
>> new "mw128" directory.  That error then disappeared.
>>
>> Any help would be much appreciated.  I can provide additional
>> information as needed.  Thanks!
>>
>>
>>
>> --
>>
>> Michael
>>
>>
>> Michael Greis
>>
>> 781 559-4623 (O)
>> 781 449-8007 (H)
>> ------------------------------------------------------------------------------
>> Developer Access Program for Intel Xeon Phi Processors
>> Access to Intel Xeon Phi processor-based developer platforms.
>> With one year of Intel Parallel Studio XE.
>> Training and support from Colfax.
>> Order your platform today.http://sdm.link/xeonphi
>> _______________________________________________
>> Semediawiki-user mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/semediawiki-user
>>


--

Michael


Michael Greis

781 559-4623 (O)
781 449-8007 (H)
------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/xeonphi
_______________________________________________
Semediawiki-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-user
Reply | Threaded
Open this post in threaded view
|

Re: Problem upgrading MW - enableSemantics - Success!

Tobias Oetterer-2
Hey

Very nice depiction. :) Might help others having similar problems.

A small recommendation from my side: MW needs its own composer packages to run properly. These are maintained in composer.json (in your software root directory) which ships with every install. Now with /composer require mediawiki/semantic-media-wiki "~2.4"/ composer changed this file according to your wishes (.i.e. adding smw to the require section). Now when you upgrade your core again and something changed in its composer.json, you have to do a merge manually. The suggested solution for this problem can be found in the official composer documentation on mediawiki.org [0].

@kghbln: Maybe this should be added to [1]?

Regards,
Tobias Oetterer

[0]: https://www.mediawiki.org/wiki/Composer#Using_composer-merge-plugin
[1]: https://www.semantic-mediawiki.org/wiki/Help:Using_Composer

--
If this email is rather brief, it is not meant to be impolite but to respect your time.
http://five.sentenc.es
No trees were killed to send this message, but a large number of electrons were terribly inconvenienced

University of Paderborn
Zentrum IMT
Warburger Straße 100
33098 Paderborn

Office: N5.338
Phone: 05251/60-2194
Internet: http://imt.uni-paderborn.de
-----Ursprüngliche Nachricht-----
Von: Michael Greis [mailto:[hidden email]]
Gesendet: Mittwoch, 7. Dezember 2016 19:32
An: James HK <[hidden email]>
Cc: [hidden email]
Betreff: Re: [Semediawiki-user] Problem upgrading MW - enableSemantics - Success!

James, John and KG,

Many thanks for your suggestions and help with my problem.  I am so appreciative for the assistance this community has provided and for the amazing responsiveness you've shown.  For my part, I hope that I have asked reasonably informed questions and provided appropriate and relevant information when doing so.  I recognize how important that is when people are offering their time and expertise to be helpful.  I have been on the other side (though certainly not at this level...).

It looks like I now have an updated and working wiki at MW 1.28 and SMW 2.4.3.  I'll share below what I did in case it is helpful to others (or for any advice it may prompt....).

After further efforts, I concluded that continuing the "whack-a-mole"
game was not the best strategy.  Clearly enough had been messed up that recovering the "new" versions I had created was not likely to work, so I went back to the beginning.

- Unzipped the MW 1.28 into a new directory "mwnew"
- Copied the images directory from my working wiki to the "mwnew" directory
- Copied over or installed new versions of the non-composer extensions from my working wiki (CategoryTree, Math, WikiArticleFeeds)
- Did NOT copy  SMW, PageSubList, SemanticForms or Validator (which is apparently no longer needed)
- Made a new copy of the database
- Copied LocalSettings.php from my working wiki to the new "mwnew" directory
     - Updated $wgDBname in LocalSettings.php to point to the new copy of the database
     - Updated $wgScriptPath in LocalSettings.php to point to the "mwnew" directory
     - Commented out all references to the uncopied extensions (e.g. SMW)
- Ran update.php

At that point, the wiki main page opened, with, not surprisingly, the SMW code showing in raw form on the page.

I then:
   - Used composer to install SMW:
composer require mediawiki/semantic-media-wiki "~2.4" --update-no-dev
   - Ran /composer update/ (as prompted)
   - Ran the database refresh script (per the Update section of the Help:Installation <https://www.semantic-mediawiki.org/wiki/Help:Installation/Using_Composer_with_MediaWiki_1.25%2B>
page
php extensions/SemanticMediaWiki/maintenance/SMW_refreshData.php -d 50 -v

   - Fired up the wiki and got the following error on my main page, which has SMW code [WEgymixcHKc9HCgM63RigAAAAAg] 2016-12-07 16:02:34: Fatal exception of type "RuntimeException"

   - Special:Version page confirmed the upgrade (MW 1.28.0, PHP 5.6.28, SMW 2.4.3)

  - Disabled SMW and fired up the main page.  Loaded OK (without SMW sections, of course)

   - Found the Help:Repairing SMW's data <https://www.semantic-mediawiki.org/wiki/Help:Repairing_SMW%27s_data>
page, opened the Special:SMWAdmin page on my updated wiki
Note: It may be helpful to include a link to this page from the Help:Installation page.

      - Ran the /Initialize or upgrade tables /job
      - Started the /updating data**/job
Suggestion: It may be helpful to add to the text at the top of this page a reminder to people upgrading their SMW like:
          "Run the first two jobs in order when upgrading your SMW installation"
                (I know, RTFM, but I went straight to the repair data the first time I tried this.  The update stalled because of a missing
table.  I only realized what had happened because I used |runJobs.php|  
and it displayed an error message about a missing table when it stopped.)

   - Created a simple test page per the Help:Testing <https://www.semantic-mediawiki.org/wiki/Help:Testing> page
       - Page displayed correctly (by which I concluded that SMW is operational, though my existing data was not yet updated)

      - Ran |runJobs.php| --maxjobs 1000 as many times as needed to complete the data update.
           - (Oddly, the progress bar on the SMWAdmin page showed complete even though additional runs of |runJobs.php|
           produced many more jobs.)
          -  The "fatal exception" update still appeared if I looked at pages while the update was underway.  Is that expected?
              If so, I can't imagine doing the update without runJobs.php.

That's it.  Once the data update was complete, I had an updated and working wiki.  (I haven't been able yet to fully check the content an do have some additional extensions to install, but so far, so good.)

Thanks again to all!



Michael


On 12/6/2016 11:19 PM, James HK wrote:

> Hi,
>
>> Fatal error: Call to undefined function enableSemantics() in
>> /home/michaelgreis/public_html/wiki128/LocalSettings.php on line 246
> If you find yourself left with this message then it just means that
> from the two ways of how to install/upgrade SMW, none were applied
> correctly (the error is the result of the autoloader being unable to
> register the file that hosts the `enableSemantics` function and
> ultimately tells us that something did not update, files are missing,
> or not at the expected place).
>
> The first being, `composer update` executed from the base directory to
> find all files and packages necessary for an update and replaces them
> without any manually file juggling or headaches about what fits
> together and what not.
>
> If `composer update` isn't available then the second option is to pick
> a tarball release and follow the installation guideline (but don't mix
> them!).
>
>> subdirectory, let alone copied it during an upgrade, but I went ahead
>> and copied the parser-hooks subdirectory into the same location in
>> the
> CAUTION: If you start copying files from/into the vendor directory
> (you can do that if you know what you are doing but that isn't an
> official recommendation) because of some issues then it should be
> obvious that things aren't going the right way. At this point you
> should stop, take a 5 minutes break, read the installation guideline
> again, and start from the beginning.
>
>> MW installation from 1.24.1 to 1.28
> @kghbln runs the sandbox [0] on 1.28+ without any issues (including
> `composer update`) therefore we can be fairly certain that what worked
> in 1.25/1.26/1.27 also works for that MW release.
>
> Maybe [1, 2, 3] can be of some help.
>
> [0] https://www.semantic-mediawiki.org/
> [1] https://vimeo.com/82255034 (Install Semantic MediaWiki using
> Composer) [2] https://vimeo.com/127356533 (Update Semantic MediaWiki
> using Composer) [3] https://www.youtube.com/watch?v=zY5ugnyq7ig
>
> Cheers
>
> On 12/6/16, Michael Greis <[hidden email]> wrote:
>> I'm having trouble upgrading my MW installation from 1.24.1 to 1.28.  
>> I get the following error message when I run update.php:
>>
>> Fatal error: Call to undefined function enableSemantics() in
>> /home/michaelgreis/public_html/wiki128/LocalSettings.php on line 246
>>
>> I have SMW 2.1 installed on the working 1.24 wiki.  The
>> enableSemantics line in LocalSettings.php looks like this:
>>
>> enableSemantics( 'michaelgreis.org' );
>>
>> This setting has been working successfully in the running wiki.  The
>> only reference to this error that I can find on the SMW pages
>> <https://www.semantic-mediawiki.org/wiki/Help:Installation/Troublesho
>> oting> applies to pre-composer versions of SMW (MW < 1.21):
>>
>> /Fatal: Call to undefined function enableSemantics() …//
>> //    This kind of message appears for MW = 1.21.x //
>> /
>>
>> Elsewhere, I found a suggestion in a similar case that the SMW
>> directory may not be installed or findable. That's certainly
>> consistent with the error message, but the SMW directory is in
>> /extensions, where it has always been.
>>
>> One other item - I have no idea if this is related, but it was an odd
>> occurence, so I thought it worth mentioning because of the connections
>> among the extensions.   I initially received the following error:
>>
>> /Fatal error: Uncaught exception 'Exception' with message 'You need
>> to have ParserHooks installed in order to use SubPageList' in
>> /home/michaelgreis/public_html/wiki128/extensions/SubPageList/SubPage
>> List.php:28/
>>
>> Stack trace:
>> #0 /home/michaelgreis/public_html/wiki128/LocalSettings.php(230):
>> require_once()
>> #1
>> /home/michaelgreis/public_html/wiki128/maintenance/doMaintenance.php(84):
>> require('/home/michaelgr...')
>> #2 /home/michaelgreis/public_html/wiki128/maintenance/update.php(217):
>> require_once('/home/michaelgr...')
>> #3 {main}
>>     thrown in
>> /home/michaelgreis/public_html/wiki128/extensions/SubPageList/SubPage
>> List.php
>> on line 28
>>
>> When I investigated further, I found a parser-hooks subdirectory in
>> the vendor/mediawiki subdirectory of my current installation, but not
>> the
>> mw128 directory.  I've not previously been aware of the vendor
>> subdirectory, let alone copied it during an upgrade, but I went ahead
>> and copied the parser-hooks subdirectory into the same location in
>> the new "mw128" directory.  That error then disappeared.
>>
>> Any help would be much appreciated.  I can provide additional
>> information as needed.  Thanks!
>>
>>
>>
>> --
>>
>> Michael
>>
>>
>> Michael Greis
>>
>> 781 559-4623 (O)
>> 781 449-8007 (H)
>> ---------------------------------------------------------------------
>> --------- Developer Access Program for Intel Xeon Phi Processors
>> Access to Intel Xeon Phi processor-based developer platforms.
>> With one year of Intel Parallel Studio XE.
>> Training and support from Colfax.
>> Order your platform today.http://sdm.link/xeonphi 
>> _______________________________________________
>> Semediawiki-user mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/semediawiki-user
>>


--

Michael


Michael Greis

781 559-4623 (O)
781 449-8007 (H)
------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/xeonphi _______________________________________________
Semediawiki-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-user
------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/xeonphi
_______________________________________________
Semediawiki-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-user
Reply | Threaded
Open this post in threaded view
|

Re: Problem upgrading MW - enableSemantics - Success!

Michael Greis
Tobias,

Thank you for that background; it's helpful for me to better understand
what goes on with Composer.  (As you can likely tell, I am not a
developer, though I feel like I've played one on TV.)  If I understand
it correctly, the intent of the suggested solution is to provide a
similar process to that used by WordPress for themes.  If you create a
child theme in WP, none of your changes are lost when the (parent) theme
is upgraded by the developer. That's a good solution for upgrading MW
and extensions that both use composer.  It's also good programming
practice (and has been for 40+ years... but I digress).

Why, then, isn't that snippet of code included *by default* in the base
MW composer?  After all, that same MW reference [0] also states:

Composer managed dependencies are bundled into tarball distributions of
MediaWiki and extensions so system administrators do not need to use
composer directly.

I gather that, much like the Pirate code, this code is more what you'd
call "guidelines" than actual rules. ☺ (with apologies to those who have
not seen "Pirates of the Caribbean")

Michael

On 12/8/2016 1:15 AM, Tobias Oetterer wrote:

> Hey
>
> Very nice depiction. :) Might help others having similar problems.
>
> A small recommendation from my side: MW needs its own composer packages to run properly. These are maintained in composer.json (in your software root directory) which ships with every install. Now with /composer require mediawiki/semantic-media-wiki "~2.4"/ composer changed this file according to your wishes (.i.e. adding smw to the require section). Now when you upgrade your core again and something changed in its composer.json, you have to do a merge manually. The suggested solution for this problem can be found in the official composer documentation on mediawiki.org [0].
>
> @kghbln: Maybe this should be added to [1]?
>
> Regards,
> Tobias Oetterer
>
> [0]: https://www.mediawiki.org/wiki/Composer#Using_composer-merge-plugin
> [1]: https://www.semantic-mediawiki.org/wiki/Help:Using_Composer
>
> --
> If this email is rather brief, it is not meant to be impolite but to respect your time.
> http://five.sentenc.es
> No trees were killed to send this message, but a large number of electrons were terribly inconvenienced
>
> University of Paderborn
> Zentrum IMT
> Warburger Straße 100
> 33098 Paderborn
>
> Office: N5.338
> Phone: 05251/60-2194
> Internet: http://imt.uni-paderborn.de
> -----Ursprüngliche Nachricht-----
> Von: Michael Greis [mailto:[hidden email]]
> Gesendet: Mittwoch, 7. Dezember 2016 19:32
> An: James HK <[hidden email]>
> Cc: [hidden email]
> Betreff: Re: [Semediawiki-user] Problem upgrading MW - enableSemantics - Success!
>
> James, John and KG,
>
> Many thanks for your suggestions and help with my problem.  I am so appreciative for the assistance this community has provided and for the amazing responsiveness you've shown.  For my part, I hope that I have asked reasonably informed questions and provided appropriate and relevant information when doing so.  I recognize how important that is when people are offering their time and expertise to be helpful.  I have been on the other side (though certainly not at this level...).
>
> It looks like I now have an updated and working wiki at MW 1.28 and SMW 2.4.3.  I'll share below what I did in case it is helpful to others (or for any advice it may prompt....).
>
> After further efforts, I concluded that continuing the "whack-a-mole"
> game was not the best strategy.  Clearly enough had been messed up that recovering the "new" versions I had created was not likely to work, so I went back to the beginning.
>
> - Unzipped the MW 1.28 into a new directory "mwnew"
> - Copied the images directory from my working wiki to the "mwnew" directory
> - Copied over or installed new versions of the non-composer extensions from my working wiki (CategoryTree, Math, WikiArticleFeeds)
> - Did NOT copy  SMW, PageSubList, SemanticForms or Validator (which is apparently no longer needed)
> - Made a new copy of the database
> - Copied LocalSettings.php from my working wiki to the new "mwnew" directory
>       - Updated $wgDBname in LocalSettings.php to point to the new copy of the database
>       - Updated $wgScriptPath in LocalSettings.php to point to the "mwnew" directory
>       - Commented out all references to the uncopied extensions (e.g. SMW)
> - Ran update.php
>
> At that point, the wiki main page opened, with, not surprisingly, the SMW code showing in raw form on the page.
>
> I then:
>     - Used composer to install SMW:
> composer require mediawiki/semantic-media-wiki "~2.4" --update-no-dev
>     - Ran /composer update/ (as prompted)
>     - Ran the database refresh script (per the Update section of the Help:Installation <https://www.semantic-mediawiki.org/wiki/Help:Installation/Using_Composer_with_MediaWiki_1.25%2B>
> page
> php extensions/SemanticMediaWiki/maintenance/SMW_refreshData.php -d 50 -v
>
>     - Fired up the wiki and got the following error on my main page, which has SMW code [WEgymixcHKc9HCgM63RigAAAAAg] 2016-12-07 16:02:34: Fatal exception of type "RuntimeException"
>
>     - Special:Version page confirmed the upgrade (MW 1.28.0, PHP 5.6.28, SMW 2.4.3)
>
>    - Disabled SMW and fired up the main page.  Loaded OK (without SMW sections, of course)
>
>     - Found the Help:Repairing SMW's data <https://www.semantic-mediawiki.org/wiki/Help:Repairing_SMW%27s_data>
> page, opened the Special:SMWAdmin page on my updated wiki
> Note: It may be helpful to include a link to this page from the Help:Installation page.
>
>        - Ran the /Initialize or upgrade tables /job
>        - Started the /updating data**/job
> Suggestion: It may be helpful to add to the text at the top of this page a reminder to people upgrading their SMW like:
>            "Run the first two jobs in order when upgrading your SMW installation"
>                  (I know, RTFM, but I went straight to the repair data the first time I tried this.  The update stalled because of a missing
> table.  I only realized what had happened because I used |runJobs.php|
> and it displayed an error message about a missing table when it stopped.)
>
>     - Created a simple test page per the Help:Testing <https://www.semantic-mediawiki.org/wiki/Help:Testing> page
>         - Page displayed correctly (by which I concluded that SMW is operational, though my existing data was not yet updated)
>
>        - Ran |runJobs.php| --maxjobs 1000 as many times as needed to complete the data update.
>             - (Oddly, the progress bar on the SMWAdmin page showed complete even though additional runs of |runJobs.php|
>             produced many more jobs.)
>            -  The "fatal exception" update still appeared if I looked at pages while the update was underway.  Is that expected?
>                If so, I can't imagine doing the update without runJobs.php.
>
> That's it.  Once the data update was complete, I had an updated and working wiki.  (I haven't been able yet to fully check the content an do have some additional extensions to install, but so far, so good.)
>
> Thanks again to all!
>
>
>
> Michael
>
>
> On 12/6/2016 11:19 PM, James HK wrote:
>> Hi,
>>
>>> Fatal error: Call to undefined function enableSemantics() in
>>> /home/michaelgreis/public_html/wiki128/LocalSettings.php on line 246
>> If you find yourself left with this message then it just means that
>> from the two ways of how to install/upgrade SMW, none were applied
>> correctly (the error is the result of the autoloader being unable to
>> register the file that hosts the `enableSemantics` function and
>> ultimately tells us that something did not update, files are missing,
>> or not at the expected place).
>>
>> The first being, `composer update` executed from the base directory to
>> find all files and packages necessary for an update and replaces them
>> without any manually file juggling or headaches about what fits
>> together and what not.
>>
>> If `composer update` isn't available then the second option is to pick
>> a tarball release and follow the installation guideline (but don't mix
>> them!).
>>
>>> subdirectory, let alone copied it during an upgrade, but I went ahead
>>> and copied the parser-hooks subdirectory into the same location in
>>> the
>> CAUTION: If you start copying files from/into the vendor directory
>> (you can do that if you know what you are doing but that isn't an
>> official recommendation) because of some issues then it should be
>> obvious that things aren't going the right way. At this point you
>> should stop, take a 5 minutes break, read the installation guideline
>> again, and start from the beginning.
>>
>>> MW installation from 1.24.1 to 1.28
>> @kghbln runs the sandbox [0] on 1.28+ without any issues (including
>> `composer update`) therefore we can be fairly certain that what worked
>> in 1.25/1.26/1.27 also works for that MW release.
>>
>> Maybe [1, 2, 3] can be of some help.
>>
>> [0] https://www.semantic-mediawiki.org/
>> [1] https://vimeo.com/82255034 (Install Semantic MediaWiki using
>> Composer) [2] https://vimeo.com/127356533 (Update Semantic MediaWiki
>> using Composer) [3] https://www.youtube.com/watch?v=zY5ugnyq7ig
>>
>> Cheers
>>
>> On 12/6/16, Michael Greis <[hidden email]> wrote:
>>> I'm having trouble upgrading my MW installation from 1.24.1 to 1.28.
>>> I get the following error message when I run update.php:
>>>
>>> Fatal error: Call to undefined function enableSemantics() in
>>> /home/michaelgreis/public_html/wiki128/LocalSettings.php on line 246
>>>
>>> I have SMW 2.1 installed on the working 1.24 wiki.  The
>>> enableSemantics line in LocalSettings.php looks like this:
>>>
>>> enableSemantics( 'michaelgreis.org' );
>>>
>>> This setting has been working successfully in the running wiki.  The
>>> only reference to this error that I can find on the SMW pages
>>> <https://www.semantic-mediawiki.org/wiki/Help:Installation/Troublesho
>>> oting> applies to pre-composer versions of SMW (MW < 1.21):
>>>
>>> /Fatal: Call to undefined function enableSemantics() …//
>>> //    This kind of message appears for MW = 1.21.x //
>>> /
>>>
>>> Elsewhere, I found a suggestion in a similar case that the SMW
>>> directory may not be installed or findable. That's certainly
>>> consistent with the error message, but the SMW directory is in
>>> /extensions, where it has always been.
>>>
>>> One other item - I have no idea if this is related, but it was an odd
>>> occurence, so I thought it worth mentioning because of the connections
>>> among the extensions.   I initially received the following error:
>>>
>>> /Fatal error: Uncaught exception 'Exception' with message 'You need
>>> to have ParserHooks installed in order to use SubPageList' in
>>> /home/michaelgreis/public_html/wiki128/extensions/SubPageList/SubPage
>>> List.php:28/
>>>
>>> Stack trace:
>>> #0 /home/michaelgreis/public_html/wiki128/LocalSettings.php(230):
>>> require_once()
>>> #1
>>> /home/michaelgreis/public_html/wiki128/maintenance/doMaintenance.php(84):
>>> require('/home/michaelgr...')
>>> #2 /home/michaelgreis/public_html/wiki128/maintenance/update.php(217):
>>> require_once('/home/michaelgr...')
>>> #3 {main}
>>>      thrown in
>>> /home/michaelgreis/public_html/wiki128/extensions/SubPageList/SubPage
>>> List.php
>>> on line 28
>>>
>>> When I investigated further, I found a parser-hooks subdirectory in
>>> the vendor/mediawiki subdirectory of my current installation, but not
>>> the
>>> mw128 directory.  I've not previously been aware of the vendor
>>> subdirectory, let alone copied it during an upgrade, but I went ahead
>>> and copied the parser-hooks subdirectory into the same location in
>>> the new "mw128" directory.  That error then disappeared.
>>>
>>> Any help would be much appreciated.  I can provide additional
>>> information as needed.  Thanks!
>>>
>>>
>>>
>>> --
>>>
>>> Michael
>>>
>>>
>>> Michael Greis
>>>
>>> 781 559-4623 (O)
>>> 781 449-8007 (H)
>>> ---------------------------------------------------------------------
>>> --------- Developer Access Program for Intel Xeon Phi Processors
>>> Access to Intel Xeon Phi processor-based developer platforms.
>>> With one year of Intel Parallel Studio XE.
>>> Training and support from Colfax.
>>> Order your platform today.http://sdm.link/xeonphi
>>> _______________________________________________
>>> Semediawiki-user mailing list
>>> [hidden email]
>>> https://lists.sourceforge.net/lists/listinfo/semediawiki-user
>>>
>


--

Michael


Michael Greis

781 559-4623 (O)
781 449-8007 (H)
------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/xeonphi
_______________________________________________
Semediawiki-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-user