Git Product home page Git Product logo

popover-vcard's People

Contributors

buddh4 avatar felixhahnweilheim avatar humhub-bot avatar luke- avatar semir1212 avatar utmostcreator avatar yurabakhtin avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

popover-vcard's Issues

doesn't work since 1.1.2

v1.1.1 - It works!
image

v1.1.2 - Error log

#8 [internal function]: humhub\modules\popovervcard\controllers\IndexController->actionLoad()
#9 /home/ntwr3147/SITES/subdomain.domain.org/protected/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array()
#10 /home/ntwr3147/SITES/subdomain.domain.org/protected/vendor/yiisoft/yii2/base/Controller.php(178): yii\base\InlineAction->runWithParams()
#11 /home/ntwr3147/SITES/subdomain.domain.org/protected/vendor/yiisoft/yii2/base/Module.php(552): yii\base\Controller->runAction()
#12 /home/ntwr3147/SITES/subdomain.domain.org/protected/vendor/yiisoft/yii2/web/Application.php(103): yii\base\Module->runAction()
#13 /home/ntwr3147/SITES/subdomain.domain.org/protected/vendor/yiisoft/yii2/base/Application.php(384): yii\web\Application->handleRequest()
#14 /home/ntwr3147/SITES/subdomain.domain.org/index.php(25): yii\base\Application->run()
#15 {main}

v1.1.2 - Info log

$_GET = [
'r' => 'popover-vcard/index/load'
]

$_SERVER = [
'PATH' => '/usr/local/bin:/usr/bin:/bin'
'TEMP' => '/tmp'
'TMP' => '/tmp'
'TMPDIR' => '/tmp'
'PWD' => '/'
'LSCAPI_CRIU_SYNC_FD' => '7'
'HTTP_ACCEPT' => '*/*'
'HTTP_ACCEPT_LANGUAGE' => 'fr-FR,fr;q=0.9,en-US;q=0.8,en;q=0.7'
'CONTENT_TYPE' => 'application/x-www-form-urlencoded; charset=UTF-8'
'CONTENT_LENGTH' => '5'
'HTTP_COOKIE' => '_identity=a3228b8f4764bea7686ceeda01d3ba5525bcb8822940906fdc69a0c04153e2f7a%3A2%3A%7Bi%3A0%3Bs%3A9%3A%22_identity%22%3Bi%3A1%3Bs%3A46%3A%22%5B1%2C%22SIPNVj55Rfic3sD0WuFOp4bFuRSiG6ON%22%2C2592000%5D%22%3B%7D; _csrf=66cae8e7981467034c200e96ff0e1054b13b0fa5a3aa22b60429bbe33a5e42eca%3A2%3A%7Bi%3A0%3Bs%3A5%3A%22_csrf%22%3Bi%3A1%3Bs%3A32%3A%22qui_ydr-3BYZD7BEsjOoSC2BZnC0evRo%22%3B%7D; PHPSESSID=r70256rnknpp8t93bai7v9qjn7'
'HTTP_HOST' => 'subdomain.domain.org'
'HTTP_REFERER' => 'https://subdomain.domain.org/index.php?r=dashboard%2Fdashboard'
'HTTP_USER_AGENT' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36'
'HTTP_X_COUNTRY_CODE' => 'FR'
'HTTP_X_AUTONOMOUS_SYSTEM' => '12322'
'HTTP_X_FORWARDED_PROTO' => 'https'
'HTTP_X_FORWARDED_PORT' => '443'
'HTTP_X_SSL' => 'yes'
'HTTP_SEC_CH_UA' => '\"Not_A Brand\";v=\"8\", \"Chromium\";v=\"120\", \"Google Chrome\";v=\"120\"'
'HTTP_X_CSRF_TOKEN' => '5x5Q2cPKevyRNE33GLVcadUxv4r7JuxzJb8EVpREi6-WazmGuq4I0aJ2FK1cgh4splvw5ahl3jF_0Udm8TLZwA=='
'HTTP_SEC_CH_UA_MOBILE' => '?0'
'HTTP_HUMHUB_VIEW_CONTEXT' => 'dashboard'
'HTTP_X_REQUESTED_WITH' => 'XMLHttpRequest'
'HTTP_SEC_CH_UA_PLATFORM' => '\"Windows\"'
'HTTP_ORIGIN' => 'https://subdomain.domain.org'
'HTTP_SEC_FETCH_SITE' => 'same-origin'
'HTTP_SEC_FETCH_MODE' => 'cors'
'HTTP_SEC_FETCH_DEST' => 'empty'
'UNIQUE_ID' => 'ZZsBAnpmvNialHJP5G7hJAAAAko'
'HTTPS' => 'on'
'SERVER_SIGNATURE' => ''
'SERVER_SOFTWARE' => 'Apache'
'SERVER_NAME' => 'subdomain.domain.org'
'SERVER_ADDR' => '109.234.161.56'
'SERVER_PORT' => '443'
'REMOTE_ADDR' => '82.65.224.172'
'DOCUMENT_ROOT' => '/home/ntwr3147/SITES/subdomain.domain.org'
'REQUEST_SCHEME' => 'https'
'CONTEXT_PREFIX' => ''
'CONTEXT_DOCUMENT_ROOT' => '/home/ntwr3147/SITES/subdomain.domain.org'
'SERVER_ADMIN' => '[email protected]'
'SCRIPT_FILENAME' => '/home/ntwr3147/SITES/subdomain.domain.org/index.php'
'REMOTE_PORT' => '33314'
'SERVER_PROTOCOL' => 'HTTP/1.1'
'REQUEST_METHOD' => 'POST'
'QUERY_STRING' => 'r=popover-vcard%2Findex%2Fload'
'REQUEST_URI' => '/index.php?r=popover-vcard%2Findex%2Fload'
'SCRIPT_NAME' => '/index.php'
'PHP_SELF' => '/index.php'
'REQUEST_TIME_FLOAT' => 1704657154.6541
'REQUEST_TIME' => 1704657154
]

