Coder Social home page Coder Social logo

Comments (8)

intoeetive avatar intoeetive commented on June 6, 2024 1

thank you!

from expressionengine.

intoeetive avatar intoeetive commented on June 6, 2024

@shbchk are you able to narrow it down to specific template code? And maybe also specific layout variables?

from expressionengine.

shbchk avatar shbchk commented on June 6, 2024

Not sure which part is responsible, so I just spill it all out (it's ugly, I know!):

{layout="_layout/_main-layout"}

{!-- [START] CHECKING IF SEGMENT_3 IS SHORT OR FEATURE --}
{if segment_3 == "short" OR segment_3 == "feature"}
	{!-- [START] SHORT FILMS --}
	{if segment_3 == "short"}
		{layout:set name="custom_title"}Short Films - Vurchel{/layout:set}
		{layout:set name="og_title"}Short Films - Vurchel{/layout:set}
		{if segment_5 == "all"}
			{exp:channel:entries channel="films" status="open" search:film_duration="<=40" limit="48" dynamic="no" disable="member_data|category_fields" cache='yes' refresh='360'}
		{if:else}
			{exp:channel:entries channel="films" status="open" search:film_duration="<=40" limit="48" search:film_full="not IS_EMPTY" dynamic="no" disable="member_data|category_fields" cache='yes' refresh='360'}
				{if no_results}
					{redirect="search/genre/{segment_3}/{segment_4}/all/noresults"}
				{/if}
		{/if}
	{!-- [END] SHORT FILMS --}
	{!-- [START] FEATURE FILMS --}
	{if:elseif segment_3 == "feature"}
		{layout:set name="custom_title"}Feature Films - Vurchel{/layout:set}
		{layout:set name="og_title"}Feature Films - Vurchel{/layout:set}
		{if segment_5 == "all"}
			{exp:channel:entries channel="films" status="open" search:film_duration=">40" limit="48" dynamic="no" disable="member_data|category_fields" cache='yes' refresh='360'}
		{if:else}
			{exp:channel:entries channel="films" status="open" search:film_duration=">40" limit="48" search:film_full="not IS_EMPTY" dynamic="no" disable="member_data|category_fields" cache='yes' refresh='360'}
				{if no_results}
					{redirect="search/genre/{segment_3}/{segment_4}/all/noresults"}
				{/if}
		{/if}
	{/if}
	{!-- [END] FEATURE FILMS --}

{!-- [START] CHECKING SEGMENT_3 IS EMPTY --}
{if:elseif segment_3 == ""}
{redirect="404"}

{!-- [START] SEGMENT_3 IS A CATEGORY --}
{if:else}
	{if segment_5 == "all"}
		{exp:channel:entries channel="films" status="open" category="{segment_3}" limit="48" dynamic="no" disable="member_data|category_fields" cache='yes' refresh='360'}
	{if:else}
		{exp:channel:entries channel="films" status="open" category="{segment_3}" limit="48" search:film_full="not IS_EMPTY" dynamic="no" disable="member_data|category_fields" cache='yes' refresh='360'}
			{if no_results}
				{redirect="search/genre/{segment_3}/{segment_4}/all/noresults"}
			{/if}
	{/if}
{!-- [END] SEGMENT_3 IS A CATEGORY --}
{/if}



{if count == 1}
<section class="container">
	<div class="genre-heading">
		{if segment_3 == "short"}
		<div class="film-tag film-tag--heading film-tag--short">Shorts</div>
		{if:elseif segment_3 == "feature"}
		<div class="film-tag film-tag--heading film-tag--feature">Feature Films</div>
		{if:else}
			{categories show="{segment_3}"}{layout:set name="custom_title"}{category_name} - Vurchel{/layout:set}{layout:set name="og_title"}{category_name} - Vurchel{/layout:set}<div class="film-tag film-tag--heading film-tag--{category_url_title}">{category_name}</div>{/categories}
		{/if}
	</div>

	{if segment_6 != 'noresults'}
		<div class="online-all-selectors">
			<a class="online-all-selector{if segment_5 == ''} online-all-selector--active{/if}" href="{site_url}search/genre/{segment_3}/{segment_4}">Online films</a>
			<a class="online-all-selector{if segment_5 == 'all'} online-all-selector--active{/if}" href="{site_url}search/genre/{segment_3}/{segment_4}/all">All films</a>
		</div>
	{/if}
  
	<div class="films">
{/if}

{film__card_part}


{if count == total_results}
	</div>

  
	{paginate}
    <div class="container pagination-block">
			{if previous_page}
			<a href="{auto_path}" class="pagination-block__link pagination-block__link--prev">Previous page</a>
			{/if}
			{if next_page}
			<a href="{auto_path}" class="pagination-block__link">Next page</a>
			{/if}
		</div>
	{/paginate}
  
</section>
{/if}

{/exp:channel:entries}

from expressionengine.

shbchk avatar shbchk commented on June 6, 2024

And the part of layout, where those variables are used:

  <head>

    <title>{if layout:custom_title}{layout:custom_title}{if:else}{slogan_var}{/if}</title>

    {if layout:meta_description}
    <meta name="description" content="{layout:meta_description}" />
    {if:else}
    <meta name="description" content="{website_description_var}" />
    {/if} 
    
    {if segment_1 == "v" AND segment_2 != "credits"}
    <meta property="og:type" content="video.movie" />
    {if:else}
    <meta property="og:type" content="website" />
    {/if} 
    
    {if layout:canonical_url}
    <meta property="og:url" content="{layout:canonical_url}" />
    {/if}

    <meta property="og:title" content="{if layout:og_title}{layout:og_title}{if:elseif layout:custom_title}{layout:custom_title}{if:else}{slogan_var}{/if}" />
    <meta property="og:site_name" content="Vurchel.com"/>

    {if layout:og_description}
    <meta property="og:description" content="{layout:og_description}" />
    {if:else}
    <meta name="description" content="{website_description_var}" />
    {/if} 
    
    {if segment_1 == "v" AND segment_2 != "credits"}
    <meta name="twitter:card" content="player" />
    {if:elseif segment_1 == "festival" OR segment_1 == "name" OR segment_1 == "company"}
    <meta name="twitter:card" content="summary" />
    {if:else}
    <meta name="twitter:card" content="summary_large_image" />
    {/if}

    <meta name="twitter:title" content="{if layout:og_title}{layout:og_title}{if:elseif layout:custom_title}{layout:custom_title}{if:else}{slogan_var}{/if}" />

    {if layout:og_description}
    <meta name="twitter:description" content="{layout:og_description}" />
    {/if} 
    
    {if layout:og_image}
    <meta property="og:image" content="{layout:og_image}" />
    <meta name="twitter:image" content="{layout:og_image}" />
    <link rel="image_src" href="{layout:og_image}" />
    {if:else}
    ...
    {/if} 
    
    {if layout:canonical_url}
    <link rel="canonical" href="{layout:canonical_url}" />
    {/if}

    {if layout:custom_meta}
    {layout:custom_meta}{value}{/layout:custom_meta}
    {/if}

    {if layout:custom_head}{layout:custom_head}{/if} 
    
    {favicons_var}

  </head>

from expressionengine.

intoeetive avatar intoeetive commented on June 6, 2024

Well, that's too complex to test. But I probably know why it's happening.

If you add this code to Template.php on line 723, it should probably fix the things for you (the final fix might be a bit different though).
$item = '';

from expressionengine.

shbchk avatar shbchk commented on June 6, 2024

Yep, the things got fixed, thank you!

from expressionengine.

intoeetive avatar intoeetive commented on June 6, 2024

@shbchk can you take the changes from #4121 and let us know if things are working correctly?

from expressionengine.

shbchk avatar shbchk commented on June 6, 2024

Done.
image

There are no warnings now and nothing seems to be broken

from expressionengine.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.