Dan Rossiter
Forum Replies Created
-
Forum: Plugins
In reply to: [Document Gallery] Seeking TranslatorsHi villevetela,
Thanks so much for working on a Finnish translation!
Let me look into this and get back to you. I’m working on remodeling my home so I’m swamped with painting and such, but I’ll try to look into this soon.
-Dan
PS: If you’ve found this plugin useful, please take a moment to rate it. Thanks! π
Forum: Plugins
In reply to: [Document Gallery] PDF thumbs not generatingPerfect!
Yeah, the logic that determines whether GS is “correctly detected” is extremely naive. It just looks at whether it has some non-empty string. This is good in the “normal” case where DG successfully finds the executable on its own, but not so great in cases like this.
-Dan
PS: If you’ve found this plugin useful, please take a moment to rate it. Thanks! π
Forum: Plugins
In reply to: [Document Gallery] A couple of questionsRoy,
I’m glad you found an alternative to WP Filebase that will do at least some of what you need.
With the fancy icons, which icon generation methods do you currently have enabled? If you’re predominantly working with PDFs then you definitely want to get Ghostscript setup as that should handle most of your needs. Files being inaccessible based on role will make using Google Drive Viewer as a thumbnail generation method impossible since there isn’t a URL it can use to find the file as a non-authenticated user.
-Dan
PS: If you’ve found this plugin useful, please take a moment to rate it. Thanks! π
Forum: Plugins
In reply to: [Document Gallery] PDF thumbs not generatingA thought… When you manually put the path, did you put what you pasted above “x:\Program Files (x86)\gs\gs9.15\bin” or did you include the exe name in that path “x:\Program Files (x86)\gs\gs9.15\bin\gswin32.exe”? Document Gallery is expecting the full path to the exe, which includes the actual exe name. If that last part is missing then it’s going to be trying to execute a directory, which won’t end well.
Also, replied to the email. It looks like the paste you linked is private.
-Dan
PS: If you’ve found this plugin useful, please take a moment to rate it. Thanks! π
Forum: Plugins
In reply to: [SlimStat Analytics] wp-slimstat/wp-slimstat.php on line 690Running Slimstat 3.7.5 now and the issue reoccurred on a slightly different line number. This time the directory is not missing, but browscap-4.php and browscap-5.php are missing compared to what is in the trunk.
PHP Warning: Invalid argument supplied for foreach() in <WP path>/wp-content/plugins/wp-slimstat/wp-slimstat.php on line 683
Forum: Plugins
In reply to: [Document Gallery] A couple of questionsHi Roy,
Yes, I would suggest against using WP Filebase on a production site. It looks like it’s still in beta meaning that there are going to be a lot of issues still (many of which aren’t going to be difficult to spot).
I would still suggest verifying that DG ordering works after disabling Filebase. If it doesn’t, there’s something else on your system that isn’t playing nice. I understand you’re using Filebase to populate the galleries right now, but you can always manually upload the files to the test page.
-Dan
PS: If you’ve found this plugin useful, please take a moment to rate it. Thanks! π
Forum: Plugins
In reply to: [Document Gallery] A couple of questionsWith the security issue, I have not investigated in detail, but two people have reported having their sites compromised on the support forum for that plugin which makes me very wary. 1 could be unrelated to the plugin, but 2 is a pattern.
With WP Filebase, I’m going to work on setting it up on my local test server to try and re-create the issue. How exactly do you have it setup? I just installed and activated Filebase and that alone has not broken ordering, but maybe it has something to do with what you have it doing specifically…
One thing I do notice off the bat is that Filebase throws a crap ton of warnings. I have my server logging PHP warnings and errors in detail and I’m getting all kinds of issues. One particularly concerning one is this: Notice: Undefined property: WP_Query::$post in /var/www/wp/wp-includes/query.php on line 3946 Notice: Undefined property: WP_Query::$post in /var/www/wp/wp-includes/query.php on line 3946
The fact that the warning is query-related makes me think that whatever Filebase is doing wrong may in some instances result in bad ordering since ordering relies on WP_Query functionality.
PS: If you’ve found this plugin useful, please take a moment to rate it. Thanks! π
Forum: Plugins
In reply to: [Document Gallery] PDF thumbs not generatingInteresting…
So the first thing I would like to test is using Ghostscript on its own. I’d like to isolate what exactly Ghostscript doesn’t like first — outside of PHP. To do that, we need to run the following:
gs -sDEVICE=png16m -dFirstPage=1 -dLastPage=1 -dBATCH -dNOPAUSE -dPDFFitPage -sOutputFile=output.png input.pdf
(replace gs with the path to the gs executable, output.png with where you want the generated thumbnail to go, and input.pdf where the PDF you’re generating a thumbnail from is located)I’m assuming the above will fail. My hope is that it will provide some details as to why it doesn’t like the command. That is exactly what Document Gallery uses.
With the “array” output, I’m not immediately sure why that would be happening. Is this on a page I can access to investigate? If not, can you save that HTML and upload it to somewhere I can grab it (maybe Dropbox or Pastebin)?
-Dan
PS: If you’ve found this plugin useful, please take a moment to rate it. Thanks! π
Forum: Plugins
In reply to: [Document Gallery] A couple of questionsHi Roy,
Thanks for the comprehensive list!
First one word of warning, if you’re using this implementation, it looks like it has a large security vulnerability. I would strongly suggest taking it off any production system until the developer has patched the issue.
Other than that, your LAMP stack looks fine, so my guess would be that one of the plugins is causing ordering problems. Unfortunately, it is an involved test to narrow down where the issue is coming from. To test, we’ll need to do the following:
- Disable all plugins and change to a default theme.
- Test ordering by creating a gallery and setting the orderby parameter to something like “title” (easy to verify at a glance). Assuming this step works, continue to following steps.
- Now start re-enabling all plugins and switch back to your theme, one-by-one, each time re-testing step 2. Once step 2 fails, whichever plugin you most recently re-enabled is the culprit.
With the settings question, you can indeed! If you change the default setting values, the raw ([dg]) shortcode will take all of those defaults.
And integrating PDF.js with DG shouldn’t be too challenging. You could either do it though a straight JS solution or by using the filters to modify the gallery output server-side.
Let me know what the above testing reveals!
-DanPS: If you’ve found this plugin useful, please take a moment to rate it. Thanks! π
Forum: Plugins
In reply to: [Document Gallery] PDF thumbs not generatingHi mcook_au,
Let’s address the second part first as it should be an easy fix. If you have installed GS, Document Gallery will look for it, but sometimes it can’t find it and you have to help it out. To manually give the path to the executable, simply go to
Dashboard -> Settings -> Document Gallery -> Advancedand fill in the Ghostscript path field. It should work following that. Also, if you tell me what the GS path is on your IIS system, I may be able to use that to enhance how DG finds the executable. Also, is the executable located in a default location or did you manually specify a different location?For the first question regarding Google Docs, are you per chance running on a local network? Google Docs relies on having a publicly accessible URL to pass Google. If you’re on a local network the path to the document will only make sense within your network and Google won’t know what to do with it. If that’s not the case, can you enable logging (again at
Dashboard -> Settings -> Document Gallery -> Advanced) then upload a new document to test and navigate to the gallery where you expect the document to be displayed. Following this, go to the Document Gallery logsDashboard -> Settings -> Document Gallery -> Loggingand filter on Warnings and look for anything that mentions Google. If you paste that error here I may have a better idea what you’re running into.-Dan
PS: If you’ve found this plugin useful, please take a moment to rate it. Thanks! π
Forum: Plugins
In reply to: [Document Gallery] A couple of questionsHi Roy,
Firstly, I’m glad many of your needs are met by the plugin!
For the other questions, opening in a new window is not supported within the plugin, but this post describes a work around to get links to open in a new window. Some day this will likely make it into Document Gallery, but I haven’t had the time to implement it the way I think it should be so it hasn’t happened yet.
For the second question, unfortunately there is no quick solution for pagination. I could envision using the filters documented on the Installation page under the Developers header to implement pagination or using JavaScript to modify the DOM after the page renders to hide later documents and add pagination navigation to progressively reveal later documents, but these are not trivial and would require development experience (not sure what your background is and whether this would be feasible for you to implement). At some point pagination may be implemented, but it by no means trivial due to the fact that it is a single part of a page that would need to change while the parts around it remain constant. Definitely will not be implemented within Document Gallery in the short term.
Addressing the ordering, you should be able to modify how documents are ordered by modifying the
orderbyparameter and theorderparameter, as documented on the Installation page. If it doesn’t appear to work as documented, please do give me as much detail as possible so that we can figure out what has gone awry.I hope those explanations help and please do let me know if you would like any further information.
-Dan
PS: If you’ve found this plugin useful, please take a moment to rate it. Thanks! π
Forum: Plugins
In reply to: [Document Gallery] Version 2.2.4 has moved descriptions underneathThanks for reporting this, and sorry about the inconvenience.
It is indeed a bug that was introduced in 2.2.3. I’ve just pushed up 2.2.5 which should resolve the issue.
If either of you encounter any further issues, please do not hesitate to let me know!
-Dan
PS: If you’ve found this plugin useful, please take a moment to rate it. Thanks! π
Forum: Plugins
In reply to: [Document Gallery] Seeking TranslatorsYou rock!
Just tagged version 2.2.4 with your updates.
-Dan
Forum: Plugins
In reply to: [Document Gallery] Seeking TranslatorsHey mepmepmep,
If you’ve got the time, a few additions were made to the POT file prior to officially releasing 2.2 and it would be great to have an up-to-date Swedish translation!
As always, thanks!
-DanForum: Plugins
In reply to: [Document Gallery] Cannot Drag/Drop in Media LibraryHi Randall,
This was the first I heard of the D&D functionality in Media Manager disappearing in 4.0, but I went and checked my test system and I’m seeing the same issue. A good way to test whether DG (or any other plugin) is to blame is to disable the plugin and see if the issue persists. I just did this on my system and it appears to still exist, so it looks like this is part of the WP core changes in 4.0.
I feel like this may be a bug rather than an intended change, but I’ll do some more digging later.
-Dan
PS: If you’ve found this plugin useful, please take a moment to rate it. Thanks! π