Skip to content

Template resource locator troubles when app code exists twice #29628

Closed

Description

@PVince81

Steps

  1. Setup ownCloud with two apps folders "apps" and "apps2"
  2. Install "customgroups" app version 0.3.1 into "apps"
  3. Install "customgroups" app version 0.3.5 into "apps2"
  4. occ app:enable customgroups
  5. Go to the "Custom groups" sections in the settings page
  6. Inspect the customgroups "section" element

Expected result

Section element looks like this: <div id="customgroups" class="section" data-cancreategroups="true">

Actual result

Section element looks like this: <div id="customgroups" class="section">.

If you check the template file "customgroups/templates/index.php" you can see that the additional bit data-cancreategroups exists in the 0.3.5 template but not 0.3.1.
It looks like ownCloud is running the 0.3.5 version app but loads the template from 0.3.1. And who knows if it's not loading other resources from there, to be checked!

You can also run the unit tests with make test-php inside the 0.3.5 version, the output shows the same problem:

1) OCA\CustomGroups\Tests\unit\SettingsPanelTest::testGetPanel
Failed asserting that '
<div id="customgroups" class="section"></div>
' contains "<div id="customgroups" class="section" data-cancreategroups="true"></div>".

/srv/www/htdocs/owncloud/apps3/customgroups/tests/unit/SettingsPanelTest.php:50
/srv/www/htdocs/owncloud/apps3/customgroups/lib/composer/phpunit/phpunit/src/TextUI/Command.php:188
/srv/www/htdocs/owncloud/apps3/customgroups/lib/composer/phpunit/phpunit/src/TextUI/Command.php:118

2) OCA\CustomGroups\Tests\unit\SettingsPanelTest::testGetPanelNoCreatePerm
Failed asserting that '
<div id="customgroups" class="section"></div>
' contains "<div id="customgroups" class="section" data-cancreategroups="false"></div>".

Activity

  1. added
    p2-high
    on Nov 20, 2017
  2. modified the milestones: , development on Nov 20, 2017
  3. VicDeo commented on Dec 8, 2017

    @VicDeo
    Contributor

    @PVince81 #29747 partially fixes that (for templates)

  4. VicDeo commented on Dec 8, 2017

    @VicDeo
    Contributor

    hm. I can see <div id="customgroups" class="section" data-cancreategroups="true"> in WebUI but CLI test still fails

  5. lock commented on Aug 2, 2019

    @lock

    This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

  6. locked as resolved and limited conversation to collaborators on Aug 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type:Bugcomp:appsp2-high

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions