Thread history
Viewing a history listing
| User | Activity | Comment | |
|---|---|---|---|
| 20:15, August 31, 2011 | Dylan (Talk | contribs) | New reply created | (Reply to map not loading after doEdit(...)) |
| 19:58, August 31, 2011 | Dylan (Talk | contribs) | New reply created | (Reply to map not loading after doEdit(...)) |
| 05:41, August 24, 2011 | Jeroen De Dauw (Talk | contribs) | New reply created | (Reply to map not loading after doEdit(...)) |
| 03:41, August 14, 2011 | Dylan (Talk | contribs) | Comment text edited | |
| 03:39, August 14, 2011 | Dylan (Talk | contribs) | New thread created |
Hi - wondering if anyone has seen this bug or recognizes what might be causing it:
Basically I have a special page that inserts the google map code into an article (even something as simple as "{{#display_point:26.2218386, -104.560546}}" )
However, after I call doEdit on the article and then go to view it, the map just sits with a "Loading map..." message.
If I then edit the article like normal but don't make ANY changes, just save, the map will load as expected.
Very odd...
any ideas? i'm blocked right now...
That's odd. What special page is doing this, and can you link to it? Also, what version of Maps?
My guess is that the resources the map needs (ie a bunch of JavaScript and CSS) are not getting added to the page for some reason.
Hi Jeroen - thanks for the reply.. i've finally been able to come back to this and still can't figure it out.. i'm really hoping you have some idea what's going on.
Essentially I have a Special page that allows users to edit pages without going through the normal Edit page and the possible confusing wikitext.
When the user is saving their edits from my Special page, I do something (simplified here for my example) like :
$text = '{{#display_points:Japan}}'; $article->doEdit($text, ...);
When I then go to look at the page, it just sits on a Loading message for the map
When I look at the actual source of the wikitext through the normal Edit page, it looks exactly as it should:
Then, if I save it without making ANY changes, it displays the map correctly. Looking at the Page History after this save doesn't show any changes so for some reason the map starts to work after I save it through the Edit page without actually making a change to the wikitext.
Very odd problem and frustrating.. do you have any idea what could be going on?
Many thanks, Dylan
Ok here are a couple more clues to this puzzle:
- I noticed that your Parser Function was getting called and in fact your google map javascript had been added after the map_google3_1 div, but it seems to happen right after I called my doEdit in my Special page, not when the page was actually being loaded (I put a die(...) in your Parser Function's render() function and it died right after I did the doEdit, not when the page was being loaded).
- That led me to wonder if Purging the page would fix it, which it DID. Purging the article recalled your render() function correctly and let the map render correctly. Obviously this workaround won't work for real users...
- I will also just mention the only thing helpful from Firebug. When the map does NOT work (i.e. right after it loads after my doEdit function) it does NOT call the mediawiki resource loader. When the map DOES work (i.e. after I resave it from the Edit page), the page DOES call the resource loader (.../load.php?debug=false&lang=en&modules=ext.maps.gm3.geoxml&....etc...)
Hope any of that helps... Dylan


