Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Load assets not specified protocol #160

Closed
nWidart opened this issue May 21, 2015 · 15 comments
Closed

Load assets not specified protocol #160

nWidart opened this issue May 21, 2015 · 15 comments

Comments

@nWidart
Copy link
Member

nWidart commented May 21, 2015

Hello,

Could you please load assets without specifying http://, for instance:

Example:

Module::asset(''core:js/keypressAction.js)

Don't load:

<script src="http://asgardcms.dev/modules/core/js/keypressAction.js" type="text/javascript"></script>

but:

<script src="//asgardcms.dev/modules/core/js/keypressAction.js" type="text/javascript"></script>

This will load the asset to the current protocol, either http or https.

You could also provide an optional argument, in addition to loading assets over //, to set secure true or false.

Thanks!

(This is pretty important since loading the site over https will fail because of this issue)

@nWidart
Copy link
Member Author

nWidart commented May 21, 2015

I just saw there is a secure = false argument to the Asset:: helper.
Maybe there's a way of making this // by default.
I know https://github.com/floatingpointsoftware/stylist does this, their assets are loading using //asset/asset.css

gravitano pushed a commit that referenced this issue May 22, 2015
@nWidart
Copy link
Member Author

nWidart commented May 22, 2015

I updated the package, using "pingpong/modules": "~2.0", , instead of the previous 2.0.*@dev one.

After update, I'm getting:

[Symfony\Component\Debug\Exception\FatalErrorException]  
  Class 'Pingpong\Support\Stub' not found                  

The full stacktrace:

[22-May-2015 06:01:02 UTC] PHP Fatal error:  Class 'Pingpong\Support\Stub' not found in /Users/nicolaswidart/Sites/Asguard/presentation-site/vendor/pingpong/modules/ModulesServiceProvider.php on line 48
[22-May-2015 06:01:02 UTC] PHP Stack trace:
[22-May-2015 06:01:02 UTC] PHP   1. {main}() /Users/nicolaswidart/Sites/Asguard/presentation-site/artisan:0
[22-May-2015 06:01:02 UTC] PHP   2. Illuminate\Foundation\Console\Kernel->handle() /Users/nicolaswidart/Sites/Asguard/presentation-site/artisan:36
[22-May-2015 06:01:02 UTC] PHP   3. Illuminate\Foundation\Console\Kernel->bootstrap() /Users/nicolaswidart/Sites/Asguard/presentation-site/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:92
[22-May-2015 06:01:02 UTC] PHP   4. Illuminate\Foundation\Application->bootstrapWith() /Users/nicolaswidart/Sites/Asguard/presentation-site/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:195
[22-May-2015 06:01:02 UTC] PHP   5. Illuminate\Foundation\Bootstrap\BootProviders->bootstrap() /Users/nicolaswidart/Sites/Asguard/presentation-site/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:183
[22-May-2015 06:01:02 UTC] PHP   6. Illuminate\Foundation\Application->boot() /Users/nicolaswidart/Sites/Asguard/presentation-site/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/BootProviders.php:15
[22-May-2015 06:01:02 UTC] PHP   7. Illuminate\Foundation\Application->fireAppCallbacks() /Users/nicolaswidart/Sites/Asguard/presentation-site/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:690
[22-May-2015 06:01:02 UTC] PHP   8. call_user_func:{/Users/nicolaswidart/Sites/Asguard/presentation-site/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:862}() /Users/nicolaswidart/Sites/Asguard/presentation-site/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:862
[22-May-2015 06:01:02 UTC] PHP   9. Pingpong\Modules\ModulesServiceProvider->Pingpong\Modules\{closure}() /Users/nicolaswidart/Sites/Asguard/presentation-site/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:862

@nWidart
Copy link
Member Author

nWidart commented May 22, 2015

When I try to go back to the @dev version, I'm getting

Nothing to install or update
Writing lock file
Generating autoload files

Plus the error mentioned above.

@gravitano
Copy link
Member

Which version are you use ?

@nWidart
Copy link
Member Author

nWidart commented May 22, 2015

~2.0 and 2.0.*@dev both have this issue.

@gravitano
Copy link
Member

Hmm.. Make sure get version 2.0.7 (the latest version). You can see in version 2.0.7 I've added pingpong/support to the require block https://github.com/pingpong-labs/modules/blob/2.0.7/composer.json#L22.

