https://bugzilla.wikimedia.org/show_bug.cgi?id=32760

Daniel Friesen <mediawiki-b...@nadir-seen-fire.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mediawiki-bugs@nadir-seen-f
                   |                            |ire.com

--- Comment #1 from Daniel Friesen <mediawiki-b...@nadir-seen-fire.com> 
2011-12-02 01:36:05 UTC ---
My response to that was:
"""
Sounds like you upgraded MediaWiki by extracting 1.18 on top of 1.17  
instead of extracting 1.18 to a new directory then moving the config and  
other stuff to the new directory. And have an old StartProfiler.php.

includes/ProfilerStub.php was moved to includes/profiler/Profiler.php and  
includes/profiler/ProfilerStub.php in 1.18

Basically what it looks like is happening is that you have a  
includes/ProfilerStub.php file from 1.17 and includes/profiler/ from 1.18.
Because your StartProfiler.php likely uses the old method of a  
require_once (instead of autoloading as I believe we now do) MediaWiki is  
loading the 1.18 profiler code from includes/profiler/Profiler.php and  
then when it require your StartProfiler.php that old require_once is  
requiring the old 1.17 code from includes/ProfilerStub.php causing a fatal  
error as the old code tries to redefine the same method.

If you don't need the profiler I recommend you delete your  
StartProfiler.php. If you do you should probably delete the require_once  
line.
You'd also probably be better off clearing out all the outdated files of  
1.17 code that were left behind since you extracted 1.18 over top of 1.17.  
Though the easiest way to do that is to just re-untar 1.18 in another  
directory, and move your actual LocalSettings, extensions, images/, etc...  
to there.
"""

There are probably a few things we can do:
- Update the updating docs with more instructions on how to update MediaWiki by
creating a new directory, and make strong notes on how extracting MW over MW is
a bad idea.
- Update the profiler docs so it stops using outdated docs that use
require_once lines and properly use the autoloader instead.
- In the next 1.18 release include a includes/ProfilerStub.php that contains
something like `<?php  require_once( "$IP/includes/profiler/ProfilerStub.php"
);`. Though, to be honest we could probably get away with a completely empty
file or just `<?php` with a comment on why the file exists. (This would fix the
issue by overwriting the 1.17 files and providing a no-op file so that the
require_once's don't fail)

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to