Jump to content

pmichaelis

Members
  • Posts

    79
  • Joined

  • Last visited

About pmichaelis

  • Birthday 05/23/1978

Profile Information

  • Gender
    Male

Recent Profile Visitors

3,966 profile views

pmichaelis's Achievements

Sr. Member

Sr. Member (5/6)

41

Reputation

1

Community Answers

  1. Hey, there is a deprecation notice when running php 8.3 🥸 Deprecated: Calling get_class() without arguments is deprecated in .../cache/FileCompiler/site/modules/InputfieldAceExtended/InputfieldAceExtended.module on line 499 The error "Deprecated: Calling get_class() without arguments is deprecated" occurs when using PHP 8.3 or later to call the get_class() function without providing an argument. This is because the function's arguments are now required. Call get_called_class(), which works similarly to get_class() but doesn't require arguments. public static function getStatic($name) { $class = get_called_class(); return isset($class::$$name) ? $class::$$name : array(); }
  2. Hey, I have made an adjustment to the output of the hreflang tags in getCommonMetatags() On news pages with pagination, only the url of the page is currently output as hreflang. As I understand it, the url segment of the pagination should also be appended to the hreflang tags so that the correct translation pages are referenced. The attached change works for me. Is my assumption correct? If so, what is the correct procedure here? Should I make a pull request? /** * Build common metatags not configured via fieldtype. * * @return array */ private function getCommonMetatags() { $baseUrl = $this->seoMaestro->get('baseUrl'); $defaultLang = $this->seoMaestro->get('defaultLanguage') ?: 'en'; $hasLanguageSupportPageNames = $this->wire('modules')->isInstalled('LanguageSupportPageNames'); $tags = ['meta_generator' => '<meta name="generator" content="ProcessWire">']; if ($hasLanguageSupportPageNames) { # page number & prefixes $pageNum = $this->wire('input')->pageNum(); $prefixes = $this->config->pageNumUrlPrefixes; foreach ($this->wire('languages') ?: [] as $language) { if (!$this->page->viewable($language)) { continue; } $code = $language->isDefault() ? $defaultLang : $language->name; $url = $baseUrl ? $baseUrl . $this->page->localUrl($language) : $this->page->localHttpUrl($language); # add pagination segment if ($pageNum > 1) { $prefix = isset($prefixes[$code]) ? $prefixes[$code] : $prefixes['default']; $pageSegment = $prefix . $pageNum; $url = rtrim($url, '/') . '/' . $pageSegment . '/'; } $tags["link_rel_{$code}"] = sprintf('<link rel="alternate" href="%s" hreflang="%s">', $url, $code); if ($language->isDefault()) { $tags['link_rel_default'] = sprintf('<link rel="alternate" href="%s" hreflang="x-default">', $url); } } } return $tags; } Kind regards & many thanks
  3. I could have just used that. Thanks for the information.
  4. Hey, is this feature already in the master branch? Thanks for help
  5. In a multilingual environment I get the following error, wehen sorting menu-items TypeError method_exists(): Argument #1 ($object_or_class) must be of type object|string, null given File: .../modules/MarkupMenuBuilder/ProcessMenuBuilder.module:2602 2602: if($language != null && method_exists($pages->get($itemID)->title, 'getLanguageValue')) $itemTitle = $pages->get($itemID)->title->getLanguageValue($language);// title of each PW page in this array This works for me: // multilingual environments if($language != null && $itemID && method_exists($pages->get($itemID)->title, 'getLanguageValue')) $itemTitle = $pages->get($itemID)->title->getLanguageValue($language);// title of each PW page in this array
  6. hm, there seems to be an error in the latest main branch with PW 3.0.18 ProcessWire\FrontendForms::cleanUpPasswordList(): Argument #1 ($data) must be of type array|string, null given, called in /var/www/html/site/modules/FrontendForms/FrontendForms.module on line 699 search►
  7. Ahh! There it is. Thank you! Maybe you should also integrate it here: https://github.com/juergenweb/FrontendForms/blob/main/Examples/inputfieldexamples.php
  8. Hello @Juergen, is there an example for a file field? In need to upload files via frontend forms, but I could not find anything in the repository. Thanks for Help
  9. Hello @torf, I pushed an update a minute ago. Please have a look, if the issue is resolved. Happy new year.
  10. hej, is it possible to hook into pageViewTracked from ready.php? I tried the following, but since I am not so familiar with hooks, it is not working out. wire()->addHookAfter('PageHitCounter::pageViewTracked', function($pageID) { $page = wire('pages')->get($pageID); ... } Thanks for any help.
  11. Hey Bernhard, Weird! thanks for bug-reporting. I'll update the repository!
  12. Hey everybody, I just uploaded a small textformatter module for wrapping tables with a div container in order to display responsive HTML tables in the frontend. TextformatterWrapTable Processwire wrap table module is a textformatter module for processwire CMS/CMF. It is wrapping markup tables with a div container. wrapping tables with div container simplifies the process of displaying responsive tables in the frontend. The css classes for the wrapper and the table are configurable. .table-responsive / .table by default the module produces the following markup: <div class="table-responsive"> <table class="table"> ... </table> </div> Link to Repository https://github.com/pmichaelis/TextformatterWrapTable
  13. Hi, i wanted to test the module. Is there still a namespacing issue? Error: Class 'ProcessWire\HtmlExporter' not found in /home/vagrant/web/pw-static/web/site/modules/StaticWire/StaticWire.module.php on line 41 thanks for help
  14. Hey Thomas, first of all: thanks for your all the effort you put into the RestApi Module. I've seen the AppApi Module recently and I think it would be good to focus on it. keep it up.
×
×
  • Create New...