Get value of key from Select/List profile fields

I am sorry if I am just being stupid but is there any way to access the value of a key in the vcard?
My users have the possibility to select the pronouns they would like to be addressed with.

For that I added a select field with the following options:

she=>she/her/hers
he=>he/him/his
they=>they/them/theirs
ey=>ey/em/eirs
per=>per/per/pers
fae=>fae/faer/faers
ve=>ve/ver/vis
sie=>sie/sir/hirs
ve=>ve/ver/vis
xe=>xe/xem/xyrs
zie=>zie/zim/zirs

When I refer to profile.pronouns in the vcard I only get the key for example she instead of she/her/hers.

Provide example of good default markdown

It would be nice if example code or markdown was given to match the screenshot on this page

this page

e.g. Title, Phone, and E-mail pulled from contact.

After a fresh installation none of that shows by default and it's not obvious how to craft a vcard with a similar look as the screenshot on the humhub market place.

Popover view with Markdown

The module is a wonderful idea, but seems that it doesn't render the markdown syntax of the new richtext editor

Screenshot_1

Twig SecurityPolicy resulting in HTTP/500

I have been using the following twig template for a while

{% if profile.tagline %}
        <b>{{ profile.tagline|e }}</b>
{% endif %}
{% if profile.url %}
        <br>
        <a href="{{ profile.url|e }}">{{ profile.url|e }}</a>
{% endif %}
{% if profile.about %}
        <hr style="height:0px; border-style: none;color:white;">
        {{ profile.about|e }}
{% endif %}

but since upgrading to version 1.1.3 I recognized some overlays not being displayed.

The tagline url and about fields are all configured as optional (aka the checkbox for Required is unticked).

When triggering the vcard popover on user profiles that have not set either tagline or url the following HTTP/500 error gets triggered:

