Project

General

Profile

Actions

Support #18276

closed

request for custom theme

Added by Marilyn Weber 10 months ago. Updated 9 months ago.

Status:
Resolved
Priority name:
Normal
Assignee:
-
Category name:
-
Target version:
Start date:
2023-05-25
Due date:
% Done:

0%

Estimated time:
Deployment actions:

git submodule init && update

Enable the voicingpoverty theme for the necessary site


Description

Via Zendesk:

Wei-Hao Wang
Yesterday 01:48 am
To:CUNY Academic CommonsShow more
Hi there,

I am a developer working for Cara O’Conner, who is a faculty member at CUNY. We made a Wordpress website a few years ago and it has been hosted on another server. Now, we want to migrate the site to CUNY Commons. I learned that, to upload a custom theme, I have to send the it over and have it checked from your help page: https://help.commons.gc.cuny.edu/themes/. Could you help me with this? Thank you.


Related issues

Related to CUNY Academic Commons - Support #18520: custom fontsResolved2023-07-27

Actions
Actions #1

Updated by Marilyn Weber 10 months ago

Below is my answers to the questions:

- What's the name of the plugin/theme?
It is a theme called "voicingpoverty".

- In a few words, what does it do?
It is a custom theme for the website "Voicing Poverty", which is running as https://voicingpoverty.com/ for now. The theme provides custom structure and style for the website.

- Please provide a link to the plugin on the WordPress theme repository or (https://wordpress.org/themes/) plugin repository (https://wordpress.org/plugins/)
https://github.com/weiwanghasbeenused/voicingpoverty

- Please research the release history and popularity of the plugin. How many times has it been downloaded? When was it last updated?
I was released around July 2021. It has never been downloaded except for by myself. Its last update was May 25, 2023.

- How is the plugin/theme different from what's already provided on the Commons?
It provides custom structure and style for the website based on the design, which none of the current themes can fit.

- Please let us know who you are (include a link to your site) and who will use this tool?
I am a freelance developer/designer working with Cara O'Conner, a faculty member in the Philosophy department at Borough of Manhattan Community College, to build the website for the project "Voicing Poverty" back in 2021. I do not have a portfolio site available right now, but here's the website of the studio where I mainly work: https://o-r-g.com/. The tool will be used only for the website, by the team members.


Please let me know if there are any other materials that you want me to provide. Thank you.

Actions #2

Updated by Boone Gorges 10 months ago

  • Status changed from New to Reporter Feedback

Thanks for passing this along. I've reviewed the theme and it mostly looks good. A few comments and requests for the submitter:

1. Please prefix functions in functions.php. There's a decent chance that some other plugin on the installation has functions with names like get_child_pages() and I would like to avoid the possibility of fatal errors.

2. Regarding the function slug() - it might be worth considering an alternative that's native to WP, like sanitize_title_with_dashes().

3. In get_child_pages(), wp_reset_postdata() is commented-out. If you're going to call WP_Query::get_posts(), then it's a good idea to call wp_reset_postdata() when you're done so that the template globals are reset. Alternatively, replace $children->have_posts() with something like ! empty( $children->posts )

4. The Commons does not support PHP shorttags, like those used in print_child_page_as_block(). So, eg, <?= slug($title); ?> must become <?php echo $title ?>, and ideally for security, <?php echo esc_attr( $title ); ?>

Items 1 and 4 really need to be addressed, 2 and 3 are nice-to-have.

Once we are settled, I will add the repo to the Commons codebase as a Git submodule. That way, if Wei-Hao makes improvements in the future, we can re-pin the submodule to the new changeset.

Actions #3

Updated by Marilyn Weber 10 months ago

Wei-Hao replies:

Thanks for getting back to me and I really appreciate the feedback from the developer. I have updated the repo regarding the suggestions. Again, here's a link to the code: https://github.com/weiwanghasbeenused/voicingpoverty. Please let me know if it looks good!

Actions #4

Updated by Boone Gorges 10 months ago

  • Status changed from Reporter Feedback to Staged for Production Release
  • Target version set to 2.1.8
  • Deployment actions updated (diff)

Thanks to Wei-Hao for the quick response. I've reviewed the changes and they look good to me.

I've added the theme as a submodule in https://github.com/cuny-academic-commons/cac/commit/d7376bad12150a68d780a4bcf574fc5750406637 The theme will be deployed in the next scheduled maintenance release, on June 13.

Could Wei-Hao please share the URL of the Commons site where the theme should be made available?

Future updates to the theme will require me to change the changeset pinned in the submodule. When that happens, Wei-Hao will have to open a new support ticket.

Actions #5

Updated by Boone Gorges 10 months ago

  • Status changed from Staged for Production Release to Testing Required

Sorry for the quick update, but our automated syntax scanner caught a few more instances of shorttags and/or invalid syntax being used:

Syntax error found in 3 files

------------------------------------------------------------
Parse error: ./wp-content/themes/voicingpoverty/functions.php:372
    370|             </div>
    371|         <?php
  > 372|     }
    373| }
