solved A bit odd

Dazed
Dazed
@dazed
7 years ago
1,022 posts
I noticed tonight that all of my audio quota song limits had been reset to a default of "0". I am not sure what would have caused that? I changed them back to the correct settings but around that same time in my activity log I had a bunch of these:

[Admin] jrCore_create_page_element: required element type not received - verify usage

Just wanted to give you guys a heads up.
updated by @dazed: 05/05/17 07:42:41AM
michael
@michael
7 years ago
7,718 posts
only thing I can see that could trigger that warning "...jrCore_create_page_element...." in the audio module is this function:

jrAudio_form_field_audio_display()

Which is fired when an audio form field has been added via the Form Designer. Have you added any audio type Form Designer fields to anywhere?

if yes, my guess is its related to the settings in that form.
Dazed
Dazed
@dazed
7 years ago
1,022 posts
Hey MIchael. Everything in there was the same from JR5. I have not made any updates since then. Everything seems ok though but I wanted to bring it up. I ran some additional tests like changing the song quantity and various fields and saving/resetting cache but no errors thrown.
Dazed
Dazed
@dazed
7 years ago
1,022 posts
Quick question on this one. I had an artist who signed up and uploaded several tracks due to this. Once I fixed the error in the quota, it used to be that only the Max Number of Items from the quota would display on the profile page except to the admin. Right now logged out I see greater than the default number of allowed songs for the quota. So if the quota says 5, if the user had 30 songs uploaded, only 5 would display however I see 30 logged out.

My concern here is also people who signup for subscriptions and then revert back to a basic account. We should only display what is allowed in the quota.

I am using the below to overwrite the module audio. I did not see anything here that stood out as an issue. Am I missing something?


jrAudio_item_index.tpl

{jrCore_module_url module="jrAudio" assign="murl"}
{if isset($_items)}

    {foreach from=$_items item="item"}

    <div class="item">
        <div class="container">
            <div class="row">

                <div class="col2">
                    <div class="block_image" style="position:relative">
                        <a href="{$jamroom_url}/{$item.profile_url}/{$murl}/{$item._item_id}/{$item.audio_title_url}">{jrCore_module_function function="jrImage_display" module="jrAudio" type="audio_image" item_id=$item._item_id size="xlarge" crop="auto" class="iloutline img_scale" alt=$item.audio_title width=false height=false}</a>
                        <div style="position:absolute;bottom:8px;right:5px">
                            {if $item.audio_active == 'on' && $item.audio_file_extension == 'mp3'}
                                {jrCore_media_player type="jrAudio_button" module="jrAudio" field="audio_file" item=$item}
                            {else}
                                 
                            {/if}
                        </div>
                    </div>
                </div>

                <div class="col7">
                    <div class="p5" style="overflow-wrap:break-word">
                        <h2><a href="{$jamroom_url}/{$item.profile_url}/{$murl}/{$item._item_id}/{$item.audio_title_url}">{$item.audio_title}</a></h2><br>
                        <span class="info">{jrCore_lang module="jrAudio" id="31" default="album"}:</span> <span class="info_c"><a href="{$jamroom_url}/{$item.profile_url}/{$murl}/albums/{$item.audio_album_url}">{$item.audio_album}</a></span><br>
                        <span class="info">{jrCore_lang module="jrAudio" id="12" default="genre"}:</span> <span class="info_c">{$item.audio_genre}</span><br>
                        {jrCore_module_function function="jrRating_form" type="star" module="jrAudio" index="1" item_id=$item._item_id current=$item.audio_rating_1_average_count|default:0 votes=$item.audio_rating_1_count|default:0}
                    </div>
                </div>

                <div class="col3 last">
                    <div class="block_config">
					{if $item.audio_dj_download == 'on' && (jrUser_is_admin() || (jrUser_is_logged_in() && $_user.profile_quota_id == $_conf.paDJDownload_dj_quota))}
		<div class="add_to_cart_section" title="DJ Download"><span class="add_to_cart_price">Mix DJ</span><a href="{$_conf['jrCore_base_url']}/audio/djdownload/audio_file/{$item._item_id}">{jrCore_icon icon="download" }</a></div>
		{/if}
			    <a href="{$jamroom_url}/{$item.profile_url}/{$murl}/{$item._item_id}/{$item.audio_title_url}" title="Review Song">{jrCore_icon icon="pen"}</a>
                            {if isset($item.audio_file_item_price) && $item.audio_file_item_price > 0}
                                {jrCore_module_function function="jrFoxyCart_add_to_cart" module="jrAudio" field="audio_file" item=$item}
                            {elseif $_conf.jrAudio_block_download != 'on' &&  $item.audio_downloadable == 'on'|| $item.audio_file_item_price == '0'}
                                <div class="add_to_cart_section" title="Free Download"><span class="add_to_cart_price">Free</span><a href="{$jamroom_url}/{$murl}/download/audio_file/{$item._item_id}">{jrCore_icon icon="download"}</a></div>
                            {/if}
							{jrCore_item_update_button module="jrAudio" profile_id=$item._profile_id item_id=$item._item_id}
                            {jrCore_module_function function="jrPlaylist_button" playlist_for="jrAudio" item_id=$item._item_id}

								 {jrCore_item_delete_button module="jrAudio" profile_id=$item._profile_id item_id=$item._item_id}
                        
					
					</div>
                </div>

            </div>
        </div>
    </div>

    {/foreach}

