fkrauthan / wp-mpdf

Print WordPress posts as PDF. Optional with Geshi highlighting.
56 stars 22 forks source link

Small fixes required to install plugin on large WP installs #27

Closed alexrah closed 9 months ago

alexrah commented 1 year ago
  1. 1d1a76276b3791dd28b8645075645d72faeec7be -> in plugin dashboard the function mpdf_admin_find_users() tries to query all users in wp_users; on installations with thousands of users, this query will cause a memory exhausted error: I limited to users with role = administrator
  2. c6187716e4ac84213250a3806062d8001ca3dfdb -> these additional check will avoid showing errors in PHP > 8
  3. 4cbe66f68cc55693ee9321fe233c4d1171f005a9 -> mpdf_getcachedir() move user data outside the plugin folder, into uploads: this edit allow the plugin to be installed in multi-server config where plugins are not continuously monitored for changes, while uploads folder is normally shared between servers
  4. f4f837334e5cc9057200ff62e3845f151e0a4141 -> align admin dashboard to list cached files from the folder returned by function mpdf_getcachedir()
  5. e44b3854e1709fa70f44d5bc2934f32a1911bab2 -> updated the list of cached files in admin dashboard to link to the files inside wp-content/uploads/wp-mpdf
fkrauthan commented 1 year ago

Hey sorry somehow I missed your merge request. What is the reason for moving the cache directory? My concern is that this update might potentially break existing installations as they have not set the new directory as writeable.

fkrauthan commented 9 months ago

Closing this for now but please feel free to re-open when the above things are addressed