@nWidart
Copy link
Member Author

nWidart commented May 22, 2015

I am on version 2.0.7...

screen shot 2015-05-22 at 8 23 35 am

I just removed the vendor folder, to be sure nothing is in cache, ran a new composer update, and I'm still getting this error.

When looking at the ModulesServiceProvider, Pingpong\Support\Stub does not exist.

@nWidart
Copy link
Member Author

nWidart commented May 22, 2015

Also, when I check pingpong/support, I don't see that Stub class.

screen shot 2015-05-22 at 8 28 01 am

@nWidart
Copy link
Member Author

nWidart commented May 22, 2015

I see version 2.0.3 of pingpong/support is installed, which doesn't have that stub class: https://github.com/pingpong-labs/support/tree/2.0.3

@nWidart
Copy link
Member Author

nWidart commented May 22, 2015

I now manually added "pingpong/support": "~2.0", to the main composer.json file, so that it's gets the 2.0.6 version, and that seems to work.

But I shouldn't have to add it myself though.

@nWidart
Copy link
Member Author

nWidart commented May 22, 2015

Using 2.0.*@dev I cannot seem to get your change of today though, concernant the // protocol of assets.

@gravitano
Copy link
Member

Just tagged this package to new version 2.0.8. Try upgrade.

@nWidart
Copy link
Member Author

nWidart commented May 22, 2015

okay thanks. Do I still need to explicitly specify "pingpong/support": "~2.0", in my composer.json file ?

@gravitano
Copy link
Member

No. pingpong/support has been included (require) by pingpong/modules package.

@nWidart
Copy link
Member Author

nWidart commented May 22, 2015

Okay, I removed pingpong/support from vendor folder to be sure it's included, though I still get

 [Symfony\Component\Debug\Exception\FatalErrorException]  
  Class 'Pingpong\Support\Stub' not found 

Again, when I add "pingpong/support": "~2.0", manually in my composer.json file, then and only then, it works.

gravitano pushed a commit to pingpong-labs/sky that referenced this issue May 27, 2015
73fe515 wrap getter property
c8fa2d8 fix typo
7815fc4 extract process logic to getProcess method
8eb218c Fix install module from repository class
fac1d35 Added missing doc
ea1433f Fix pingpong-labs/modules#160
0601e2e Fix pingpong-labs/modules#159
419481e update title
b2306cd Use Stub class from pingpong/support package
f65d04b Added new feature: allow to install modules from 'modules.json' file
e7b4e01 install require dependencies automatically after running module:install command
825b15d Allow to set process timeout
b301a7d CS Fixes
77146fa trim back slash
8b583c5 improved module:make-model command
116d67a improved module:make-provider command
c874240 improved module:make-command command
0850c75 improved module:make-middleware command
9dd31f6 improved module:make-request command
ab00280 move getClass & getClassNamespace method to GeneratorCommand
148d2db allow to append class namespace when creating controller with subdirectory
7460a31 fix generated class name
88fe867 fix wrong variable
53f41f7 allow to create sub directory automatically. fix pingpong-labs/modules#157.
2041b0d PSR-2

git-subtree-dir: src/Pingpong/Modules
git-subtree-split: 73fe5156d6de24955c405150647513e54ee85fac
gravitano pushed a commit to pingpong-labs/sky that referenced this issue Jun 3, 2015
d71fd39 use dev version
843b59a Update header
2a65ce1 Merge branch 2.0
49d1a50 Merge branch '2.0' into 2.1
690a5d6 set minimum stability to dev
b16615c Added support for Laravel 5.1 (develop version). Ref: pingpong-labs/modules#151
REVERT: fca0fea Fix pingpong-labs/modules#164
REVERT: 73fe515 wrap getter property
REVERT: c8fa2d8 fix typo
REVERT: 7815fc4 extract process logic to getProcess method
REVERT: 8eb218c Fix install module from repository class
REVERT: fac1d35 Added missing doc
REVERT: ea1433f Fix pingpong-labs/modules#160
REVERT: 0601e2e Fix pingpong-labs/modules#159
REVERT: 419481e update title

git-subtree-dir: src/Pingpong/Modules
git-subtree-split: d71fd39a0efdca45ee9e0ebb44a75bdef0361cf3
gravitano pushed a commit to pingpong-labs/sky that referenced this issue Jun 14, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants