publiclab / plots2

a collaborative knowledge-exchange platform in Rails; we welcome first-time contributors! :balloon:
https://publiclab.org
GNU General Public License v3.0
957 stars 1.83k forks source link

inline edit not publishing #1501

Open steviepubliclab opened 7 years ago

steviepubliclab commented 7 years ago

What happened just before the problem occurred

Gilbert and I were attempting to edit this wiki page with the new inline editor: https://publiclab.org/wiki/aerial-imagery-in-the-public-domain. We were looking to add the section on remote sensing below the Landsat Imagery section.

We clicked the green edit button and scrolled down to the Remote Sensing section, clicked the edit button, added this info below it with a link to the new Remote Sensing wiki page(https://publiclab.org/wiki/remote-sensing):

(3hashes) Remote Sensing Data Availability (link) (i.e. AmericaView, European Space Agency, UN Disaster Charter, USGS)

We clicked save and we got a scrolling bar next to the button, but the text never saved.

We went back and used the old edit feature to change the page.

PublicLab.org username - Gilbert

Browser, version, and operating system

Chrome, MacOS Sierra version 10.12.5

jywarren commented 7 years ago

Great, thank you very much!

I reproduced this and found the JavaScript console error:

Uncaught TypeError: Cannot read property 'html' of undefined
    at Object.e.exports [as onComplete] (application-668d6f7….js:105)
    at Object.<anonymous> (application-668d6f7….js:105)
    at fire (PublicLab.Editor.js:11313)
    at Object.fireWith [as resolveWith] (PublicLab.Editor.js:11443)
    at done (PublicLab.Editor.js:16883)
    at XMLHttpRequest.<anonymous> (PublicLab.Editor.js:17249)
e.exports @ application-668d6f7….js:105
(anonymous) @ application-668d6f7….js:105
fire @ PublicLab.Editor.js:11313
fireWith @ PublicLab.Editor.js:11443
done @ PublicLab.Editor.js:16883
(anonymous) @ PublicLab.Editor.js:17249

This occured on editing anything below the line Please add to this list! -- and there are some odd ### header issues there, so I wonder if that's related.

jywarren commented 7 years ago

The first subsection that does not seem editable is:

###[The National Map](http://nationalmap.gov/viewer.html)
**Program**
Managed by the USGS National Geospatial Program (NGP) and "Allows visualization and download of our most current topographic base map data and products for free." The site includes easy download directions. 

I changed that to:

### The National Map

**Link:** http://nationalmap.gov/viewer.html

**Program** Managed by the USGS National Geospatial Program (NGP) and "Allows visualization and download of our most current topographic base map data and products for free." The site includes easy download directions. 

and it still didn't work below that line.

OK, i see two errors. One is that the error message itself isn't being displayed. The second is that the replacement isn't happening properly. Looking into this.

jywarren commented 7 years ago

It should be matching:

###[USGS National Aerial Photography Program](https://lta.cr.usgs.gov/NAPP)
**Program:** This "was coordinated by the USGS as an interagency project to acquire cloud-free aerial photographs at an altitude of 20,000 feet above mean terrain elevation. The photographs were taken with a 6-inch focal length lens at a scale of 1:40,000. Coverage over the conterminous United States includes both black-and-white (BW) and color infrared (CIR) aerial photographs."

with

###[USGS National Aerial Photography Program](https://lta.cr.usgs.gov/NAPP)
**Program:** This "was coordinated by the USGS as an interagency project to acquire cloud-free aerial photographs at an altitude of 20,000 feet above mean terrain elevation. The photographs were taken with a 6-inch focal length lens at a scale of 1:40,000. Coverage over the conterminous United States includes both black-and-white (BW) and color infrared (CIR) aerial photographs."

But isn't. Looking at https://github.com/publiclab/plots2/blob/master/app/controllers/wiki_controller.rb#L327-L343

jywarren commented 7 years ago

Ahhh, so this is the actual request:

before=%0A%23%23%23%5BUSGS+National+Aerial+Photography+Program%5D(https%3A%2F%2Flta.cr.usgs.gov%2FNAPP)%0A**Program%3A**+This+%22was+coordinated+by+the+USGS+as+an+interagency+project+to+acquire+cloud-free+aerial+photographs+at+an+altitude+of+20%2C000+feet+above+mean+terrain+elevation.+The+photographs+were+taken+with+a+6-inch+focal+length+lens+at+a+scale+of+1%3A40%2C000.+Coverage+over+the+conterminous+United+States+includes+both+black-and-white+(BW)+and+color+infrared+(CIR)+aerial+photographs.%22&after=%23%23%23+USGS+National+Aerial+Photography+Program%0A%0ALink%3A+https%3A%2F%2Flta.cr.usgs.gov%2FNAPP%0A%0A**Program%3A**+This+%22was+coordinated+by+the+USGS+as+an+interagency+project+to+acquire+cloud-free+aerial+photographs+at+an+altitude+of+20%2C000+feet+above+mean+terrain+elevation.+The+photographs+were+taken+with+a+6-inch+focal+length+lens+at+a+scale+of+1%3A40%2C000.+Coverage+over+the+conterminous+United+States+includes+both+black-and-white+(BW)+and+color+infrared+(CIR)+aerial+photographs.%22Name
jywarren commented 7 years ago

Here it is -- the before/after are being URL encoded differently: https://gist.github.com/jywarren/b10ec26bf6f491d26204f0812be6450e/revisions

screenshot 2017-07-06 at 8 04 17 pm

jywarren commented 7 years ago

Chipping away at this, Stevie - thanks for your patience!

steviepubliclab commented 7 years ago

No worries! Thanks for working on it. -Stevie

On Mon, Jul 10, 2017 at 5:25 PM, Jeffrey Warren notifications@github.com wrote:

Chipping away at this, Stevie - thanks for your patience!

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/publiclab/plots2/issues/1501#issuecomment-314267442, or mute the thread https://github.com/notifications/unsubscribe-auth/AHJLrohKwRERn9N7rXWdI_Ivqfpv9xo4ks5sMqTSgaJpZM4OOlV4 .

jywarren commented 7 years ago

Hi, Stevie, can you try it out at:

http://staging.laboratoriopublico.org/wiki/aerial-imagery-in-the-public-domain?raw=true

for several different sections? This ended up being multiple bugs intertangled, so I think we've solved some but not all, so feedback on specifically which sections work or don't would be helpful. Thanks!

steviepubliclab commented 7 years ago

Hi Jeff, Can we do this on the sandbox instead of a page we use? -Stevie

On Wed, Jul 12, 2017 at 11:18 AM, Jeffrey Warren notifications@github.com wrote:

Reopened #1501 https://github.com/publiclab/plots2/issues/1501.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/publiclab/plots2/issues/1501#event-1161049423, or mute the thread https://github.com/notifications/unsubscribe-auth/AHJLrglqoliCRgH-RZnwcvGEhAj9jFcGks5sNPHGgaJpZM4OOlV4 .

jywarren commented 7 years ago

This link is to a shadow site called "staging" so it won't affect the main site! no worries :-)

On Wed, Jul 12, 2017 at 2:35 PM, steviepubliclab notifications@github.com wrote:

Hi Jeff, Can we do this on the sandbox instead of a page we use? -Stevie

On Wed, Jul 12, 2017 at 11:18 AM, Jeffrey Warren <notifications@github.com

wrote:

Reopened #1501 https://github.com/publiclab/plots2/issues/1501.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/publiclab/plots2/issues/1501#event-1161049423, or mute the thread https://github.com/notifications/unsubscribe-auth/AHJLrglqoliCRgH- RZnwcvGEhAj9jFcGks5sNPHGgaJpZM4OOlV4 .

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/publiclab/plots2/issues/1501#issuecomment-314858509, or mute the thread https://github.com/notifications/unsubscribe-auth/AABfJ5-NRGBvPIH45lrnODTIsoLEvMGoks5sNRIIgaJpZM4OOlV4 .

steviepubliclab commented 7 years ago

Hi Jeff, Thanks for clarifying. RIght now I can't get the inline editor button to work at all. When I click it the page reloads, but it doesn't show any inline editing options.

Best, Stevie

On Wed, Jul 12, 2017 at 2:14 PM, Jeffrey Warren notifications@github.com wrote:

This link is to a shadow site called "staging" so it won't affect the main site! no worries :-)

On Wed, Jul 12, 2017 at 2:35 PM, steviepubliclab <notifications@github.com

wrote:

Hi Jeff, Can we do this on the sandbox instead of a page we use? -Stevie

On Wed, Jul 12, 2017 at 11:18 AM, Jeffrey Warren < notifications@github.com

wrote:

Reopened #1501 https://github.com/publiclab/plots2/issues/1501.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/publiclab/plots2/issues/1501#event-1161049423, or mute the thread https://github.com/notifications/unsubscribe-auth/AHJLrglqoliCRgH- RZnwcvGEhAj9jFcGks5sNPHGgaJpZM4OOlV4 .

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub <https://github.com/publiclab/plots2/issues/1501#issuecomment-314858509 , or mute the thread https://github.com/notifications/unsubscribe-auth/AABfJ5- NRGBvPIH45lrnODTIsoLEvMGoks5sNRIIgaJpZM4OOlV4

.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/publiclab/plots2/issues/1501#issuecomment-314868997, or mute the thread https://github.com/notifications/unsubscribe-auth/AHJLrj8zRl28X9HWnlsAtF-9hSjUUDShks5sNRsjgaJpZM4OOlV4 .

jywarren commented 7 years ago

Hi, Stevie, are you sure? Which button did you press? I just tried a couple on staging and they worked:

screenshot_20170713-095251

steviepubliclab commented 7 years ago

I clicked the green pencil 4 times. Haven't seen a pencil to edit after any of the paragraphs:

[image: Inline image 2]

On Thu, Jul 13, 2017 at 8:55 AM, Jeffrey Warren notifications@github.com wrote:

Hi, Stevie, are you sure? Which button did you press? I just tried a couple on staging and they worked:

[image: screenshot_20170713-095251] https://user-images.githubusercontent.com/24359/28169780-5e51f76a-67b1-11e7-875e-1af96b57b722.png

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/publiclab/plots2/issues/1501#issuecomment-315084974, or mute the thread https://github.com/notifications/unsubscribe-auth/AHJLrj_8_iqqngHtpNDZtZj3MlIty8kXks5sNiHKgaJpZM4OOlV4 .

jywarren commented 7 years ago

Hmm your image didn't attach... You went to this page?

http://staging.laboratoriopublico.org/wiki/aerial-imagery-in-the-public-domain?raw=true

It should already be running the inline edito, no green pencil needed . You do need to hover your mouse over a paragraph to show the inline editor buttons.

Do you see the yellow alert box saying "this is the beta inline..."?

jywarren commented 7 years ago

Hi, Stevie - I think we have a fix for this now:

https://publiclab.org/wiki/aerial-imagery-in-the-public-domain?raw=true

Can you give it a try and reopen if you still see issues? Thanks!

steviepubliclab commented 7 years ago

Hi, I got it to work the first time, and added the word "testing" after " Structures, while maps include: US Topo and Historical Topo." Link to viewer here." which worked, but then when I refreshed the page and went to edit it back it wouldn't let me do the inline editing and I got this:

[image: Inline image 1]

-Stevie

On Sat, Aug 12, 2017 at 8:42 AM, Jeffrey Warren notifications@github.com wrote:

Closed #1501 https://github.com/publiclab/plots2/issues/1501.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/publiclab/plots2/issues/1501#event-1203613927, or mute the thread https://github.com/notifications/unsubscribe-auth/AHJLrgGMEv30ncDG47ucRuDSYU6B29CYks5sXau1gaJpZM4OOlV4 .

jywarren commented 7 years ago

Hi, Stevie - I went back to the page at https://publiclab.org/wiki/aerial-imagery-in-the-public-domain?raw=true and was able to edit the section you mentioned, removing the word "testing" but then upon saving, i saw an error:

screenshot 2017-08-25 at 6 32 42 pm

Reopening this, although we're much closer than we were!

jywarren commented 7 years ago

Is that the error you saw too? Your image didn't attach -- actually you can't attach images by email, that might be the problem you've been having.

steviepubliclab commented 7 years ago

Hi Jeff, This was the image I was trying to attach before. I didn't realize these don't transfer from email. screen shot 2017-08-14 at 8 29 40 am