Unexpected '}', expecting end of file in ./wp-content/themes/voicingpoverty/functions.php on line 372
------------------------------------------------------------
Parse error: ./wp-content/themes/voicingpoverty/page-templates/page-password.php:748
    746| <?
    747| get_footer();
Unexpected end of file in ./wp-content/themes/voicingpoverty/page-templates/page-password.php on line 748
------------------------------------------------------------
Parse error: ./wp-content/themes/voicingpoverty/page-templates/page-home.php:476
    474| <?
    475|     get_footer();
Unexpected end of file in ./wp-content/themes/voicingpoverty/page-templates/page-home.php on line 476

Could we please get these fixed?

Actions #6

Updated by Marilyn Weber 10 months ago

Boone - Should I pass anything along to Wei-Hao? Or wait until fixes are made for the instances of shorttags and/or invalid syntax being used?

Actions #7

Updated by Boone Gorges 10 months ago

  • Status changed from Testing Required to Reporter Feedback

Please pass the above along to Wei-Hao - I will need them to make the changes, as I don't have write access to the GitHub repo.

Actions #8

Updated by Marilyn Weber 10 months ago

He replies "The files are updated. I am quite sure if I made the right corrections since the website was running without throwing error messages on my local server. Anyway, please let me know if the issues are fixed. Thank you."

Actions #9

Updated by Boone Gorges 10 months ago

I'm not 100% sure what happened in the above. The error messages show that the errors were caused by the use of shorttags: <? instead of <?php. But when I looked at the previous changeset for the theme, it looks like those particular instances of shorttags had already been removed. I guess our continuous integration system pulled in the wrong version of the theme? Anyway, all checks are now passing.

Please ask the theme author to share the URL of the theme in question, so that I can enable the theme there after the deployment next week?

Actions #10

Updated by Marilyn Weber 10 months ago

Apologies - do you mean their commons URL?

Actions #11

Updated by Boone Gorges 10 months ago

Yes, sorry for the bad wording!

Actions #12

Updated by Marilyn Weber 10 months ago

Ha no problem. It's https://voicingpoverty.commons.gc.cuny.edu/. What date should I tell him? Thanks!

Actions #13

Updated by Boone Gorges 10 months ago

  • Status changed from Reporter Feedback to Staged for Production Release

Maintenance releases are on the second and fourth Tuesday of the month. The next one is scheduled for Tuesday, June 13. https://dev.commons.gc.cuny.edu/release-schedule-and-procedures/

Actions #14

Updated by Marilyn Weber 9 months ago

We asks:

Two more questions:
If we made any update to the theme in the future, do we have to go through the same process again? Also, is it possible to import the database (.sql file) from our previous site (voicingpoverty.com) to this new site on Commons?

Actions #15

Updated by Boone Gorges 9 months ago

If we made any update to the theme in the future, do we have to go through the same process again?

Yes. I'll need to review the changes, and then, pending approval, they'll go into the subsequent maintenance release.

Also, is it possible to import the database (.sql file) from our previous site (voicingpoverty.com) to this new site on Commons?

No. The best technique is to migrate using the WP export/import tools. See https://help.commons.gc.cuny.edu/importing-and-exporting-site-content/. We're able to do low-level imports only in unusual circumstances where the regular technique won't work.

Actions #16

Updated by Marilyn Weber 9 months ago

Wei replies "Yes wp importer is way better for this job. Thanks for letting me know!"

I think that's a wrap on this, you can close the ticket

Actions #17

Updated by Boone Gorges 9 months ago

  • Status changed from Staged for Production Release to Resolved

The theme is now activated on the site.

Actions #18

Updated by Raymond Hoh 8 months ago

Actions

Also available in: Atom PDF