Site Views - Public Access Not Working #235

Closed
opened 2018-02-22 21:00:30 +00:00 by mwweb · 2 comments
mwweb commented 2018-02-22 21:00:30 +00:00 (Migrated from github.com)

Steps to reproduce the issue

Somewhere along the way with different changes, the "Public Access" option on component site views has stopped working.

To replicated, go to JBC --> Components --> Demo component --> Component Site Views. Check the option for a site view for Public Access, then save and close.

Compile the Demo Component, and do a fresh install of the component.

Check the component options --> permissions tab. The site views are still set to not allowed.

Expected result

Upon compile and install, site views with "Public Access" should have the permissions for the component set to allowed.

Actual result

The Public Access switch isn't doing anything. All site permissions are remaining as Not Allowed.

System information (as much as possible)

  • OS Name & Version: Ubuntu 14.04
  • MySql Version: 10.1.28-MariaDB-1~trusty
  • Apache Version: Apache/2.4.29 (Ubuntu)
  • PHP Version: PHP 7.1.11-1+ubuntu14.04.1+deb.sury.org+1
  • Joomla Version: 3.8.5
  • JCB Version: 2.6.16
  • Browser: Firefox 58.0.2

Additional comments

### Steps to reproduce the issue Somewhere along the way with different changes, the "Public Access" option on component site views has stopped working. To replicated, go to JBC --> Components --> Demo component --> Component Site Views. Check the option for a site view for Public Access, then save and close. Compile the Demo Component, and do a fresh install of the component. Check the component options --> permissions tab. The site views are still set to not allowed. ### Expected result Upon compile and install, site views with "Public Access" should have the permissions for the component set to allowed. ### Actual result The Public Access switch isn't doing anything. All site permissions are remaining as Not Allowed. ### System information (as much as possible) - OS Name & Version: Ubuntu 14.04 - MySql Version: 10.1.28-MariaDB-1~trusty - Apache Version: Apache/2.4.29 (Ubuntu) - PHP Version: PHP 7.1.11-1+ubuntu14.04.1+deb.sury.org+1 - Joomla Version: 3.8.5 - JCB Version: 2.6.16 - Browser: Firefox 58.0.2 ### Additional comments

Okay found it, we change a field name and did not update the compiler.

So on line 14407 please change:

if (isset($site_view['public']) && $site_view['public'] == 1)

To:

if (isset($site_view['public_access']) && $site_view['public_access'] == 1)

This should resolve the issue, I will add the fix to the next update. Once you have compiled your component you should find a comment line in the script.php file that says:

// Install the global extenstion assets permission.

Let me know if it does not work.

Okay found it, we change a field name and did not update the compiler. So on [line 14407](https://github.com/vdm-io/Joomla-Component-Builder/blob/master/admin/helpers/compiler/e_Interpretation.php#L14407) please change: ``` if (isset($site_view['public']) && $site_view['public'] == 1) ``` To: ``` if (isset($site_view['public_access']) && $site_view['public_access'] == 1) ``` This should resolve the issue, I will add the fix to the next update. Once you have compiled your component you should find a comment line in the script.php file that says: ``` // Install the global extenstion assets permission. ``` Let me know if it does not work.
mwweb commented 2018-02-23 09:15:49 +00:00 (Migrated from github.com)

That looks to have resolved it.

That looks to have resolved it.
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: joomla/Component-Builder#235
No description provided.