Exception 'Twig\Sandbox\SecurityNotAllowedMethodError' with message 'Calling "tagline" method on a "humhub\modules\user\models\Profile" object is not allowed in "__string_template__a467a3e9ae0b262d4779e45ef3cd9950" at line 1.' 

in /var/www/localhost/htdocs/protected/vendor/twig/twig/src/Sandbox/SecurityPolicy.php:106

Stack trace:
#0 /var/www/localhost/htdocs/protected/vendor/twig/twig/src/Extension/SandboxExtension.php(84): Twig\Sandbox\SecurityPolicy->checkMethodAllowed()
#1 /var/www/localhost/htdocs/protected/vendor/twig/twig/src/Extension/CoreExtension.php(1629): Twig\Extension\SandboxExtension->checkMethodAllowed()
#2 /var/www/localhost/htdocs/protected/vendor/twig/twig/src/Environment.php(361) : eval()'d code(39): twig_get_attribute()
#3 /var/www/localhost/htdocs/protected/vendor/twig/twig/src/Template.php(394): __TwigTemplate_88fa12bd176cd8ff3b3b090bcac31915->doDisplay()
#4 /var/www/localhost/htdocs/protected/vendor/twig/twig/src/Template.php(367): Twig\Template->displayWithErrorHandling()
#5 /var/www/localhost/htdocs/protected/vendor/twig/twig/src/Template.php(379): Twig\Template->display()
#6 /var/www/localhost/htdocs/protected/vendor/twig/twig/src/TemplateWrapper.php(40): Twig\Template->render()
#7 /var/www/localhost/htdocs/protected/modules/popover-vcard/widgets/VCardUser.php(43): Twig\TemplateWrapper->render()
#8 /var/www/localhost/htdocs/protected/humhub/components/Widget.php(63): humhub\modules\popovervcard\widgets\VCardUser->run()
#9 /var/www/localhost/htdocs/protected/modules/popover-vcard/controllers/IndexController.php(64): humhub\components\Widget::widget()
#10 [internal function]: humhub\modules\popovervcard\controllers\IndexController->actionLoad()
#11 /var/www/localhost/htdocs/protected/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array()
#12 /var/www/localhost/htdocs/protected/vendor/yiisoft/yii2/base/Controller.php(178): yii\base\InlineAction->runWithParams()
#13 /var/www/localhost/htdocs/protected/vendor/yiisoft/yii2/base/Module.php(552): yii\base\Controller->runAction()
#14 /var/www/localhost/htdocs/protected/vendor/yiisoft/yii2/web/Application.php(103): yii\base\Module->runAction()
#15 /var/www/localhost/htdocs/protected/vendor/yiisoft/yii2/base/Application.php(384): yii\web\Application->handleRequest()
#16 /var/www/localhost/htdocs/index.php(25): yii\base\Application->run()
#17 {main}

The error is not triggered for empty about fields.

Workaround

This issue was introduced in 9077f70 and/ or 4bca07f,
commenting https://github.com/humhub-contrib/popover-vcard/blob/master/widgets/VCardUser.php#L37 is a workaround.

Another workaround is adding the fields tagline and url to [Profile::class => 'about'], which IMO defeats the purpose of being able to configure the popover via twig.

Additional comments

For my use-case limiting the twig filters to escape only makes my code more complex. E.g. the line for creating a link could be simplified with the format filter and I would love to have access to filters like trim.
I'm not sure this could be best implemented, but the current limit in the twig SecurityPolicy makes the module almost unusable beyond the configuration it is shipped with.

Vcard Popover css breaks tour css

What steps will reproduce the problem?

Start a tour with addon Vcard popover installed. The tour popup has no margins.
What is the expected result?

Popup with margins

| HumHub version | 1.3.4
| PHP version 7.2
| Operating system Linux

Details:
In popover.css: line 58
.popover-content {
padding: 0px !important; <-- should not use !important, make it popover specific.
}
breaks the padding in theme.css line 1
.popover .popover-content {
font-size: 13px;
padding: 5px 15px;
color: #555;
}

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.