{/if}

updated by @dazed: 01/18/17 05:43:38AM
michael
@michael
7 years ago
7,718 posts
I'll go check the default code, because I think thats how it should work too. Better to get that working that debug workaround code.
Dazed
Dazed
@dazed
7 years ago
1,022 posts
Let me know if you want login info.
brian
@brian
7 years ago
10,148 posts
Yeah this should be automatic. Note that until cache's reset you may see the OLD amount until thew NEW amount kicks in, but I believe it automatically limits the items to X of the most recent.


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
michael
@michael
7 years ago
7,718 posts
Can replicate the issue.

I uploaded 4 audio files by the admin to their home profile while audio was set to unlimited. Then changed the "Max Items" to 2. Ran the integrity check and reset caches, then viewed the profile by a logged out user expecting to see 2 items. All items are visible.

Will try more tests with non-admin user.
Dazed
Dazed
@dazed
7 years ago
1,022 posts
Thanks Michael for looking into it.
brian
@brian
7 years ago
10,148 posts
Yeah to be honest this is not something that has been looked at in a very long time - I _think_ it worked like JR4 at one point, and ideally it works like that going forward. We'll check it out and see what is up.


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
Dazed
Dazed
@dazed
7 years ago
1,022 posts
Hey Brian - It worked like that in JR5 also. I think I have emails with you on this topic discussing this. I remember I had a concern because I could see all the songs and you mentioned the admin and user would see them logged in but any other user, logged in or not, would only see the number allowed by the quota.

We want to encourage subscriptions because it helps cover our expenses.

Additionally I would love to see a module created that would do something like email the user and say, "Your subscription expired "x" number of days ago. Please renew your subscription within "x" number of days to retain all songs and comments. Your account allows for "x" number of free songs. All songs over this amount will be deleted in "x" number of days.

Then send a reminder a day or two before we delete.

This just helps keep our severs clean and we reduce hard drive space for hidden songs.
Dazed
Dazed
@dazed
7 years ago
1,022 posts
Just a follow up on this issue to see where you are at.

Thanks,
Todd
michael
@michael
7 years ago
7,718 posts
should be fixed up in jrProfile v 1.6.0

if you go here:
http://yoursite.com/profile/admin/quota/hl=cap_type#ff-cap_type

you will see a quota limit type option
Quote:
The Quota Limit Type setting affects how items are shown on a Profile when a profile matches or exceeds the number of items allowed by their quota.

SOFT: All items are viewable on the profile but the profile owners will no longer be able to add any new items until the number of items falls below the amount allowed in their quota.

HARD: Items that exceed the number allowed in the quota will only be visible to admin users and profile owners. All other users will see a notification that the profile has exceeded the number if items allowed.
Default: Soft Limit on Items
Dazed
Dazed
@dazed
7 years ago
1,022 posts
Perfect thanks Michael. You guys are awesome.