Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Processing help files for QGIS algs all dead now #21550

Closed
qgib opened this issue Oct 4, 2015 · 17 comments
Closed

Processing help files for QGIS algs all dead now #21550

qgib opened this issue Oct 4, 2015 · 17 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Processing Relating to QGIS Processing framework or individual Processing algorithms
Milestone

Comments

@qgib
Copy link
Contributor

qgib commented Oct 4, 2015

Author Name: Richard Duivenvoorde (@rduivenvoorde)
Original Redmine Issue: 13506
Affected QGIS version: master
Redmine category:processing/core
Assignee: Victor Olaya


Hi Victor,

as a result of this thread:

https://lists.osgeo.org/pipermail/qgis-community-team/2015-October/004293.html

we removed all old/stale help files from the webserver.
(in short: some time ago we had one helpfile per algorithm, to speed up generation of the docs we create one html file per group of algorithms)

with that it turned out that the help tab of processing were actually poining to the old url's like:

http://docs.qgis.org/testing/en/docs/user_manual/processing_algs/qgis/vector_analysis_tools/sumlinelengths.html#sum-line-lengths

whic are dead now.

These links should be:

http://docs.qgis.org/testing/en/docs/user_manual/processing_algs/qgis/vector_analysis_tools.html#sum-line-lengths

note that the html should be in it.

If not clear, let me know.

@qgib
Copy link
Contributor Author

qgib commented Oct 4, 2015

Author Name: Paolo Cavallini (@pcav)


I see at least gdal and grass here, current master.

@qgib
Copy link
Contributor Author

qgib commented Oct 4, 2015

Author Name: Anita Graser (@anitagraser)


This change should only affect QGIS algs.


  • subject was changed from processing help files all dead now to Processing help files for QGIS algs all dead now

@qgib
Copy link
Contributor Author

qgib commented Oct 4, 2015

Author Name: Richard Duivenvoorde (@rduivenvoorde)


I had a look into this, seems pretty easy to fix this line:

https://github.com/qgis/QGIS/blob/master/python/plugins/processing/core/GeoAlgorithm.py#L141

helpUrl = 'http://docs.qgis.org/{}/en/docs/user_manual/processing_algs/{}/{}/{}.html'.format(qgsVersion, providerName, safeGroupName, safeAlgName)

into

helpUrl = 'http://docs.qgis.org/{}/en/docs/user_manual/processing_algs/{}/{}.html#{}'.format(qgsVersion, providerName, safeGroupName, safeAlgName)

BUT: the safeAlgName is already 'cleaned', so there are no '-' in it anymore, while the anchors in the html file contain '-'

EG: using the line above, you will get the following url:

http://docs.qgis.org/testing/en/docs/user_manual/processing_algs/qgis/vector_general_tools.html#orientedminimumboundingbox

while the anchor in current html files are like:

http://docs.qgis.org/testing/en/docs/user_manual/processing_algs/qgis/vector_general_tools.html#oriented-minimum-bounding-box

so EITHER we have to have a look into the 'cleaning'-up of the url-components
OR we change the helpfiles to have anchors like #orientedminimumboundingbox

@qgib
Copy link
Contributor Author

qgib commented Oct 4, 2015

Author Name: Richard Duivenvoorde (@rduivenvoorde)


Paolo Cavallini wrote:

I see at least gdal and grass hel here, current master.

Hi Paolo,

you say 'hel' you mean 'hell', like it is not working for you?

Because for me grass7 is (with or without my 'patch') still working ok.

GDAL is alway pointing to the same url (ogr2ogr).

I think there was a discussion already about where to point for help to for these external algorithm's isn't it?

@qgib
Copy link
Contributor Author

qgib commented Oct 4, 2015

Author Name: Paolo Cavallini (@pcav)


Typo, now corrected, sorry.

@qgib
Copy link
Contributor Author

qgib commented Oct 5, 2015

Author Name: Jürgen Fischer (@jef-n)


Fixed in changeset "ca697dbaf28905660df0e12fa10ede2396c36867".


  • status_id was changed from Open to Closed

