CUNY Graduate Center - Project Tracking System: Issueshttps://redmine.gc.cuny.edu/https://redmine.gc.cuny.edu/favicon.ico2024-03-13T23:27:17ZCUNY Graduate Center - Project Tracking System
Redmine CUNY Academic Commons - Bug #19975 (Resolved): Deleted and spammed sites are still able to create...https://redmine.gc.cuny.edu/issues/199752024-03-13T23:27:17ZRaymond Hoh
<p>When I was looking into <a class="issue tracker-1 status-1 priority-4 priority-default" title="Bug: Expected Group Forum Functionality (New)" href="https://redmine.gc.cuny.edu/issues/19971">#19971</a> to trim down the Cavalvade scheduled tasks, I noticed that deleted sites such as <code>admissions.commons.gc.cuny.edu</code> or sites marked as spam are still able to create and trigger scheduled tasks.</p>
<p>We should prevent scheduled tasks from being created for deleted / spammed sites.</p> CUNY Academic Commons - Bug #19944 (New): Dealing with BuddyPress 12.x upgrade, pt. 2https://redmine.gc.cuny.edu/issues/199442024-03-11T22:29:12ZRaymond Hoh
<p>Follow-up to <a class="issue tracker-2 status-5 priority-4 priority-default closed" title="Feature: Dealing with BuddyPress 12.x upgrade (Resolved)" href="https://redmine.gc.cuny.edu/issues/19493">#19493</a>. Just wanted to make sure my comments in <a class="external" href="https://redmine.gc.cuny.edu/issues/19493#note-10">https://redmine.gc.cuny.edu/issues/19493#note-10</a> are brought forward to a future release:</p>
<blockquote>
<p>For more pronounced changes, I created a new branch -- <a href="https://github.com/cuny-academic-commons/cac/compare/bp12...bp12-part2" class="external">bp12-part2</a> -- that namely switches out all BuddyPress 12 deprecated function calls. We can roll that out in a later maintenance release.</p>
<p>I've been testing <code>bp12-part2</code> with BP Classic <em>deactivated</em> and with <code>BP_IGNORE_DEPRECATED</code> set to <code>true</code> and these are some issues I encountered:</p>
<ul>
<li>BP Event Organiser needs some minor adjustments to account for group subnav registration: <a class="external" href="https://github.com/cuny-academic-commons/bp-event-organiser/compare/1.2.x...bp12#diff-b0397cc71e95a79af968e8dadb7b8e525085f462c5a88ac11c8bdb86ecd7173d">https://github.com/cuny-academic-commons/bp-event-organiser/compare/1.2.x...bp12#diff-b0397cc71e95a79af968e8dadb7b8e525085f462c5a88ac11c8bdb86ecd7173d</a></li>
<li>bbPress does <a href="https://github.com/bbpress/bbPress/blob/4178cbf665674c128c928fabdc0322badacad06b/src/includes/extend/buddypress/groups.php#L140-L157" class="external">some conditional checks</a> that needs to be delayed to the <code>'bp_parse_query'</code> hook. This fixes an issue with the bbPress stylesheet not loading on group forum pages I mentioned above in <a href="https://redmine.gc.cuny.edu/issues/19493#note-4" class="external">comment 4</a> amongst other permission-related cap overrides for the current user.</li>
<li>I need Git permissions to the <code>tapor-client</code> repo so I can push changes and pin a new version for our <code>cac</code> repo.</li>
</ul>
<p>About the bbPress load order issue:</p>
<blockquote>
<p>Furthermore, when running bp-classic, I had to do some additional work to ensure that bbPress's BP compatibility layer is loaded in time, and is loaded only once. Like the approach above, it's pretty hacky (requiring a static variable to prevent double-loading) but it basically works. Here's the full patch: <a class="external" href="https://github.com/openlab-at-city-tech/openlab/commit/27f2a68354550295d85f0f3c5aaafc55004268f0">https://github.com/openlab-at-city-tech/openlab/commit/27f2a68354550295d85f0f3c5aaafc55004268f0</a></p>
</blockquote>
<p>I tackled this a little differently in my bbPress commit. See <a class="external" href="https://github.com/cuny-academic-commons/cac/commit/e2145f2462d3d2cbe2f16de914e7875c48b6e1cc#diff-0f345898d2c7666be77acc95ec88e90e98a407644a4ce5431b3fb96d06749039">https://github.com/cuny-academic-commons/cac/commit/e2145f2462d3d2cbe2f16de914e7875c48b6e1cc#diff-0f345898d2c7666be77acc95ec88e90e98a407644a4ce5431b3fb96d06749039</a> and the constructor and includes() portion of <a class="external" href="https://github.com/cuny-academic-commons/cac/commit/e2145f2462d3d2cbe2f16de914e7875c48b6e1cc#diff-a8d1ad6e40805411d0e557ee641e9d47c6cc3d0f17ef107f22ac729255439a5a">https://github.com/cuny-academic-commons/cac/commit/e2145f2462d3d2cbe2f16de914e7875c48b6e1cc#diff-a8d1ad6e40805411d0e557ee641e9d47c6cc3d0f17ef107f22ac729255439a5a</a> . I think the constructor changes might fix your double load order issue. Can you do some tests and see if this works for you, Boone?</p>
</blockquote>
<p>This doesn't need to go in tomorrow's 2.3.4 release. Let's put this in 2.3.5 or later.</p> CUNY Academic Commons - Bug #19928 (New): Forum Topic by Email Statshttps://redmine.gc.cuny.edu/issues/199282024-03-08T17:41:09ZRaymond Hoh
<p>Matt wanted to know the number of topics created by email vs. total number of topics.</p>
<p>Here are the stats:</p>
<p>2024 - 192/515 (so far)<br />2023 - 964/3260<br />2022 - 1058/3272<br />2021 - 1333/4010<br />2020 - 1284/4225<br />2019 - 801/2604<br />2018 - 405/2868<br />2017 - 104/1540<br />2016 - 116/1430<br />2015 - 65/1414<br />2014 - 12/1305</p> CUNY Academic Commons - Bug #19775 (Resolved): Check member status when using REST API for privat...https://redmine.gc.cuny.edu/issues/197752024-02-19T18:56:44ZRaymond Hoh
<p>We allow sites to alter their site privacy with the "More Privacy Options" plugin.</p>
<p>The MPO plugin currently does member status checks for users on the frontend to determine if a user is able to access a private site, however member status checks are not done when accessing the WP REST API. So it would be possible for someone to access private content if the user was savvy enough with the WP REST API to query for post content, etc.</p>
<p>This was brought up in a CBOX OpenLab support thread: <a class="external" href="https://cboxopenlab.org/groups/the-hub/forum/topic/question-about-the-more-privacy-options-plugin/#post-696">https://cboxopenlab.org/groups/the-hub/forum/topic/question-about-the-more-privacy-options-plugin/#post-696</a></p>
<p>Fix forthcoming.</p> CUNY Academic Commons - Bug #19415 (Resolved): Audit usage of custom en_CAC localehttps://redmine.gc.cuny.edu/issues/194152023-12-15T00:11:56ZRaymond Hoh
<p>In our codebase, we use a custom <code>en_CAC</code> locale to load these strings:<br />1. WordPress - <a class="external" href="https://github.com/cuny-academic-commons/cac/blob/12e3001973274946faa69cd37360a2d7fce35f04/wp-content/plugins/bp-custom.php#L492-L509">https://github.com/cuny-academic-commons/cac/blob/12e3001973274946faa69cd37360a2d7fce35f04/wp-content/plugins/bp-custom.php#L492-L509</a><br />2. BuddyPress - <a class="external" href="https://github.com/cuny-academic-commons/cac/blob/12e3001973274946faa69cd37360a2d7fce35f04/wp-content/plugins/bp-custom.php#L172-L176">https://github.com/cuny-academic-commons/cac/blob/12e3001973274946faa69cd37360a2d7fce35f04/wp-content/plugins/bp-custom.php#L172-L176</a><br />3. BP plugins - <a class="external" href="https://github.com/cuny-academic-commons/cac/blob/12e3001973274946faa69cd37360a2d7fce35f04/wp-content/plugins/bp-custom.php#L1837C4-L1865">https://github.com/cuny-academic-commons/cac/blob/12e3001973274946faa69cd37360a2d7fce35f04/wp-content/plugins/bp-custom.php#L1837C4-L1865</a></p>
<p>For point 1, <code>en_CAC</code> is not a valid locale and can cause issues when using certain javascript libraries like <a href="https://shoelace.style/getting-started/localization" class="external">Shoelace</a> that attempts to load a locale file for <code>CAC</code>. Also, most of the strings in our custom WordPress localization file are no longer being used. I would recommend removing the <code>update_option( 'WPLANG', 'en-CAC' )</code> approach and doing string overrides using the <code>'gettext_default'</code> filter on a page-by-page basis. It looks like the only string we would need to override is the one for <code>/wp-admin/ms-delete-site.php</code>: <a class="external" href="https://github.com/cuny-academic-commons/cac/blob/12e3001973274946faa69cd37360a2d7fce35f04/wp-content/languages/en_CAC.po#L34-L38">https://github.com/cuny-academic-commons/cac/blob/12e3001973274946faa69cd37360a2d7fce35f04/wp-content/languages/en_CAC.po#L34-L38</a> .</p>
<p>Points 2 and 3 are not as important to address, but it looks like we only made a few changes overall: <a class="external" href="https://github.com/cuny-academic-commons/cac/commits/master/wp-content/languages">https://github.com/cuny-academic-commons/cac/commits/master/wp-content/languages</a> . I think we need to audit this list to determine whether most of our string overrides are even necessary nowadays.</p> CUNY Academic Commons - Feature #19278 (Resolved): "Account Settings > Edit Profile" screen and "...https://redmine.gc.cuny.edu/issues/192782023-11-15T22:33:22ZRaymond Hoh
<p>I decided to create a new ticket from <a class="issue tracker-2 status-5 priority-4 priority-default closed child" title="Feature: Account Settings Tab (Resolved)" href="https://redmine.gc.cuny.edu/issues/17769">#17769</a>.</p>
<p>Here are Sara's mockups for the "Account Settings > Edit Profile" screen:</p>
<p><img src="https://redmine.gc.cuny.edu/attachments/download/26231/Screen%20Shot%202023-09-05%20at%2011.27.19%20AM.png" alt="" /></p>
<p><img src="https://redmine.gc.cuny.edu/attachments/download/26841/Screenshot%202023-11-14%20at%2011.58.16%20AM.png" alt="" /></p>
<hr />
<p>There was a bit of talk in the dev chat about keeping the CV data and the Commons Profile header data separate. I'm wondering whether we can just use the CV's data as the main source of data. By that I mean, if a user has filled in their CV's name, pronouns, one-line bio, social links, etc, we will display that same data in the Commons Profile header and we will not show the "Account Settings > Edit Profile" screen at all. I've already got some code for this ready to go. The code uses the <code>parse_blocks()</code> function and thanks to the placeholders in those blocks, it is possible to extract data for specific blocks from the CV.</p>
<p>If a user has not filled in their CV, for the header, we will fall back to the data that the user inputted previously during account signup or for their Public Portfolio. For these users, the "Account Settings > Edit Profile" screen will be available so that data can be edited.</p>
<p>I think this would limit the confusion of having two separate pieces of profile data. On the contrary, would users be surprised to see some of their CV data in their Commons Profile header? What does everyone think?</p> CUNY Academic Commons - System Upgrade #19144 (Resolved): Set 'bp-nelo' as template in developer ...https://redmine.gc.cuny.edu/issues/191442023-10-30T22:37:07ZRaymond Hoh
<p>This is just a message for Boone and Jeremy.</p>
<p>If you are running the latest version of <code>2.2.x</code> branch in your development environment, please make sure to set your <code>'template'</code> option to <code>'bp-nelo'</code>. Can do so with WP-CLI:</p>
<pre>
wp option update template bp-nelo
</pre>
<p>Previously, <code>'bp-nelo'</code> was a child theme of the <code>'bp-default'</code> theme, but in <code>2.2.x</code>, bp-nelo is now its own theme, so the template is now <code>'bp-nelo'</code>. I previously enforced the <code>'template'</code> option to <code>'bp-nelo'</code> with a filter, but that filter is now removed as of <a class="external" href="https://github.com/cuny-academic-commons/cac/commit/2582798911a1e990c07fe7194132438c08b696ee">https://github.com/cuny-academic-commons/cac/commit/2582798911a1e990c07fe7194132438c08b696ee</a> .</p>
<p>So this is a just a FYI.</p> CUNY Academic Commons - Bug #18496 (New): PHP 8+ Compatibilityhttps://redmine.gc.cuny.edu/issues/184962023-07-21T22:45:40ZRaymond Hoh
<p>We're currently running PHP 7.4 in our PHPCS set up and on the GC server, but some of us are using PHP 8+ in our development environments. (For example, <a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Bug: bp-email-type doesn't properly deal with 'to' arrays (Resolved)" href="https://redmine.gc.cuny.edu/issues/16948">#16948</a>.)</p>
<p>This will be a catch-all ticket to address deprecated notices, fatal errors and the like.</p>
<p>Also, just to note that PHP 7.4 reached end-of-life back in November 2022. Upgrading to PHP 8.2 is probably good to think about when we decide to move hosts. PHP 8.2 is supported until December 2025, while PHP 8.0 will reach end-of-life in November 2023.</p> CUNY Academic Commons - Bug #17712 (New): Event Directory issueshttps://redmine.gc.cuny.edu/issues/177122023-02-22T22:05:04ZRaymond Hoh
<p>Just salvaging a few things brought up by Laurie and Colin in a recently-deleted ticket.</p>
<hr />
<p>Laurie wrote:</p>
<blockquote>
<p>I created a text event in a private group but my "all upcoming" events tab reads zero "0" , see screenshot. Shouldn't the # counts described the following:</p>
<p>"all upcoming" = # of public + events you created in private groups on the commons</p>
<p>"My upcoming" = # of events in private and public groups you are a part of, and events you created</p>
</blockquote>
<hr />
<p>Confirmed about the "All Upcoming" count not including private events that the user authored. Will look into this.</p>
<hr />
<p>Colin wrote:</p>
<blockquote>
<p>Speaking of... there are no upcoming or visible events on the /events/ page, so anything we can do to encourage more event creation (including publishing more ourselves) would help to make that top level page more vibrant.</p>
</blockquote>
<hr />
<p>Maybe we can add a message when there are no upcoming events.</p>
<p>For logged-in users:</p>
<blockquote>
<p>There are no upcoming events. Feel free to [add your upcoming event to the calendar](LINK). You can also view prior events [here](LINK TO PREVIOUS MONTH'S EVENTS).</p>
</blockquote>
<p>For logged-out users:</p>
<blockquote>
<p>There are no public, upcoming events. You can view prior events [here](LINK TO PREVIOUS MONTH's EVENTS).</p>
</blockquote> CUNY Academic Commons - Bug #17587 (New): Recurring event issueshttps://redmine.gc.cuny.edu/issues/175872023-01-31T07:16:53ZRaymond Hoh
<p>I came across a few bugs while testing events:</p>
<ul>
<li>Dates for recurring events are not displayed correctly in list view. The first event date is shown instead of the actual recurring event's date.</li>
<li>Recurring date info is missing on single event pages. For a point of reference, a recurring event page looks like this in Event Organiser: <a class="external" href="http://demo.wp-event-organiser.com/events/event/fortnightly-event/">http://demo.wp-event-organiser.com/events/event/fortnightly-event/</a>. Do we want to port over the <code>"This event is running from X until Y. It is next occurring on Z"</code> line or the "Upcoming Dates" section? (Also, venue map is missing on our single event page as well.)</li>
</ul>
<p>Will add a fix for the former, but could use some feedback on the latter.</p> CUNY Academic Commons - Bug #15408 (Resolved): Pagination broken on Sites Directoryhttps://redmine.gc.cuny.edu/issues/154082022-02-22T17:40:54ZRaymond Hoh
<p>See <a class="external" href="https://buddypress.trac.wordpress.org/ticket/8633">https://buddypress.trac.wordpress.org/ticket/8633</a>.</p>
<p>During the refactoring of BP_Blogs_Blog::get() to use an array as a function argument, this broke pagination due to the parameters not being the same.</p>
<p>I'll add the patch as a hotfix.</p> CUNY Academic Commons - Bug #13966 (Resolved): Replying by email to a trashed or spammed forum to...https://redmine.gc.cuny.edu/issues/139662021-02-09T19:05:35ZRaymond Hoh
<p>So on the dev call, I thought that there was a timeout issue when parsing the RBE inbox check.</p>
<p>Turns out the problem was simpler than that! A user was replying to a trashed forum topic and that caused a fatal error due to the way RBE handles replies when a forum topic was trashed or marked as spammed.</p>
<p>Full details here: <a class="external" href="https://github.com/r-a-y/bp-reply-by-email/issues/125">https://github.com/r-a-y/bp-reply-by-email/issues/125</a></p>
<p>I initially copied the reply logic from bbPress and they also recently addressed the issue in bbPress 2.6.5: <a class="external" href="https://bbpress.trac.wordpress.org/ticket/3409">https://bbpress.trac.wordpress.org/ticket/3409</a></p> CUNY Academic Commons - Bug #7825 (Rejected): WP Cron fails to spawn on productionhttps://redmine.gc.cuny.edu/issues/78252017-03-22T17:31:27ZRaymond Hoh
<p>I was checking to see if a scheduled task that I added to WP cron was there or not and it appears that WP cron doesn't appear to be working.</p>
<p>I used the following wp-cli command to see if WP cron was functioning correctly:<br /><code>wp cron test</code></p>
<p>And that throws back the following error:</p>
<p><code>Error: WP-Cron spawn failed with error: cURL error 28: Operation timed out after 3001 milliseconds with 0 out<br />of -1 bytes received</code></p>
<p>I then checked the cron schedule with:</p>
<p><code>wp cron event list</code></p>
<p>And there are a bunch of older cron events dating as far back as March 7th that haven't run. This might be the cause of other issues such as #7346. Also, I'm guessing that no one has received a daily digest since March 7th.</p>
<p>I did some brief research to see what might be causing the problem and a Github user notes that <code>commons.gc.cuny.edu</code> might not be in the HOSTS file during the cURL lookup:<br /><a class="external" href="https://github.com/Automattic/vip-quickstart/issues/421#issuecomment-91355870">https://github.com/Automattic/vip-quickstart/issues/421#issuecomment-91355870</a></p>
<p>We'd have to confirm with Lihua if that is the case or not.</p>
<p>I also just tested WP cron on the development server and it appears to be working there though.</p> CUNY Academic Commons - Bug #5313 (Resolved): Migrate over to BuddyPress 2.5 Emailshttps://redmine.gc.cuny.edu/issues/53132016-03-10T15:08:48ZRaymond Hoh
<p>Since we're scheduled to roll BuddyPress 2.5 onto the Commons on the 21st, we need to decide whether we want to keep using our existing email system (a hodgepodge of various email plugins - WP Better Emails, WP Better Emails for BuddyPress, BP Group Email Subscription, etc.) or migrate over to BuddyPress 2.5's email system.</p>
<p>For the 1.9.x milestone, we should probably just continue to use what we currently have.</p>
<p>Sometime down the road (probably the 2.0 milestone), we should migrate over to BP's email system.</p>
<p>Migrating over to BuddyPress 2.5 presents a few things that we'll need to address.</p>
<p>Here are the notables (these notes are mostly for Boone to glean over.):</p>
<ul>
<li>Making modifications to BP Group Email Subscription (GES) to support BP 2.5's email system. (I recently did something similar for the Genchem platform, so I'm a little familiar with this.). Should we also use BP's email system for GES digests?</li>
<li>Making modifications to Reply By Email to support BP 2.5's email system. (Work is pretty much completed here.)</li>
<li>Ensuring that HTML content in emails shows up (blockquotes, bold, italics, links, etc). I'm mostly only concerned with group forum emails here. If time permits, I'll also work on activity updates and private messages (these will require BP core changes).</li>
<li>Ensuring that HTML content in plain-text emails degrades well for accessibility reasons (converting over links, text emphasis, etc.)</li>
<li>Ensuring that the HTML email option under a user's "Settings > Email" page is respected. (This is a feature of the WP Better Emails for BuddyPress plugin.) Will need to do some research here.</li>
<li>Deactivate and remove WP Better Emails for BuddyPress.</li>
<li>Deactivate WP Better Emails.</li>
<li>Investigate what needs to be done with our custom "WP Better Emails for BP Groupblog" plugin (<a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Bug: new_groupblog_post emails not being sent as HTML (Resolved)" href="https://redmine.gc.cuny.edu/issues/3219">#3219</a>). (This might not be required after modifications to GES are made.)</li>
<li>Make a decision as to whether we should use BP's default email template or use the same template we use with WP Better Emails. If we use the default BP template, we should remove the "unsubscribe" link located in the email footer.</li>
</ul>
<p>I'm probably forgetting some things, but these are the main items.</p>
<p>Placing this in the 2.0 milestone for now.</p> CUNY Academic Commons - Bug #3546 (Resolved): My Commons - New user sees all site activity for "E...https://redmine.gc.cuny.edu/issues/35462014-10-10T18:29:55ZRaymond Hoh
<p>When a new user joins the site, this user has not joined any groups, followed any sites or created any friendships.</p>
<p>Currently, on the "My Commons" page, this user sees the "Everything" and "My Sites" tabs. If the user clicks on one of these tabs, they see all site activity instead of nothing.</p>
<p>I'm going to fix this so no activity is shown and will override the default empty message to state something like:</p>
<p>"It looks like you're new here. To see some activity here, join a group (link to groups directory) , add a friend (link to members directory) or follow a site (link to sites directory)."</p>
<p>Let me know what you think.</p>