Jump to content


These Forums Are Now Read-Only


For TubePress support, please post a question here or open a support ticket and we will be glad to assist.


Photo

Custom Theme Won't Load after Upgrading to 2.2


  • Please log in to reply
9 replies to this topic

#1 Darren Kennedy

Darren Kennedy

    Newbie

  • Members
  • Pip
  • 7 posts

Posted 22 March 2011 - 09:31 PM

Don't know why this is the case. When I upgraded my custom theme folder looks like it got wiped out, but no big deal, I just recreated it. I only had one style in there. Now, the custom style.css file will not load. No idea what's going on. It was working fine prior to upgrading to the latest.

#2 eric

eric

    Lead Developer

  • TubePress Staff
  • 2787 posts

Posted 22 March 2011 - 10:33 PM

Have a link you could share? Putting TubePress into debug mode would also likely provide some insight into what's wrong. Thanks.

#3 Darren Kennedy

Darren Kennedy

    Newbie

  • Members
  • Pip
  • 7 posts

Posted 22 March 2011 - 11:32 PM

Thanks,

I think it is in debug mode. Not sure what that enables exactly.

So, here is the page:
http://www.undercove....com/wp/videos/

Here is the invoke code:
[tubepress theme="ucp1" video="20172760" embeddedHeight="152" embeddedWidth="270"]

Here is the stylesheet I am trying to load:
http://www.undercove...wp.../style.css

It's just a single embed test. video loading fine. What I'm trying to do for starters is override the title style.
I had this working fine before, no idea what I'm doing wrong. Or if it's some weird caching issue or something.

#4 Darren Kennedy

Darren Kennedy

    Newbie

  • Members
  • Pip
  • 7 posts

Posted 23 March 2011 - 12:22 AM

I tried it with another install using 2.1.2 with the same style sheet in this directory:

wp-content/plugins/tubepress/ui/themes/ucp1/style.css

It works as it should. I also noticed that my custom stylesheet isn't showing up in the settings appearance tab dropdown. It is in the 2.1.2 install.

Thanks.

#5 Darren Kennedy

Darren Kennedy

    Newbie

  • Members
  • Pip
  • 7 posts

Posted 23 March 2011 - 02:24 PM

Is this a problem others are encountering? I'd like to use the plugin but really need to use my own theme css. Right now, I'll either have to just create my own css to override the default or continue to use the previous version.

Thanks.

#6 eric

eric

    Lead Developer

  • TubePress Staff
  • 2787 posts

Posted 23 March 2011 - 06:17 PM

This very much looks like a bug. I think the fix could be to add a single line to the very end of sys/classes/org/tubepress/impl/filters/html/ThemeCss.class.php. Change it from this:

$fm->registerFilter(org_tubepress_api_const_filters_ExecutionPoint::GALLERY_HTML, array($instance, 'filter'));
to this

$fm->registerFilter(org_tubepress_api_const_filters_ExecutionPoint::GALLERY_HTML, array($instance, 'filter'));$fm->registerFilter(org_tubepress_api_const_filters_ExecutionPoint::SINGLE_VIDEO_HTML, array($instance, 'filter'));
That will hopefully load your theme's CSS for your single video test.

That said, I'm a little concerned that your theme isn't showing up in the dropdown menu in TubePress settings. Does the directory /home2/petervar/public_html/undercoverpresents/wp/wp-content/plugins/tubepress/content/themes/ucp1 exist?

#7 Darren Kennedy

Darren Kennedy

    Newbie

  • Members
  • Pip
  • 7 posts

Posted 23 March 2011 - 06:42 PM

Thanks,

I added your code and it appears to be working!
I still don't see my theme as an option in the appearance dropdown menu. I haven't tried deactivating and reactivating the plugin. Maybe that would help.

response prior to using your code:
I'm not sure about that directory location. I know that this exists:
http://www.undercove...wp.../style.css
I'm not sure about the directory you asked about but it can also be seen at this url:
http://petervarshavs...pr.../style.css

#8 eric

eric

    Lead Developer

  • TubePress Staff
  • 2787 posts

Posted 25 March 2011 - 05:12 PM

I still don't see my theme as an option in the appearance dropdown menu.


Confirmed this is a bug. I've pushed a fix to github, so you can download the bleeding TubePress package from there and you'll see your user themes in the drop down menu. Thanks for the report.

#9 alex m

alex m

    Newbie

  • Members
  • Pip
  • 8 posts

Posted 25 March 2011 - 06:53 PM

I noticed you changed the variable names in the gallery.tpl.php files. if anyone else problems with the theme casing an error...

org_tubepress_options_category_Meta : is now : org_tubepress_api_const_options_names_Meta
org_tubepress_template_Template : is now : org_tubepress_api_const_template_Variable

#10 eric

eric

    Lead Developer

  • TubePress Staff
  • 2787 posts

Posted 25 March 2011 - 08:05 PM

org_tubepress_options_category_Meta : is now : org_tubepress_api_const_options_names_Meta
org_tubepress_template_Template : is now : org_tubepress_api_const_template_Variable


Contrary to how it must seem, I actually tried to make this change relatively invisible to users and I don't get pleasure out of making your upgrade process a living hell! The org_tubepress_template_Template => org_tubepress_api_const_template_Variable change actually has a spot in the code to make this work, regardless of which you use. The "Meta" name, however, slipped through the cracks. I'm sorry! As you pointed out, it is just a find/replace fix.