@qgib
Copy link
Contributor Author

qgib commented Oct 10, 2015

Author Name: Anita Graser (@anitagraser)


Does this really work for you? For me, the help dialog loads the correct page but it doesn't jump to the correct heading.

Tested e.g. for Reproject layer, and Fixed distance buffer.


  • status_id was changed from Closed to Reopened

@qgib
Copy link
Contributor Author

qgib commented Oct 10, 2015

Author Name: Richard Duivenvoorde (@rduivenvoorde)


Anita, I had seen that too, following is an email from me to alex and victor, (we are talking about
https://github.com/qgis/QGIS/blob/master/python/plugins/processing/gui/AlgorithmDialogBase.py#L80 here)

Ok, it has something to do with the anchor loading in a non visible
webview tab.

If I add this
self.tabWidget.setCurrentIndex(2)·
above the line:
self.txtHelp.load(algHelp)

Then it just works....
But that means that the dialog always opens with the help, which is not
what we want off course...

So another hack would be to reload(!) the url when a user hits the help
tab. Tried that but that is ugly...

So third hack is to do 'lazy loading' of the help, that is only load the url
when the user hits the help tab.
Below some code which does that. Not sure if people are ok with that,
because that means it takes some seconds to fetch the help after going to the help...

But to me this would be ok

...
        # load algorithm help if available
        isText, algHelp = self.alg.help()
        if algHelp is not None:
            algHelp = algHelp if isText else QUrl(algHelp)
        else:
            algHelp = self.tr('<h2>Sorry, no help is available for this '
                              'algorithm.</h2>')
        try:
            if isText:
                self.txtHelp.setHtml(algHelp)
            else:
		# connect pressing tab to loadHelp func
                self.tabWidget.currentChanged.connect(self.loadHelp)
		# msg to user
                self.txtHelp.setHtml(self.tr('<h2>Getting help...</h2>'))
		# save QUrl for help
                self.algHelp = algHelp
        except:
            self.txtHelp.setHtml(
                self.tr('<h2>Could not open help file  </h2>'))

        self.showDebug = ProcessingConfig.getSetting(
            ProcessingConfig.SHOW_DEBUG_IN_DIALOG)

    def loadHelp(self, i):
	# only when the help tab is activated load the url
        if i == 2:
            self.txtHelp.load(self.algHelp)

</code>

@qgib
Copy link
Contributor Author

qgib commented Oct 16, 2015

Author Name: Victor Olaya (@volaya)


Fixed in changeset "545a90de8ff7fce4a1c42bc84d289934c0502b3a".


  • status_id was changed from Reopened to Closed

@qgib
Copy link
Contributor Author

qgib commented Oct 21, 2015

Author Name: Harrissou Santanna (@DelazJ)


The links in the processing algs help are NOT FOUND. Instead of http://docs.qgis.org/testing/en/docs/user_manual/processing_algs/qgis/vector_analysis_tools.html#sum-line-lengths as stated in Richard's first message, you get the following message :
??The requested URL /testing/en/docs/user_manual/processing_algs/qgis/vector_analysis_tools.html/sum-line-lengths.html was not found on this server.??

Tested on master ea0ce4e


  • status_id was changed from Closed to Reopened

@qgib
Copy link
Contributor Author

qgib commented Oct 22, 2015

Author Name: Victor Olaya (@volaya)


can you provide more detail?

I am not able to reproduce it here

Moreover, the code in the changeset that I added does not modify the URL of the help file or the way the page is loaded, it just adds the scrolling mechanism. It seems to me that the server for some reason was responding with that and changed the URL when displaying the message.

What do you get if you revert to a version before that changeset?

Thanks!


  • status_id was changed from Reopened to Feedback

@qgib
Copy link
Contributor Author

qgib commented Oct 22, 2015

Author Name: Harrissou Santanna (@DelazJ)


Victor Olaya wrote:

can you provide more detail?

I am not able to reproduce it here

I just open any QGIS algorithm in the Processing toolbox and went to its Help tab. Nothing special.

Moreover, the code in the changeset that I added does not modify the URL of the help file or the way the page is loaded, it just adds the scrolling mechanism. It seems to me that the server for some reason was responding with that and changed the URL when displaying the message.

BTW, could the scrolling fix be backported to 2.8?

What do you get if you revert to a version before that changeset?

Thanks!

I've never succeeded building QGIS myself (on Win7 to 10) so I just use osgeo4w but I can't find how I can revert to a nightly build older than yesterday's. Any idea?

@qgib
Copy link
Contributor Author

qgib commented Oct 22, 2015

Author Name: Anita Graser (@anitagraser)


I can't reproduce the issue either (using OSGeo4W nightly). Are you sure you have the latest Processing version? Check the plugin manager. For me it says:

Installed version: 2.10.99 (in C:\\OSGEO4~1\\apps\\qgis-dev\\.\\python\\plugins\\processing)
Available version: 2.10.2 (in Offizielles QGIS-Erweiterungsrepositorium)


@qgib
Copy link
Contributor Author

qgib commented Oct 22, 2015

Author Name: Harrissou Santanna (@DelazJ)


Indeed, Anita, I didn't have the same version. As stated in your quote, the available one is 2.10.2 and this is the one I had installed.
I also remark that your installed version is in C:\OSGEO folder while mine is still in \users\me\.qgis2. So I removed the one in this folder and now each qgis app ships its own processing plugin.
All is ok now (the anchor and the help link).


  • status_id was changed from Feedback to Closed

@qgib
Copy link
Contributor Author

qgib commented Oct 23, 2015

Author Name: Harrissou Santanna (@DelazJ)


The Processing version i had in LTR was 2.6 (if I'm not wrong) so I update it to 2.10.2. New version was saved in \.qgis2 folder, meaning that reopening qgis master (or any other release) fetches the processing version in \.qgis2 and not the one in \osgeo\app folder.
I suppose I just have to copy/paste the 2.10.2 folder in ltr and delete it from \.qgis2 and all will be ok but I'm wondering if there's not an issue with Processing updating.

Since it's a core plugin, shipped in app folder, shouldn't updating be made over the shipped version instead of creating a new folder in \.qgis2?
Am I missing something or should I open a ticket for this (if there isn't)?

@qgib
Copy link
Contributor Author

qgib commented Oct 23, 2015

Author Name: Richard Duivenvoorde (@rduivenvoorde)


@Harrissou fyi: processing is a core plugin, so when you install a version of QGIS the plugin is included in the QGIS-standard plugins folder. But when you update your plugins, and there is a newer version, the plugin is downloaded and put in your PERSONAL plugin folder.

If all is ok, the plugins in your peronsal folder should shadow the ones in the standard(installation) plugin folder, so you should not see/use the 'older' one.

IF there is still something wrong there (2.6 is old, and there have been issues with this in history), and you can give a clear way to describe, please create a new issue for this.

@qgib
Copy link
Contributor Author

qgib commented Oct 27, 2015

Author Name: Harrissou Santanna (@DelazJ)


Richard Duivenvoorde wrote:

@Harrissou fyi: processing is a core plugin, so when you install a version of QGIS the plugin is included in the QGIS-standard plugins folder. But when you update your plugins, and there is a newer version, the plugin is downloaded and put in your PERSONAL plugin folder.

If all is ok, the plugins in your peronsal folder should shadow the ones in the standard(installation) plugin folder, so you should not see/use the 'older' one.

This is what I understood, what I said and what I'm complaining about (it doesn't just shadow older's). see #21716

@qgib qgib added Bug Either a bug report, or a bug fix. Let's hope for the latter! Processing Relating to QGIS Processing framework or individual Processing algorithms labels May 25, 2019
@qgib qgib added this to the Version 2.12 milestone May 25, 2019
@qgib qgib closed this as completed May 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Processing Relating to QGIS Processing framework or individual Processing algorithms
Projects
None yet
Development

No branches or pull requests

1 participant